summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-gfx
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/DFBPoint/DFBPoint-0.7.2.ebuild42
-rw-r--r--media-gfx/DFBPoint/Manifest1
-rw-r--r--media-gfx/DFBPoint/metadata.xml8
-rw-r--r--media-gfx/aaphoto/Manifest1
-rw-r--r--media-gfx/aaphoto/aaphoto-0.43.1.ebuild32
-rw-r--r--media-gfx/aaphoto/metadata.xml13
-rw-r--r--media-gfx/aewan/Manifest1
-rw-r--r--media-gfx/aewan/aewan-1.0.01-r1.ebuild29
-rw-r--r--media-gfx/aewan/files/aewan-1.0.01-debug_aewl-warnings.patch10
-rw-r--r--media-gfx/aewan/files/aewan-1.0.01-tinfo.patch15
-rw-r--r--media-gfx/aewan/metadata.xml20
-rw-r--r--media-gfx/album/Manifest3
-rw-r--r--media-gfx/album/album-4.07.ebuild40
-rw-r--r--media-gfx/album/album-4.13.ebuild40
-rw-r--r--media-gfx/album/metadata.xml9
-rw-r--r--media-gfx/aoi/Manifest4
-rw-r--r--media-gfx/aoi/aoi-2.5.ebuild49
-rw-r--r--media-gfx/aoi/aoi-2.7.2.ebuild50
-rw-r--r--media-gfx/aoi/files/aoi31
-rw-r--r--media-gfx/aoi/metadata.xml8
-rw-r--r--media-gfx/apng2gif/Manifest3
-rw-r--r--media-gfx/apng2gif/apng2gif-1.4.ebuild31
-rw-r--r--media-gfx/apng2gif/apng2gif-1.5.ebuild31
-rw-r--r--media-gfx/apng2gif/apng2gif-1.6.ebuild35
-rw-r--r--media-gfx/apng2gif/files/apng2gif-1.6-gcc-4.3.patch10
-rw-r--r--media-gfx/apng2gif/files/apng2gif-1.6-makefile.patch17
-rw-r--r--media-gfx/apng2gif/metadata.xml8
-rw-r--r--media-gfx/apngasm/Manifest3
-rw-r--r--media-gfx/apngasm/apngasm-2.5.ebuild33
-rw-r--r--media-gfx/apngasm/apngasm-2.6.ebuild33
-rw-r--r--media-gfx/apngasm/apngasm-2.7.ebuild37
-rw-r--r--media-gfx/apngasm/files/apngasm-2.7-string_h.patch16
-rw-r--r--media-gfx/apngasm/metadata.xml8
-rw-r--r--media-gfx/apngdis/Manifest1
-rw-r--r--media-gfx/apngdis/apngdis-2.7.ebuild35
-rw-r--r--media-gfx/apngdis/files/apngdis-2.6-gcc-4.3.patch10
-rw-r--r--media-gfx/apngdis/files/apngdis-2.6-makefile.patch17
-rw-r--r--media-gfx/apngdis/metadata.xml8
-rw-r--r--media-gfx/apngopt/Manifest1
-rw-r--r--media-gfx/apngopt/apngopt-1.2.ebuild32
-rw-r--r--media-gfx/apngopt/metadata.xml8
-rw-r--r--media-gfx/aqsis/Manifest1
-rw-r--r--media-gfx/aqsis/aqsis-1.8.2.ebuild58
-rw-r--r--media-gfx/aqsis/files/aqsis-1.8.2-openexr-compat.patch15
-rw-r--r--media-gfx/aqsis/files/aqsis-1.8.2-unbundle-tinyxml.patch57
-rw-r--r--media-gfx/aqsis/metadata.xml8
-rw-r--r--media-gfx/argyllcms/Manifest5
-rw-r--r--media-gfx/argyllcms/argyllcms-1.4.0-r1.ebuild85
-rw-r--r--media-gfx/argyllcms/argyllcms-1.4.0-r2.ebuild93
-rw-r--r--media-gfx/argyllcms/argyllcms-1.5.1.ebuild92
-rw-r--r--media-gfx/argyllcms/argyllcms-1.6.2.ebuild91
-rw-r--r--media-gfx/argyllcms/argyllcms-1.6.3-r1.ebuild92
-rw-r--r--media-gfx/argyllcms/argyllcms-1.6.3.ebuild91
-rw-r--r--media-gfx/argyllcms/argyllcms-1.7.0.ebuild91
-rw-r--r--media-gfx/argyllcms/files/argyllcms-1.4.0-CVE-2012-4405.patch18
-rw-r--r--media-gfx/argyllcms/files/argyllcms-1.4.0-jpeg.patch21
-rw-r--r--media-gfx/argyllcms/files/argyllcms-1.6.3-usb-db.patch12
-rw-r--r--media-gfx/argyllcms/metadata.xml8
-rw-r--r--media-gfx/arss/Manifest1
-rw-r--r--media-gfx/arss/arss-0.2.3.ebuild25
-rw-r--r--media-gfx/arss/metadata.xml10
-rw-r--r--media-gfx/asymptote/Manifest2
-rw-r--r--media-gfx/asymptote/asymptote-2.21.ebuild205
-rw-r--r--media-gfx/asymptote/asymptote-2.32.ebuild214
-rw-r--r--media-gfx/asymptote/files/64asymptote-gentoo.el9
-rw-r--r--media-gfx/asymptote/files/asy-ftd.vim2
-rw-r--r--media-gfx/asymptote/files/asymptote-2.21-configure-ac.patch32
-rw-r--r--media-gfx/asymptote/files/asymptote-2.21-info.patch13
-rw-r--r--media-gfx/asymptote/files/asymptote-2.21-xdg-utils.patch22
-rw-r--r--media-gfx/asymptote/files/asymptote-2.27-configure-ac.patch32
-rw-r--r--media-gfx/asymptote/files/asymptote-2.27-info.patch13
-rw-r--r--media-gfx/asymptote/files/asymptote-2.27-xdg-utils.patch23
-rw-r--r--media-gfx/asymptote/files/asymptote-2.32-configure-ac.patch32
-rw-r--r--media-gfx/asymptote/files/asymptote-2.32-ghostscript-9.15.patch24
-rw-r--r--media-gfx/asymptote/files/asymptote-2.32-info.patch13
-rw-r--r--media-gfx/asymptote/files/asymptote-2.32-xdg-utils.patch23
-rw-r--r--media-gfx/asymptote/metadata.xml32
-rw-r--r--media-gfx/autopano-sift-C/Manifest1
-rw-r--r--media-gfx/autopano-sift-C/autopano-sift-C-2.5.1.ebuild31
-rw-r--r--media-gfx/autopano-sift-C/files/autopano-sift-C-2.5.1-lm.patch14
-rw-r--r--media-gfx/autopano-sift-C/metadata.xml10
-rw-r--r--media-gfx/autotrace/Manifest2
-rw-r--r--media-gfx/autotrace/autotrace-0.31.1-r6.ebuild58
-rw-r--r--media-gfx/autotrace/files/autotrace-0.31.1-GetOnePixel.patch16
-rw-r--r--media-gfx/autotrace/files/autotrace-0.31.1-bool.patch12
-rw-r--r--media-gfx/autotrace/files/autotrace-0.31.1-libpng-1.5.patch64
-rw-r--r--media-gfx/autotrace/files/autotrace-0.31.1-libpng14.patch17
-rw-r--r--media-gfx/autotrace/files/autotrace-0.31.1-m4.patch7
-rw-r--r--media-gfx/autotrace/files/autotrace-0.31.1-pkgconfig.patch13
-rw-r--r--media-gfx/autotrace/files/autotrace-0.31.1-swf-output.patch30
-rw-r--r--media-gfx/autotrace/metadata.xml6
-rw-r--r--media-gfx/aview/Manifest1
-rw-r--r--media-gfx/aview/aview-1.3.0_rc1-r1.ebuild38
-rw-r--r--media-gfx/aview/aview-1.3.0_rc1-r3.ebuild43
-rw-r--r--media-gfx/aview/files/aview-1.3.0_rc1-asciiview.patch76
-rw-r--r--media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch53
-rw-r--r--media-gfx/aview/files/aview-1.3.0_rc1-includes.patch11
-rw-r--r--media-gfx/aview/files/aview-1.3.0_rc1-tmp_creation.patch46
-rw-r--r--media-gfx/aview/metadata.xml10
-rw-r--r--media-gfx/blender/Manifest1
-rw-r--r--media-gfx/blender/blender-2.72b-r2.ebuild280
-rw-r--r--media-gfx/blender/blender-2.72b-r3.ebuild278
-rw-r--r--media-gfx/blender/files/blender-2.68-doxyfile.patch19
-rw-r--r--media-gfx/blender/files/blender-2.68-fix-install-rules.patch26
-rw-r--r--media-gfx/blender/files/blender-2.70-sse2.patch35
-rw-r--r--media-gfx/blender/files/blender-2.72-T42797.diff13
-rw-r--r--media-gfx/blender/metadata.xml64
-rw-r--r--media-gfx/bootsplash-themes/Manifest176
-rw-r--r--media-gfx/bootsplash-themes/bootsplash-themes-20060913.ebuild298
-rw-r--r--media-gfx/bootsplash-themes/metadata.xml7
-rw-r--r--media-gfx/brlcad/Manifest1
-rw-r--r--media-gfx/brlcad/brlcad-7.18.4.ebuild100
-rw-r--r--media-gfx/brlcad/files/brlcad-7.18.4-libpng15.patch42
-rw-r--r--media-gfx/brlcad/metadata.xml34
-rw-r--r--media-gfx/cairosvg/Manifest2
-rw-r--r--media-gfx/cairosvg/cairosvg-1.0.7.ebuild31
-rw-r--r--media-gfx/cairosvg/cairosvg-1.0.ebuild30
-rw-r--r--media-gfx/cairosvg/metadata.xml8
-rw-r--r--media-gfx/cellwriter/Manifest2
-rw-r--r--media-gfx/cellwriter/cellwriter-1.3.4.ebuild30
-rw-r--r--media-gfx/cellwriter/cellwriter-1.3.5.ebuild32
-rw-r--r--media-gfx/cellwriter/metadata.xml6
-rw-r--r--media-gfx/colorhug-client/Manifest2
-rw-r--r--media-gfx/colorhug-client/colorhug-client-0.2.5.ebuild54
-rw-r--r--media-gfx/colorhug-client/colorhug-client-0.2.7.ebuild52
-rw-r--r--media-gfx/colorhug-client/metadata.xml10
-rw-r--r--media-gfx/comical/Manifest1
-rw-r--r--media-gfx/comical/comical-0.8-r3.ebuild53
-rw-r--r--media-gfx/comical/files/comical-0.8-syslibs.patch91
-rw-r--r--media-gfx/comical/files/comical-0.8-wxGTK-2.8.patch12
-rw-r--r--media-gfx/comical/files/comical.desktop9
-rw-r--r--media-gfx/comical/metadata.xml8
-rw-r--r--media-gfx/comix/Manifest1
-rw-r--r--media-gfx/comix/comix-4.0.4-r1.ebuild78
-rw-r--r--media-gfx/comix/files/comix-4.0.4-pillow.patch153
-rw-r--r--media-gfx/comix/metadata.xml13
-rw-r--r--media-gfx/converseen/Manifest2
-rw-r--r--media-gfx/converseen/converseen-0.6.4.ebuild49
-rw-r--r--media-gfx/converseen/converseen-0.6.8.ebuild50
-rw-r--r--media-gfx/converseen/metadata.xml16
-rw-r--r--media-gfx/cptutils/Manifest2
-rw-r--r--media-gfx/cptutils/cptutils-1.54.ebuild27
-rw-r--r--media-gfx/cptutils/cptutils-1.59.ebuild27
-rw-r--r--media-gfx/cptutils/files/cptutils-1.54-parallel-make.patch30
-rw-r--r--media-gfx/cptutils/metadata.xml5
-rw-r--r--media-gfx/cropgui/Manifest1
-rw-r--r--media-gfx/cropgui/cropgui-0.1.1-r3.ebuild53
-rw-r--r--media-gfx/cropgui/files/cropgui-0.1.1-PIL.patch29
-rw-r--r--media-gfx/cropgui/metadata.xml12
-rw-r--r--media-gfx/crwinfo/Manifest1
-rw-r--r--media-gfx/crwinfo/crwinfo-0.2.ebuild31
-rw-r--r--media-gfx/crwinfo/files/crwinfo-0.2.patch17
-rw-r--r--media-gfx/crwinfo/metadata.xml15
-rw-r--r--media-gfx/cthumb/Manifest1
-rw-r--r--media-gfx/cthumb/cthumb-4.2.ebuild32
-rw-r--r--media-gfx/cthumb/metadata.xml10
-rw-r--r--media-gfx/cutycapt/Manifest1
-rw-r--r--media-gfx/cutycapt/cutycapt-0_p20120409.ebuild34
-rw-r--r--media-gfx/cutycapt/metadata.xml11
-rw-r--r--media-gfx/darktable/Manifest4
-rw-r--r--media-gfx/darktable/darktable-1.6.6.ebuild146
-rw-r--r--media-gfx/darktable/darktable-1.6.7.ebuild146
-rw-r--r--media-gfx/darktable/darktable-1.6.8.ebuild146
-rw-r--r--media-gfx/darktable/darktable-9999.ebuild143
-rw-r--r--media-gfx/darktable/metadata.xml24
-rw-r--r--media-gfx/dawn/Manifest1
-rw-r--r--media-gfx/dawn/dawn-3.90b.ebuild58
-rw-r--r--media-gfx/dawn/files/dawn-3.88a-no-interactive.patch292
-rw-r--r--media-gfx/dawn/files/dawn-3.90b-no-interactive.patch158
-rw-r--r--media-gfx/dawn/metadata.xml23
-rw-r--r--media-gfx/dcraw/Manifest5
-rw-r--r--media-gfx/dcraw/dcraw-9.24.4.ebuild109
-rw-r--r--media-gfx/dcraw/dcraw-9.25.0.ebuild109
-rw-r--r--media-gfx/dcraw/dcraw-9.26.0.ebuild109
-rw-r--r--media-gfx/dcraw/files/conversion-examples.txt18
-rw-r--r--media-gfx/dcraw/files/dcwrap27
-rw-r--r--media-gfx/dcraw/metadata.xml13
-rw-r--r--media-gfx/digikam/Manifest4
-rw-r--r--media-gfx/digikam/digikam-4.10.0.ebuild155
-rw-r--r--media-gfx/digikam/digikam-4.12.0.ebuild145
-rw-r--r--media-gfx/digikam/digikam-4.4.0-r1.ebuild167
-rw-r--r--media-gfx/digikam/digikam-4.7.0.ebuild154
-rw-r--r--media-gfx/digikam/files/digikam-4.4.0-hang.patch85
-rw-r--r--media-gfx/digikam/files/digikam-4.4.0-libkexiv2.patch53
-rw-r--r--media-gfx/digikam/metadata.xml16
-rw-r--r--media-gfx/dispcalgui/Manifest4
-rw-r--r--media-gfx/dispcalgui/dispcalgui-1.2.7.0.ebuild78
-rw-r--r--media-gfx/dispcalgui/dispcalgui-2.0.0.0.ebuild74
-rw-r--r--media-gfx/dispcalgui/dispcalgui-2.5.0.0.ebuild72
-rw-r--r--media-gfx/dispcalgui/dispcalgui-2.6.0.0.ebuild72
-rw-r--r--media-gfx/dispcalgui/files/dispcalgui-1.2.7.0-wxversion-select.patch11
-rw-r--r--media-gfx/dispcalgui/files/dispcalgui-2.0.0.0-wxversion-select.patch13
-rw-r--r--media-gfx/dispcalgui/metadata.xml20
-rw-r--r--media-gfx/dpic/Manifest1
-rw-r--r--media-gfx/dpic/dpic-20130310.ebuild35
-rw-r--r--media-gfx/dpic/metadata.xml5
-rw-r--r--media-gfx/drqueue/Manifest1
-rw-r--r--media-gfx/drqueue/drqueue-0.64.4-r1.ebuild150
-rw-r--r--media-gfx/drqueue/drqueue-9999.ebuild140
-rw-r--r--media-gfx/drqueue/files/drqueue-0.64.3-compile-flags.patch15
-rw-r--r--media-gfx/drqueue/files/drqueue-0.64.3-etc-confd-drqmd20
-rw-r--r--media-gfx/drqueue/files/drqueue-0.64.3-etc-confd-drqsd20
-rw-r--r--media-gfx/drqueue/files/drqueue-0.64.3-etc-envd-02drqueue5
-rwxr-xr-xmedia-gfx/drqueue/files/drqueue-0.64.3-etc-initd-drqmd26
-rwxr-xr-xmedia-gfx/drqueue/files/drqueue-0.64.3-etc-initd-drqsd25
-rw-r--r--media-gfx/drqueue/files/drqueue-0.64.3-sconstruct.patch11
-rw-r--r--media-gfx/drqueue/files/drqueue-0.64.4-fpic.patch11
-rw-r--r--media-gfx/drqueue/files/drqueue-0.64.4-git.patch17
-rw-r--r--media-gfx/drqueue/metadata.xml8
-rw-r--r--media-gfx/duhdraw/Manifest1
-rw-r--r--media-gfx/duhdraw/duhdraw-2.8.13-r1.ebuild31
-rw-r--r--media-gfx/duhdraw/files/duhdraw-2.8.13-macos.patch12
-rw-r--r--media-gfx/duhdraw/files/duhdraw-2.8.13-prestrip.patch18
-rw-r--r--media-gfx/duhdraw/metadata.xml5
-rw-r--r--media-gfx/ebdftopcf/Manifest1
-rw-r--r--media-gfx/ebdftopcf/ebdftopcf-2.ebuild24
-rw-r--r--media-gfx/ebdftopcf/metadata.xml9
-rw-r--r--media-gfx/enblend/Manifest3
-rw-r--r--media-gfx/enblend/enblend-4.1.1-r1.ebuild73
-rw-r--r--media-gfx/enblend/enblend-4.1.1.ebuild81
-rw-r--r--media-gfx/enblend/enblend-4.1.2.ebuild74
-rw-r--r--media-gfx/enblend/enblend-4.1.3.ebuild77
-rw-r--r--media-gfx/enblend/files/enblend-4.1.3-vigra_check.patch11
-rw-r--r--media-gfx/enblend/metadata.xml12
-rw-r--r--media-gfx/engauge/Manifest2
-rw-r--r--media-gfx/engauge/engauge-5.1.ebuild50
-rw-r--r--media-gfx/engauge/engauge-5.2.ebuild48
-rw-r--r--media-gfx/engauge/metadata.xml11
-rw-r--r--media-gfx/entangle/Manifest1
-rw-r--r--media-gfx/entangle/entangle-0.6.0.ebuild42
-rw-r--r--media-gfx/entangle/metadata.xml11
-rw-r--r--media-gfx/eog-plugins/Manifest3
-rw-r--r--media-gfx/eog-plugins/eog-plugins-3.14.1.ebuild64
-rw-r--r--media-gfx/eog-plugins/eog-plugins-3.14.2.ebuild66
-rw-r--r--media-gfx/eog-plugins/eog-plugins-3.16.0.ebuild66
-rw-r--r--media-gfx/eog-plugins/metadata.xml10
-rw-r--r--media-gfx/eog/Manifest3
-rw-r--r--media-gfx/eog/eog-3.14.3.ebuild57
-rw-r--r--media-gfx/eog/eog-3.14.4.ebuild57
-rw-r--r--media-gfx/eog/eog-3.16.2.ebuild63
-rw-r--r--media-gfx/eog/files/eog-3.16.2-without-libexif.patch33
-rw-r--r--media-gfx/eog/metadata.xml10
-rw-r--r--media-gfx/eom/Manifest2
-rw-r--r--media-gfx/eom/eom-1.8.0.ebuild77
-rw-r--r--media-gfx/eom/eom-1.8.1.ebuild77
-rw-r--r--media-gfx/eom/metadata.xml8
-rw-r--r--media-gfx/esci-interpreter-gt-s80/Manifest2
-rw-r--r--media-gfx/esci-interpreter-gt-s80/esci-interpreter-gt-s80-0.2.1.1.ebuild80
-rw-r--r--media-gfx/esci-interpreter-gt-s80/metadata.xml19
-rw-r--r--media-gfx/evoluspencil/Manifest1
-rw-r--r--media-gfx/evoluspencil/evoluspencil-2.0.5.ebuild44
-rw-r--r--media-gfx/evoluspencil/files/launcher9
-rw-r--r--media-gfx/evoluspencil/metadata.xml10
-rw-r--r--media-gfx/exact-image/Manifest1
-rw-r--r--media-gfx/exact-image/exact-image-0.8.1-r1.ebuild105
-rw-r--r--media-gfx/exact-image/files/exact-image-0.7.5-libpng14.patch69
-rw-r--r--media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch34
-rw-r--r--media-gfx/exact-image/metadata.xml8
-rw-r--r--media-gfx/exif/Manifest1
-rw-r--r--media-gfx/exif/exif-0.6.21.ebuild24
-rw-r--r--media-gfx/exif/metadata.xml8
-rw-r--r--media-gfx/exiftags/Manifest1
-rw-r--r--media-gfx/exiftags/exiftags-1.01.ebuild26
-rw-r--r--media-gfx/exiftags/metadata.xml5
-rw-r--r--media-gfx/exiv2/Manifest1
-rw-r--r--media-gfx/exiv2/exiv2-0.24-r1.ebuild136
-rw-r--r--media-gfx/exiv2/files/exiv2-0.23-boost-fs-contrib.patch182
-rw-r--r--media-gfx/exiv2/files/exiv2-0.24-CVE-2014-9449.patch27
-rw-r--r--media-gfx/exiv2/files/exiv2-0.24-python3.patch27
-rw-r--r--media-gfx/exiv2/metadata.xml15
-rw-r--r--media-gfx/fbgrab/Manifest2
-rw-r--r--media-gfx/fbgrab/fbgrab-1.0-r2.ebuild37
-rw-r--r--media-gfx/fbgrab/fbgrab-1.3.ebuild34
-rw-r--r--media-gfx/fbgrab/files/fbgrab-1.0-Makefile.patch14
-rw-r--r--media-gfx/fbgrab/files/fbgrab-1.0-zlib_h.patch10
-rw-r--r--media-gfx/fbgrab/files/fbgrab-1.1-Makefile.patch12
-rw-r--r--media-gfx/fbgrab/metadata.xml12
-rw-r--r--media-gfx/fbida/Manifest4
-rw-r--r--media-gfx/fbida/fbida-2.09-r4.ebuild122
-rw-r--r--media-gfx/fbida/fbida-2.10.ebuild108
-rw-r--r--media-gfx/fbida/files/fbida-2.09-giflib.patch97
-rw-r--r--media-gfx/fbida/files/fbida-2.09-make.patch36
-rw-r--r--media-gfx/fbida/files/fbida-2.10-giflib-4.2.patch17
-rw-r--r--media-gfx/fbida/files/ida-desktop.patch17
-rw-r--r--media-gfx/fbida/metadata.xml12
-rw-r--r--media-gfx/fblogo/Manifest1
-rw-r--r--media-gfx/fblogo/fblogo-0.5.2.ebuild40
-rw-r--r--media-gfx/fblogo/files/fblogo-0.5.2-cross.patch36
-rw-r--r--media-gfx/fblogo/metadata.xml7
-rw-r--r--media-gfx/fbv/Manifest1
-rw-r--r--media-gfx/fbv/fbv-1.0b.ebuild55
-rw-r--r--media-gfx/fbv/files/fbv-1.0b-cc.patch97
-rw-r--r--media-gfx/fbv/files/fbv-1.0b-libpng15.patch20
-rw-r--r--media-gfx/fbv/files/oob-segfault-fbv-1.0b.diff13
-rw-r--r--media-gfx/fbv/metadata.xml11
-rw-r--r--media-gfx/feh/Manifest6
-rw-r--r--media-gfx/feh/feh-2.10.ebuild63
-rw-r--r--media-gfx/feh/feh-2.11.ebuild63
-rw-r--r--media-gfx/feh/feh-2.12.1.ebuild62
-rw-r--r--media-gfx/feh/feh-2.12.ebuild62
-rw-r--r--media-gfx/feh/feh-2.13.1.ebuild62
-rw-r--r--media-gfx/feh/feh-2.9.3.ebuild63
-rw-r--r--media-gfx/feh/files/feh-2.6.2-debug-cflags.patch11
-rw-r--r--media-gfx/feh/metadata.xml12
-rw-r--r--media-gfx/figurine/Manifest1
-rw-r--r--media-gfx/figurine/figurine-1.0.5.ebuild24
-rw-r--r--media-gfx/figurine/metadata.xml10
-rw-r--r--media-gfx/fim/Manifest1
-rw-r--r--media-gfx/fim/files/fim-0.4_pre-automake-1.12.patch13
-rw-r--r--media-gfx/fim/files/fim-0.4_pre-graphicsmagick.patch10
-rw-r--r--media-gfx/fim/files/fim-0.4_pre-nosvn.patch11
-rw-r--r--media-gfx/fim/files/fim-0.4_rc1-giflib-4.2.patch19
-rw-r--r--media-gfx/fim/files/fim-0.4_rc1-nosvn.patch11
-rw-r--r--media-gfx/fim/files/fim-0.4_rc3-poppler031.patch12
-rw-r--r--media-gfx/fim/fim-0.4_rc3-r1.ebuild94
-rw-r--r--media-gfx/fim/metadata.xml14
-rw-r--r--media-gfx/flam3/Manifest1
-rw-r--r--media-gfx/flam3/files/flam3-3.0.1-libpng15.patch76
-rw-r--r--media-gfx/flam3/flam3-3.0.1.ebuild46
-rw-r--r--media-gfx/flam3/flam3-9999.ebuild38
-rw-r--r--media-gfx/flam3/metadata.xml11
-rw-r--r--media-gfx/fondu/Manifest1
-rw-r--r--media-gfx/fondu/files/fondu-20060102-build-fix.patch70
-rw-r--r--media-gfx/fondu/fondu-20060102-r1.ebuild33
-rw-r--r--media-gfx/fondu/metadata.xml5
-rw-r--r--media-gfx/fontforge/Manifest8
-rw-r--r--media-gfx/fontforge/files/fontforge-20110222-libz.so-linkage.patch66
-rw-r--r--media-gfx/fontforge/files/fontforge-20110222-lxkbui.patch13
-rw-r--r--media-gfx/fontforge/files/fontforge-20110222-remove-useless-extern.patch11
-rw-r--r--media-gfx/fontforge/files/fontforge-desktop.patch16
-rw-r--r--media-gfx/fontforge/files/fontforge-py27.diff11
-rw-r--r--media-gfx/fontforge/fontforge-20110222-r1.ebuild126
-rw-r--r--media-gfx/fontforge/fontforge-20120731-r1.ebuild133
-rw-r--r--media-gfx/fontforge/fontforge-20120731.ebuild133
-rw-r--r--media-gfx/fontforge/fontforge-20150430.ebuild131
-rw-r--r--media-gfx/fontforge/fontforge-20150612-r1.ebuild128
-rw-r--r--media-gfx/fontforge/fontforge-20150612.ebuild128
-rw-r--r--media-gfx/fontforge/metadata.xml36
-rw-r--r--media-gfx/fontypython/Manifest1
-rw-r--r--media-gfx/fontypython/files/fontypython-pillow.patch41
-rw-r--r--media-gfx/fontypython/fontypython-0.4.4-r1.ebuild36
-rw-r--r--media-gfx/fontypython/fontypython-0.4.4-r2.ebuild30
-rw-r--r--media-gfx/fontypython/metadata.xml6
-rw-r--r--media-gfx/fotowall/Manifest1
-rw-r--r--media-gfx/fotowall/fotowall-0.9-r1.ebuild43
-rw-r--r--media-gfx/fotowall/metadata.xml13
-rw-r--r--media-gfx/fotoxx/Manifest3
-rw-r--r--media-gfx/fotoxx/files/fotoxx-13.11.1.patch44
-rw-r--r--media-gfx/fotoxx/files/fotoxx-15.04.1.patch13
-rw-r--r--media-gfx/fotoxx/files/fotoxx-15.05.patch13
-rw-r--r--media-gfx/fotoxx/fotoxx-13.11.1.ebuild55
-rw-r--r--media-gfx/fotoxx/fotoxx-15.04.1.ebuild55
-rw-r--r--media-gfx/fotoxx/fotoxx-15.05.ebuild55
-rw-r--r--media-gfx/fotoxx/metadata.xml18
-rw-r--r--media-gfx/fr0st/Manifest1
-rw-r--r--media-gfx/fr0st/fr0st-1.4-r1.ebuild63
-rw-r--r--media-gfx/fr0st/metadata.xml8
-rw-r--r--media-gfx/freecad/Manifest4
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-boost148.patch25
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-cmake-2.8.12.patch294
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch11
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-glu.patch12
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch9
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch40
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-nodir.patch21
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch17
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch224
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-occ-6.6.patch69
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch36
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch111
-rw-r--r--media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch228
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-CMakefile.patch21
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-avoid-include-salome.patch11
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-cmake-2.8.12.patch294
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-no-machdist.patch11
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-occ-6.7.patch63
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch33
-rw-r--r--media-gfx/freecad/files/freecad-0.13.1830-startpage-links.patch97
-rw-r--r--media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch21
-rw-r--r--media-gfx/freecad/freecad-0.12.5284-r4.ebuild120
-rw-r--r--media-gfx/freecad/freecad-0.13.1830-r1.ebuild142
-rw-r--r--media-gfx/freecad/freecad-0.14.3702-r1.ebuild136
-rw-r--r--media-gfx/freecad/freecad-0.15.4671.ebuild125
-rw-r--r--media-gfx/freecad/freecad-9999.ebuild138
-rw-r--r--media-gfx/freecad/metadata.xml9
-rw-r--r--media-gfx/freepv/Manifest1
-rw-r--r--media-gfx/freepv/files/freepv-0.3.0-gcc44.patch60
-rw-r--r--media-gfx/freepv/files/freepv-0.3.0-gcc46.patch10
-rw-r--r--media-gfx/freepv/files/freepv-0.3.0-libpng14.patch20
-rw-r--r--media-gfx/freepv/files/freepv-0.3.0-noplugin.patch30
-rw-r--r--media-gfx/freepv/files/freepv-0.3.0-stringh.patch10
-rw-r--r--media-gfx/freepv/freepv-0.3.0-r4.ebuild40
-rw-r--r--media-gfx/freepv/metadata.xml12
-rw-r--r--media-gfx/freewrl/Manifest2
-rw-r--r--media-gfx/freewrl/files/freewrl-1.22.13-desktop.patch11
-rw-r--r--media-gfx/freewrl/files/freewrl-1.22.13-fontconfig-match.patch19
-rw-r--r--media-gfx/freewrl/files/freewrl-1.22.13-java-fix.patch54
-rw-r--r--media-gfx/freewrl/files/freewrl-1.22.13-mozjs187-config.patch10
-rw-r--r--media-gfx/freewrl/files/freewrl-2.3.3-ld.gold.patch35
-rw-r--r--media-gfx/freewrl/freewrl-1.22.13-r3.ebuild143
-rw-r--r--media-gfx/freewrl/freewrl-2.3.3.ebuild140
-rw-r--r--media-gfx/freewrl/freewrl-9999.ebuild144
-rw-r--r--media-gfx/freewrl/metadata.xml28
-rw-r--r--media-gfx/galleryadd/Manifest1
-rw-r--r--media-gfx/galleryadd/galleryadd-2.30.ebuild20
-rw-r--r--media-gfx/galleryadd/metadata.xml7
-rw-r--r--media-gfx/geeqie/Manifest1
-rw-r--r--media-gfx/geeqie/files/geeqie-1.2-fix-lcms2-integration.patch35
-rw-r--r--media-gfx/geeqie/files/geeqie-1.2-fix_version.patch11
-rw-r--r--media-gfx/geeqie/geeqie-1.2-r1.ebuild79
-rw-r--r--media-gfx/geeqie/metadata.xml9
-rw-r--r--media-gfx/gif2apng/Manifest4
-rw-r--r--media-gfx/gif2apng/files/gif2apng-1.8-flags.patch26
-rw-r--r--media-gfx/gif2apng/files/gif2apng-1.9-flags.patch15
-rw-r--r--media-gfx/gif2apng/gif2apng-1.6.ebuild31
-rw-r--r--media-gfx/gif2apng/gif2apng-1.7.ebuild31
-rw-r--r--media-gfx/gif2apng/gif2apng-1.8.ebuild35
-rw-r--r--media-gfx/gif2apng/gif2apng-1.9.ebuild35
-rw-r--r--media-gfx/gif2apng/metadata.xml8
-rw-r--r--media-gfx/gif2png/Manifest3
-rw-r--r--media-gfx/gif2png/gif2png-2.5.10.ebuild20
-rw-r--r--media-gfx/gif2png/gif2png-2.5.8.ebuild20
-rw-r--r--media-gfx/gif2png/gif2png-2.5.9.ebuild20
-rw-r--r--media-gfx/gif2png/metadata.xml5
-rw-r--r--media-gfx/gifsicle/Manifest7
-rw-r--r--media-gfx/gifsicle/gifsicle-1.67.ebuild25
-rw-r--r--media-gfx/gifsicle/gifsicle-1.70.ebuild25
-rw-r--r--media-gfx/gifsicle/gifsicle-1.78.ebuild25
-rw-r--r--media-gfx/gifsicle/gifsicle-1.83.ebuild25
-rw-r--r--media-gfx/gifsicle/gifsicle-1.86.ebuild25
-rw-r--r--media-gfx/gifsicle/gifsicle-1.87.ebuild25
-rw-r--r--media-gfx/gifsicle/gifsicle-1.88.ebuild25
-rw-r--r--media-gfx/gifsicle/metadata.xml5
-rw-r--r--media-gfx/gimageview/Manifest1
-rw-r--r--media-gfx/gimageview/files/gimageview-0.2.27-gtk12_fix.diff11
-rw-r--r--media-gfx/gimageview/files/gimageview-0.2.27-gtk2.patch24
-rw-r--r--media-gfx/gimageview/files/gimageview-0.2.27-libpng15.patch24
-rw-r--r--media-gfx/gimageview/files/gimageview-0.2.27-sort_fix.diff30
-rw-r--r--media-gfx/gimageview/gimageview-0.2.27-r3.ebuild68
-rw-r--r--media-gfx/gimageview/metadata.xml8
-rw-r--r--media-gfx/gimmage/Manifest1
-rw-r--r--media-gfx/gimmage/files/gimmage-0.2.3-as-needed.patch11
-rw-r--r--media-gfx/gimmage/files/gimmage-0.2.3-desktop-entry.patch16
-rw-r--r--media-gfx/gimmage/files/gimmage-0.2.3-gcc43.patch11
-rw-r--r--media-gfx/gimmage/files/gimmage-0.2.3-gcc47.patch19
-rw-r--r--media-gfx/gimmage/gimmage-0.2.3.ebuild43
-rw-r--r--media-gfx/gimmage/metadata.xml8
-rw-r--r--media-gfx/gimp-arrow-brushes/Manifest9
-rw-r--r--media-gfx/gimp-arrow-brushes/gimp-arrow-brushes-20120122.ebuild34
-rw-r--r--media-gfx/gimp-arrow-brushes/metadata.xml8
-rw-r--r--media-gfx/gimp/Manifest2
-rw-r--r--media-gfx/gimp/files/gimp-2.6.11-file-uri.patch79
-rw-r--r--media-gfx/gimp/files/gimp-2.6.12-CVE-2012-2763.patch20
-rw-r--r--media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3236.patch39
-rw-r--r--media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3403.patch511
-rw-r--r--media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3481.patch56
-rw-r--r--media-gfx/gimp/files/gimp-2.6.12-potfiles-skip.patch17
-rw-r--r--media-gfx/gimp/files/gimp-2.7.4-no-deprecation.patch36
-rw-r--r--media-gfx/gimp/files/gimp-2.8.10-CVE-2013-1913.patch31
-rw-r--r--media-gfx/gimp/files/gimp-2.8.10-CVE-2013-1978.patch151
-rw-r--r--media-gfx/gimp/files/gimp-2.8.10-clang.patch204
-rw-r--r--media-gfx/gimp/files/gimp-2.8.10-freetype251.patch26
-rw-r--r--media-gfx/gimp/files/gimp-2.8.6-uclibc.patch45
-rw-r--r--media-gfx/gimp/files/gimp-curl-headers.diff12
-rw-r--r--media-gfx/gimp/gimp-2.8.10-r1.ebuild165
-rw-r--r--media-gfx/gimp/gimp-2.8.10-r2.ebuild168
-rw-r--r--media-gfx/gimp/gimp-2.8.14.ebuild164
-rw-r--r--media-gfx/gimp/gimp-9999.ebuild170
-rw-r--r--media-gfx/gimp/metadata.xml12
-rw-r--r--media-gfx/gliv/Manifest2
-rw-r--r--media-gfx/gliv/files/gliv-1.9.6-as-needed.patch99
-rw-r--r--media-gfx/gliv/files/gliv-1.9.7-as-needed.patch87
-rw-r--r--media-gfx/gliv/files/gliv-1.9.7-destdir.patch15
-rw-r--r--media-gfx/gliv/gliv-1.9.6.ebuild44
-rw-r--r--media-gfx/gliv/gliv-1.9.7.ebuild44
-rw-r--r--media-gfx/gliv/metadata.xml5
-rw-r--r--media-gfx/gmic/Manifest4
-rw-r--r--media-gfx/gmic/files/gmic-1.6.0.2-makefile.patch155
-rw-r--r--media-gfx/gmic/files/gmic-1.6.5.0-makefile.patch154
-rw-r--r--media-gfx/gmic/gmic-1.6.0.2.ebuild77
-rw-r--r--media-gfx/gmic/gmic-1.6.0.3.ebuild79
-rw-r--r--media-gfx/gmic/gmic-1.6.0.4.ebuild79
-rw-r--r--media-gfx/gmic/gmic-1.6.5.0.ebuild77
-rw-r--r--media-gfx/gmic/metadata.xml12
-rw-r--r--media-gfx/gnofract4d/Manifest2
-rw-r--r--media-gfx/gnofract4d/files/gnofract4d-3.12-libpng14.patch47
-rw-r--r--media-gfx/gnofract4d/gnofract4d-3.13.ebuild52
-rw-r--r--media-gfx/gnofract4d/gnofract4d-3.14-r1.ebuild41
-rw-r--r--media-gfx/gnofract4d/gnofract4d-3.14.ebuild46
-rw-r--r--media-gfx/gnofract4d/metadata.xml8
-rw-r--r--media-gfx/gnome-font-viewer/Manifest2
-rw-r--r--media-gfx/gnome-font-viewer/gnome-font-viewer-3.14.1.ebuild34
-rw-r--r--media-gfx/gnome-font-viewer/gnome-font-viewer-3.16.2.ebuild34
-rw-r--r--media-gfx/gnome-font-viewer/metadata.xml5
-rw-r--r--media-gfx/gnome-photos/Manifest3
-rw-r--r--media-gfx/gnome-photos/gnome-photos-3.14.2.ebuild48
-rw-r--r--media-gfx/gnome-photos/gnome-photos-3.14.3.ebuild45
-rw-r--r--media-gfx/gnome-photos/gnome-photos-3.16.2.ebuild54
-rw-r--r--media-gfx/gnome-photos/metadata.xml5
-rw-r--r--media-gfx/gnome-raw-thumbnailer/Manifest1
-rw-r--r--media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-0.99.1-drop-libgsf.patch32
-rw-r--r--media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-0.99.1-make-382.patch34
-rw-r--r--media-gfx/gnome-raw-thumbnailer/gnome-raw-thumbnailer-3.0.0.ebuild33
-rw-r--r--media-gfx/gnome-raw-thumbnailer/metadata.xml5
-rw-r--r--media-gfx/gnome-screenshot/Manifest2
-rw-r--r--media-gfx/gnome-screenshot/files/gnome-screenshot-3.14.0-use-dash.patch23
-rw-r--r--media-gfx/gnome-screenshot/gnome-screenshot-3.14.0-r1.ebuild57
-rw-r--r--media-gfx/gnome-screenshot/gnome-screenshot-3.16.2.ebuild51
-rw-r--r--media-gfx/gnome-screenshot/metadata.xml5
-rw-r--r--media-gfx/gnome-specimen/Manifest1
-rw-r--r--media-gfx/gnome-specimen/gnome-specimen-0.4-r1.ebuild37
-rw-r--r--media-gfx/gnome-specimen/metadata.xml5
-rw-r--r--media-gfx/gozer/Manifest1
-rw-r--r--media-gfx/gozer/gozer-0.7-r2.ebuild35
-rw-r--r--media-gfx/gozer/metadata.xml7
-rw-r--r--media-gfx/gphoto2/Manifest2
-rw-r--r--media-gfx/gphoto2/gphoto2-2.5.5.ebuild58
-rw-r--r--media-gfx/gphoto2/gphoto2-2.5.6.ebuild58
-rw-r--r--media-gfx/gphoto2/metadata.xml9
-rw-r--r--media-gfx/gphotofs/Manifest1
-rw-r--r--media-gfx/gphotofs/gphotofs-0.5.ebuild21
-rw-r--r--media-gfx/gphotofs/metadata.xml12
-rw-r--r--media-gfx/gpicview/Manifest1
-rw-r--r--media-gfx/gpicview/gpicview-0.2.4.ebuild26
-rw-r--r--media-gfx/gpicview/metadata.xml9
-rw-r--r--media-gfx/gqview/Manifest1
-rw-r--r--media-gfx/gqview/files/gqview-2.1.5-glibc.patch39
-rw-r--r--media-gfx/gqview/files/gqview-2.1.5-windows.patch16
-rw-r--r--media-gfx/gqview/gqview-2.1.5-r1.ebuild45
-rw-r--r--media-gfx/gqview/metadata.xml12
-rw-r--r--media-gfx/graphicsmagick/Manifest3
-rw-r--r--media-gfx/graphicsmagick/files/graphicsmagick-1.3.16-libpng14.patch65
-rw-r--r--media-gfx/graphicsmagick/files/graphicsmagick-1.3.17-freetype.patch32
-rw-r--r--media-gfx/graphicsmagick/files/graphicsmagick-1.3.18-freetype.patch32
-rw-r--r--media-gfx/graphicsmagick/files/graphicsmagick-1.3.18-powerpc.patch11
-rw-r--r--media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-flags.patch56
-rw-r--r--media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-freetype.patch15
-rw-r--r--media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-perl.patch13
-rw-r--r--media-gfx/graphicsmagick/files/graphicsmagick-1.3.20-powerpc.patch20
-rw-r--r--media-gfx/graphicsmagick/graphicsmagick-1.3.18.ebuild116
-rw-r--r--media-gfx/graphicsmagick/graphicsmagick-1.3.19.ebuild130
-rw-r--r--media-gfx/graphicsmagick/graphicsmagick-1.3.20-r1.ebuild130
-rw-r--r--media-gfx/graphicsmagick/metadata.xml24
-rw-r--r--media-gfx/graphite2/Manifest2
-rw-r--r--media-gfx/graphite2/files/graphite2-1.0.2-no_harfbuzz_tests.patch12
-rw-r--r--media-gfx/graphite2/files/graphite2-1.0.3-no-test-binaries.patch9
-rw-r--r--media-gfx/graphite2/files/graphite2-1.1.0-includes-libs-perl.patch13
-rw-r--r--media-gfx/graphite2/files/graphite2-1.2.0-solaris.patch22
-rw-r--r--media-gfx/graphite2/graphite2-1.2.1.ebuild102
-rw-r--r--media-gfx/graphite2/graphite2-1.2.4-r1.ebuild105
-rw-r--r--media-gfx/graphite2/graphite2-1.2.4.ebuild102
-rw-r--r--media-gfx/graphite2/metadata.xml8
-rw-r--r--media-gfx/graphviz/Manifest5
-rw-r--r--media-gfx/graphviz/files/graphviz-2.26.3-automake-1.11.2.patch35
-rw-r--r--media-gfx/graphviz/files/graphviz-2.26.3-libtool-configure.patch52
-rw-r--r--media-gfx/graphviz/files/graphviz-2.26.3-libtool.patch27
-rw-r--r--media-gfx/graphviz/files/graphviz-2.28.0-Xaw-configure.patch71
-rw-r--r--media-gfx/graphviz/files/graphviz-2.28.0-automake-1.11.2.patch33
-rw-r--r--media-gfx/graphviz/files/graphviz-2.28.0-dot-pangocairo-link.patch13
-rw-r--r--media-gfx/graphviz/files/graphviz-2.34.0-Xaw-configure.patch81
-rw-r--r--media-gfx/graphviz/files/graphviz-2.34.0-dot-pangocairo-link.patch17
-rw-r--r--media-gfx/graphviz/files/graphviz-2.38-fix-backslashes.patch34
-rw-r--r--media-gfx/graphviz/graphviz-2.26.3-r4.ebuild224
-rw-r--r--media-gfx/graphviz/graphviz-2.28.0.ebuild255
-rw-r--r--media-gfx/graphviz/graphviz-2.34.0.ebuild260
-rw-r--r--media-gfx/graphviz/graphviz-2.36.0-r1.ebuild259
-rw-r--r--media-gfx/graphviz/graphviz-2.36.0.ebuild256
-rw-r--r--media-gfx/graphviz/graphviz-2.38.0.ebuild256
-rw-r--r--media-gfx/graphviz/metadata.xml46
-rw-r--r--media-gfx/greycstoration/Manifest1
-rw-r--r--media-gfx/greycstoration/files/greycstoration-2.9-libpng14.patch22
-rw-r--r--media-gfx/greycstoration/greycstoration-2.9-r1.ebuild64
-rw-r--r--media-gfx/greycstoration/metadata.xml11
-rw-r--r--media-gfx/grub-splashes/Manifest3
-rw-r--r--media-gfx/grub-splashes/grub-splashes-20091109.ebuild44
-rw-r--r--media-gfx/grub-splashes/metadata.xml8
-rw-r--r--media-gfx/gthumb/Manifest2
-rw-r--r--media-gfx/gthumb/gthumb-3.2.9.1.ebuild90
-rw-r--r--media-gfx/gthumb/gthumb-3.4.0.ebuild91
-rw-r--r--media-gfx/gthumb/metadata.xml12
-rw-r--r--media-gfx/gtkam/Manifest1
-rw-r--r--media-gfx/gtkam/files/gtkam-0.1.18-desktop-validation.patch15
-rw-r--r--media-gfx/gtkam/files/gtkam-0.2.0-underlinking.patch86
-rw-r--r--media-gfx/gtkam/gtkam-0.2.0.ebuild59
-rw-r--r--media-gfx/gtkam/metadata.xml9
-rw-r--r--media-gfx/gtkimageview/Manifest1
-rw-r--r--media-gfx/gtkimageview/gtkimageview-1.6.4.ebuild78
-rw-r--r--media-gfx/gtkimageview/metadata.xml5
-rw-r--r--media-gfx/hp2xx/Manifest1
-rw-r--r--media-gfx/hp2xx/files/hp2xx-3.4.4-docbuild.patch14
-rw-r--r--media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch137
-rw-r--r--media-gfx/hp2xx/hp2xx-3.4.4-r1.ebuild70
-rw-r--r--media-gfx/hp2xx/hp2xx-3.4.4.ebuild45
-rw-r--r--media-gfx/hp2xx/metadata.xml10
-rw-r--r--media-gfx/hugin/Manifest2
-rw-r--r--media-gfx/hugin/files/hugin-2014.0.0-ParseExp.patch527
-rw-r--r--media-gfx/hugin/files/hugin-2014.0.0-lensfun-0.3.0.patch15
-rw-r--r--media-gfx/hugin/hugin-2014.0.0-r1.ebuild89
-rw-r--r--media-gfx/hugin/hugin-2014.0.0.ebuild89
-rw-r--r--media-gfx/hugin/hugin-2015.0.0-r1.ebuild86
-rw-r--r--media-gfx/hugin/hugin-2015.0.0.ebuild86
-rw-r--r--media-gfx/hugin/hugin-9999.ebuild88
-rw-r--r--media-gfx/hugin/metadata.xml11
-rw-r--r--media-gfx/icc_examin/Manifest3
-rw-r--r--media-gfx/icc_examin/files/icc_examin-0.54-fix-xcm-test.patch15
-rw-r--r--media-gfx/icc_examin/files/icc_examin-0.55-fix-xrandr-test.patch25
-rw-r--r--media-gfx/icc_examin/icc_examin-0.54.ebuild44
-rw-r--r--media-gfx/icc_examin/icc_examin-0.55-r1.ebuild46
-rw-r--r--media-gfx/icc_examin/icc_examin-0.55.ebuild44
-rw-r--r--media-gfx/icc_examin/icc_examin-9999.ebuild44
-rw-r--r--media-gfx/icc_examin/metadata.xml11
-rw-r--r--media-gfx/icon-slicer/Manifest1
-rw-r--r--media-gfx/icon-slicer/icon-slicer-0.3.ebuild25
-rw-r--r--media-gfx/icon-slicer/metadata.xml5
-rw-r--r--media-gfx/icoutils/Manifest1
-rw-r--r--media-gfx/icoutils/files/icoutils-0.29.1-gettext.patch13
-rw-r--r--media-gfx/icoutils/files/icoutils-0.29.1-locale.patch39
-rw-r--r--media-gfx/icoutils/icoutils-0.31.0.ebuild40
-rw-r--r--media-gfx/icoutils/metadata.xml13
-rw-r--r--media-gfx/igal/Manifest1
-rw-r--r--media-gfx/igal/igal-2.0.ebuild41
-rw-r--r--media-gfx/igal/metadata.xml10
-rw-r--r--media-gfx/imagemagick/Manifest4
-rw-r--r--media-gfx/imagemagick/files/imagemagick-6.9.1.7-cflags.patch68
-rw-r--r--media-gfx/imagemagick/imagemagick-6.9.0.3.ebuild180
-rw-r--r--media-gfx/imagemagick/imagemagick-6.9.1.4.ebuild180
-rw-r--r--media-gfx/imagemagick/imagemagick-6.9.1.7.ebuild181
-rw-r--r--media-gfx/imagemagick/imagemagick-6.9.1.8.ebuild179
-rw-r--r--media-gfx/imagemagick/metadata.xml18
-rw-r--r--media-gfx/imageworsener/Manifest3
-rw-r--r--media-gfx/imageworsener/imageworsener-0.9.2.ebuild38
-rw-r--r--media-gfx/imageworsener/imageworsener-1.0.0.ebuild50
-rw-r--r--media-gfx/imageworsener/imageworsener-1.2.0.ebuild50
-rw-r--r--media-gfx/imageworsener/metadata.xml11
-rw-r--r--media-gfx/inkscape/Manifest2
-rw-r--r--media-gfx/inkscape/files/inkscape-0.48.0-spell.patch45
-rw-r--r--media-gfx/inkscape/files/inkscape-0.48.2-libwpg.patch25
-rw-r--r--media-gfx/inkscape/files/inkscape-0.48.3.1-desktop.patch11
-rw-r--r--media-gfx/inkscape/files/inkscape-0.48.4-automake-1.13.patch21
-rw-r--r--media-gfx/inkscape/files/inkscape-0.48.4-epython.patch11
-rw-r--r--media-gfx/inkscape/files/inkscape-0.48.4-gc74-configure.patch15
-rw-r--r--media-gfx/inkscape/files/inkscape-0.48.4-poppler-0.29.0.patch98
-rw-r--r--media-gfx/inkscape/files/inkscape-0.91_pre3-automagic.patch154
-rw-r--r--media-gfx/inkscape/files/inkscape-0.91_pre3-cppflags.patch14
-rw-r--r--media-gfx/inkscape/files/inkscape-0.91_pre3-desktop.patch20
-rw-r--r--media-gfx/inkscape/files/inkscape-0.91_pre3-exif.patch12
-rw-r--r--media-gfx/inkscape/files/inkscape-0.91_pre3-sk-man.patch15
-rw-r--r--media-gfx/inkscape/inkscape-0.48.5-r1.ebuild120
-rw-r--r--media-gfx/inkscape/inkscape-0.91.ebuild162
-rw-r--r--media-gfx/inkscape/metadata.xml12
-rw-r--r--media-gfx/ipe/Manifest2
-rw-r--r--media-gfx/ipe/files/ipe-7.1.3-gold.patch30
-rw-r--r--media-gfx/ipe/ipe-7.1.2.ebuild78
-rw-r--r--media-gfx/ipe/ipe-7.1.3.ebuild81
-rw-r--r--media-gfx/ipe/metadata.xml14
-rw-r--r--media-gfx/iscan-data/Manifest2
-rw-r--r--media-gfx/iscan-data/iscan-data-1.22.0.1.ebuild43
-rw-r--r--media-gfx/iscan-data/iscan-data-1.36.0.1.ebuild47
-rw-r--r--media-gfx/iscan-data/metadata.xml14
-rw-r--r--media-gfx/iscan-plugin-esdip/Manifest2
-rw-r--r--media-gfx/iscan-plugin-esdip/iscan-plugin-esdip-1.0.0.5-r1.ebuild42
-rw-r--r--media-gfx/iscan-plugin-esdip/metadata.xml14
-rw-r--r--media-gfx/iscan-plugin-gt-f500/Manifest1
-rw-r--r--media-gfx/iscan-plugin-gt-f500/iscan-plugin-gt-f500-1.0.0.1-r1.ebuild85
-rw-r--r--media-gfx/iscan-plugin-gt-f500/metadata.xml26
-rw-r--r--media-gfx/iscan-plugin-gt-f720/Manifest2
-rw-r--r--media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.2.ebuild69
-rw-r--r--media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.ebuild67
-rw-r--r--media-gfx/iscan-plugin-gt-f720/metadata.xml15
-rw-r--r--media-gfx/iscan-plugin-gt-x770/Manifest2
-rw-r--r--media-gfx/iscan-plugin-gt-x770/iscan-plugin-gt-x770-2.1.2.1-r3.ebuild90
-rw-r--r--media-gfx/iscan-plugin-gt-x770/metadata.xml20
-rw-r--r--media-gfx/iscan-plugin-gt-x820/Manifest2
-rw-r--r--media-gfx/iscan-plugin-gt-x820/iscan-plugin-gt-x820-2.2.0.1.ebuild91
-rw-r--r--media-gfx/iscan-plugin-gt-x820/metadata.xml20
-rw-r--r--media-gfx/iscan-plugin-perfection-v370/Manifest2
-rw-r--r--media-gfx/iscan-plugin-perfection-v370/iscan-plugin-perfection-v370-1.0.0.2.ebuild94
-rw-r--r--media-gfx/iscan-plugin-perfection-v370/metadata.xml19
-rw-r--r--media-gfx/iscan/Manifest6
-rw-r--r--media-gfx/iscan/files/iscan-2.25.0-drop-ltdl.patch64
-rw-r--r--media-gfx/iscan/files/iscan-2.25.0-fix-g++-test.patch13
-rw-r--r--media-gfx/iscan/files/iscan-2.26.2-libpng15.patch51
-rw-r--r--media-gfx/iscan/files/iscan-2.26.2-png-libs.patch37
-rw-r--r--media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch48
-rw-r--r--media-gfx/iscan/files/iscan-2.29.1-drop-ltdl.patch64
-rw-r--r--media-gfx/iscan/files/iscan-2.29.1-png-libs.patch37
-rw-r--r--media-gfx/iscan/files/iscan-2.30.1-fix-g++-test.patch45
-rw-r--r--media-gfx/iscan/files/iscan-usb.sh27
-rw-r--r--media-gfx/iscan/iscan-2.26.2.ebuild164
-rw-r--r--media-gfx/iscan/iscan-2.29.1.5.ebuild174
-rw-r--r--media-gfx/iscan/iscan-2.30.1.1.ebuild180
-rw-r--r--media-gfx/iscan/metadata.xml16
-rw-r--r--media-gfx/jhead/Manifest3
-rw-r--r--media-gfx/jhead/files/jhead-2.90-mkstemp_respect_flags.patch26
-rw-r--r--media-gfx/jhead/jhead-2.96.ebuild32
-rw-r--r--media-gfx/jhead/jhead-2.97.ebuild32
-rw-r--r--media-gfx/jhead/jhead-3.00.ebuild32
-rw-r--r--media-gfx/jhead/metadata.xml5
-rw-r--r--media-gfx/jigl/Manifest1
-rw-r--r--media-gfx/jigl/jigl-2.0.1.ebuild22
-rw-r--r--media-gfx/jigl/metadata.xml5
-rw-r--r--media-gfx/jp2a/Manifest1
-rw-r--r--media-gfx/jp2a/jp2a-1.0.6-r1.ebuild30
-rw-r--r--media-gfx/jp2a/metadata.xml11
-rw-r--r--media-gfx/jpeg2ps/Manifest1
-rw-r--r--media-gfx/jpeg2ps/files/jpeg2ps-1.9-include.diff11
-rw-r--r--media-gfx/jpeg2ps/jpeg2ps-1.9-r1.ebuild52
-rw-r--r--media-gfx/jpeg2ps/metadata.xml10
-rw-r--r--media-gfx/jpeginfo/Manifest1
-rw-r--r--media-gfx/jpeginfo/files/jpeginfo-1.6.0-parallel_install.patch11
-rw-r--r--media-gfx/jpeginfo/jpeginfo-1.6.1.ebuild32
-rw-r--r--media-gfx/jpeginfo/metadata.xml5
-rw-r--r--media-gfx/jpegoptim/Manifest3
-rw-r--r--media-gfx/jpegoptim/jpegoptim-1.3.1.ebuild17
-rw-r--r--media-gfx/jpegoptim/jpegoptim-1.4.0.ebuild17
-rw-r--r--media-gfx/jpegoptim/jpegoptim-1.4.2.ebuild17
-rw-r--r--media-gfx/jpegoptim/metadata.xml5
-rw-r--r--media-gfx/jpegpixi/Manifest1
-rw-r--r--media-gfx/jpegpixi/jpegpixi-1.1.1.ebuild22
-rw-r--r--media-gfx/jpegpixi/metadata.xml9
-rw-r--r--media-gfx/jpegtoavi/Manifest1
-rw-r--r--media-gfx/jpegtoavi/files/jpegtoavi-1.5-Makefile.patch31
-rw-r--r--media-gfx/jpegtoavi/jpegtoavi-1.5.ebuild30
-rw-r--r--media-gfx/jpegtoavi/metadata.xml12
-rw-r--r--media-gfx/k3d/Manifest1
-rw-r--r--media-gfx/k3d/files/k3d-0.7.11.0-cuda.patch52
-rw-r--r--media-gfx/k3d/files/k3d-0.7.11.0-fix-potfiles.patch19
-rw-r--r--media-gfx/k3d/files/k3d-0.7.11.0-gcc44.patch60
-rw-r--r--media-gfx/k3d/files/k3d-0.7.11.0-gcc47.patch87
-rw-r--r--media-gfx/k3d/files/k3d-0.7.11.0-gtk-liststore-vs-treemodel.patch40
-rw-r--r--media-gfx/k3d/files/k3d-0.7.11.0-libpng14.patch54
-rw-r--r--media-gfx/k3d/k3d-0.7.11.0-r1.ebuild112
-rw-r--r--media-gfx/k3d/metadata.xml15
-rw-r--r--media-gfx/kcoloredit/Manifest1
-rw-r--r--media-gfx/kcoloredit/files/kcoloredit-2.0.0-underlinking.patch11
-rw-r--r--media-gfx/kcoloredit/kcoloredit-2.0.0-r1.ebuild28
-rw-r--r--media-gfx/kcoloredit/metadata.xml5
-rw-r--r--media-gfx/kfax/Manifest1
-rw-r--r--media-gfx/kfax/files/kfax-3.3.6-kde45.patch12
-rw-r--r--media-gfx/kfax/files/kfax-3.3.6-underlinking.patch12
-rw-r--r--media-gfx/kfax/kfax-3.3.6-r1.ebuild38
-rw-r--r--media-gfx/kfax/metadata.xml5
-rw-r--r--media-gfx/kflickr/Manifest1
-rw-r--r--media-gfx/kflickr/kflickr-0.9.1_p1.ebuild18
-rw-r--r--media-gfx/kflickr/metadata.xml6
-rw-r--r--media-gfx/kgrab/Manifest1
-rw-r--r--media-gfx/kgrab/kgrab-0.1.1.ebuild31
-rw-r--r--media-gfx/kgrab/metadata.xml5
-rw-r--r--media-gfx/kgraphviewer/Manifest3
-rw-r--r--media-gfx/kgraphviewer/files/kgraphviewer-2.1.1-boost-1.50.patch32
-rw-r--r--media-gfx/kgraphviewer/kgraphviewer-2.1.1.ebuild31
-rw-r--r--media-gfx/kgraphviewer/kgraphviewer-2.1.1_p20140331.ebuild28
-rw-r--r--media-gfx/kgraphviewer/kgraphviewer-2.2.0.ebuild27
-rw-r--r--media-gfx/kgraphviewer/metadata.xml5
-rw-r--r--media-gfx/kiconedit/Manifest1
-rw-r--r--media-gfx/kiconedit/kiconedit-4.4.0.ebuild21
-rw-r--r--media-gfx/kiconedit/metadata.xml6
-rw-r--r--media-gfx/kphotoalbum/Manifest2
-rw-r--r--media-gfx/kphotoalbum/kphotoalbum-4.5.ebuild46
-rw-r--r--media-gfx/kphotoalbum/kphotoalbum-4.6.2.ebuild56
-rw-r--r--media-gfx/kphotoalbum/metadata.xml11
-rw-r--r--media-gfx/kpovmodeler/Manifest1
-rw-r--r--media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-desktop.patch17
-rw-r--r--media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-freetype-include.patch15
-rw-r--r--media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-underlinking.patch12
-rw-r--r--media-gfx/kpovmodeler/kpovmodeler-1.1.3-r1.ebuild39
-rw-r--r--media-gfx/kpovmodeler/metadata.xml6
-rw-r--r--media-gfx/kuickshow/Manifest1
-rw-r--r--media-gfx/kuickshow/kuickshow-0.9.1-r2.ebuild32
-rw-r--r--media-gfx/kuickshow/metadata.xml5
-rw-r--r--media-gfx/kxstitch/Manifest1
-rw-r--r--media-gfx/kxstitch/kxstitch-1.2.0.ebuild27
-rw-r--r--media-gfx/kxstitch/metadata.xml5
-rw-r--r--media-gfx/librecad/Manifest4
-rw-r--r--media-gfx/librecad/files/gcc_cpp0x.patch13
-rw-r--r--media-gfx/librecad/librecad-2.0.3.ebuild38
-rw-r--r--media-gfx/librecad/librecad-2.0.4.ebuild38
-rw-r--r--media-gfx/librecad/librecad-2.0.5.ebuild38
-rw-r--r--media-gfx/librecad/librecad-2.0.6.ebuild38
-rw-r--r--media-gfx/librecad/metadata.xml13
-rw-r--r--media-gfx/llgal/Manifest1
-rw-r--r--media-gfx/llgal/llgal-0.13.17-r1.ebuild41
-rw-r--r--media-gfx/llgal/metadata.xml9
-rw-r--r--media-gfx/luminance-hdr/Manifest3
-rw-r--r--media-gfx/luminance-hdr/files/luminance-hdr-2.2.1-docs.patch15
-rw-r--r--media-gfx/luminance-hdr/files/luminance-hdr-2.2.1-openmp-automagic.patch41
-rw-r--r--media-gfx/luminance-hdr/files/luminance-hdr-2.3.0_beta1-no-git.patch65
-rw-r--r--media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-docs.patch17
-rw-r--r--media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-no-git.patch54
-rw-r--r--media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-openmp-automagic.patch40
-rw-r--r--media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-fits-automagic.patch36
-rw-r--r--media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-qtprinter.patch99
-rw-r--r--media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-qtquick.patch13
-rw-r--r--media-gfx/luminance-hdr/luminance-hdr-2.3.0.ebuild79
-rw-r--r--media-gfx/luminance-hdr/luminance-hdr-2.3.1.ebuild79
-rw-r--r--media-gfx/luminance-hdr/luminance-hdr-2.4.0.ebuild87
-rw-r--r--media-gfx/luminance-hdr/metadata.xml35
-rw-r--r--media-gfx/lximage-qt/Manifest3
-rw-r--r--media-gfx/lximage-qt/lximage-qt-0.2.0.ebuild33
-rw-r--r--media-gfx/lximage-qt/lximage-qt-0.3.0.ebuild47
-rw-r--r--media-gfx/lximage-qt/lximage-qt-0.4.0.ebuild47
-rw-r--r--media-gfx/lximage-qt/metadata.xml9
-rw-r--r--media-gfx/mandelbulber/Manifest3
-rw-r--r--media-gfx/mandelbulber/files/mandelbulber-1.11-qa.patch37
-rw-r--r--media-gfx/mandelbulber/files/mandelbulber-1.12.1-memcpy_and_memset.patch22
-rw-r--r--media-gfx/mandelbulber/files/mandelbulber-1.21.1-qa.patch30
-rw-r--r--media-gfx/mandelbulber/mandelbulber-1.11.ebuild46
-rw-r--r--media-gfx/mandelbulber/mandelbulber-1.12.1.ebuild47
-rw-r--r--media-gfx/mandelbulber/mandelbulber-1.21.1.ebuild48
-rw-r--r--media-gfx/mandelbulber/metadata.xml14
-rw-r--r--media-gfx/mcomix/Manifest2
-rw-r--r--media-gfx/mcomix/mcomix-1.00-r1.ebuild48
-rw-r--r--media-gfx/mcomix/mcomix-1.01.ebuild49
-rw-r--r--media-gfx/mcomix/metadata.xml12
-rw-r--r--media-gfx/meshlab/Manifest2
-rw-r--r--media-gfx/meshlab/files/1.3.2/01_crash-on-save.patch29
-rw-r--r--media-gfx/meshlab/files/1.3.2/02_cstddef.patch46
-rw-r--r--media-gfx/meshlab/files/1.3.2/03_disable-updates.patch21
-rw-r--r--media-gfx/meshlab/files/1.3.2/05_externals.patch25
-rw-r--r--media-gfx/meshlab/files/1.3.2/06_format-security.patch44
-rw-r--r--media-gfx/meshlab/files/1.3.2/07_gcc47.patch105
-rw-r--r--media-gfx/meshlab/files/1.3.2/08_lib3ds.patch32
-rw-r--r--media-gfx/meshlab/files/1.3.2/09_libbz2.patch31
-rw-r--r--media-gfx/meshlab/files/1.3.2/10_muparser.patch30
-rw-r--r--media-gfx/meshlab/files/1.3.2/11_openctm.patch31
-rw-r--r--media-gfx/meshlab/files/1.3.2/12_overflow.patch23
-rw-r--r--media-gfx/meshlab/files/1.3.2/13_pluginsdir.patch21
-rw-r--r--media-gfx/meshlab/files/1.3.2/14_ply_numeric.patch32
-rw-r--r--media-gfx/meshlab/files/1.3.2/15_qhull.patch67
-rw-r--r--media-gfx/meshlab/files/1.3.2/16_shadersdir.patch49
-rw-r--r--media-gfx/meshlab/files/1.3.2/17_structuresynth.patch48
-rw-r--r--media-gfx/meshlab/files/1.3.2/18_glew.c18p1.patch146
-rw-r--r--media-gfx/meshlab/files/1.3.2/19_CONFLICTS_IN_rpath.patch32
-rw-r--r--media-gfx/meshlab/files/1.3.2/20_rpath.c18p2.patch43
-rw-r--r--media-gfx/meshlab/files/1.3.2/21_RESOLUTION.patch29
-rw-r--r--media-gfx/meshlab/files/1.3.2/22_aliasing.patch43
-rw-r--r--media-gfx/meshlab/files/1.3.3/gcc-4.7.patch12
-rw-r--r--media-gfx/meshlab/files/1.3.3/lapack.patch11
-rw-r--r--media-gfx/meshlab/files/1.3.3/mpir.patch10
-rw-r--r--media-gfx/meshlab/files/1.3.3/qt-4.8.patch11
-rw-r--r--media-gfx/meshlab/files/1.3.3/rpath.patch39
-rw-r--r--media-gfx/meshlab/meshlab-1.3.2.ebuild84
-rw-r--r--media-gfx/meshlab/meshlab-1.3.3.ebuild65
-rw-r--r--media-gfx/meshlab/metadata.xml17
-rw-r--r--media-gfx/metadata.xml32
-rw-r--r--media-gfx/metapixel/Manifest1
-rw-r--r--media-gfx/metapixel/files/metapixel-1.0.2-libpng15.patch141
-rw-r--r--media-gfx/metapixel/metadata.xml5
-rw-r--r--media-gfx/metapixel/metapixel-1.0.2.ebuild38
-rw-r--r--media-gfx/mirage/Manifest2
-rw-r--r--media-gfx/mirage/files/mirage-0.9.3-stop_cleaning_up.patch27
-rw-r--r--media-gfx/mirage/metadata.xml5
-rw-r--r--media-gfx/mirage/mirage-0.9.5.1.ebuild43
-rw-r--r--media-gfx/mirage/mirage-0.9.5.2-r1.ebuild35
-rw-r--r--media-gfx/mirage/mirage-0.9.5.2.ebuild43
-rw-r--r--media-gfx/mkgallery/Manifest1
-rw-r--r--media-gfx/mkgallery/metadata.xml7
-rw-r--r--media-gfx/mkgallery/mkgallery-1.1.ebuild21
-rw-r--r--media-gfx/monica/Manifest1
-rw-r--r--media-gfx/monica/files/monica-3.6-makefile-cleanup.patch33
-rw-r--r--media-gfx/monica/files/monica-3.7-gcc44.patch11
-rw-r--r--media-gfx/monica/metadata.xml14
-rw-r--r--media-gfx/monica/monica-3.7.ebuild40
-rw-r--r--media-gfx/mscgen/Manifest1
-rw-r--r--media-gfx/mscgen/files/mscgen-0.18-pkg.patch11
-rw-r--r--media-gfx/mscgen/metadata.xml5
-rw-r--r--media-gfx/mscgen/mscgen-0.20.ebuild43
-rw-r--r--media-gfx/mypaint/Manifest2
-rw-r--r--media-gfx/mypaint/files/mypaint-0.9.0-gentoo.patch26
-rw-r--r--media-gfx/mypaint/files/mypaint-0.9.1-gentoo.patch25
-rw-r--r--media-gfx/mypaint/files/mypaint-1.1.0-build-env-vars.patch53
-rw-r--r--media-gfx/mypaint/files/mypaint-1.1.0-desktop.patch24
-rw-r--r--media-gfx/mypaint/files/mypaint-1.1.0-gentoo.patch36
-rw-r--r--media-gfx/mypaint/files/mypaint-1.1.0-json-c-0.11.patch15
-rw-r--r--media-gfx/mypaint/metadata.xml11
-rw-r--r--media-gfx/mypaint/mypaint-1.0.0-r1.ebuild75
-rw-r--r--media-gfx/mypaint/mypaint-1.1.0-r1.ebuild88
-rw-r--r--media-gfx/mypaint/mypaint-1.1.0-r2.ebuild89
-rw-r--r--media-gfx/mypaint/mypaint-1.1.0.ebuild81
-rw-r--r--media-gfx/nip2/Manifest1
-rw-r--r--media-gfx/nip2/files/nip2-7.16.4-fftw3-build.patch12
-rw-r--r--media-gfx/nip2/metadata.xml8
-rw-r--r--media-gfx/nip2/nip2-7.26.4.ebuild78
-rw-r--r--media-gfx/nomacs/Manifest2
-rw-r--r--media-gfx/nomacs/files/nomacs-2.4.2-include.patch10
-rw-r--r--media-gfx/nomacs/metadata.xml14
-rw-r--r--media-gfx/nomacs/nomacs-2.4.2.ebuild55
-rw-r--r--media-gfx/nomacs/nomacs-2.4.4.ebuild57
-rw-r--r--media-gfx/nvidia-cg-toolkit/Manifest2
-rw-r--r--media-gfx/nvidia-cg-toolkit/files/80cgc7
-rw-r--r--media-gfx/nvidia-cg-toolkit/files/80cgc-opt6
-rw-r--r--media-gfx/nvidia-cg-toolkit/files/80cgc-opt-211
-rw-r--r--media-gfx/nvidia-cg-toolkit/files/80cgc-opt-39
-rw-r--r--media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit-gl.pc.in10
-rw-r--r--media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit.pc.in9
-rw-r--r--media-gfx/nvidia-cg-toolkit/metadata.xml16
-rw-r--r--media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r3.ebuild148
-rw-r--r--media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r4.ebuild151
-rw-r--r--media-gfx/nvidia-texture-tools/Manifest2
-rw-r--r--media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cg.patch39
-rw-r--r--media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-clang.patch18
-rw-r--r--media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-gcc-4.7.patch16
-rw-r--r--media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-openexr.patch93
-rw-r--r--media-gfx/nvidia-texture-tools/metadata.xml12
-rw-r--r--media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild76
-rw-r--r--media-gfx/opcion/Manifest1
-rw-r--r--media-gfx/opcion/files/opcion-1.1.1-fix-source.patch15
-rw-r--r--media-gfx/opcion/metadata.xml8
-rw-r--r--media-gfx/opcion/opcion-1.1.1-r2.ebuild58
-rw-r--r--media-gfx/openclipart/Manifest1
-rw-r--r--media-gfx/openclipart/metadata.xml8
-rw-r--r--media-gfx/openclipart/openclipart-0.20.ebuild49
-rw-r--r--media-gfx/opencsg/Manifest1
-rw-r--r--media-gfx/opencsg/metadata.xml13
-rw-r--r--media-gfx/opencsg/opencsg-1.3.2-r1.ebuild40
-rw-r--r--media-gfx/openexr_viewers/Manifest4
-rw-r--r--media-gfx/openexr_viewers/files/openexr_viewers-1.0.1-gcc43.patch55
-rw-r--r--media-gfx/openexr_viewers/files/openexr_viewers-1.0.1-gcc44.patch37
-rw-r--r--media-gfx/openexr_viewers/files/openexr_viewers-1.0.2-nvidia-automagic.patch16
-rw-r--r--media-gfx/openexr_viewers/files/openexr_viewers-2.0.0-nvidia-automagic.patch14
-rw-r--r--media-gfx/openexr_viewers/metadata.xml11
-rw-r--r--media-gfx/openexr_viewers/openexr_viewers-1.0.2.ebuild58
-rw-r--r--media-gfx/openexr_viewers/openexr_viewers-2.0.1.ebuild56
-rw-r--r--media-gfx/openexr_viewers/openexr_viewers-2.1.0.ebuild56
-rw-r--r--media-gfx/openexr_viewers/openexr_viewers-2.2.0.ebuild56
-rw-r--r--media-gfx/openmesh/Manifest4
-rw-r--r--media-gfx/openmesh/files/QGLViewerWidget-hh-gcc-4.3-include-fix.patch18
-rw-r--r--media-gfx/openmesh/files/openmesh-1.0.0-gcc41.patch145
-rw-r--r--media-gfx/openmesh/metadata.xml16
-rw-r--r--media-gfx/openmesh/openmesh-2.3.1.ebuild52
-rw-r--r--media-gfx/openmesh/openmesh-3.2.ebuild65
-rw-r--r--media-gfx/openmesh/openmesh-3.3.ebuild72
-rw-r--r--media-gfx/openmesh/openmesh-4.1.ebuild76
-rw-r--r--media-gfx/openscad/Manifest2
-rw-r--r--media-gfx/openscad/metadata.xml13
-rw-r--r--media-gfx/openscad/openscad-2013.06.ebuild37
-rw-r--r--media-gfx/openscad/openscad-2014.03.ebuild37
-rw-r--r--media-gfx/optipng/Manifest3
-rw-r--r--media-gfx/optipng/files/optipng-0.7.5-estonian.patch34
-rw-r--r--media-gfx/optipng/metadata.xml15
-rw-r--r--media-gfx/optipng/optipng-0.7.3-r1.ebuild56
-rw-r--r--media-gfx/optipng/optipng-0.7.3.ebuild55
-rw-r--r--media-gfx/optipng/optipng-0.7.4.ebuild54
-rw-r--r--media-gfx/optipng/optipng-0.7.5.ebuild56
-rw-r--r--media-gfx/paint-mono/Manifest1
-rw-r--r--media-gfx/paint-mono/metadata.xml8
-rw-r--r--media-gfx/paint-mono/paint-mono-0.1.63.ebuild31
-rw-r--r--media-gfx/panini/Manifest1
-rw-r--r--media-gfx/panini/files/panini-0.71.104-glu.patch10
-rw-r--r--media-gfx/panini/files/panini.desktop10
-rw-r--r--media-gfx/panini/metadata.xml8
-rw-r--r--media-gfx/panini/panini-0.71.104.ebuild37
-rw-r--r--media-gfx/pdf2svg/Manifest2
-rw-r--r--media-gfx/pdf2svg/metadata.xml5
-rw-r--r--media-gfx/pdf2svg/pdf2svg-0.2.1.ebuild32
-rw-r--r--media-gfx/pdf2svg/pdf2svg-0.2.2.ebuild29
-rw-r--r--media-gfx/pencil/Manifest1
-rw-r--r--media-gfx/pencil/files/pencil-0.4.4_beta-gcc461.patch14
-rw-r--r--media-gfx/pencil/metadata.xml10
-rw-r--r--media-gfx/pencil/pencil-0.4.4_beta.ebuild42
-rw-r--r--media-gfx/peps/Manifest1
-rw-r--r--media-gfx/peps/metadata.xml14
-rw-r--r--media-gfx/peps/peps-2.0.ebuild54
-rw-r--r--media-gfx/photivo/Manifest3
-rw-r--r--media-gfx/photivo/metadata.xml13
-rw-r--r--media-gfx/photivo/photivo-0_pre20121006.ebuild69
-rw-r--r--media-gfx/photivo/photivo-0_pre20121212.ebuild69
-rw-r--r--media-gfx/photivo/photivo-0_pre20131115.ebuild70
-rw-r--r--media-gfx/photivo/photivo-9999.ebuild63
-rw-r--r--media-gfx/photopc/Manifest1
-rw-r--r--media-gfx/photopc/metadata.xml10
-rw-r--r--media-gfx/photopc/photopc-3.07.ebuild26
-rw-r--r--media-gfx/photoqt/Manifest5
-rw-r--r--media-gfx/photoqt/files/photo-0.7.1.1-install-desktop.patch22
-rw-r--r--media-gfx/photoqt/metadata.xml13
-rw-r--r--media-gfx/photoqt/photoqt-0.8-r1.ebuild27
-rw-r--r--media-gfx/photoqt/photoqt-1.0.ebuild37
-rw-r--r--media-gfx/photoqt/photoqt-1.1.0.1.ebuild38
-rw-r--r--media-gfx/photoqt/photoqt-1.2.ebuild40
-rw-r--r--media-gfx/photoqt/photoqt-1.3.ebuild41
-rw-r--r--media-gfx/phototonic/Manifest2
-rw-r--r--media-gfx/phototonic/metadata.xml12
-rw-r--r--media-gfx/phototonic/phototonic-1.5.54.ebuild36
-rw-r--r--media-gfx/phototonic/phototonic-1.6.6.ebuild36
-rw-r--r--media-gfx/pictureflow/Manifest1
-rw-r--r--media-gfx/pictureflow/metadata.xml10
-rw-r--r--media-gfx/pictureflow/pictureflow-0.1.0.ebuild25
-rw-r--r--media-gfx/picturewall/Manifest1
-rw-r--r--media-gfx/picturewall/metadata.xml10
-rw-r--r--media-gfx/picturewall/picturewall-1.0-r1.ebuild33
-rw-r--r--media-gfx/pinta/Manifest2
-rw-r--r--media-gfx/pinta/metadata.xml20
-rw-r--r--media-gfx/pinta/pinta-1.4.ebuild42
-rw-r--r--media-gfx/pinta/pinta-1.5_pre20121118.ebuild59
-rw-r--r--media-gfx/pinta/pinta-9999.ebuild58
-rw-r--r--media-gfx/pixels2pgf/Manifest1
-rw-r--r--media-gfx/pixels2pgf/metadata.xml16
-rw-r--r--media-gfx/pixels2pgf/pixels2pgf-0.1.ebuild20
-rw-r--r--media-gfx/pixels2pgf/pixels2pgf-9999.ebuild32
-rw-r--r--media-gfx/pixie/Manifest1
-rw-r--r--media-gfx/pixie/files/Makefile.shaders15
-rw-r--r--media-gfx/pixie/files/pixie-2.2.6-autotools.patch22
-rw-r--r--media-gfx/pixie/files/pixie-2.2.6-zlib-1.2.5.2.patch73
-rw-r--r--media-gfx/pixie/metadata.xml22
-rw-r--r--media-gfx/pixie/pixie-2.2.6-r1.ebuild100
-rw-r--r--media-gfx/plantuml/Manifest1
-rw-r--r--media-gfx/plantuml/metadata.xml22
-rw-r--r--media-gfx/plantuml/plantuml-7999.ebuild35
-rw-r--r--media-gfx/png2ico/Manifest1
-rw-r--r--media-gfx/png2ico/files/png2ico-2002.12.08-memset_and_strcmp.patch13
-rw-r--r--media-gfx/png2ico/metadata.xml5
-rw-r--r--media-gfx/png2ico/png2ico-2002.12.08.ebuild41
-rw-r--r--media-gfx/pngcheck/Manifest1
-rw-r--r--media-gfx/pngcheck/metadata.xml8
-rw-r--r--media-gfx/pngcheck/pngcheck-2.3.0.ebuild30
-rw-r--r--media-gfx/pngcrush/Manifest6
-rw-r--r--media-gfx/pngcrush/metadata.xml16
-rw-r--r--media-gfx/pngcrush/pngcrush-1.7.81.ebuild41
-rw-r--r--media-gfx/pngcrush/pngcrush-1.7.85.ebuild41
-rw-r--r--media-gfx/pngcrush/pngcrush-1.7.86.ebuild41
-rw-r--r--media-gfx/pngnq/Manifest1
-rw-r--r--media-gfx/pngnq/files/pngnq-1.0-libpng14.patch13
-rw-r--r--media-gfx/pngnq/files/pngnq-1.0-libpng15.patch13
-rw-r--r--media-gfx/pngnq/metadata.xml10
-rw-r--r--media-gfx/pngnq/pngnq-1.1.ebuild26
-rw-r--r--media-gfx/pngquant/Manifest6
-rw-r--r--media-gfx/pngquant/files/pngquant-1.8.3-libpng16.patch53
-rw-r--r--media-gfx/pngquant/metadata.xml5
-rw-r--r--media-gfx/pngquant/pngquant-1.8.2.ebuild38
-rw-r--r--media-gfx/pngquant/pngquant-1.8.3.ebuild49
-rw-r--r--media-gfx/pngquant/pngquant-2.0.2.ebuild48
-rw-r--r--media-gfx/pngquant/pngquant-2.1.0.ebuild48
-rw-r--r--media-gfx/pngquant/pngquant-2.2.0.ebuild48
-rw-r--r--media-gfx/pngquant/pngquant-2.3.3.ebuild40
-rw-r--r--media-gfx/pngrewrite/Manifest2
-rw-r--r--media-gfx/pngrewrite/files/pngrewrite-1.3.0-gcc44.patch19
-rw-r--r--media-gfx/pngrewrite/metadata.xml5
-rw-r--r--media-gfx/pngrewrite/pngrewrite-1.3.0.ebuild30
-rw-r--r--media-gfx/pngrewrite/pngrewrite-1.4.0.ebuild31
-rw-r--r--media-gfx/pngtoico/Manifest1
-rw-r--r--media-gfx/pngtoico/files/pngtoico-1.0.1-Makefile.patch15
-rw-r--r--media-gfx/pngtoico/files/pngtoico-1.0.1-libpng15.patch11
-rw-r--r--media-gfx/pngtoico/metadata.xml8
-rw-r--r--media-gfx/pngtoico/pngtoico-1.0.1-r1.ebuild33
-rw-r--r--media-gfx/pngtools/Manifest1
-rw-r--r--media-gfx/pngtools/files/pngtools-0.3-implicit-declarations.patch40
-rw-r--r--media-gfx/pngtools/files/pngtools-0.4-libpng14.patch34
-rw-r--r--media-gfx/pngtools/files/pngtools-0.4-libpng15-fixes.patch190
-rw-r--r--media-gfx/pngtools/metadata.xml8
-rw-r--r--media-gfx/pngtools/pngtools-0.4-r2.ebuild35
-rw-r--r--media-gfx/pornview/Manifest1
-rw-r--r--media-gfx/pornview/metadata.xml9
-rw-r--r--media-gfx/pornview/pornview-0.2.2.ebuild53
-rw-r--r--media-gfx/postr/Manifest1
-rw-r--r--media-gfx/postr/metadata.xml5
-rw-r--r--media-gfx/postr/postr-0.13.1.ebuild59
-rw-r--r--media-gfx/potrace/Manifest3
-rw-r--r--media-gfx/potrace/metadata.xml11
-rw-r--r--media-gfx/potrace/potrace-1.10-r1.ebuild32
-rw-r--r--media-gfx/potrace/potrace-1.11.ebuild32
-rw-r--r--media-gfx/potrace/potrace-1.12.ebuild32
-rw-r--r--media-gfx/povray/Manifest1
-rw-r--r--media-gfx/povray/files/povray-3.7.0.0-automagic.patch27
-rw-r--r--media-gfx/povray/files/povray-3.7.0.0-boost-1.50.patch72
-rw-r--r--media-gfx/povray/files/povray-3.7.0.0-user-conf.patch27
-rw-r--r--media-gfx/povray/files/povray-3.7.0_rc6-darwin-defaults.patch21
-rw-r--r--media-gfx/povray/metadata.xml14
-rw-r--r--media-gfx/povray/povray-3.7.0.0.ebuild147
-rw-r--r--media-gfx/povtree/Manifest1
-rw-r--r--media-gfx/povtree/files/povtree12
-rw-r--r--media-gfx/povtree/metadata.xml5
-rw-r--r--media-gfx/povtree/povtree-1.5-r1.ebuild29
-rw-r--r--media-gfx/pqiv/Manifest1
-rw-r--r--media-gfx/pqiv/metadata.xml12
-rw-r--r--media-gfx/pqiv/pqiv-2.2.ebuild42
-rw-r--r--media-gfx/pqstego/Manifest1
-rw-r--r--media-gfx/pqstego/metadata.xml8
-rw-r--r--media-gfx/pqstego/pqstego-0.0.1.ebuild27
-rw-r--r--media-gfx/printrun/Manifest1
-rw-r--r--media-gfx/printrun/files/printrun-no-py-in-binaries.patch396
-rw-r--r--media-gfx/printrun/metadata.xml17
-rw-r--r--media-gfx/printrun/printrun-20140730.ebuild31
-rw-r--r--media-gfx/propaganda/Manifest15
-rw-r--r--media-gfx/propaganda/metadata.xml7
-rw-r--r--media-gfx/propaganda/propaganda-1.0.ebuild68
-rw-r--r--media-gfx/psftools/Manifest1
-rw-r--r--media-gfx/psftools/metadata.xml5
-rw-r--r--media-gfx/psftools/psftools-1.0.7.ebuild20
-rw-r--r--media-gfx/pstoedit/Manifest3
-rw-r--r--media-gfx/pstoedit/files/pstoedit-3.60-libdl.patch13
-rw-r--r--media-gfx/pstoedit/files/pstoedit-3.60-parallel.patch49
-rw-r--r--media-gfx/pstoedit/files/pstoedit-3.62-parallel.patch54
-rw-r--r--media-gfx/pstoedit/files/pstoedit-3.70-pkgconfig.patch14
-rw-r--r--media-gfx/pstoedit/metadata.xml14
-rw-r--r--media-gfx/pstoedit/pstoedit-3.61.ebuild56
-rw-r--r--media-gfx/pstoedit/pstoedit-3.62.ebuild61
-rw-r--r--media-gfx/pstoedit/pstoedit-3.70-r1.ebuild60
-rw-r--r--media-gfx/pstoedit/pstoedit-3.70.ebuild59
-rw-r--r--media-gfx/pycam/Manifest2
-rw-r--r--media-gfx/pycam/files/fix-export-toolpath.patch25
-rw-r--r--media-gfx/pycam/metadata.xml7
-rw-r--r--media-gfx/pycam/pycam-0.5.1.ebuild23
-rw-r--r--media-gfx/pycam/pycam-0.6_pre20130416-r1.ebuild30
-rw-r--r--media-gfx/pydot/Manifest1
-rw-r--r--media-gfx/pydot/files/pydot-1.0.23-setup.patch21
-rw-r--r--media-gfx/pydot/files/pydot-1.0.28-pyparsing2fix.patch14
-rw-r--r--media-gfx/pydot/metadata.xml9
-rw-r--r--media-gfx/pydot/pydot-1.0.28-r2.ebuild28
-rw-r--r--media-gfx/qingy-themes/Manifest18
-rw-r--r--media-gfx/qingy-themes/metadata.xml7
-rw-r--r--media-gfx/qingy-themes/qingy-themes-20050816.ebuild65
-rw-r--r--media-gfx/qiv/Manifest2
-rw-r--r--media-gfx/qiv/metadata.xml8
-rw-r--r--media-gfx/qiv/qiv-2.2.4.ebuild44
-rw-r--r--media-gfx/qiv/qiv-2.3.1.ebuild64
-rw-r--r--media-gfx/qiviewer/Manifest1
-rw-r--r--media-gfx/qiviewer/files/qiviewer-use-system-webp.patch41
-rw-r--r--media-gfx/qiviewer/metadata.xml12
-rw-r--r--media-gfx/qiviewer/qiviewer-0.5.0-r1.ebuild60
-rw-r--r--media-gfx/qosmic/Manifest1
-rw-r--r--media-gfx/qosmic/metadata.xml9
-rw-r--r--media-gfx/qosmic/qosmic-1.5.0.ebuild23
-rw-r--r--media-gfx/qrencode-python/Manifest2
-rw-r--r--media-gfx/qrencode-python/files/qrencode-python-1.01-PIL.patch14
-rw-r--r--media-gfx/qrencode-python/metadata.xml11
-rw-r--r--media-gfx/qrencode-python/qrencode-python-1.01-r1.ebuild27
-rw-r--r--media-gfx/qrencode-python/qrencode-python-1.02_pre140921.ebuild24
-rw-r--r--media-gfx/qrencode/Manifest3
-rw-r--r--media-gfx/qrencode/files/qrencode-3.2.0-pngregenfix.patch44
-rw-r--r--media-gfx/qrencode/metadata.xml8
-rw-r--r--media-gfx/qrencode/qrencode-3.3.1.ebuild24
-rw-r--r--media-gfx/qrencode/qrencode-3.4.3.ebuild24
-rw-r--r--media-gfx/qrencode/qrencode-3.4.4.ebuild24
-rw-r--r--media-gfx/quat/Manifest1
-rw-r--r--media-gfx/quat/metadata.xml7
-rw-r--r--media-gfx/quat/quat-1.20.ebuild35
-rw-r--r--media-gfx/qvv/Manifest1
-rw-r--r--media-gfx/qvv/metadata.xml5
-rw-r--r--media-gfx/qvv/qvv-4.02.ebuild29
-rw-r--r--media-gfx/raw-thumbnailer/Manifest1
-rw-r--r--media-gfx/raw-thumbnailer/metadata.xml12
-rw-r--r--media-gfx/raw-thumbnailer/raw-thumbnailer-0.2.1.ebuild22
-rw-r--r--media-gfx/rawtherapee/Manifest6
-rw-r--r--media-gfx/rawtherapee/files/rawtherapee-4.0.9-desktop.patch9
-rw-r--r--media-gfx/rawtherapee/files/rawtherapee-4.0.9-no-hg.patch60
-rw-r--r--media-gfx/rawtherapee/metadata.xml5
-rw-r--r--media-gfx/rawtherapee/rawtherapee-4.0.10.ebuild55
-rw-r--r--media-gfx/rawtherapee/rawtherapee-4.0.11.ebuild55
-rw-r--r--media-gfx/rawtherapee/rawtherapee-4.0.12.ebuild50
-rw-r--r--media-gfx/rawtherapee/rawtherapee-4.0.9-r1.ebuild58
-rw-r--r--media-gfx/rawtherapee/rawtherapee-4.1.ebuild51
-rw-r--r--media-gfx/rawtherapee/rawtherapee-4.2.ebuild52
-rw-r--r--media-gfx/recoverjpeg/Manifest5
-rw-r--r--media-gfx/recoverjpeg/metadata.xml8
-rw-r--r--media-gfx/recoverjpeg/recoverjpeg-2.0-r1.ebuild22
-rw-r--r--media-gfx/recoverjpeg/recoverjpeg-2.1.1.ebuild22
-rw-r--r--media-gfx/recoverjpeg/recoverjpeg-2.2.1.ebuild22
-rw-r--r--media-gfx/recoverjpeg/recoverjpeg-2.2.2.ebuild22
-rw-r--r--media-gfx/recoverjpeg/recoverjpeg-2.2.3.ebuild22
-rw-r--r--media-gfx/replicatorg/Manifest2
-rwxr-xr-xmedia-gfx/replicatorg/files/replicatorg2
-rw-r--r--media-gfx/replicatorg/metadata.xml13
-rw-r--r--media-gfx/replicatorg/replicatorg-37-r2.ebuild85
-rw-r--r--media-gfx/replicatorg/replicatorg-40-r1.ebuild85
-rw-r--r--media-gfx/ristretto/Manifest2
-rw-r--r--media-gfx/ristretto/files/ristretto-0.8.0-fix-appdata-validation.patch25
-rw-r--r--media-gfx/ristretto/files/ristretto-0.8.0-fix-icon-installation.patch20
-rw-r--r--media-gfx/ristretto/metadata.xml8
-rw-r--r--media-gfx/ristretto/ristretto-0.6.3.ebuild37
-rw-r--r--media-gfx/ristretto/ristretto-0.8.0-r1.ebuild42
-rw-r--r--media-gfx/rotoscope/Manifest1
-rw-r--r--media-gfx/rotoscope/metadata.xml8
-rw-r--r--media-gfx/rotoscope/rotoscope-0.2.ebuild24
-rw-r--r--media-gfx/sam2p/Manifest2
-rw-r--r--media-gfx/sam2p/files/sam2p-0.45-cflags.patch37
-rw-r--r--media-gfx/sam2p/files/sam2p-0.45-fbsd.patch14
-rw-r--r--media-gfx/sam2p/files/sam2p-0.45-nostrip.patch13
-rw-r--r--media-gfx/sam2p/files/sam2p-0.49-glibc-2.20.patch18
-rw-r--r--media-gfx/sam2p/files/sam2p-0.49.1-build.patch42
-rw-r--r--media-gfx/sam2p/files/sam2p-0.49.1-gcc48.patch39
-rw-r--r--media-gfx/sam2p/metadata.xml8
-rw-r--r--media-gfx/sam2p/sam2p-0.49.1.ebuild44
-rw-r--r--media-gfx/sam2p/sam2p-0.49.2.ebuild43
-rw-r--r--media-gfx/sane-backends/Manifest2
-rw-r--r--media-gfx/sane-backends/files/niash_array_index.patch140
-rw-r--r--media-gfx/sane-backends/files/sane-backends-1.0.24-automagic_systemd.patch56
-rw-r--r--media-gfx/sane-backends/files/sane-backends-1.0.24-cross-compile.patch30
-rw-r--r--media-gfx/sane-backends/files/sane-backends-1.0.24-kodakaio_avahi.patch105
-rw-r--r--media-gfx/sane-backends/files/sane-backends-1.0.24-saned_pidfile_location.patch11
-rw-r--r--media-gfx/sane-backends/files/sane-backends-1.0.24-systemd_pkgconfig.patch54
-rw-r--r--media-gfx/sane-backends/files/sane-backends-1.0.24-unused-cups.patch62
-rw-r--r--media-gfx/sane-backends/files/saned10
-rw-r--r--media-gfx/sane-backends/files/saned.confd2
-rw-r--r--media-gfx/sane-backends/files/saned.initd12
-rw-r--r--media-gfx/sane-backends/metadata.xml7
-rw-r--r--media-gfx/sane-backends/sane-backends-1.0.24-r5.ebuild329
-rw-r--r--media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild336
-rw-r--r--media-gfx/sane-frontends/Manifest1
-rw-r--r--media-gfx/sane-frontends/files/MissingCapsFlag.patch12
-rw-r--r--media-gfx/sane-frontends/metadata.xml7
-rw-r--r--media-gfx/sane-frontends/sane-frontends-1.0.14.ebuild56
-rw-r--r--media-gfx/scantailor/Manifest2
-rw-r--r--media-gfx/scantailor/files/scantailor-0.9.9-environment_flags.patch24
-rw-r--r--media-gfx/scantailor/files/scantailor-gcc46.patch121
-rw-r--r--media-gfx/scantailor/metadata.xml8
-rw-r--r--media-gfx/scantailor/scantailor-0.9.10.ebuild50
-rw-r--r--media-gfx/scantailor/scantailor-0.9.11.1.ebuild48
-rw-r--r--media-gfx/scrot/Manifest3
-rw-r--r--media-gfx/scrot/files/scrot.bash-completion40
-rw-r--r--media-gfx/scrot/metadata.xml5
-rw-r--r--media-gfx/scrot/scrot-0.8-r1.ebuild28
-rw-r--r--media-gfx/scrot/scrot-0.8_p13.ebuild38
-rw-r--r--media-gfx/sfftobmp/Manifest1
-rw-r--r--media-gfx/sfftobmp/files/sfftobmp-3.1.1-gcc44-and-boost-1_37.patch33
-rw-r--r--media-gfx/sfftobmp/files/sfftobmp-3.1.2-boost_fs3.patch21
-rw-r--r--media-gfx/sfftobmp/metadata.xml9
-rw-r--r--media-gfx/sfftobmp/sfftobmp-3.1.2-r1.ebuild38
-rw-r--r--media-gfx/shotwell/Manifest3
-rw-r--r--media-gfx/shotwell/files/shotwell-0.13.1-ldflags.patch28
-rw-r--r--media-gfx/shotwell/metadata.xml19
-rw-r--r--media-gfx/shotwell/shotwell-0.22.0.ebuild112
-rw-r--r--media-gfx/simple-scan/Manifest3
-rw-r--r--media-gfx/simple-scan/metadata.xml15
-rw-r--r--media-gfx/simple-scan/simple-scan-3.14.3.ebuild47
-rw-r--r--media-gfx/simple-scan/simple-scan-3.16.0.ebuild49
-rw-r--r--media-gfx/simple-scan/simple-scan-3.16.1.ebuild47
-rw-r--r--media-gfx/skencil/Manifest2
-rw-r--r--media-gfx/skencil/files/skencil-0.6.17-setup.py.patch11
-rw-r--r--media-gfx/skencil/files/skencil-configure-without-nls.diff11
-rw-r--r--media-gfx/skencil/metadata.xml10
-rw-r--r--media-gfx/skencil/skencil-0.6.18_pre20080519.ebuild61
-rw-r--r--media-gfx/skencil/skencil-1.0_alpha784.ebuild31
-rw-r--r--media-gfx/smile/Manifest1
-rw-r--r--media-gfx/smile/files/fix_docs-0.9.10.patch18
-rw-r--r--media-gfx/smile/files/fix_installation.patch122
-rw-r--r--media-gfx/smile/metadata.xml7
-rw-r--r--media-gfx/smile/smile-1.0.ebuild61
-rw-r--r--media-gfx/splash-themes-gentoo/Manifest4
-rw-r--r--media-gfx/splash-themes-gentoo/metadata.xml7
-rw-r--r--media-gfx/splash-themes-gentoo/splash-themes-gentoo-20101212-r1.ebuild41
-rw-r--r--media-gfx/splash-themes-gentoo/splash-themes-gentoo-20101212-r2.ebuild48
-rw-r--r--media-gfx/splash-themes-livecd/Manifest7
-rw-r--r--media-gfx/splash-themes-livecd/files/splash-themes-livecd-2007.0-rounding.patch12
-rw-r--r--media-gfx/splash-themes-livecd/metadata.xml5
-rw-r--r--media-gfx/splash-themes-livecd/splash-themes-livecd-2004.3.ebuild21
-rw-r--r--media-gfx/splash-themes-livecd/splash-themes-livecd-2005.0.ebuild30
-rw-r--r--media-gfx/splash-themes-livecd/splash-themes-livecd-2005.1.ebuild31
-rw-r--r--media-gfx/splash-themes-livecd/splash-themes-livecd-2006.0.ebuild30
-rw-r--r--media-gfx/splash-themes-livecd/splash-themes-livecd-2006.1.ebuild30
-rw-r--r--media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0-r1.ebuild42
-rw-r--r--media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0-r2.ebuild37
-rw-r--r--media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0.ebuild40
-rw-r--r--media-gfx/splash-themes-livedvd/Manifest1
-rw-r--r--media-gfx/splash-themes-livedvd/metadata.xml13
-rw-r--r--media-gfx/splash-themes-livedvd/splash-themes-livedvd-12.0-r1.ebuild33
-rw-r--r--media-gfx/splashutils/Manifest7
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.4-bzip2.patch43
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2.patch15
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.4-ft25.patch42
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.4-gentoo-typo-fix.patch19
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.4-multi-keyboard.patch381
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.4-r3-bzip2.patch53
-rw-r--r--media-gfx/splashutils/files/splashutils-1.5.4.4-sys-queue.patch8
-rw-r--r--media-gfx/splashutils/metadata.xml16
-rw-r--r--media-gfx/splashutils/splashutils-1.5.4.4-r5.ebuild236
-rw-r--r--media-gfx/springgraph/Manifest2
-rw-r--r--media-gfx/springgraph/metadata.xml14
-rw-r--r--media-gfx/springgraph/springgraph-88.ebuild38
-rw-r--r--media-gfx/structure-synth/Manifest1
-rw-r--r--media-gfx/structure-synth/metadata.xml8
-rw-r--r--media-gfx/structure-synth/structure-synth-1.5.0.ebuild39
-rw-r--r--media-gfx/svg2rlg/Manifest1
-rw-r--r--media-gfx/svg2rlg/files/svg2rlg-issue-3.patch19
-rw-r--r--media-gfx/svg2rlg/files/svg2rlg-issue-6.patch47
-rw-r--r--media-gfx/svg2rlg/files/svg2rlg-issue-7.patch16
-rw-r--r--media-gfx/svg2rlg/metadata.xml12
-rw-r--r--media-gfx/svg2rlg/svg2rlg-0.3.ebuild40
-rw-r--r--media-gfx/swftools/Manifest1
-rw-r--r--media-gfx/swftools/files/swftools-0.9.2_general.patch28
-rw-r--r--media-gfx/swftools/files/swftools-0.9.2_giflib.patch89
-rw-r--r--media-gfx/swftools/files/swftools-0.9.2_nopdf.patch40
-rw-r--r--media-gfx/swftools/metadata.xml13
-rw-r--r--media-gfx/swftools/swftools-0.9.2.ebuild46
-rw-r--r--media-gfx/sxiv/Manifest4
-rw-r--r--media-gfx/sxiv/files/sxiv-1.1-makefile.patch14
-rw-r--r--media-gfx/sxiv/files/sxiv-1.2-makefile.patch16
-rw-r--r--media-gfx/sxiv/files/sxiv-1.3-makefile.patch30
-rw-r--r--media-gfx/sxiv/metadata.xml8
-rw-r--r--media-gfx/sxiv/sxiv-1.1.1.ebuild34
-rw-r--r--media-gfx/sxiv/sxiv-1.2.ebuild34
-rw-r--r--media-gfx/sxiv/sxiv-1.3.1.ebuild37
-rw-r--r--media-gfx/sxiv/sxiv-1.3.ebuild37
-rw-r--r--media-gfx/symboleditor/Manifest1
-rw-r--r--media-gfx/symboleditor/files/symboleditor-1.5.0-cflags.patch25
-rw-r--r--media-gfx/symboleditor/metadata.xml5
-rw-r--r--media-gfx/symboleditor/symboleditor-1.5.0.ebuild26
-rw-r--r--media-gfx/tachyon/Manifest2
-rw-r--r--media-gfx/tachyon/files/0.98.9-ldflags.patch13
-rw-r--r--media-gfx/tachyon/files/tachyon-0.99_beta6-ldflags.patch13
-rw-r--r--media-gfx/tachyon/files/tachyon-0.99_beta6-shared.patch179
-rw-r--r--media-gfx/tachyon/metadata.xml8
-rw-r--r--media-gfx/tachyon/tachyon-0.98.9-r2.ebuild123
-rw-r--r--media-gfx/tachyon/tachyon-0.99_beta6.ebuild134
-rw-r--r--media-gfx/tgif/Manifest1
-rw-r--r--media-gfx/tgif/metadata.xml7
-rw-r--r--media-gfx/tgif/tgif-4.2.5.ebuild46
-rw-r--r--media-gfx/tic98/Manifest1
-rw-r--r--media-gfx/tic98/files/tic98-1.01-gentoo.diff205
-rw-r--r--media-gfx/tic98/files/tic98-1.01-glibc-2.10.patch20
-rw-r--r--media-gfx/tic98/files/tic98-1.01-macos.patch26
-rw-r--r--media-gfx/tic98/metadata.xml5
-rw-r--r--media-gfx/tic98/tic98-1.01-r3.ebuild46
-rw-r--r--media-gfx/tif22pnm/Manifest1
-rw-r--r--media-gfx/tif22pnm/files/tif22pnm-0.14-gentoo.patch44
-rw-r--r--media-gfx/tif22pnm/metadata.xml8
-rw-r--r--media-gfx/tif22pnm/tif22pnm-0.14.ebuild29
-rw-r--r--media-gfx/tintii/Manifest3
-rw-r--r--media-gfx/tintii/metadata.xml5
-rw-r--r--media-gfx/tintii/tintii-2.8.0.ebuild26
-rw-r--r--media-gfx/tintii/tintii-2.8.2.ebuild25
-rw-r--r--media-gfx/tintii/tintii-2.9.0.ebuild25
-rw-r--r--media-gfx/transfig/Manifest3
-rw-r--r--media-gfx/transfig/files/transfig-3.2.5-solaris.patch12
-rw-r--r--media-gfx/transfig/files/transfig-3.2.5c-maxfontsize.patch44
-rw-r--r--media-gfx/transfig/files/transfig-3.2.5d-MAXWIDTH.patch19
-rw-r--r--media-gfx/transfig/files/transfig-3.2.5d-fig2mpdf-r1.patch1425
-rw-r--r--media-gfx/transfig/files/transfig-3.2.5d-fig2mpdf.patch522
-rw-r--r--media-gfx/transfig/files/transfig-3.2.5d-leadspace.patch19
-rw-r--r--media-gfx/transfig/files/transfig-3.2.5d-libpng-1.5.patch39
-rw-r--r--media-gfx/transfig/files/transfig-3.2.5d-precision.patch45
-rw-r--r--media-gfx/transfig/files/transfig-3.2.5e-fprintf_format_warnings.patch55
-rw-r--r--media-gfx/transfig/files/transfig-3.2.5e-man-hyphen.patch530
-rw-r--r--media-gfx/transfig/files/transfig-3.2.5e-typos.patch25
-rw-r--r--media-gfx/transfig/files/transfig-ru_RU.CP1251.ps298
-rw-r--r--media-gfx/transfig/files/transfig-ru_RU.KOI8-R.ps298
-rw-r--r--media-gfx/transfig/files/transfig-uk_UA.KOI8-U.ps298
-rw-r--r--media-gfx/transfig/metadata.xml11
-rw-r--r--media-gfx/transfig/transfig-3.2.5d-r1.ebuild95
-rw-r--r--media-gfx/transfig/transfig-3.2.5e.ebuild94
-rw-r--r--media-gfx/tuxpaint-stamps/Manifest1
-rw-r--r--media-gfx/tuxpaint-stamps/files/tuxpaint-stamps-20090628-make-382.patch15
-rw-r--r--media-gfx/tuxpaint-stamps/metadata.xml11
-rw-r--r--media-gfx/tuxpaint-stamps/tuxpaint-stamps-20090628.ebuild33
-rw-r--r--media-gfx/tuxpaint/Manifest1
-rw-r--r--media-gfx/tuxpaint/files/tuxpaint-0.9.20-gentoo.patch136
-rw-r--r--media-gfx/tuxpaint/files/tuxpaint-0.9.21-LDFLAGS.patch22
-rw-r--r--media-gfx/tuxpaint/files/tuxpaint-0.9.21-libpng1.5.patch19
-rw-r--r--media-gfx/tuxpaint/files/tuxpaint-0.9.21-underlinking.patch17
-rw-r--r--media-gfx/tuxpaint/metadata.xml15
-rw-r--r--media-gfx/tuxpaint/tuxpaint-0.9.21-r1.ebuild71
-rw-r--r--media-gfx/ufraw/Manifest3
-rw-r--r--media-gfx/ufraw/files/ufraw-0.17-cfitsio-automagic.patch28
-rw-r--r--media-gfx/ufraw/files/ufraw-0.20-gimp.patch24
-rw-r--r--media-gfx/ufraw/files/ufraw-0.21-CVE-2015-3885.patch52
-rw-r--r--media-gfx/ufraw/metadata.xml19
-rw-r--r--media-gfx/ufraw/ufraw-0.20-r1.ebuild81
-rw-r--r--media-gfx/ufraw/ufraw-0.21-r1.ebuild81
-rw-r--r--media-gfx/ufraw/ufraw-0.21.ebuild80
-rw-r--r--media-gfx/ufraw/ufraw-0.22.ebuild80
-rw-r--r--media-gfx/uniconvertor/Manifest1
-rw-r--r--media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-import.patch30
-rw-r--r--media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-libimg.patch30
-rw-r--r--media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-test.patch37
-rw-r--r--media-gfx/uniconvertor/metadata.xml8
-rw-r--r--media-gfx/uniconvertor/uniconvertor-2.0_pre379-r1.ebuild55
-rw-r--r--media-gfx/videorbits/Manifest1
-rw-r--r--media-gfx/videorbits/files/videorbits-2.201-libpng15.patch30
-rw-r--r--media-gfx/videorbits/metadata.xml11
-rw-r--r--media-gfx/videorbits/videorbits-2.201.ebuild40
-rw-r--r--media-gfx/viewer/Manifest1
-rw-r--r--media-gfx/viewer/metadata.xml8
-rw-r--r--media-gfx/viewer/viewer-0.8.0.ebuild43
-rw-r--r--media-gfx/viewnior/Manifest2
-rw-r--r--media-gfx/viewnior/metadata.xml11
-rw-r--r--media-gfx/viewnior/viewnior-1.3.ebuild44
-rw-r--r--media-gfx/viewnior/viewnior-1.4.ebuild44
-rw-r--r--media-gfx/w3mimgfb/Manifest1
-rw-r--r--media-gfx/w3mimgfb/metadata.xml7
-rw-r--r--media-gfx/w3mimgfb/w3mimgfb-0.9.1.ebuild36
-rw-r--r--media-gfx/wally/Manifest1
-rw-r--r--media-gfx/wally/files/wally-2.2.0-disable-kde4.patch14
-rw-r--r--media-gfx/wally/files/wally-2.2.0-disable_popup.patch9
-rw-r--r--media-gfx/wally/files/wally-2.4.4-gold.patch11
-rw-r--r--media-gfx/wally/metadata.xml12
-rw-r--r--media-gfx/wally/wally-2.4.5.ebuild62
-rw-r--r--media-gfx/wings/Manifest1
-rw-r--r--media-gfx/wings/files/wings.sh4
-rw-r--r--media-gfx/wings/metadata.xml18
-rw-r--r--media-gfx/wings/wings-1.1.1.ebuild45
-rw-r--r--media-gfx/wkhtmltopdf/Manifest2
-rw-r--r--media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.1.2-manpages.patch24
-rw-r--r--media-gfx/wkhtmltopdf/metadata.xml8
-rw-r--r--media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.1.2.ebuild40
-rw-r--r--media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.2.1.ebuild40
-rw-r--r--media-gfx/xfig/Manifest1
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-CVE-2010-4262.patch22
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch24
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-darwin.patch22
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-edit-menu.patch332
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-figparserstack.patch61
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-fix-eps-reading.patch46
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-libpng-1.5.patch70
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch32
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-network_images.patch371
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-papersize_b1.patch27
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-pdfimport_mediabox.patch37
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-solaris.patch26
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-spelling.patch29
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch79
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5b-zoom-during-edit.patch22
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5c-XAW3D1_5E_notlocal.patch70
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5c-crash-on-exit.patch19
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5c-darwin.patch26
-rw-r--r--media-gfx/xfig/files/xfig-3.2.5c-spelling.patch17
-rw-r--r--media-gfx/xfig/metadata.xml11
-rw-r--r--media-gfx/xfig/xfig-3.2.5c.ebuild110
-rw-r--r--media-gfx/xli/Manifest1
-rw-r--r--media-gfx/xli/files/Xli.ad2
-rw-r--r--media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch61
-rw-r--r--media-gfx/xli/files/xli-1.17.0-libpng14.patch14
-rw-r--r--media-gfx/xli/files/xli-security-gentoo.diff199
-rw-r--r--media-gfx/xli/metadata.xml5
-rw-r--r--media-gfx/xli/xli-1.17.0-r5.ebuild76
-rw-r--r--media-gfx/xloadimage/Manifest2
-rw-r--r--media-gfx/xloadimage/files/xloadimage-4.1-bracket.patch13
-rw-r--r--media-gfx/xloadimage/files/xloadimage-4.1-endif.patch11
-rw-r--r--media-gfx/xloadimage/files/xloadimage-4.1-include-errno_h.patch13
-rw-r--r--media-gfx/xloadimage/files/xloadimage-4.1-ldflags_and_exit.patch23
-rw-r--r--media-gfx/xloadimage/files/xloadimage-4.1-libpng15.patch29
-rw-r--r--media-gfx/xloadimage/files/xloadimage-4.1-unaligned-access.patch51
-rw-r--r--media-gfx/xloadimage/files/xloadimage-4.1-zio-shell-meta-char.diff36
-rw-r--r--media-gfx/xloadimage/files/xloadimage-gentoo.patch258
-rw-r--r--media-gfx/xloadimage/metadata.xml5
-rw-r--r--media-gfx/xloadimage/xloadimage-4.1-r11.ebuild95
-rw-r--r--media-gfx/xpaint/Manifest1
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.10.2-QA2.patch67
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.10.2-tiff.patch37
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.9.4-QA1.patch91
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.9.4-QA2.patch67
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.9.4-autoreconf.patch24
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.9.4-parallel-make.patch25
-rw-r--r--media-gfx/xpaint/files/xpaint-2.9.9.4-submake.patch29
-rw-r--r--media-gfx/xpaint/metadata.xml32
-rw-r--r--media-gfx/xpaint/xpaint-2.9.10.2.ebuild85
-rw-r--r--media-gfx/xsane/Manifest2
-rw-r--r--media-gfx/xsane/files/xsane-0.999-lcms2.patch372
-rw-r--r--media-gfx/xsane/metadata.xml12
-rw-r--r--media-gfx/xsane/xsane-0.999-r1.ebuild87
-rw-r--r--media-gfx/xsvg/Manifest1
-rw-r--r--media-gfx/xsvg/files/xsvg-0.2.1-asneeded.patch9
-rw-r--r--media-gfx/xsvg/metadata.xml5
-rw-r--r--media-gfx/xsvg/xsvg-0.2.1.ebuild33
-rw-r--r--media-gfx/xv/Manifest3
-rw-r--r--media-gfx/xv/files/xv-3.10a-add-ldflags-20070520.patch27
-rw-r--r--media-gfx/xv/files/xv-3.10a-disable-jp2k-20070520.patch23
-rw-r--r--media-gfx/xv/files/xv-3.10a-fix-wait-20070520.patch40
-rw-r--r--media-gfx/xv/files/xv-3.10a-libpng15.patch520
-rw-r--r--media-gfx/xv/files/xv-3.10a-osx-bsd-20070520.patch38
-rw-r--r--media-gfx/xv/files/xv-3.10a-vdcomp-osx-20070520.patch11
-rw-r--r--media-gfx/xv/metadata.xml10
-rw-r--r--media-gfx/xv/xv-3.10a-r16.ebuild92
-rw-r--r--media-gfx/xzgv/Manifest1
-rw-r--r--media-gfx/xzgv/files/xzgv-0.9-asneeded-and-cflags.patch35
-rw-r--r--media-gfx/xzgv/metadata.xml8
-rw-r--r--media-gfx/xzgv/xzgv-0.9.1.ebuild34
-rw-r--r--media-gfx/yafaray/Manifest2
-rw-r--r--media-gfx/yafaray/metadata.xml13
-rw-r--r--media-gfx/yafaray/yafaray-0.1.1.ebuild85
-rw-r--r--media-gfx/zbar/Manifest2
-rw-r--r--media-gfx/zbar/files/zbar-0.10-errors.patch10
-rw-r--r--media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch74
-rw-r--r--media-gfx/zbar/files/zbar-0.10-python-crash.patch19
-rw-r--r--media-gfx/zbar/metadata.xml11
-rw-r--r--media-gfx/zbar/zbar-0.10-r5.ebuild71
-rw-r--r--media-gfx/zbar/zbar-0.10_p20121015.ebuild79
-rw-r--r--media-gfx/zgv/Manifest1
-rw-r--r--media-gfx/zgv/files/zgv-5.9-Makefile-QA.patch56
-rw-r--r--media-gfx/zgv/files/zgv-5.9-cmyk-yccl-fix.diff64
-rw-r--r--media-gfx/zgv/files/zgv-5.9-libpng15.patch22
-rw-r--r--media-gfx/zgv/metadata.xml8
-rw-r--r--media-gfx/zgv/zgv-5.9.ebuild57
1481 files changed, 59623 insertions, 0 deletions
diff --git a/media-gfx/DFBPoint/DFBPoint-0.7.2.ebuild b/media-gfx/DFBPoint/DFBPoint-0.7.2.ebuild
new file mode 100644
index 000000000000..08c910cf302a
--- /dev/null
+++ b/media-gfx/DFBPoint/DFBPoint-0.7.2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit gnome2-utils
+
+DESCRIPTION="DFBPoint is presentation program based on DirectFB"
+HOMEPAGE="http://www.directfb.org/index.php?path=Projects%2FDFBPoint"
+SRC_URI="http://www.directfb.org/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 -sparc x86"
+IUSE=""
+
+RDEPEND="
+ dev-libs/DirectFB
+ >=dev-libs/glib-2:2
+"
+DEPEND="${RDEPEND}
+ >=dev-libs/glib-2
+"
+
+src_prepare() {
+ gnome2_disable_deprecation_warning
+}
+
+src_install () {
+ default
+
+ dodir /usr/share/DFBPoint/
+ cp dfbpoint.dtd "${D}"/usr/share/DFBPoint/
+
+ dodoc AUTHORS ChangeLog INSTALL README NEWS
+
+ dodir /usr/share/DFBPoint/examples/
+ cd examples
+ cp bg.png bullet.png decker.ttf test.xml wilber_stoned.png \
+ "${D}"/usr/share/DFBPoint/examples/
+ cp -R guadec/ "${D}"/usr/share/DFBPoint/examples/
+}
diff --git a/media-gfx/DFBPoint/Manifest b/media-gfx/DFBPoint/Manifest
new file mode 100644
index 000000000000..a0e3096f0622
--- /dev/null
+++ b/media-gfx/DFBPoint/Manifest
@@ -0,0 +1 @@
+DIST DFBPoint-0.7.2.tar.gz 536190 SHA256 0518773b8aceca0f105a01c70480951c1b6ee173d85db31f9168d3c4173df325 SHA512 f1e256a40adfa9397a07730eb53c6239ea26615a789337d93f02ed85b16750768634398ed4e3da36cde7192b8fc34a87ccbe0e85f394a586da18d8f982e3b304 WHIRLPOOL ee24222a262c6495cf6c14c75e6131a2d4d970688165d017026f4810bb92a28ab738a1e9bfcacd7e34120ed05998f2deddddf7572de01a0dcdc75ea658752af2
diff --git a/media-gfx/DFBPoint/metadata.xml b/media-gfx/DFBPoint/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/media-gfx/DFBPoint/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/aaphoto/Manifest b/media-gfx/aaphoto/Manifest
new file mode 100644
index 000000000000..a7ef82e5e21b
--- /dev/null
+++ b/media-gfx/aaphoto/Manifest
@@ -0,0 +1 @@
+DIST aaphoto-0.43.1.tar.gz 135261 SHA256 35a21d075d297872e35f52c9e92ab8e7ee403f5ecf4927634f22b56bb401b5ca SHA512 272a949051cd7efbb092d5d115100376ffe17012b6d02d68b5b8251b75ebab3449b2f5c889aac60a3790c20137ffc4ea69452751d04a8e65c0cb39af84e1034d WHIRLPOOL bebf332bf7eeb711c34740acc78c02a285aac291d49fdc13526e86f6f1ae01c6ccac142abbbf5ed5842cf349fc56758071034f8714734f5053eccf59682d020c
diff --git a/media-gfx/aaphoto/aaphoto-0.43.1.ebuild b/media-gfx/aaphoto/aaphoto-0.43.1.ebuild
new file mode 100644
index 000000000000..9710aa346f9d
--- /dev/null
+++ b/media-gfx/aaphoto/aaphoto-0.43.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AM_OPTS="--force-missing" # overwrite old 'missing' script
+inherit autotools-utils
+
+DESCRIPTION="Automatic color correction and resizing of photos"
+HOMEPAGE="http://log69.com/aaphoto.html http://github.com/log69/aaphoto"
+SRC_URI="http://github.com/log69/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+RDEPEND="media-libs/jasper[jpeg]
+ media-libs/libpng:0=
+ sys-libs/zlib
+ virtual/jpeg:0"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ [[ $(gcc-major-version) -lt 4 ]] || \
+ ( [[ $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 2 ]] ) \
+ && die "Sorry, but gcc 4.2 or higher is required"
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
diff --git a/media-gfx/aaphoto/metadata.xml b/media-gfx/aaphoto/metadata.xml
new file mode 100644
index 000000000000..62ebf7726c21
--- /dev/null
+++ b/media-gfx/aaphoto/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>erkiferenc@gmail.com</email>
+ <name>Ferenc Erki</name>
+ <description>Maintainer. Assign bugs to him</description>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">log69/aaphoto</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/aewan/Manifest b/media-gfx/aewan/Manifest
new file mode 100644
index 000000000000..6788e0cc9f94
--- /dev/null
+++ b/media-gfx/aewan/Manifest
@@ -0,0 +1 @@
+DIST aewan-1.0.01.tar.gz 122880 SHA256 5266dec5e185e530b792522821c97dfa5f9e3892d0dca5e881d0c30ceac21817 SHA512 8c7e81ed3e2c4d0848e36ed60922c920471c7bc46a7127f529be3f5a9c3c66a6e0dff06bca7b5cb21eb0a93d03ba31fd4ef07fc48e2e39f2224956801fe322f3 WHIRLPOOL d432ad982507324a2467bc88b6158d1365e6d2abd50eacf52814ed9d16c5569f1e59cf08c9cd2f14ed80381c1e9fa71c1451145daf8f92677e9af235d3e12880
diff --git a/media-gfx/aewan/aewan-1.0.01-r1.ebuild b/media-gfx/aewan/aewan-1.0.01-r1.ebuild
new file mode 100644
index 000000000000..7fdd8084cb70
--- /dev/null
+++ b/media-gfx/aewan/aewan-1.0.01-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="A curses-based ascii-art editor"
+HOMEPAGE="http://aewan.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+DOCS=( CHANGELOG README TODO )
+
+DEPEND="sys-libs/zlib
+ >=sys-libs/ncurses-5.0"
+
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-debug_aewl-warnings.patch" \
+ "${FILESDIR}/${P}-tinfo.patch"
+ eautoreconf
+}
diff --git a/media-gfx/aewan/files/aewan-1.0.01-debug_aewl-warnings.patch b/media-gfx/aewan/files/aewan-1.0.01-debug_aewl-warnings.patch
new file mode 100644
index 000000000000..4d96f487741f
--- /dev/null
+++ b/media-gfx/aewan/files/aewan-1.0.01-debug_aewl-warnings.patch
@@ -0,0 +1,10 @@
+--- aewan-1.0.01.orig/debug_aewl.c
++++ aewan-1.0.01/debug_aewl.c
+@@ -8,6 +8,7 @@
+ #include "aewl/label.h"
+
+ #include "keys.h"
++#include "filedlg.h"
+
+ #include <ncurses.h>
+ #include <stdbool.h>
diff --git a/media-gfx/aewan/files/aewan-1.0.01-tinfo.patch b/media-gfx/aewan/files/aewan-1.0.01-tinfo.patch
new file mode 100644
index 000000000000..b4edfd1b990c
--- /dev/null
+++ b/media-gfx/aewan/files/aewan-1.0.01-tinfo.patch
@@ -0,0 +1,15 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -13,9 +13,10 @@
+
+ # Checks for libraries.
+ AC_CHECK_LIB([ncurses], [initscr], [],
+- AC_MSG_ERROR([Can't find ncurses library. Install it first.]))
++ AC_MSG_ERROR([Cannot find ncurses library. Install it first.]))
++AC_SEARCH_LIBS([define_key], [tinfo])
+ AC_CHECK_LIB([z], [gzopen], [],
+- AC_MSG_ERROR([Can't find zlib library. Install it first.]))
++ AC_MSG_ERROR([Cannot find zlib library. Install it first.]))
+
+ # Checks for header files.
+ AC_HEADER_STDC
diff --git a/media-gfx/aewan/metadata.xml b/media-gfx/aewan/metadata.xml
new file mode 100644
index 000000000000..39ec7931c103
--- /dev/null
+++ b/media-gfx/aewan/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>zlogene@gentoo.org</email>
+ <name>Mikle Kolyada</name>
+ </maintainer>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <longdescription lang="en">
+Aewan is a multi-layered ascii-art/animation editor that produces both
+stand-alone cat-able art files and an easy-to-parse format for integration in
+your terminal applications.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">aewan</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/album/Manifest b/media-gfx/album/Manifest
new file mode 100644
index 000000000000..29289348eda2
--- /dev/null
+++ b/media-gfx/album/Manifest
@@ -0,0 +1,3 @@
+DIST album-4.07.tar.gz 619238 SHA256 eed9a3abe206397afaf21f445178845aa38159f359dc0dffd3174dd8b26ae0e8 SHA512 dde914a8a0f0dd5896d069ad22c47db645f1acefc9c2d1a7047862185e3b96b0c4fb2c9681d8838eaf3de40b49082b9c06d848340aa92ecb8f398d9fd31273ba WHIRLPOOL 2fbcf5ce69a45b8b1005e2aa4642be17066eea74f5a9573ac074106595eedf1d69bc72135ae1939e80400c98afd4347964662d6380cf629046317dfd6bc1b4e0
+DIST album-4.13.tar.gz 667760 SHA256 b25c4d27546b710175f1a482f5222371fa6deefa011d31c68035f46b94f19b06 SHA512 c22bbc5ad154f35d50d28e5331911d0fd32c5e7f25b659e48274baa1ccc9e3e8b9f771a1bfdf39078c9e959c3fd84b3ccd8528f20f7a80baa7c59bc579579756 WHIRLPOOL 56ba2457a5e583e0228b563e0d1d9443a1ef0a1b83a7444ed31368814b3e21bc017d421a8f080a639f72dfb563ec062f132dc082d9dafd137a773c5883f2396f
+DIST data-4.05.tar.gz 6468036 SHA256 e1ee211d652f886494b84e957cd9a2f34b8a6b1fb3adad320484a62ce30debc6 SHA512 a7c577df6d10dc2db53fa6d469d2cf9c5115de99df47e79f31ecc0b009bd12e654e4ca7b9e6e78abe90a8a87d5f52ca9946a2d632e3f219d9bcb5ab7838ce42e WHIRLPOOL 00831d65b611652301310b743276cdd5434a9702c8a92a220267aa8ccf28783aaef7e9de57f8493f446e261c14eb7020ea4edd1a2dfdf4942d17f88c051b6800
diff --git a/media-gfx/album/album-4.07.ebuild b/media-gfx/album/album-4.07.ebuild
new file mode 100644
index 000000000000..9e47e43e94cd
--- /dev/null
+++ b/media-gfx/album/album-4.07.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="HTML photo album generator"
+HOMEPAGE="http://MarginalHacks.com/Hacks/album/"
+SRC_URI="http://marginalhacks.com/bin/album.versions/${P}.tar.gz
+ http://marginalhacks.com/bin/album.versions/data-4.05.tar.gz"
+
+LICENSE="marginalhacks"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~ppc64 x86"
+IUSE="doc ffmpeg plugins themes"
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ media-gfx/imagemagick
+ media-gfx/jhead
+ ffmpeg? ( virtual/ffmpeg )"
+
+src_install() {
+ dobin album
+ doman album.1
+ dodoc License.txt CHANGELOG
+ use doc && dohtml -r Docs/*
+
+ dodir /usr/share/album
+ insinto /usr/share/album
+ cd ..
+ doins -r lang
+ use themes && doins -r Themes
+ use plugins && doins -r plugins
+}
+
+pkg_postinst() {
+ elog "For some optional tools please browse:"
+ elog "http://MarginalHacks.com/Hacks/album/tools/"
+}
diff --git a/media-gfx/album/album-4.13.ebuild b/media-gfx/album/album-4.13.ebuild
new file mode 100644
index 000000000000..8ef0a2a5e15d
--- /dev/null
+++ b/media-gfx/album/album-4.13.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="HTML photo album generator"
+HOMEPAGE="http://MarginalHacks.com/Hacks/album/"
+SRC_URI="http://marginalhacks.com/bin/album.versions/${P}.tar.gz
+ http://marginalhacks.com/bin/album.versions/data-4.05.tar.gz"
+
+LICENSE="marginalhacks"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="doc ffmpeg plugins themes"
+
+DEPEND=""
+RDEPEND="dev-lang/perl
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )
+ media-gfx/jhead
+ ffmpeg? ( virtual/ffmpeg )"
+
+src_install() {
+ dobin album
+ doman album.1
+ dodoc License.txt CHANGELOG
+ use doc && dohtml -r Docs/*
+
+ dodir /usr/share/album
+ insinto /usr/share/album
+ cd ..
+ doins -r lang
+ use themes && doins -r Themes
+ use plugins && doins -r plugins
+}
+
+pkg_postinst() {
+ elog "For some optional tools please browse:"
+ elog "http://MarginalHacks.com/Hacks/album/tools/"
+}
diff --git a/media-gfx/album/metadata.xml b/media-gfx/album/metadata.xml
new file mode 100644
index 000000000000..f99fc2d51a77
--- /dev/null
+++ b/media-gfx/album/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+<use>
+ <flag name="plugins">Install optional plugins</flag>
+ <flag name="themes">Install optional themes</flag>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/aoi/Manifest b/media-gfx/aoi/Manifest
new file mode 100644
index 000000000000..aafc192dbcd2
--- /dev/null
+++ b/media-gfx/aoi/Manifest
@@ -0,0 +1,4 @@
+DIST aoi25.zip 4529346 SHA256 4b2fef9afa9015fda0d6b7e8fa684d83081f0c83f184330c9432cbd5ccda5231
+DIST aoi272.zip 4733701 SHA256 d5850d13f8fda8f7708676492c9bc9e3471889a7f19f28cae6f1e191de17325e
+DIST manual2.3.zip 11511867 SHA256 d517bf915c5382cec7ef98aff84f9d6eea60e137cbd7e4a83c9d2e02d7b56de3
+DIST manual2.6.zip 13402007 SHA256 b99d249af1e578ebaaa6e4270eed8062e4c9cd2f50e60cd2c26f646076d575e0
diff --git a/media-gfx/aoi/aoi-2.5.ebuild b/media-gfx/aoi/aoi-2.5.ebuild
new file mode 100644
index 000000000000..9873f952a9ca
--- /dev/null
+++ b/media-gfx/aoi/aoi-2.5.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit java-pkg-2 eutils
+
+MY_P="aoi25"
+MY_MANUAL_V="2.3"
+S="${WORKDIR}/ArtOfIllusion25"
+DESCRIPTION="A free, open-source 3D modelling and rendering studio"
+SRC_URI="mirror://sourceforge/aoi/${MY_P}.zip
+ doc? ( mirror://sourceforge/aoi/manual${MY_MANUAL_V}.zip )"
+HOMEPAGE="http://aoi.sourceforge.net/index"
+KEYWORDS="~amd64 ~ppc x86"
+LICENSE="GPL-2"
+SLOT="0"
+DEPEND="app-arch/unzip"
+RDEPEND=">=virtual/jre-1.4"
+IUSE="doc"
+
+src_install() {
+ # documentation
+ dodoc HISTORY README
+ if use doc ; then
+ mv "${WORKDIR}"/AoI\ Manual/ "${WORKDIR}"/aoi_manual
+ dohtml -r "${WORKDIR}"/aoi_manual/
+ fi
+
+ # main app
+ java-pkg_dojar ArtOfIllusion.jar
+
+ # run script
+ java-pkg_dolauncher aoi \
+ --jar ArtOfIllusion.jar \
+ --java_args -Xmx128M
+
+ # plugins
+ mv Plugins "${D}"/usr/share/${PN}/lib
+
+ # scripts
+ mv Scripts "${D}"/usr/share/${PN}/lib
+
+ # icon
+ mv Icons/64x64.png Icons/aoi.png
+ doicon Icons/aoi.png
+
+ # desktop entry
+ make_desktop_entry aoi "Art of Illusion" aoi "Graphics"
+}
diff --git a/media-gfx/aoi/aoi-2.7.2.ebuild b/media-gfx/aoi/aoi-2.7.2.ebuild
new file mode 100644
index 000000000000..b8c8d069543c
--- /dev/null
+++ b/media-gfx/aoi/aoi-2.7.2.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit java-pkg-2 eutils versionator
+
+MY_V=$(delete_all_version_separators)
+MY_P="aoi${MY_V}"
+MY_MANUAL_V="2.6"
+S="${WORKDIR}/ArtOfIllusion${MY_V}"
+DESCRIPTION="A free, open-source 3D modelling and rendering studio"
+SRC_URI="mirror://sourceforge/aoi/${MY_P}.zip
+ doc? ( mirror://sourceforge/aoi/manual${MY_MANUAL_V}.zip )"
+HOMEPAGE="http://aoi.sourceforge.net/index"
+KEYWORDS="~amd64 ~ppc ~x86"
+LICENSE="GPL-2"
+SLOT="0"
+DEPEND="app-arch/unzip"
+RDEPEND=">=virtual/jre-1.5"
+IUSE="doc"
+
+src_install() {
+ # documentation
+ dodoc HISTORY README
+ if use doc ; then
+ mv "${WORKDIR}"/AoI\ Manual/ "${WORKDIR}"/aoi_manual
+ dohtml -r "${WORKDIR}"/aoi_manual/
+ fi
+
+ # main app
+ java-pkg_dojar ArtOfIllusion.jar
+
+ # run script
+ java-pkg_dolauncher aoi \
+ --jar ArtOfIllusion.jar \
+ --java_args -Xmx128M
+
+ # plugins
+ mv Plugins "${D}"/usr/share/${PN}/lib
+
+ # scripts
+ mv Scripts "${D}"/usr/share/${PN}/lib
+
+ # icon
+ mv Icons/64x64.png Icons/aoi.png
+ doicon Icons/aoi.png
+
+ # desktop entry
+ make_desktop_entry aoi "Art of Illusion" aoi "Graphics"
+}
diff --git a/media-gfx/aoi/files/aoi b/media-gfx/aoi/files/aoi
new file mode 100644
index 000000000000..e7f56707c606
--- /dev/null
+++ b/media-gfx/aoi/files/aoi
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Art Of Illusion Launch Script
+# Author: Dylan Carlson
+# May 2003
+# $Id$
+
+JAVA_HOME=`/usr/bin/java-config --jdk-home`
+if [ -z "${JAVA_HOME}" ] ; then
+ JAVA_HOME=`/usr/bin/java-config --jre-home`
+fi
+CLASSPATH="${CLASSPATH}:`/usr/bin/java-config --classpath=aoi`"
+
+if [ ! -f ${JAVA_HOME}/bin/java ] ; then
+ echo " "
+ echo "I tried using the following Java Runtime:"
+ echo "${JAVA_HOME}/bin/java"
+ echo " "
+ echo "Java Runtime missing. Please run java-config(1) and ensure"
+ echo "your environment is configured properly."
+ exit 1
+else
+ echo " "
+ echo "Using Java Runtime:"
+ echo "${JAVA_HOME}/bin/java"
+ echo " "
+ echo "Using CLASSPATH:"
+ echo "${CLASSPATH}"
+ echo " "
+fi
+
+${JAVA_HOME}/bin/java -Xmx128M -jar /usr/share/aoi/lib/ArtOfIllusion.jar $*
diff --git a/media-gfx/aoi/metadata.xml b/media-gfx/aoi/metadata.xml
new file mode 100644
index 000000000000..670266a8b580
--- /dev/null
+++ b/media-gfx/aoi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">aoi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/apng2gif/Manifest b/media-gfx/apng2gif/Manifest
new file mode 100644
index 000000000000..8d0b285a7cfa
--- /dev/null
+++ b/media-gfx/apng2gif/Manifest
@@ -0,0 +1,3 @@
+DIST apng2gif-1.4-src.zip 11797 SHA256 be12409304bb268c26c55692822f7aff072315edd6b8120d829264a08e4b2781
+DIST apng2gif-1.5-src.zip 11830 SHA256 024d9f042691216f74d39cec308c447531bd67bee0fab33b32990163559d4978
+DIST apng2gif-1.6-src.zip 455673 SHA256 cd46d7d6de34fed11822ec7f2257b296ec5e45ba1cfa53f70c7974fdae456ffe SHA512 4beeb628f26614b9084ac33eba748559eeb36ee9fb9cf17559973b5c629d898f868a5ae719bff6745ce60dfa99958fd503d2c96bc816f522dbb415383af87462 WHIRLPOOL c969674ea8049c88b8c18c8bd75f8bb6598f61a0e6c84b113b3eba8b4de3a520111a3423c8331969779636aa704c8bcbd96493d3c17b0eeed39c379e080be9eb
diff --git a/media-gfx/apng2gif/apng2gif-1.4.ebuild b/media-gfx/apng2gif/apng2gif-1.4.ebuild
new file mode 100644
index 000000000000..b086df6bb4d6
--- /dev/null
+++ b/media-gfx/apng2gif/apng2gif-1.4.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="create a GIF from an APNG"
+HOMEPAGE="http://sourceforge.net/projects/apng2gif/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDLIBS="-lz" ${PN}
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/apng2gif/apng2gif-1.5.ebuild b/media-gfx/apng2gif/apng2gif-1.5.ebuild
new file mode 100644
index 000000000000..8969f72abb93
--- /dev/null
+++ b/media-gfx/apng2gif/apng2gif-1.5.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="create a GIF from an APNG"
+HOMEPAGE="http://sourceforge.net/projects/apng2gif/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDLIBS="-lz" ${PN}
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/apng2gif/apng2gif-1.6.ebuild b/media-gfx/apng2gif/apng2gif-1.6.ebuild
new file mode 100644
index 000000000000..5f1abf5a1f9b
--- /dev/null
+++ b/media-gfx/apng2gif/apng2gif-1.6.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="create a GIF from an APNG"
+HOMEPAGE="http://sourceforge.net/projects/apng2gif/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib
+ media-libs/libpng:0="
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ epatch "${FILESDIR}"/${P}-gcc-4.3.patch
+
+ tc-export CXX
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/apng2gif/files/apng2gif-1.6-gcc-4.3.patch b/media-gfx/apng2gif/files/apng2gif-1.6-gcc-4.3.patch
new file mode 100644
index 000000000000..b3d32647b19b
--- /dev/null
+++ b/media-gfx/apng2gif/files/apng2gif-1.6-gcc-4.3.patch
@@ -0,0 +1,10 @@
+--- apng2gif-1.6-src/apng2gif.cpp
++++ apng2gif-1.6-src/apng2gif.cpp
+@@ -30,6 +30,7 @@
+ */
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <cstring>
+ #include <vector>
+ #include "png.h" /* original (unpatched) libpng is ok */
+ #include "zlib.h"
diff --git a/media-gfx/apng2gif/files/apng2gif-1.6-makefile.patch b/media-gfx/apng2gif/files/apng2gif-1.6-makefile.patch
new file mode 100644
index 000000000000..c004a3c5c0c4
--- /dev/null
+++ b/media-gfx/apng2gif/files/apng2gif-1.6-makefile.patch
@@ -0,0 +1,17 @@
+--- apng2gif-1.6-src/Makefile
++++ apng2gif-1.6-src/Makefile
+@@ -1,11 +1,10 @@
+ PACKAGE = apng2gif
+-CC = gcc
+-CFLAGS = -Wall -pedantic
+-CFLAGS_OPT = -O2
++CXX ?= g++
++CFLAGS += -Wall -pedantic
+ LIBS = -lstdc++ -lm -lpng -lz
+
+ all :
+- $(CC) $(CFLAGS) $(CFLAGS_OPT) -o apng2gif apng2gif.cpp -s $(LIBS)
++ $(CXX) $(CFLAGS) $(LDFLAGS) -o apng2gif apng2gif.cpp $(LIBS)
+
+ .PHONY : clean
+
diff --git a/media-gfx/apng2gif/metadata.xml b/media-gfx/apng2gif/metadata.xml
new file mode 100644
index 000000000000..cf8762004522
--- /dev/null
+++ b/media-gfx/apng2gif/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">apng2gif</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/apngasm/Manifest b/media-gfx/apngasm/Manifest
new file mode 100644
index 000000000000..6a948c3dc2df
--- /dev/null
+++ b/media-gfx/apngasm/Manifest
@@ -0,0 +1,3 @@
+DIST apngasm-2.5-src.zip 11333 SHA256 e5346948f2a51328161b3ef0d2c8111cd7289c7b4ac48e72db3a617cfb4f24c5
+DIST apngasm-2.6-src.zip 11350 SHA256 1d4b63e55c241c0db4a812e6cddea48586e4275b041a1e600154c2840f4ebb06 SHA512 b603bb91ad2c803abd18894ff95212f9cbed37a61fdefec60f06284e03bf274721b291f63ac8cf7d6c0cad516cb05f2ae7382f4aeb42ec87ebb07eaf29b27050 WHIRLPOOL 0e1c2684e3b36a062fb832077b29395a2198dca94c784c80d9e9c7de7542db3208a9e80e7529d6e28b2e46b32ff98534b96b62e683eba3a1b2d4515898446b95
+DIST apngasm-2.7-src.zip 11448 SHA256 af42569666cab268a20a0754191396c9d48f4e01d6e8f93c3ae1164c3c821cc3 SHA512 28ec70a4ac02021ff85390ad6863aaca5451937209345128ecd5baf76bef9495168c3c4ee5d823afbeb569ca673328673a81b807e7985c3d5d1843c056af7810 WHIRLPOOL e2cd3c937af8010672cb3866903df084c52e37e7c05c0933f0e7bf2be69ee74a78c5367c463a07d2314e5d416c3616e6e218060298f349be0eab944d4e6af2eb
diff --git a/media-gfx/apngasm/apngasm-2.5.ebuild b/media-gfx/apngasm/apngasm-2.5.ebuild
new file mode 100644
index 000000000000..d8a89394cf0c
--- /dev/null
+++ b/media-gfx/apngasm/apngasm-2.5.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="create an APNG from multiple PNG files"
+HOMEPAGE="http://sourceforge.net/projects/apngasm/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/libpng[apng]
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDLIBS="$($(tc-getPKG_CONFIG) --libs libpng --libs zlib)" ${PN}
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/apngasm/apngasm-2.6.ebuild b/media-gfx/apngasm/apngasm-2.6.ebuild
new file mode 100644
index 000000000000..d8a89394cf0c
--- /dev/null
+++ b/media-gfx/apngasm/apngasm-2.6.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="create an APNG from multiple PNG files"
+HOMEPAGE="http://sourceforge.net/projects/apngasm/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/libpng[apng]
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDLIBS="$($(tc-getPKG_CONFIG) --libs libpng --libs zlib)" ${PN}
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/apngasm/apngasm-2.7.ebuild b/media-gfx/apngasm/apngasm-2.7.ebuild
new file mode 100644
index 000000000000..5c12c8caa3d7
--- /dev/null
+++ b/media-gfx/apngasm/apngasm-2.7.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="create an APNG from multiple PNG files"
+HOMEPAGE="http://sourceforge.net/projects/apngasm/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="media-libs/libpng:0=[apng]
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ virtual/pkgconfig"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-string_h.patch #465780
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDLIBS="$($(tc-getPKG_CONFIG) --libs libpng --libs zlib)" ${PN}
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/apngasm/files/apngasm-2.7-string_h.patch b/media-gfx/apngasm/files/apngasm-2.7-string_h.patch
new file mode 100644
index 000000000000..303e832b37c5
--- /dev/null
+++ b/media-gfx/apngasm/files/apngasm-2.7-string_h.patch
@@ -0,0 +1,16 @@
+http://bugs.gentoo.org/465780
+
+Same for all of memcpy(), memset(), strlen() and strcpy():
+
+apngasm.c:141:11: warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default]
+
+--- apngasm.c
++++ apngasm.c
+@@ -29,6 +29,7 @@
+ */
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include "png.h" /* original (unpatched) libpng is ok */
+ #include "zlib.h"
+
diff --git a/media-gfx/apngasm/metadata.xml b/media-gfx/apngasm/metadata.xml
new file mode 100644
index 000000000000..e61abad77a70
--- /dev/null
+++ b/media-gfx/apngasm/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">apngasm</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/apngdis/Manifest b/media-gfx/apngdis/Manifest
new file mode 100644
index 000000000000..33461dac107a
--- /dev/null
+++ b/media-gfx/apngdis/Manifest
@@ -0,0 +1 @@
+DIST apngdis-2.7-src.zip 450869 SHA256 cce7470d1ec0c518655d63133931e16d01050033405b67220e94ca7b2b97920d SHA512 016c9f0fe1ed7a26f9982414ea797b7a1f1b854ea9d13d089f0fbf9886520b637dc3dd0a7968137db4055f039afb1a5015fa2d1611b48ebb2e98af1b8e3c56fb WHIRLPOOL f9b7360da201de55a86f45decb265d9b71227c4ce6441d8faeb2d6d9211dca8d3da7f76f5e6dd66e8f3f61ddd9d58cb66afddac451dad7a1ec9fbec2080687ed
diff --git a/media-gfx/apngdis/apngdis-2.7.ebuild b/media-gfx/apngdis/apngdis-2.7.ebuild
new file mode 100644
index 000000000000..9584e99cac35
--- /dev/null
+++ b/media-gfx/apngdis/apngdis-2.7.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="extract PNG frames from an APNG"
+HOMEPAGE="http://sourceforge.net/projects/apngdis/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib
+ media-libs/libpng:0="
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.6-makefile.patch
+ epatch "${FILESDIR}"/${PN}-2.6-gcc-4.3.patch
+
+ tc-export CXX
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/apngdis/files/apngdis-2.6-gcc-4.3.patch b/media-gfx/apngdis/files/apngdis-2.6-gcc-4.3.patch
new file mode 100644
index 000000000000..cabf3efed742
--- /dev/null
+++ b/media-gfx/apngdis/files/apngdis-2.6-gcc-4.3.patch
@@ -0,0 +1,10 @@
+--- apngdis-2.6-src/apngdis.cpp
++++ apngdis-2.6-src/apngdis.cpp
+@@ -29,6 +29,7 @@
+ */
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <cstring>
+ #include <vector>
+ #include "png.h" /* original (unpatched) libpng is ok */
+ #include "zlib.h"
diff --git a/media-gfx/apngdis/files/apngdis-2.6-makefile.patch b/media-gfx/apngdis/files/apngdis-2.6-makefile.patch
new file mode 100644
index 000000000000..ada1cc89a23f
--- /dev/null
+++ b/media-gfx/apngdis/files/apngdis-2.6-makefile.patch
@@ -0,0 +1,17 @@
+--- apngdis-2.6-src/Makefile
++++ apngdis-2.6-src/Makefile
+@@ -1,11 +1,10 @@
+ PACKAGE = apngdis
+-CC = gcc
+-CFLAGS = -Wall -pedantic
+-CFLAGS_OPT = -O2
++CCX ?= g++
++CFLAGS += -Wall -pedantic
+ LIBS = -lstdc++ -lm -lpng -lz
+
+ all :
+- $(CC) $(CFLAGS) $(CFLAGS_OPT) -o apngdis apngdis.cpp -s $(LIBS)
++ $(CXX) $(CFLAGS) $(LDFLAGS) -o apngdis apngdis.cpp $(LIBS)
+
+ .PHONY : clean
+
diff --git a/media-gfx/apngdis/metadata.xml b/media-gfx/apngdis/metadata.xml
new file mode 100644
index 000000000000..dd79e90cbe52
--- /dev/null
+++ b/media-gfx/apngdis/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">apngdis</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/apngopt/Manifest b/media-gfx/apngopt/Manifest
new file mode 100644
index 000000000000..bf1a66cbbed6
--- /dev/null
+++ b/media-gfx/apngopt/Manifest
@@ -0,0 +1 @@
+DIST apngopt-1.2-src.zip 12333 SHA256 a12b251da0f2485bfbc7434b4cc00609beb8e833d6657fd5ba2aaf3bd681b04e SHA512 0e09e7d2f3fab450904cb20fc515b18e46cdb6f907d9acbcd7df1400de2f5c985a81b55f7a11c6821cf234951ee53c95c3c1cc81c03bda6bf136069af85b8c76 WHIRLPOOL d4685fcc6e885660da2c02bf1c37a098919062b3cfa45783b8f11f04eda63ceba7f849a52a6a85a328e52bb73847fdd8873952c86e7da3476016b4ce1d3699d2
diff --git a/media-gfx/apngopt/apngopt-1.2.ebuild b/media-gfx/apngopt/apngopt-1.2.ebuild
new file mode 100644
index 000000000000..df42f24200f9
--- /dev/null
+++ b/media-gfx/apngopt/apngopt-1.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="optimize APNG images"
+HOMEPAGE="http://sourceforge.net/projects/apng/"
+SRC_URI="mirror://sourceforge/apng/APNG_Optimizer/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDLIBS="$($(tc-getPKG_CONFIG) --libs zlib)" ${PN}
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/apngopt/metadata.xml b/media-gfx/apngopt/metadata.xml
new file mode 100644
index 000000000000..03df6f2be2c9
--- /dev/null
+++ b/media-gfx/apngopt/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">apng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/aqsis/Manifest b/media-gfx/aqsis/Manifest
new file mode 100644
index 000000000000..2e672aa04f63
--- /dev/null
+++ b/media-gfx/aqsis/Manifest
@@ -0,0 +1 @@
+DIST aqsis-1.8.2.tar.gz 5669285 SHA256 25f644eb69dfe6f89c76f95615e897c6d74053fe72cc2069713855f80e791098 SHA512 b571f9cfa46c0f1e659b054835698fe90f4d9bf43bea54caea257ac0b9d1d65fca68a0ea874772d18c98194630e13528acefb0e852ef398f353b1d1bb545cecc WHIRLPOOL 57514e5943f48946db78f1fe88fd884d844318c7dd92a7d260beb0c6302f5c2fa71d0e97b0a58f0f9f16388eec5b0097106e6142906aa503a7b9f5f833377079
diff --git a/media-gfx/aqsis/aqsis-1.8.2.ebuild b/media-gfx/aqsis/aqsis-1.8.2.ebuild
new file mode 100644
index 000000000000..02ae317704e9
--- /dev/null
+++ b/media-gfx/aqsis/aqsis-1.8.2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils multilib
+
+DESCRIPTION="Open source RenderMan-compliant 3D rendering solution"
+HOMEPAGE="http://www.aqsis.org"
+SRC_URI="mirror://sourceforge/aqsis/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="png qt4"
+
+# OpenEXR currently can not be optional dependency, despite build system options
+RDEPEND="
+ dev-libs/boost:=
+ dev-libs/tinyxml
+ media-libs/tiff:0
+ sys-libs/zlib
+ media-libs/openexr:=
+ png? ( media-libs/libpng:0= )
+ qt4? ( dev-qt/qtgui:4 )
+"
+
+DEPEND="${RDEPEND}
+ dev-libs/libxslt
+ sys-devel/bison
+ sys-devel/flex
+"
+
+DOCS=( AUTHORS INSTALL README )
+PATCHES=(
+ "${FILESDIR}/${P}-openexr-compat.patch"
+ "${FILESDIR}/${P}-unbundle-tinyxml.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use png AQSIS_USE_PNG)
+ $(cmake-utils_use qt4 AQSIS_USE_QT)
+ -DAQSIS_ENABLE_DOCS=OFF
+ -DAQSIS_USE_EXTERNAL_TINYXML=ON
+ -DAQSIS_USE_OPENEXR=ON
+ -DAQSIS_USE_RPATH=OFF
+ -DLIBDIR="$(get_libdir)"
+ -DSYSCONFDIR="/etc"
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ newdoc "release-notes/1.8/summary-1.8.0.txt" ReleaseNotes
+ cmake-utils_src_install
+}
diff --git a/media-gfx/aqsis/files/aqsis-1.8.2-openexr-compat.patch b/media-gfx/aqsis/files/aqsis-1.8.2-openexr-compat.patch
new file mode 100644
index 000000000000..155c93ebb295
--- /dev/null
+++ b/media-gfx/aqsis/files/aqsis-1.8.2-openexr-compat.patch
@@ -0,0 +1,15 @@
+--- libs/tex/io/exrinputfile.h.orig 2012-08-24 16:26:50.000000000 +0400
++++ libs/tex/io/exrinputfile.h 2014-02-14 16:26:47.293497092 +0400
+@@ -48,10 +48,9 @@
+
+ #include <aqsis/tex/io/itexinputfile.h>
+
++#include <OpenEXR/ImfInputFile.h>
++
+ //------------------------------------------------------------------------------
+-namespace Imf {
+- class InputFile;
+-}
+
+ namespace Aqsis {
+
diff --git a/media-gfx/aqsis/files/aqsis-1.8.2-unbundle-tinyxml.patch b/media-gfx/aqsis/files/aqsis-1.8.2-unbundle-tinyxml.patch
new file mode 100644
index 000000000000..158c96aeabce
--- /dev/null
+++ b/media-gfx/aqsis/files/aqsis-1.8.2-unbundle-tinyxml.patch
@@ -0,0 +1,57 @@
+--- CMakeLists.txt.orig 2014-02-14 16:55:38.894647998 +0400
++++ CMakeLists.txt 2014-02-14 16:56:14.017651059 +0400
+@@ -134,15 +134,15 @@
+ endif()
+ endif()
+
+-## find tinyxml. If not found we use the version distributed with the aqsis
+-## source.
+-#if(AQSIS_USE_EXTERNAL_TINYXML)
+-# find_package(TinyXML)
+-# if(NOT TINYXML_FOUND)
+-# message("** Cannot find external tinyxml library - using version included with the aqsis source.")
+-# set(AQSIS_USE_EXTERNAL_TINYXML OFF)
+-# endif()
+-#endif()
++# find tinyxml. If not found we use the version distributed with the aqsis
++# source.
++if(AQSIS_USE_EXTERNAL_TINYXML)
++ find_package(TinyXML)
++ if(NOT AQSIS_TINYXML_FOUND)
++ message("** Cannot find external tinyxml library - using version included with the aqsis source.")
++ set(AQSIS_USE_EXTERNAL_TINYXML OFF)
++ endif()
++endif()
+
+
+ #-------------------------------------------------------------------------------
+@@ -274,7 +274,9 @@
+ )
+
+ # Thirdparty libs
+-declare_subproject(thirdparty/tinyxml)
++if(NOT AQSIS_USE_EXTERNAL_TINYXML)
++ declare_subproject(thirdparty/tinyxml)
++endif()
+ declare_subproject(thirdparty/partio)
+ declare_subproject(libs/pointrender)
+ if(AQSIS_USE_PDIFF)
+--- tools/piqsl/CMakeLists.txt.orig 2014-02-16 11:18:43.308699170 +0400
++++ tools/piqsl/CMakeLists.txt 2014-02-16 11:18:52.620699981 +0400
+@@ -5,8 +5,6 @@
+ message(FATAL_ERROR "Piqsl requires boost thread and Qt4 to build")
+ endif()
+
+-include_subproject(tinyxml)
+-
+ set(piqsl_hdrs
+ displayserverimage.h
+ image.h
+--- tools/displays/piqsl/CMakeLists.txt.orig 2014-02-16 11:21:25.820713332 +0400
++++ tools/displays/piqsl/CMakeLists.txt 2014-02-16 11:21:34.676714104 +0400
+@@ -1,5 +1,4 @@
+ include_subproject(dspyutil)
+-include_subproject(tinyxml)
+
+ aqsis_add_display(piqsl piqsldisplay.cpp ${dspyutil_srcs}
+ ${tinyxml_srcs} ${tinyxml_hdrs}
diff --git a/media-gfx/aqsis/metadata.xml b/media-gfx/aqsis/metadata.xml
new file mode 100644
index 000000000000..457cf2a57988
--- /dev/null
+++ b/media-gfx/aqsis/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">aqsis</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/argyllcms/Manifest b/media-gfx/argyllcms/Manifest
new file mode 100644
index 000000000000..16e4087effd5
--- /dev/null
+++ b/media-gfx/argyllcms/Manifest
@@ -0,0 +1,5 @@
+DIST Argyll_V1.4.0_src.zip 15242860 SHA256 d33134704d2964db69f9e61eb73188632fe2058cdf57aeaa56e64a264e02b1a8 SHA512 edb9ff1b0a965e79a26c0138afe16472fd18236b55b7262135d70bfc7405001a55d2ada4251111fcbaa0b6f73a3fa2faa2cfe07b3413c8a5ecea04c87e5646ae WHIRLPOOL 7b777f43c9a34966d3fee8ab67010d7253da4054e107749ffe67c4f834c3977a2889c3d0d5035b7e1d186d669c4ead69e2a912682631598630f12056d45acd6b
+DIST Argyll_V1.5.1_src.zip 9693168 SHA256 7c65055e577da5a3344b3949e52c3e66fe6339b8801bf4e0cda687e78f7808a7 SHA512 c21cd676edd6415a866fb2a7b122eac18e7596f265a0f2dc8d1f7ca761f64be9fd64ead1430e36eff8767672e73bd93de61398ff588e94a0e121d848afd8bb96 WHIRLPOOL d827297475755e75abd73d60a725cb3e29eb2afa341295d5e47ee9cbae8803863bf84d2fc11f56f9f98862c126bd3f4fa37060a629c0b24ac3081bd3b2d2c5b6
+DIST Argyll_V1.6.2_src.zip 10291838 SHA256 c21591d5615a584df438ecbfe7858fde571f6066e56da436c541d08ca899ac9f SHA512 98484eb7985482c132532c2aedb24afeb20576a6417c89718d58e5e35e36bd4feb270aa7ea8c86b31dc218c82d99de3500c47346c75159a79de9df57d2019fcd WHIRLPOOL fbc4b766bd45d47b33f56b8662c7681c251aabeeee0c978ff71f3079b83f9eeb8052725b77446035ce91589f11553283f84b43f24602e3b4127bc1b5f37672d3
+DIST Argyll_V1.6.3_src.zip 10338488 SHA256 188beaa03dd2459403415023f8f8f9aab362bf3062a9822b3622dde6902e4b84 SHA512 7c350c73492d7e2e27354814cfcb172bf1e4bb6ee8f3f71f2003a7d44ed4be9890a6c80d6a69228495645be11a327c0f7c2ab68d6f6621dd938744a1cd7ebe95 WHIRLPOOL a854ebcca1950f3e654ae85fff3189bae17c511c26e2f3dd8104d9b55ddb83022659276fae201899f51a2a27b00c1cf98f157261e50d0fd48f1a8044923e11c6
+DIST Argyll_V1.7.0_src.zip 13935712 SHA256 dac51cf5d8f6d04bb02f2f5b119fa0e8b773a010e6377116768b082ef018f663 SHA512 644683c8a73d36583d607b5d51c543dca8f1e3fb3db8138a164f9ed7f994df7739ee7d810b7136a7cf0eba7b54fe53b35ffbdd4e6915ec20b271325119ce369c WHIRLPOOL e08c6e311856716ee6b49e37c583d8d4275629fb746f018e0d7c768d4c907644dc60545ff2c709217988c668b198dfc95396af3fdf0ccd40d320514854b1c087
diff --git a/media-gfx/argyllcms/argyllcms-1.4.0-r1.ebuild b/media-gfx/argyllcms/argyllcms-1.4.0-r1.ebuild
new file mode 100644
index 000000000000..51837594403d
--- /dev/null
+++ b/media-gfx/argyllcms/argyllcms-1.4.0-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base udev
+
+MY_P="Argyll_V${PV}"
+DESCRIPTION="Open source, ICC compatible color management system"
+HOMEPAGE="http://www.argyllcms.com/"
+SRC_URI="http://www.argyllcms.com/${MY_P}_src.zip"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="doc"
+
+RDEPEND="media-libs/tiff
+ virtual/jpeg
+ sys-libs/zlib
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm
+ x11-libs/libXScrnSaver"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/ftjam"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}/${PN}-1.4.0-jpeg.patch"
+ "${FILESDIR}/${PN}-1.4.0-CVE-2012-4405.patch" )
+
+src_compile() {
+ # Make it respect LDFLAGS
+ echo "LINKFLAGS += ${LDFLAGS} ;" >> Jamtop
+
+ # Evil hack to get --as-needed working. The build system unfortunately lists all
+ # the shared libraries by default on the command line _before_ the object to be built...
+ echo "STDLIBS += -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -ltiff -ljpeg ;" >> Jamtop
+
+ local jobnumber=$(echo "${MAKEOPTS}" | sed -ne "/-j/ { s/.*\(-j[[:space:]]*[0-9]\+\).*/\1/; p }")
+ [ ${jobnumber} ] || jobnumber=-j1
+
+ jam -q -fJambase ${jobnumber} || die
+}
+
+src_install() {
+ jam -q -fJambase install || die
+
+ rm bin/License.txt || die
+
+ cd bin || die
+ local binname
+ for binname in * ; do
+ newbin ${binname} argyll-${binname}
+ done
+ cd .. || die
+
+ if use doc; then
+ dohtml doc/*
+ fi
+
+ dodoc log.txt Readme.txt ttbd.txt notes.txt
+
+ insinto /usr/share/${PN}/ref
+ doins ref/*
+
+ udev_dorules libusb/55-Argyll.rules
+}
+
+pkg_postinst() {
+ elog "If you have a Spyder2 you need to extract the firmware"
+ elog "from the CVSpyder.dll of the windows driver package"
+ elog "and store it as /usr/share/color/spyd2PLD.bin"
+ elog
+ elog "For further info on setting up instrument access read"
+ elog "http://www.argyllcms.com/doc/Installing_Linux.html"
+ elog
+}
diff --git a/media-gfx/argyllcms/argyllcms-1.4.0-r2.ebuild b/media-gfx/argyllcms/argyllcms-1.4.0-r2.ebuild
new file mode 100644
index 000000000000..775327f23f24
--- /dev/null
+++ b/media-gfx/argyllcms/argyllcms-1.4.0-r2.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base flag-o-matic multiprocessing toolchain-funcs udev
+
+MY_P="Argyll_V${PV}"
+
+DESCRIPTION="Open source, ICC compatible color management system"
+HOMEPAGE="http://www.argyllcms.com/"
+SRC_URI="http://www.argyllcms.com/${MY_P}_src.zip"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="
+ media-libs/tiff
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm
+ x11-libs/libXScrnSaver"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/ftjam"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.4.0-jpeg.patch"
+ "${FILESDIR}/${PN}-1.4.0-CVE-2012-4405.patch"
+ )
+
+src_compile() {
+ # Make it respect LDFLAGS
+ echo "LINKFLAGS += ${LDFLAGS} ;" >> Jamtop
+
+ # Evil hack to get --as-needed working. The build system unfortunately lists all
+ # the shared libraries by default on the command line _before_ the object to be built...
+ echo "STDLIBS += -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -ltiff -ljpeg ;" >> Jamtop
+
+ append-cflags -DUNIX -D_THREAD_SAFE
+
+ sed \
+ -e 's:CCFLAGS:CFLAGS:g' \
+ -e "s:ar rusc:$(tc-getAR) rusc:g" \
+ -i Jambase || die
+
+ tc-export CC RANLIB
+
+ jam -dx -fJambase "-j$(makeopts_jobs)" || die
+}
+
+src_install() {
+ jam -dx -fJambase install || die
+
+ rm bin/License.txt || die
+
+ pushd bin > /dev/null
+ local binname
+ for binname in * ; do
+ newbin ${binname} argyll-${binname}
+ done
+ popd > /dev/null
+
+ use doc && dohtml doc/*
+
+ dodoc log.txt Readme.txt ttbd.txt notes.txt
+
+ insinto /usr/share/${PN}
+ doins -r ref
+
+ udev_dorules libusb/55-Argyll.rules
+}
+
+pkg_postinst() {
+ elog "If you have a Spyder2 you need to extract the firmware"
+ elog "from the CVSpyder.dll of the windows driver package"
+ elog "and store it as /usr/share/color/spyd2PLD.bin"
+ echo
+ elog "For further info on setting up instrument access read"
+ elog "http://www.argyllcms.com/doc/Installing_Linux.html"
+ echo
+}
diff --git a/media-gfx/argyllcms/argyllcms-1.5.1.ebuild b/media-gfx/argyllcms/argyllcms-1.5.1.ebuild
new file mode 100644
index 000000000000..be3082ea28eb
--- /dev/null
+++ b/media-gfx/argyllcms/argyllcms-1.5.1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base flag-o-matic multiprocessing toolchain-funcs udev
+
+MY_P="Argyll_V${PV}"
+
+DESCRIPTION="Open source, ICC compatible color management system"
+HOMEPAGE="http://www.argyllcms.com/"
+SRC_URI="http://www.argyllcms.com/${MY_P}_src.zip"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="
+ media-libs/tiff
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm
+ x11-libs/libXScrnSaver"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/ftjam"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.4.0-CVE-2012-4405.patch"
+ )
+
+src_compile() {
+ # Make it respect LDFLAGS
+ echo "LINKFLAGS += ${LDFLAGS} ;" >> Jamtop
+
+ # Evil hack to get --as-needed working. The build system unfortunately lists all
+ # the shared libraries by default on the command line _before_ the object to be built...
+ echo "STDLIBS += -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -ltiff -ljpeg ;" >> Jamtop
+
+ append-cflags -DUNIX -D_THREAD_SAFE
+
+ sed \
+ -e 's:CCFLAGS:CFLAGS:g' \
+ -e "s:ar rusc:$(tc-getAR) rusc:g" \
+ -i Jambase || die
+
+ tc-export CC RANLIB
+
+ jam -dx -fJambase "-j$(makeopts_jobs)" || die
+}
+
+src_install() {
+ jam -dx -fJambase install || die
+
+ rm bin/License.txt || die
+
+ pushd bin > /dev/null
+ local binname
+ for binname in * ; do
+ newbin ${binname} argyll-${binname}
+ done
+ popd > /dev/null
+
+ use doc && dohtml -r doc/*
+
+ dodoc log.txt Readme.txt ttbd.txt notes.txt
+
+ insinto /usr/share/${PN}
+ doins -r ref
+
+ udev_dorules usb/55-Argyll.rules
+}
+
+pkg_postinst() {
+ elog "If you have a Spyder2 you need to extract the firmware"
+ elog "from the CVSpyder.dll of the windows driver package"
+ elog "and store it as /usr/share/color/spyd2PLD.bin"
+ echo
+ elog "For further info on setting up instrument access read"
+ elog "http://www.argyllcms.com/doc/Installing_Linux.html"
+ echo
+}
diff --git a/media-gfx/argyllcms/argyllcms-1.6.2.ebuild b/media-gfx/argyllcms/argyllcms-1.6.2.ebuild
new file mode 100644
index 000000000000..64f0754bee1f
--- /dev/null
+++ b/media-gfx/argyllcms/argyllcms-1.6.2.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base flag-o-matic multiprocessing toolchain-funcs udev
+
+MY_P="Argyll_V${PV}"
+
+DESCRIPTION="Open source, ICC compatible color management system"
+HOMEPAGE="http://www.argyllcms.com/"
+SRC_URI="http://www.argyllcms.com/${MY_P}_src.zip"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="
+ media-libs/tiff
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm
+ x11-libs/libXScrnSaver"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/ftjam"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ )
+
+src_compile() {
+ # Make it respect LDFLAGS
+ echo "LINKFLAGS += ${LDFLAGS} ;" >> Jamtop
+
+ # Evil hack to get --as-needed working. The build system unfortunately lists all
+ # the shared libraries by default on the command line _before_ the object to be built...
+ echo "STDLIBS += -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -ltiff -ljpeg ;" >> Jamtop
+
+ append-cflags -DUNIX -D_THREAD_SAFE
+
+ sed \
+ -e 's:CCFLAGS:CFLAGS:g' \
+ -e "s:ar rusc:$(tc-getAR) rusc:g" \
+ -i Jambase || die
+
+ tc-export CC RANLIB
+
+ jam -dx -fJambase "-j$(makeopts_jobs)" || die
+}
+
+src_install() {
+ jam -dx -fJambase install || die
+
+ rm bin/License.txt || die
+
+ pushd bin > /dev/null
+ local binname
+ for binname in * ; do
+ newbin ${binname} argyll-${binname}
+ done
+ popd > /dev/null
+
+ use doc && dohtml doc/*
+
+ dodoc log.txt Readme.txt ttbd.txt notes.txt
+
+ insinto /usr/share/${PN}
+ doins -r ref
+
+ udev_dorules usb/55-Argyll.rules
+}
+
+pkg_postinst() {
+ elog "If you have a Spyder2 you need to extract the firmware"
+ elog "from the CVSpyder.dll of the windows driver package"
+ elog "and store it as /usr/share/color/spyd2PLD.bin"
+ echo
+ elog "For further info on setting up instrument access read"
+ elog "http://www.argyllcms.com/doc/Installing_Linux.html"
+ echo
+}
diff --git a/media-gfx/argyllcms/argyllcms-1.6.3-r1.ebuild b/media-gfx/argyllcms/argyllcms-1.6.3-r1.ebuild
new file mode 100644
index 000000000000..f02ccc102b8d
--- /dev/null
+++ b/media-gfx/argyllcms/argyllcms-1.6.3-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base flag-o-matic multiprocessing toolchain-funcs udev
+
+MY_P="Argyll_V${PV}"
+
+DESCRIPTION="Open source, ICC compatible color management system"
+HOMEPAGE="http://www.argyllcms.com/"
+SRC_URI="http://www.argyllcms.com/${MY_P}_src.zip"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="doc"
+
+RDEPEND="
+ media-libs/tiff:0
+ sys-libs/zlib
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm
+ x11-libs/libXScrnSaver"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/ftjam"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-usb-db.patch
+ )
+
+src_compile() {
+ # Make it respect LDFLAGS
+ echo "LINKFLAGS += ${LDFLAGS} ;" >> Jamtop
+
+ # Evil hack to get --as-needed working. The build system unfortunately lists all
+ # the shared libraries by default on the command line _before_ the object to be built...
+ echo "STDLIBS += -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -ltiff -ljpeg ;" >> Jamtop
+
+ append-cflags -DUNIX -D_THREAD_SAFE
+
+ sed \
+ -e 's:CCFLAGS:CFLAGS:g' \
+ -e "s:ar rusc:$(tc-getAR) rusc:g" \
+ -i Jambase || die
+
+ tc-export CC RANLIB
+
+ jam -dx -fJambase "-j$(makeopts_jobs)" || die
+}
+
+src_install() {
+ jam -dx -fJambase install || die
+
+ rm bin/License.txt || die
+
+ pushd bin > /dev/null
+ local binname
+ for binname in * ; do
+ newbin ${binname} argyll-${binname}
+ done
+ popd > /dev/null
+
+ use doc && dohtml doc/*
+
+ dodoc log.txt Readme.txt ttbd.txt notes.txt
+
+ insinto /usr/share/${PN}
+ doins -r ref
+
+ udev_dorules usb/55-Argyll.rules
+}
+
+pkg_postinst() {
+ elog "If you have a Spyder2 you need to extract the firmware"
+ elog "from the CVSpyder.dll of the windows driver package"
+ elog "and store it as /usr/share/color/spyd2PLD.bin"
+ echo
+ elog "For further info on setting up instrument access read"
+ elog "http://www.argyllcms.com/doc/Installing_Linux.html"
+ echo
+}
diff --git a/media-gfx/argyllcms/argyllcms-1.6.3.ebuild b/media-gfx/argyllcms/argyllcms-1.6.3.ebuild
new file mode 100644
index 000000000000..0ea5ca709602
--- /dev/null
+++ b/media-gfx/argyllcms/argyllcms-1.6.3.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base flag-o-matic multiprocessing toolchain-funcs udev
+
+MY_P="Argyll_V${PV}"
+
+DESCRIPTION="Open source, ICC compatible color management system"
+HOMEPAGE="http://www.argyllcms.com/"
+SRC_URI="http://www.argyllcms.com/${MY_P}_src.zip"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 hppa ~x86"
+IUSE="doc"
+
+RDEPEND="
+ media-libs/tiff
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm
+ x11-libs/libXScrnSaver"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/ftjam"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ )
+
+src_compile() {
+ # Make it respect LDFLAGS
+ echo "LINKFLAGS += ${LDFLAGS} ;" >> Jamtop
+
+ # Evil hack to get --as-needed working. The build system unfortunately lists all
+ # the shared libraries by default on the command line _before_ the object to be built...
+ echo "STDLIBS += -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -ltiff -ljpeg ;" >> Jamtop
+
+ append-cflags -DUNIX -D_THREAD_SAFE
+
+ sed \
+ -e 's:CCFLAGS:CFLAGS:g' \
+ -e "s:ar rusc:$(tc-getAR) rusc:g" \
+ -i Jambase || die
+
+ tc-export CC RANLIB
+
+ jam -dx -fJambase "-j$(makeopts_jobs)" || die
+}
+
+src_install() {
+ jam -dx -fJambase install || die
+
+ rm bin/License.txt || die
+
+ pushd bin > /dev/null
+ local binname
+ for binname in * ; do
+ newbin ${binname} argyll-${binname}
+ done
+ popd > /dev/null
+
+ use doc && dohtml doc/*
+
+ dodoc log.txt Readme.txt ttbd.txt notes.txt
+
+ insinto /usr/share/${PN}
+ doins -r ref
+
+ udev_dorules usb/55-Argyll.rules
+}
+
+pkg_postinst() {
+ elog "If you have a Spyder2 you need to extract the firmware"
+ elog "from the CVSpyder.dll of the windows driver package"
+ elog "and store it as /usr/share/color/spyd2PLD.bin"
+ echo
+ elog "For further info on setting up instrument access read"
+ elog "http://www.argyllcms.com/doc/Installing_Linux.html"
+ echo
+}
diff --git a/media-gfx/argyllcms/argyllcms-1.7.0.ebuild b/media-gfx/argyllcms/argyllcms-1.7.0.ebuild
new file mode 100644
index 000000000000..c59a59aaf217
--- /dev/null
+++ b/media-gfx/argyllcms/argyllcms-1.7.0.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit base flag-o-matic multiprocessing toolchain-funcs udev
+
+MY_P="Argyll_V${PV}"
+
+DESCRIPTION="Open source, ICC compatible color management system"
+HOMEPAGE="http://www.argyllcms.com/"
+SRC_URI="http://www.argyllcms.com/${MY_P}_src.zip"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE="doc"
+
+RDEPEND="
+ media-libs/tiff:0
+ sys-libs/zlib
+ virtual/jpeg:0
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm
+ x11-libs/libXScrnSaver"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-util/ftjam"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ )
+
+src_compile() {
+ # Make it respect LDFLAGS
+ echo "LINKFLAGS += ${LDFLAGS} ;" >> Jamtop
+
+ # Evil hack to get --as-needed working. The build system unfortunately lists all
+ # the shared libraries by default on the command line _before_ the object to be built...
+ echo "STDLIBS += -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -ltiff -ljpeg ;" >> Jamtop
+
+ append-cflags -DUNIX -D_THREAD_SAFE
+
+ sed \
+ -e 's:CCFLAGS:CFLAGS:g' \
+ -e "s:ar rusc:$(tc-getAR) rusc:g" \
+ -i Jambase || die
+
+ tc-export CC RANLIB
+
+ jam -dx -fJambase "-j$(makeopts_jobs)" || die
+}
+
+src_install() {
+ jam -dx -fJambase install || die
+
+ rm bin/License.txt || die
+
+ pushd bin > /dev/null
+ local binname
+ for binname in * ; do
+ newbin ${binname} argyll-${binname}
+ done
+ popd > /dev/null
+
+ use doc && dohtml doc/*
+
+ dodoc log.txt Readme.txt ttbd.txt notes.txt
+
+ insinto /usr/share/${PN}
+ doins -r ref
+
+ udev_dorules usb/55-Argyll.rules
+}
+
+pkg_postinst() {
+ elog "If you have a Spyder2 you need to extract the firmware"
+ elog "from the CVSpyder.dll of the windows driver package"
+ elog "and store it as /usr/share/color/spyd2PLD.bin"
+ echo
+ elog "For further info on setting up instrument access read"
+ elog "http://www.argyllcms.com/doc/Installing_Linux.html"
+ echo
+}
diff --git a/media-gfx/argyllcms/files/argyllcms-1.4.0-CVE-2012-4405.patch b/media-gfx/argyllcms/files/argyllcms-1.4.0-CVE-2012-4405.patch
new file mode 100644
index 000000000000..8808fe1ae8ac
--- /dev/null
+++ b/media-gfx/argyllcms/files/argyllcms-1.4.0-CVE-2012-4405.patch
@@ -0,0 +1,18 @@
+
+https://bugzilla.redhat.com/show_bug.cgi?id=854227
+https://bugzilla.redhat.com/attachment.cgi?id=609986
+
+--- icc/icc.c 2012-04-19 09:36:49.000000000 +0200
++++ icc/icc.c.oden 2012-09-12 12:35:49.252519528 +0200
+@@ -6065,6 +6065,11 @@ static int icmLut_read(
+ p->clutPoints = read_UInt8Number(bp+10);
+
+ /* Sanity check */
++ if (p->inputChan < 1) {
++ sprintf(icp->err,"icmLut_read: No input channels!");
++ return icp->errc = 1;
++ }
++
+ if (p->inputChan > MAX_CHAN) {
+ sprintf(icp->err,"icmLut_read: Can't handle > %d input channels\n",MAX_CHAN);
+ return icp->errc = 1;
diff --git a/media-gfx/argyllcms/files/argyllcms-1.4.0-jpeg.patch b/media-gfx/argyllcms/files/argyllcms-1.4.0-jpeg.patch
new file mode 100644
index 000000000000..d523481e3326
--- /dev/null
+++ b/media-gfx/argyllcms/files/argyllcms-1.4.0-jpeg.patch
@@ -0,0 +1,21 @@
+diff -ruN Argyll_V1.4.0.orig/Jamtop Argyll_V1.4.0/Jamtop
+--- Argyll_V1.4.0.orig/Jamtop 2012-04-19 09:50:31.000000000 +0200
++++ Argyll_V1.4.0/Jamtop 2012-05-07 02:18:37.000000000 +0200
+@@ -113,13 +113,13 @@
+ # See if we have a system JPEG library.
+ if ! $(BUILTIN_JPEG) && $(UNIX) {
+ if [ GLOB /usr/include : jpeglib.h ] {
+- if ! $(HOST64) && ( [ GLOB /usr/lib : libjpg.so ] || [ GLOB /usr/lib : libjpg.a ] )
+- || $(HOST64) && ( [ GLOB /usr/lib64 : libjpg.so ] || [ GLOB /usr/lib64 : libjpg.a ] )
+- || $(HOST64) && ( [ GLOB /usr/lib/x86_64-linux-gnu : libjpg.so ] || [ GLOB /usr/lib/x86_64-linux-gnu : libjpg.a ] ) {
++ if ! $(HOST64) && ( [ GLOB /usr/lib : libjpeg.so ] || [ GLOB /usr/lib : libjpeg.a ] )
++ || $(HOST64) && ( [ GLOB /usr/lib64 : libjpeg.so ] || [ GLOB /usr/lib64 : libjpeg.a ] )
++ || $(HOST64) && ( [ GLOB /usr/lib/x86_64-linux-gnu : libjpeg.so ] || [ GLOB /usr/lib/x86_64-linux-gnu : libjpeg.a ] ) {
+ echo "Using system JPEG library" ;
+ JPEGLIB = ;
+ JPEGINC = ;
+- LINKFLAGS += $(LINKFLAG)tiff ;
++ LINKFLAGS += $(LINKFLAG)jpeg ;
+ HAVE_JPEG = true ;
+ }
+ }
diff --git a/media-gfx/argyllcms/files/argyllcms-1.6.3-usb-db.patch b/media-gfx/argyllcms/files/argyllcms-1.6.3-usb-db.patch
new file mode 100644
index 000000000000..04f3367f6332
--- /dev/null
+++ b/media-gfx/argyllcms/files/argyllcms-1.6.3-usb-db.patch
@@ -0,0 +1,12 @@
+Index: trunk/usb/55-Argyll.rules
+===================================================================
+--- trunk.orig/usb/55-Argyll.rules 2014-09-25 11:10:12.000000000 +0200
++++ trunk/usb/55-Argyll.rules 2014-09-26 14:08:21.067295380 +0200
+@@ -85,6 +85,6 @@
+ ENV{COLOR_MEASUREMENT_DEVICE}=="*?", ENV{ACL_MANAGE}!="*?", MODE="660", GROUP="plugdev"
+
+ # Set ID_VENDOR and ID_MODEL acording to VID and PID
+-TEST=="/lib/udev/usb-db", IMPORT{program}="usb-db %p"
++IMPORT{builtin}="hwdb --subsystem=usb"
+
+ LABEL="argyll_rules_end"
diff --git a/media-gfx/argyllcms/metadata.xml b/media-gfx/argyllcms/metadata.xml
new file mode 100644
index 000000000000..ea02039c8d10
--- /dev/null
+++ b/media-gfx/argyllcms/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/arss/Manifest b/media-gfx/arss/Manifest
new file mode 100644
index 000000000000..6aebc82a8ffc
--- /dev/null
+++ b/media-gfx/arss/Manifest
@@ -0,0 +1 @@
+DIST arss-0.2.3-src.tar.gz 17597 SHA256 e2faca8b8a3902226353c4053cd9ab71595eec6ead657b5b44c14b4bef52b2b2 SHA512 7ef7115b310c9f4ecb7bdc8f34fb1afadabadb56d50ddef27a7688fd28af511ebaa1468f2c11a91077b8197027f9e31333c22d6b5f39d2a35d7b7dfc5b90658d WHIRLPOOL 40c9ee69cde4eb55b85f5ace0f9b277ef45b517a61b7da7744b547099d1f87a954d10e9024d9df94aa33f54cd6a8e4a5d526680e593955c1f4fb88ff52aa9603
diff --git a/media-gfx/arss/arss-0.2.3.ebuild b/media-gfx/arss/arss-0.2.3.ebuild
new file mode 100644
index 000000000000..07d780e33ebe
--- /dev/null
+++ b/media-gfx/arss/arss-0.2.3.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+CMAKE_IN_SOURCE_BUILD="true"
+MY_P=${P}-src
+
+inherit cmake-utils
+
+DESCRIPTION="Analysis & Resynthesis Sound Spectrograph"
+HOMEPAGE="http://arss.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="sci-libs/fftw"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}/src
+
+DOCS=( ../AUTHORS ../ChangeLog )
diff --git a/media-gfx/arss/metadata.xml b/media-gfx/arss/metadata.xml
new file mode 100644
index 000000000000..5d3191b158b6
--- /dev/null
+++ b/media-gfx/arss/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">arss</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/asymptote/Manifest b/media-gfx/asymptote/Manifest
new file mode 100644
index 000000000000..8453a4e46b51
--- /dev/null
+++ b/media-gfx/asymptote/Manifest
@@ -0,0 +1,2 @@
+DIST asymptote-2.21.src.tgz 1797507 SHA256 5fe6cfa880a9dba36105d45e5c2bcd0491240da760d455997656dd6e3b90931e SHA512 10341674f0b88611a341d2cb8abd1dfaec1d2711111bb66fb3cd00442427b432107c6c6deeec548b4c7cf114b77a764f0efe627bf421f990e64626d3bb60a91a WHIRLPOOL d30d88eac92e1e4ea411a54e0bd0149d5146db484113cbbc990cbb5250ef46fac804668929f652fddfc87a094f150692abb5f0f2b2719801fe424eb6e31f4d77
+DIST asymptote-2.32.src.tgz 1794495 SHA256 2035035e02774598312d5588da2685d20fb85a378ea2bbe48b825c5442b18fa5 SHA512 a0663f1768cb4340bb6e9224d4fbc6e2f8b41501b1f59793d84db2e0f99b9ff071d3dd8fa5c4715c1874f8ef1af713a54b27de37ff40d8ca042f0f48579a57f9 WHIRLPOOL 38a8aaa581acb07bcc7ac0c802222501acf77abaf609d5ae758d9b5668ac6b8b1343640259cc3948e62a39862404709ddb64b4bbd11bcf20dbb7ce29d4fc25d1
diff --git a/media-gfx/asymptote/asymptote-2.21.ebuild b/media-gfx/asymptote/asymptote-2.21.ebuild
new file mode 100644
index 000000000000..eb0317753505
--- /dev/null
+++ b/media-gfx/asymptote/asymptote-2.21.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+SUPPORT_PYTHON_ABIS=1
+PYTHON_DEPEND="python? 2"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit eutils autotools elisp-common latex-package multilib python
+
+DESCRIPTION="A vector graphics language that provides a framework for technical drawing"
+HOMEPAGE="http://asymptote.sourceforge.net/"
+SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+boehm-gc doc emacs examples fftw gsl +imagemagick latex offscreen +opengl python sigsegv svg vim-syntax X"
+
+REQUIRED_USE="offscreen? ( opengl )"
+
+RDEPEND="
+ >=sys-libs/readline-4.3-r5:0
+ >=sys-libs/ncurses-5.4-r5
+ imagemagick? ( media-gfx/imagemagick[png] )
+ opengl? ( >=media-libs/mesa-8 )
+ offscreen? ( media-libs/mesa[osmesa] )
+ svg? ( app-text/dvisvgm )
+ sigsegv? ( dev-libs/libsigsegv )
+ boehm-gc? ( >=dev-libs/boehm-gc-7.0[cxx,threads] )
+ fftw? ( >=sci-libs/fftw-3.0.1 )
+ gsl? ( sci-libs/gsl )
+ X? ( x11-misc/xdg-utils dev-lang/python dev-python/imaging[tk] )
+ latex? ( virtual/latex-base dev-texlive/texlive-latexextra )
+ emacs? ( virtual/emacs )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
+DEPEND="${RDEPEND}
+ doc? ( dev-lang/perl virtual/texi2dvi virtual/latex-base media-gfx/imagemagick[png] )"
+
+TEXMF=/usr/share/texmf-site
+
+src_prepare() {
+ # Fixing sigsegv enabling
+ epatch "${FILESDIR}/${P}-configure-ac.patch"
+ einfo "Patching configure.ac"
+ sed -e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \
+ -i configure.ac \
+ || die "sed configure.ac failed"
+
+ # Changing pdf, ps, image viewers to xdg-open
+ epatch "${FILESDIR}/${P}-xdg-utils.patch"
+
+ # Bug #322473
+ epatch "${FILESDIR}/${P}-info.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ # for the CPPFLAGS see
+ # http://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349
+ econf \
+ CPPFLAGS=-DHAVE_SYS_TYPES_H \
+ CFLAGS="${CXXFLAGS}" \
+ --disable-gc-debug \
+ $(use_enable boehm-gc gc system) \
+ $(use_enable fftw) \
+ $(use_enable gsl) \
+ $(use_enable opengl gl) \
+ $(use_enable offscreen) \
+ $(use_with sigsegv)
+}
+
+src_compile() {
+ emake
+
+ cd doc || die
+ emake asy.1
+ if use doc; then
+ # info
+ einfo "Making info"
+ emake ${PN}.info
+ cd FAQ || die
+ emake
+ cd .. || die
+ # pdf
+ einfo "Making pdf docs"
+ export VARTEXFONTS="${T}"/fonts
+ # see bug #260606
+ emake -j1 asymptote.pdf
+ emake CAD.pdf
+ fi
+ cd .. || die
+
+ if use emacs; then
+ einfo "Compiling emacs lisp files"
+ elisp-compile base/*.el
+ fi
+}
+
+src_install() {
+ # the program
+ dobin asy
+
+ # .asy files
+ insinto /usr/share/${PN}
+ doins base/*.asy
+
+ # documentation
+ dodoc BUGS ChangeLog README ReleaseNotes TODO
+ doman doc/asy.1
+
+ # X GUI
+ if use X; then
+ exeinto /usr/share/${PN}/GUI
+ doexe GUI/xasy.py
+ rm GUI/xasy.py || die
+ insinto /usr/share/${PN}/GUI
+ doins GUI/*.py
+ dosym /usr/share/${PN}/GUI/xasy.py /usr/bin/xasy
+ doman doc/xasy.1x
+ fi
+
+ # examples
+ if use examples; then
+ insinto /usr/share/${PN}/examples
+ doins \
+ examples/*.asy \
+ examples/*.eps \
+ doc/*.asy \
+ doc/*.csv \
+ doc/*.dat \
+ doc/extra/*.asy
+ use X && doins GUI/*.asy
+
+ insinto /usr/share/${PN}/examples/animations
+ doins examples/animations/*.asy
+ fi
+
+ # LaTeX style
+ if use latex; then
+ cd doc || die
+ insinto "${TEXMF}"/tex/latex/${PN}
+ doins ${PN}.sty asycolors.sty
+ if use examples; then
+ insinto /usr/share/${PN}/examples
+ doins latexusage.tex
+ fi
+ cd .. || die
+ fi
+
+ # asymptote.py
+ if use python; then
+ python_install() {
+ insinto "$(python_get_sitedir)"
+ doins base/${PN}.py
+ }
+ python_execute_function python_install
+ fi
+
+ # emacs mode
+ if use emacs; then
+ elisp-install ${PN} base/*.el base/*.elc
+ elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
+ fi
+
+ # vim syntax
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins base/asy.vim
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins "${FILESDIR}"/asy-ftd.vim
+ fi
+
+ # extra documentation
+ if use doc; then
+ cd doc || die
+ doinfo ${PN}.info*
+ cd FAQ || die
+ dodoc asy-faq.ascii
+ doinfo asy-faq.info
+ insinto /usr/share/doc/${PF}/html/FAQ
+ doins asy-faq.html/*
+ cd .. || die
+ insinto /usr/share/doc/${PF}
+ doins ${PN}.pdf CAD.pdf
+ fi
+}
+
+pkg_postinst() {
+ use python && python_mod_optimize ${PN}.py
+ use latex && latex-package_rehash
+ use emacs && elisp-site-regen
+
+ elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer'
+ elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer'
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup ${PN}.py
+ use latex && latex-package_rehash
+ use emacs && elisp-site-regen
+}
diff --git a/media-gfx/asymptote/asymptote-2.32.ebuild b/media-gfx/asymptote/asymptote-2.32.ebuild
new file mode 100644
index 000000000000..41b0a1f8f1cc
--- /dev/null
+++ b/media-gfx/asymptote/asymptote-2.32.ebuild
@@ -0,0 +1,214 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools elisp-common eutils latex-package multilib python-single-r1
+
+DESCRIPTION="A vector graphics language that provides a framework for technical drawing"
+HOMEPAGE="http://asymptote.sourceforge.net/"
+SRC_URI="mirror://sourceforge/asymptote/${P}.src.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+boehm-gc doc emacs examples fftw gsl +imagemagick latex offscreen +opengl python sigsegv svg vim-syntax X"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ offscreen? ( opengl )"
+
+RDEPEND="
+ >=sys-libs/ncurses-5.4-r5
+ >=sys-libs/readline-4.3-r5:0=
+ imagemagick? ( media-gfx/imagemagick[png] )
+ opengl? ( >=media-libs/mesa-8 )
+ offscreen? ( media-libs/mesa[osmesa] )
+ svg? ( app-text/dvisvgm )
+ sigsegv? ( dev-libs/libsigsegv )
+ boehm-gc? ( >=dev-libs/boehm-gc-7.0[cxx,threads] )
+ fftw? ( >=sci-libs/fftw-3.0.1 )
+ gsl? ( sci-libs/gsl )
+ python? ( ${PYTHON_DEPS} )
+ X? (
+ ${PYTHON_DEPS}
+ x11-misc/xdg-utils
+ virtual/python-imaging[tk,${PYTHON_USEDEP}]
+ )
+ latex? (
+ virtual/latex-base
+ >=dev-texlive/texlive-latexextra-2013
+ )
+ emacs? ( virtual/emacs )
+ vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-lang/perl
+ media-gfx/imagemagick[png]
+ virtual/texi2dvi
+ virtual/latex-base
+ )"
+
+TEXMF=/usr/share/texmf-site
+
+pkg_setup() {
+ (use python || use X) && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Fixing sigsegv enabling
+ epatch "${FILESDIR}/${P}-configure-ac.patch"
+ einfo "Patching configure.ac"
+ sed -e "s:Datadir/doc/asymptote:Datadir/doc/${PF}:" \
+ -i configure.ac \
+ || die "sed configure.ac failed"
+
+ # Changing pdf, ps, image viewers to xdg-open
+ epatch "${FILESDIR}/${P}-xdg-utils.patch"
+
+ # Bug #322473
+ epatch "${FILESDIR}/${P}-info.patch"
+
+ # Bug #528632 - fix from https://www.archlinux.org/packages/extra/x86_64/asymptote/
+ epatch "${FILESDIR}/${P}-ghostscript-9.15.patch"
+
+ eautoreconf
+}
+
+src_configure() {
+ # for the CPPFLAGS see
+ # http://sourceforge.net/forum/forum.php?thread_id=1683277&forum_id=409349
+ econf \
+ CPPFLAGS=-DHAVE_SYS_TYPES_H \
+ CFLAGS="${CXXFLAGS}" \
+ --disable-gc-debug \
+ $(use_enable boehm-gc gc system) \
+ $(use_enable fftw) \
+ $(use_enable gsl) \
+ $(use_enable opengl gl) \
+ $(use_enable offscreen) \
+ $(use_with sigsegv)
+}
+
+src_compile() {
+ default
+
+ cd doc || die
+ emake asy.1
+ if use doc; then
+ # info
+ einfo "Making info"
+ emake ${PN}.info
+ cd FAQ || die
+ emake
+ cd .. || die
+ # pdf
+ einfo "Making pdf docs"
+ export VARTEXFONTS="${T}"/fonts
+ # see bug #260606
+ emake -j1 asymptote.pdf
+ emake CAD.pdf
+ fi
+ cd .. || die
+
+ if use emacs; then
+ einfo "Compiling emacs lisp files"
+ elisp-compile base/*.el
+ fi
+}
+
+src_install() {
+ # the program
+ dobin asy
+
+ # .asy files
+ insinto /usr/share/${PN}
+ doins base/*.asy
+
+ # documentation
+ dodoc BUGS ChangeLog README ReleaseNotes TODO
+ doman doc/asy.1
+
+ # X GUI
+ if use X; then
+ python_scriptinto /usr/share/${PN}/GUI
+ python_doscript GUI/*.py
+ dosym /usr/share/${PN}/GUI/xasy.py /usr/bin/xasy
+ doman doc/xasy.1x
+ fi
+
+ # examples
+ if use examples; then
+ insinto /usr/share/${PN}/examples
+ doins \
+ examples/*.asy \
+ examples/*.eps \
+ doc/*.asy \
+ doc/*.csv \
+ doc/*.dat \
+ doc/extra/*.asy
+ use X && doins GUI/*.asy
+
+ insinto /usr/share/${PN}/examples/animations
+ doins examples/animations/*.asy
+ fi
+
+ # LaTeX style
+ if use latex; then
+ cd doc || die
+ insinto "${TEXMF}"/tex/latex/${PN}
+ doins ${PN}.sty asycolors.sty
+ if use examples; then
+ insinto /usr/share/${PN}/examples
+ doins latexusage.tex
+ fi
+ cd .. || die
+ fi
+
+ # asymptote.py
+ use python && python_domodule base/${PN}.py
+
+ # emacs mode
+ if use emacs; then
+ elisp-install ${PN} base/*.el base/*.elc
+ elisp-site-file-install "${FILESDIR}"/64${PN}-gentoo.el
+ fi
+
+ # vim syntax
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins base/asy.vim
+ insinto /usr/share/vim/vimfiles/ftdetect
+ doins "${FILESDIR}"/asy-ftd.vim
+ fi
+
+ # extra documentation
+ if use doc; then
+ cd doc || die
+ doinfo ${PN}.info*
+ cd FAQ || die
+ dodoc asy-faq.ascii
+ doinfo asy-faq.info
+ insinto /usr/share/doc/${PF}/html/FAQ
+ doins asy-faq.html/*
+ cd .. || die
+ insinto /usr/share/doc/${PF}
+ doins ${PN}.pdf CAD.pdf
+ fi
+}
+
+pkg_postinst() {
+ use latex && latex-package_rehash
+ use emacs && elisp-site-regen
+
+ elog 'Use the variable ASYMPTOTE_PSVIEWER to set the postscript viewer'
+ elog 'Use the variable ASYMPTOTE_PDFVIEWER to set the PDF viewer'
+}
+
+pkg_postrm() {
+ use latex && latex-package_rehash
+ use emacs && elisp-site-regen
+}
diff --git a/media-gfx/asymptote/files/64asymptote-gentoo.el b/media-gfx/asymptote/files/64asymptote-gentoo.el
new file mode 100644
index 000000000000..57cd48d04a64
--- /dev/null
+++ b/media-gfx/asymptote/files/64asymptote-gentoo.el
@@ -0,0 +1,9 @@
+
+;; site-init for media-gfx/asymptote
+
+(add-to-list 'load-path "@SITELISP@")
+
+(autoload 'asy-mode "asy-mode" "Asymptote major mode." t)
+(autoload 'lasy-mode "asy-mode" "Hybrid Asymptote/Latex major mode." t)
+(autoload 'asy-insinuate-latex "asy-mode" "Asymptote insinuate LaTeX." t)
+(add-to-list 'auto-mode-alist '("\\.asy$" . asy-mode))
diff --git a/media-gfx/asymptote/files/asy-ftd.vim b/media-gfx/asymptote/files/asy-ftd.vim
new file mode 100644
index 000000000000..0f5e3957900a
--- /dev/null
+++ b/media-gfx/asymptote/files/asy-ftd.vim
@@ -0,0 +1,2 @@
+au BufNewFile,BufRead *.asy setf asy
+filetype plugin on
diff --git a/media-gfx/asymptote/files/asymptote-2.21-configure-ac.patch b/media-gfx/asymptote/files/asymptote-2.21-configure-ac.patch
new file mode 100644
index 000000000000..e65c18dc455b
--- /dev/null
+++ b/media-gfx/asymptote/files/asymptote-2.21-configure-ac.patch
@@ -0,0 +1,32 @@
+Index: asymptote-2.21/configure.ac
+===================================================================
+--- asymptote-2.21.orig/configure.ac
++++ asymptote-2.21/configure.ac
+@@ -154,7 +154,7 @@ if test "x$ac_cv_use_gc" != "xno" ; then
+ fi
+ CPPFLAGS_SAVE=$CPPFLAGS
+ CPPFLAGS=$CPPFLAGS" $INCL"
+- AC_CHECK_HEADER(gc.h,
++ AC_CHECK_HEADER([gc/gc.h],
+ AC_CHECK_LIB([gc],[GC_malloc],[
+ LIBS=$LIBS"-lgc "
+ AC_MSG_NOTICE([enabling system $GCNAME])],[
+@@ -227,7 +227,17 @@ AC_MSG_ERROR([*** Please install libm on
+ AC_CHECK_LIB([z], [deflate],,
+ AC_MSG_ERROR([*** Please install libz on your system ***]))
+ AX_PTHREAD
+-AC_CHECK_LIB([sigsegv], [stackoverflow_install_handler])
++
++AC_ARG_WITH(sigsegv,
++ [ --with-sigsegv use libsigsegv],
++ [with_sigsegv=$withval],
++ [with_sigsegv="no"])
++if test "$with_sigsegv" = "yes"; then
++AC_CHECK_HEADER([sigsegv.h],
++ AC_CHECK_LIB([sigsegv], [stackoverflow_install_handler]),
++ AC_MSG_NOTICE([*** Header file sigsegv.h not found ***]))
++fi
++
+ AC_CHECK_LIB([rt], [sched_yield])
+
+ AC_ARG_ENABLE(readline,
diff --git a/media-gfx/asymptote/files/asymptote-2.21-info.patch b/media-gfx/asymptote/files/asymptote-2.21-info.patch
new file mode 100644
index 000000000000..cb5f43671add
--- /dev/null
+++ b/media-gfx/asymptote/files/asymptote-2.21-info.patch
@@ -0,0 +1,13 @@
+Index: asymptote-2.21/doc/asymptote.texi
+===================================================================
+--- asymptote-2.21.orig/doc/asymptote.texi
++++ asymptote-2.21/doc/asymptote.texi
+@@ -21,7 +21,7 @@ file LICENSE in the top-level source dir
+
+ @dircategory Languages
+ @direntry
+-* asymptote: (asymptote/asymptote). Vector graphics language.
++* asymptote: (asymptote). Vector graphics language.
+ @end direntry
+
+ @titlepage
diff --git a/media-gfx/asymptote/files/asymptote-2.21-xdg-utils.patch b/media-gfx/asymptote/files/asymptote-2.21-xdg-utils.patch
new file mode 100644
index 000000000000..5fb54d80f785
--- /dev/null
+++ b/media-gfx/asymptote/files/asymptote-2.21-xdg-utils.patch
@@ -0,0 +1,22 @@
+Index: asymptote-2.21/settings.cc
+===================================================================
+--- asymptote-2.21.orig/settings.cc
++++ asymptote-2.21/settings.cc
+@@ -90,14 +90,14 @@ bool msdos=false;
+ string HOME="HOME";
+ string docdir=ASYMPTOTE_DOCDIR;
+ const char pathSeparator=':';
+-string defaultPSViewer="gv";
++string defaultPSViewer="xdg-open";
+ #ifdef __APPLE__
+ string defaultPDFViewer="open";
+ #else
+-string defaultPDFViewer="acroread";
++string defaultPDFViewer="xdg-open";
+ #endif
+ string defaultGhostscript="gs";
+-string defaultDisplay="display";
++string defaultDisplay="xdg-open";
+ string defaultAnimate="animate";
+ void queryRegistry() {}
+ const string dirsep="/";
diff --git a/media-gfx/asymptote/files/asymptote-2.27-configure-ac.patch b/media-gfx/asymptote/files/asymptote-2.27-configure-ac.patch
new file mode 100644
index 000000000000..df02ad92fcb3
--- /dev/null
+++ b/media-gfx/asymptote/files/asymptote-2.27-configure-ac.patch
@@ -0,0 +1,32 @@
+Index: asymptote-2.27/configure.ac
+===================================================================
+--- asymptote-2.27.orig/configure.ac
++++ asymptote-2.27/configure.ac
+@@ -155,7 +155,7 @@ if test "x$ac_cv_use_gc" != "xno" ; then
+ fi
+ CPPFLAGS_SAVE=$CPPFLAGS
+ CPPFLAGS=$CPPFLAGS" $INCL"
+- AC_CHECK_HEADER(gc.h,
++ AC_CHECK_HEADER([gc/gc.h],
+ AC_CHECK_LIB([gc],[GC_malloc],[
+ LIBS=$LIBS"-lgc "
+ AC_MSG_NOTICE([enabling system $GCNAME])],[
+@@ -229,7 +229,17 @@ AC_MSG_ERROR([*** Please install libm on
+ AC_CHECK_LIB([z], [deflate],,
+ AC_MSG_ERROR([*** Please install libz or zlib-devel on your system ***]))
+ AX_PTHREAD
+-AC_CHECK_LIB([sigsegv], [stackoverflow_install_handler])
++
++AC_ARG_WITH(sigsegv,
++ [ --with-sigsegv use libsigsegv],
++ [with_sigsegv=$withval],
++ [with_sigsegv="no"])
++if test "$with_sigsegv" = "yes"; then
++AC_CHECK_HEADER([sigsegv.h],
++ AC_CHECK_LIB([sigsegv], [stackoverflow_install_handler]),
++ AC_MSG_NOTICE([*** Header file sigsegv.h not found ***]))
++fi
++
+ AC_CHECK_LIB([rt], [sched_yield])
+
+ AC_ARG_ENABLE(readline,
diff --git a/media-gfx/asymptote/files/asymptote-2.27-info.patch b/media-gfx/asymptote/files/asymptote-2.27-info.patch
new file mode 100644
index 000000000000..a64c8eb467ac
--- /dev/null
+++ b/media-gfx/asymptote/files/asymptote-2.27-info.patch
@@ -0,0 +1,13 @@
+Index: asymptote-2.27/doc/asymptote.texi
+===================================================================
+--- asymptote-2.27.orig/doc/asymptote.texi
++++ asymptote-2.27/doc/asymptote.texi
+@@ -21,7 +21,7 @@ file LICENSE in the top-level source dir
+
+ @dircategory Languages
+ @direntry
+-* asymptote: (asymptote/asymptote). Vector graphics language.
++* asymptote: (asymptote). Vector graphics language.
+ @end direntry
+
+ @titlepage
diff --git a/media-gfx/asymptote/files/asymptote-2.27-xdg-utils.patch b/media-gfx/asymptote/files/asymptote-2.27-xdg-utils.patch
new file mode 100644
index 000000000000..1be4a4b89435
--- /dev/null
+++ b/media-gfx/asymptote/files/asymptote-2.27-xdg-utils.patch
@@ -0,0 +1,23 @@
+Index: asymptote-2.27/settings.cc
+===================================================================
+--- asymptote-2.27.orig/settings.cc
++++ asymptote-2.27/settings.cc
+@@ -90,15 +90,15 @@ bool msdos=false;
+ string HOME="HOME";
+ string docdir=ASYMPTOTE_DOCDIR;
+ const char pathSeparator=':';
+-string defaultPSViewer="gv";
++string defaultPSViewer="xdg-open";
+ #ifdef __APPLE__
+ string defaultPDFViewer="open";
+ #else
+-string defaultPDFViewer="acroread";
++string defaultPDFViewer="xdg-open";
+ #endif
+ string defaultGhostscript="gs";
+ string defaultGhostscriptLibrary="/usr/lib/libgs.so";
+-string defaultDisplay="display";
++string defaultDisplay="xdg-open";
+ string defaultAnimate="animate";
+ void queryRegistry() {}
+ const string dirsep="/";
diff --git a/media-gfx/asymptote/files/asymptote-2.32-configure-ac.patch b/media-gfx/asymptote/files/asymptote-2.32-configure-ac.patch
new file mode 100644
index 000000000000..597e915539be
--- /dev/null
+++ b/media-gfx/asymptote/files/asymptote-2.32-configure-ac.patch
@@ -0,0 +1,32 @@
+Index: asymptote-2.32/configure.ac
+===================================================================
+--- asymptote-2.32.orig/configure.ac
++++ asymptote-2.32/configure.ac
+@@ -158,7 +158,7 @@ if test "x$ac_cv_use_gc" != "xno" ; then
+ fi
+ CPPFLAGS_SAVE=$CPPFLAGS
+ CPPFLAGS=$CPPFLAGS" $INCL"
+- AC_CHECK_HEADER(gc.h,
++ AC_CHECK_HEADER([gc/gc.h],
+ AC_CHECK_LIB([gc],[GC_malloc],[
+ LIBS=$LIBS"-lgc "
+ AC_MSG_NOTICE([enabling system $GCNAME])],[
+@@ -232,7 +232,17 @@ AC_MSG_ERROR([*** Please install libm on
+ AC_CHECK_LIB([z], [deflate],,
+ AC_MSG_ERROR([*** Please install libz or zlib-devel on your system ***]))
+ AX_PTHREAD
+-AC_CHECK_LIB([sigsegv], [stackoverflow_install_handler])
++
++AC_ARG_WITH(sigsegv,
++ [ --with-sigsegv use libsigsegv],
++ [with_sigsegv=$withval],
++ [with_sigsegv="no"])
++if test "$with_sigsegv" = "yes"; then
++AC_CHECK_HEADER([sigsegv.h],
++ AC_CHECK_LIB([sigsegv], [stackoverflow_install_handler]),
++ AC_MSG_NOTICE([*** Header file sigsegv.h not found ***]))
++fi
++
+ AC_CHECK_LIB([rt], [sched_yield])
+
+ AC_ARG_ENABLE(readline,
diff --git a/media-gfx/asymptote/files/asymptote-2.32-ghostscript-9.15.patch b/media-gfx/asymptote/files/asymptote-2.32-ghostscript-9.15.patch
new file mode 100644
index 000000000000..aa826c5c251f
--- /dev/null
+++ b/media-gfx/asymptote/files/asymptote-2.32-ghostscript-9.15.patch
@@ -0,0 +1,24 @@
+diff -r -U2 asymptote-2.32.orig/runlabel.in asymptote-2.32/runlabel.in
+--- asymptote-2.32.orig/runlabel.in 2014-05-22 23:11:47.000000000 +0700
++++ asymptote-2.32/runlabel.in 2015-01-11 21:41:30.268889133 +0600
+@@ -112,5 +112,5 @@
+ const string null="/dev/null";
+ #endif
+- cmd.push_back("-sDEVICE=epswrite");
++ cmd.push_back("-sDEVICE=eps2write");
+ cmd.push_back("-sOutputFile="+null);
+ cmd.push_back(stripDir(psname));
+@@ -310,5 +310,5 @@
+ cmd.push_back("-dBATCH");
+ if(safe) cmd.push_back("-dSAFER");
+- cmd.push_back("-sDEVICE=epswrite");
++ cmd.push_back("-sDEVICE=eps2write");
+ cmd.push_back("-sOutputFile=-");
+ cmd.push_back(pdfname);
+@@ -399,5 +399,5 @@
+ cmd2.push_back("-P");
+ if(safe) cmd2.push_back("-dSAFER");
+- cmd2.push_back("-sDEVICE=epswrite");
++ cmd2.push_back("-sDEVICE=eps2write");
+ cmd2.push_back("-sOutputFile=-");
+ cmd2.push_back("-");
diff --git a/media-gfx/asymptote/files/asymptote-2.32-info.patch b/media-gfx/asymptote/files/asymptote-2.32-info.patch
new file mode 100644
index 000000000000..8a1e3f464231
--- /dev/null
+++ b/media-gfx/asymptote/files/asymptote-2.32-info.patch
@@ -0,0 +1,13 @@
+Index: asymptote-2.32/doc/asymptote.texi
+===================================================================
+--- asymptote-2.32.orig/doc/asymptote.texi
++++ asymptote-2.32/doc/asymptote.texi
+@@ -21,7 +21,7 @@ file LICENSE in the top-level source dir
+
+ @dircategory Languages
+ @direntry
+-* asymptote: (asymptote/asymptote). Vector graphics language.
++* asymptote: (asymptote). Vector graphics language.
+ @end direntry
+
+ @titlepage
diff --git a/media-gfx/asymptote/files/asymptote-2.32-xdg-utils.patch b/media-gfx/asymptote/files/asymptote-2.32-xdg-utils.patch
new file mode 100644
index 000000000000..2ac59e59f058
--- /dev/null
+++ b/media-gfx/asymptote/files/asymptote-2.32-xdg-utils.patch
@@ -0,0 +1,23 @@
+Index: asymptote-2.32/settings.cc
+===================================================================
+--- asymptote-2.32.orig/settings.cc
++++ asymptote-2.32/settings.cc
+@@ -90,15 +90,15 @@ bool msdos=false;
+ string HOME="HOME";
+ string docdir=ASYMPTOTE_DOCDIR;
+ const char pathSeparator=':';
+-string defaultPSViewer="gv";
++string defaultPSViewer="xdg-open";
+ #ifdef __APPLE__
+ string defaultPDFViewer="open";
+ #else
+-string defaultPDFViewer="acroread";
++string defaultPDFViewer="xdg-open";
+ #endif
+ string defaultGhostscript="gs";
+ string defaultGhostscriptLibrary="/usr/lib/libgs.so";
+-string defaultDisplay="display";
++string defaultDisplay="xdg-open";
+ string defaultAnimate="animate";
+ void queryRegistry() {}
+ const string dirsep="/";
diff --git a/media-gfx/asymptote/metadata.xml b/media-gfx/asymptote/metadata.xml
new file mode 100644
index 000000000000..83bd6f53fce8
--- /dev/null
+++ b/media-gfx/asymptote/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <maintainer>
+ <email>grozin@gentoo.org</email>
+ <name>Andrey Grozin</name>
+ </maintainer>
+ <longdescription lang="en">
+ Asymptote is a powerful descriptive vector graphics language that
+ provides a natural coordinate-based framework for technical drawing.
+ Labels and equations are typeset with LaTeX, for high-quality PostScript
+ output.
+
+ A major advantage of Asymptote over other graphics packages is that it
+ is a programming language, as opposed to just a graphics program.
+ </longdescription>
+ <use>
+ <flag name="boehm-gc">
+ Enables using the Boehm-Demers-Weiser conservative garbage collector
+ </flag>
+ <flag name="sigsegv">
+ Enables using <pkg>dev-libs/libsigsegv</pkg>
+ </flag>
+ <flag name="offscreen">
+ Enables off-screen rendering
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">asymptote</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/autopano-sift-C/Manifest b/media-gfx/autopano-sift-C/Manifest
new file mode 100644
index 000000000000..71e4d5c8e9f0
--- /dev/null
+++ b/media-gfx/autopano-sift-C/Manifest
@@ -0,0 +1 @@
+DIST autopano-sift-C-2.5.1.tar.gz 192267 SHA256 9a9029353f240b105a9c0e31e4053b37b0f9ef4bd9166dcb26be3e819c431337 SHA512 4f3c9e8738c7bc29ff6284033b7b813de61ef440c3d544755be8c4ad715a6e4175801ee4c02642df5e05bac82929c5554d85a5c488a2c27da1e5e81d3cd72931 WHIRLPOOL 95f54d93cf5162b1b88dccb6750ed5b59f88ebbbfa4201d02d0fff14858beb89e98b474465c03104bb4c7a49dc5564fc60d446f185cf0cc9b8012e65d1fac483
diff --git a/media-gfx/autopano-sift-C/autopano-sift-C-2.5.1.ebuild b/media-gfx/autopano-sift-C/autopano-sift-C-2.5.1.ebuild
new file mode 100644
index 000000000000..1d416dfca454
--- /dev/null
+++ b/media-gfx/autopano-sift-C/autopano-sift-C-2.5.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils eutils versionator
+
+DESCRIPTION="SIFT algorithm for automatic panorama creation in C"
+HOMEPAGE="http://hugin.sourceforge.net/ http://user.cs.tu-berlin.de/~nowozin/autopano-sift/"
+SRC_URI="mirror://sourceforge/hugin/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}-"$(get_version_component_range 1-3)"
+
+RDEPEND="!media-gfx/autopano-sift
+ dev-libs/libxml2
+ media-libs/libpano13:0=
+ media-libs/libpng:0=
+ media-libs/tiff:0=
+ sys-libs/zlib
+ virtual/jpeg:0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-lm.patch
+ epatch_user
+}
diff --git a/media-gfx/autopano-sift-C/files/autopano-sift-C-2.5.1-lm.patch b/media-gfx/autopano-sift-C/files/autopano-sift-C-2.5.1-lm.patch
new file mode 100644
index 000000000000..97619975d9b6
--- /dev/null
+++ b/media-gfx/autopano-sift-C/files/autopano-sift-C-2.5.1-lm.patch
@@ -0,0 +1,14 @@
+Link against -lm (mathlib) because ScaleSpace.c (which is part of the internal libsift.a)
+is using the exp() function, see http://bugs.gentoo.org/472150
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -121,7 +121,7 @@
+
+ ADD_LIBRARY(libsift STATIC ${LIBSIFT_SOURCES})
+
+-set(all_libs libsift ${JPEG_LIBRARIES} ${TIFF_LIBRARIES}
++set(all_libs libsift m ${JPEG_LIBRARIES} ${TIFF_LIBRARIES}
+ ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${PANO13_LIBRARIES} ${LIBXML2_LIBRARIES})
+
+ add_executable(generatekeys GenerateKeys.c)
diff --git a/media-gfx/autopano-sift-C/metadata.xml b/media-gfx/autopano-sift-C/metadata.xml
new file mode 100644
index 000000000000..239509055f5b
--- /dev/null
+++ b/media-gfx/autopano-sift-C/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription>autopano-sift-C is a program to automatically find control points
+ for stitching together panoramas.</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">hugin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/autotrace/Manifest b/media-gfx/autotrace/Manifest
new file mode 100644
index 000000000000..a6c51613f1e0
--- /dev/null
+++ b/media-gfx/autotrace/Manifest
@@ -0,0 +1,2 @@
+DIST autotrace_0.31.1-15.diff.gz 343197 SHA256 d7084e992ef43db3dec5f912ba757c616b4698aeea17b9c167f2686c3f2df9c9 SHA512 70d3003120e2c0eb82c5f6dc7fd303eec2dcc772b81c22c3624bfa28bb5048016fd923a85f333904af326e201422bde05bed22fe7af5de939542e64b2883a7cb WHIRLPOOL c0c7f64c14aab41d56f3435c63ff40b1a1df51d69285192f2ef3532b03688aa13f120f1b9778ffa9fa9d2e97ab8bce2a229f49819177985e86ae8177f3225c72
+DIST autotrace_0.31.1.orig.tar.gz 362718 SHA256 5a1a923c3335dfd7cbcccb2bbd4cc3d68cafe7713686a2f46a1591ed8a92aff6 SHA512 7d0ec86a41617b3d4336eed72f2974c10f569ff53d450a4c91b4611bb6fdb8c4ff81d04d91e9d20f1b4df592f82c8421e7656af7fa2bdc786ffb4618e9eadd24 WHIRLPOOL 2fda99c453bf4a98ba85abf9853a06fdf8f6d49df5804d377ff4bb9131f21a202eb60749f39afa4ca258432c2ddef4d12e6edce14c69f42a25b26c56fb46fc3d
diff --git a/media-gfx/autotrace/autotrace-0.31.1-r6.ebuild b/media-gfx/autotrace/autotrace-0.31.1-r6.ebuild
new file mode 100644
index 000000000000..006e80d8fc7c
--- /dev/null
+++ b/media-gfx/autotrace/autotrace-0.31.1-r6.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+_dpatch=15
+
+DESCRIPTION="A program for converting bitmaps to vector graphics"
+HOMEPAGE="http://packages.qa.debian.org/a/autotrace.html http://autotrace.sourceforge.net/"
+SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.orig.tar.gz
+ mirror://debian/pool/main/a/${PN}/${PN}_${PV}-${_dpatch}.diff.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="+imagemagick static-libs"
+
+RDEPEND="media-libs/libexif:=
+ media-libs/libpng:0=
+ >=media-libs/ming-0.4.2:=
+ >=media-gfx/pstoedit-3.50:=
+ imagemagick? ( >=media-gfx/imagemagick-6.6.2.5 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_prepare() {
+ epatch "${WORKDIR}"/${PN}_${PV}-${_dpatch}.diff
+
+ epatch \
+ "${FILESDIR}"/${P}-{m4,libpng14,pkgconfig}.patch \
+ "${FILESDIR}"/${P}-swf-output.patch \
+ "${FILESDIR}"/${P}-GetOnePixel.patch \
+ "${FILESDIR}"/${P}-libpng-1.5.patch
+
+ # Fix building on PowerPC with Altivec
+ epatch "${FILESDIR}"/${P}-bool.patch
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #468496
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with imagemagick magick) \
+ --with-ming \
+ --with-pstoedit
+}
+
+src_install() {
+ default
+ prune_libtool_files --all
+}
diff --git a/media-gfx/autotrace/files/autotrace-0.31.1-GetOnePixel.patch b/media-gfx/autotrace/files/autotrace-0.31.1-GetOnePixel.patch
new file mode 100644
index 000000000000..048b7a76be70
--- /dev/null
+++ b/media-gfx/autotrace/files/autotrace-0.31.1-GetOnePixel.patch
@@ -0,0 +1,16 @@
+http://cvs.fedoraproject.org/viewvc/rpms/autotrace/devel/autotrace-0.31.1-GetOnePixel.patch?view=markup
+
+--- input-magick.c
++++ input-magick.c
+@@ -83,7 +83,11 @@
+
+ for(j=0,runcount=0,point=0;j<image->rows;j++)
+ for(i=0;i<image->columns;i++) {
++#if (MagickLibVersion < 0x0645) || (MagickLibVersion >= 0x0649)
+ p=GetOnePixel(image,i,j);
++#else
++ GetOnePixel(image,i,j,pixel);
++#endif
+ AT_BITMAP_BITS(bitmap)[point++]=pixel->red; /* if gray: red=green=blue */
+ if(np==3) {
+ AT_BITMAP_BITS(bitmap)[point++]=pixel->green;
diff --git a/media-gfx/autotrace/files/autotrace-0.31.1-bool.patch b/media-gfx/autotrace/files/autotrace-0.31.1-bool.patch
new file mode 100644
index 000000000000..447f10c735ad
--- /dev/null
+++ b/media-gfx/autotrace/files/autotrace-0.31.1-bool.patch
@@ -0,0 +1,12 @@
+--- types.h.old 2011-03-03 13:56:30.000000000 +0000
++++ types.h 2011-03-03 13:59:45.000000000 +0000
+@@ -25,6 +25,9 @@
+ #ifndef bool
+ typedef enum { false = 0, true = 1 } at_bool;
+ #else
++#ifdef __ALTIVEC__
++#include <stdbool.h>
++#endif
+ #define at_bool bool
+ #endif
+ #else
diff --git a/media-gfx/autotrace/files/autotrace-0.31.1-libpng-1.5.patch b/media-gfx/autotrace/files/autotrace-0.31.1-libpng-1.5.patch
new file mode 100644
index 000000000000..7252b79aaf1a
--- /dev/null
+++ b/media-gfx/autotrace/files/autotrace-0.31.1-libpng-1.5.patch
@@ -0,0 +1,64 @@
+http://sourceforge.net/mailarchive/forum.php?thread_name=01e601cbc22e%24f45d7200%24dd185600%24%40acm.org&forum_name=png-mng-implement
+
+$NetBSD$
+
+Fix build with png-1.5.
+
+--- input-png.c.orig 2002-10-10 20:44:14.000000000 +0000
++++ input-png.c
+@@ -42,17 +42,17 @@ static png_bytep * read_png(png_structp
+
+ static void handle_warning(png_structp png, const at_string message) {
+ LOG1("PNG warning: %s", message);
+- at_exception_warning((at_exception_type *)png->error_ptr,
++ at_exception_warning((at_exception_type *)png_get_error_ptr(png),
+ message);
+- /* at_exception_fatal((at_exception_type *)at_png->error_ptr,
++ /* at_exception_fatal((at_exception_type *)png_get_error_ptr(at_png),
+ "PNG warning"); */
+ }
+
+ static void handle_error(png_structp png, const at_string message) {
+ LOG1("PNG error: %s", message);
+- at_exception_fatal((at_exception_type *)png->error_ptr,
++ at_exception_fatal((at_exception_type *)png_get_error_ptr(png),
+ message);
+- /* at_exception_fatal((at_exception_type *)at_png->error_ptr,
++ /* at_exception_fatal((at_exception_type *)png_get_error_ptr(at_png),
+ "PNG error"); */
+
+ }
+@@ -157,8 +157,8 @@ read_png(png_structp png_ptr, png_infop
+
+ png_set_strip_16(png_ptr);
+ png_set_packing(png_ptr);
+- if ((png_ptr->bit_depth < 8) ||
+- (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ||
++ if ((png_get_bit_depth(png_ptr, info_ptr) < 8) ||
++ (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE) ||
+ (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)))
+ png_set_expand(png_ptr);
+
+@@ -181,20 +181,10 @@ read_png(png_structp png_ptr, png_infop
+ PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
+ } else
+ png_set_strip_alpha(png_ptr);
++ png_set_interlace_handling(png_ptr);
+ png_read_update_info(png_ptr, info_ptr);
+
+-
+- info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr,
+- info_ptr->height * sizeof(png_bytep));
+-#ifdef PNG_FREE_ME_SUPPORTED
+- info_ptr->free_me |= PNG_FREE_ROWS;
+-#endif
+- for (row = 0; row < (int)info_ptr->height; row++)
+- info_ptr->row_pointers[row] = (png_bytep)png_malloc(png_ptr,
+- png_get_rowbytes(png_ptr, info_ptr));
+-
+- png_read_image(png_ptr, info_ptr->row_pointers);
+- info_ptr->valid |= PNG_INFO_IDAT;
++ png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL);
+ png_read_end(png_ptr, info_ptr);
+ return png_get_rows(png_ptr, info_ptr);
+ }
diff --git a/media-gfx/autotrace/files/autotrace-0.31.1-libpng14.patch b/media-gfx/autotrace/files/autotrace-0.31.1-libpng14.patch
new file mode 100644
index 000000000000..72f76bcf1535
--- /dev/null
+++ b/media-gfx/autotrace/files/autotrace-0.31.1-libpng14.patch
@@ -0,0 +1,17 @@
+http://bugs.gentoo.org/321525
+
+--- configure.in
++++ configure.in
+@@ -188,9 +188,9 @@
+ HAVE_LIBPNG=yes ,,-lz -lm)
+ if test "x$HAVE_LIBPNG" = "xyes" ; then
+ LIBPNG_LDFLAGS="-lpng -lz -lm"
+- PKGCONFIG_REQS="$PKGCONFIG_REQS, libpng12"
+- if pkg-config --exists libpng12 ; then
+- LIBPNG_LDFLAGS="`pkg-config --libs libpng12`"
++ PKGCONFIG_REQS="$PKGCONFIG_REQS, libpng"
++ if pkg-config --exists libpng ; then
++ LIBPNG_LDFLAGS="`pkg-config --libs libpng`"
+ fi
+ AC_SUBST(LIBPNG_LDFLAGS)
+ AC_DEFINE(HAVE_LIBPNG)
diff --git a/media-gfx/autotrace/files/autotrace-0.31.1-m4.patch b/media-gfx/autotrace/files/autotrace-0.31.1-m4.patch
new file mode 100644
index 000000000000..7781be784f01
--- /dev/null
+++ b/media-gfx/autotrace/files/autotrace-0.31.1-m4.patch
@@ -0,0 +1,7 @@
+--- autotrace.m4
++++ autotrace.m4
+@@ -6,3 +6,3 @@
+ dnl
+-AC_DEFUN(AM_PATH_AUTOTRACE,
++AC_DEFUN([AM_PATH_AUTOTRACE],
+ [dnl
diff --git a/media-gfx/autotrace/files/autotrace-0.31.1-pkgconfig.patch b/media-gfx/autotrace/files/autotrace-0.31.1-pkgconfig.patch
new file mode 100644
index 000000000000..a6371dd3c725
--- /dev/null
+++ b/media-gfx/autotrace/files/autotrace-0.31.1-pkgconfig.patch
@@ -0,0 +1,13 @@
+http://bugs.gentoo.org/283534
+
+--- configure.in
++++ configure.in
+@@ -223,7 +223,7 @@ if test "${swf_header_found}" = yes ; then
+ AC_CHECK_LIB(ming, Ming_init,
+ HAVE_LIBSWF=yes,,-lm)
+ if test "$HAVE_LIBSWF" = "yes" ; then
+- PKGCONFIG_REQS="$PKGCONFIG_REQS, ming"
++ PKGCONFIG_REQS="$PKGCONFIG_REQS, libming"
+ LIBSWF_LDFLAGS="-lming -lm"
+ AC_SUBST(LIBSWF_LDFLAGS)
+ AC_DEFINE(HAVE_LIBSWF)
diff --git a/media-gfx/autotrace/files/autotrace-0.31.1-swf-output.patch b/media-gfx/autotrace/files/autotrace-0.31.1-swf-output.patch
new file mode 100644
index 000000000000..b9132c2ac529
--- /dev/null
+++ b/media-gfx/autotrace/files/autotrace-0.31.1-swf-output.patch
@@ -0,0 +1,30 @@
+http://bugs.gentoo.org/122035
+
+--- output-swf.c
++++ output-swf.c
+@@ -24,7 +24,6 @@
+ #include "spline.h"
+ #include "color.h"
+ #include "output-swf.h"
+-#include <ming.h>
+
+ #define FPS 24.0
+ #define IMGID 1
+
+--- output-swf.h
++++ output-swf.h
+@@ -23,6 +23,7 @@
+ #define OUTPUTSWF_H
+
+ #include "output.h"
++#include <ming.h>
+
+ int output_swf_writer(FILE* file, at_string name,
+ int llx, int lly, int urx, int ury,
+@@ -31,4 +32,6 @@
+ at_msg_func msg_func,
+ at_address msg_data);
+
++void fileOutputMethod(byte b, void *data);
++
+ #endif /* Not def: OUTPUTSWF_H */
diff --git a/media-gfx/autotrace/metadata.xml b/media-gfx/autotrace/metadata.xml
new file mode 100644
index 000000000000..08a29587f786
--- /dev/null
+++ b/media-gfx/autotrace/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+<herd>fonts</herd>
+</pkgmetadata>
diff --git a/media-gfx/aview/Manifest b/media-gfx/aview/Manifest
new file mode 100644
index 000000000000..ce00fc6250b8
--- /dev/null
+++ b/media-gfx/aview/Manifest
@@ -0,0 +1 @@
+DIST aview-1.3.0rc1.tar.gz 54317 SHA256 42d61c4194e8b9b69a881fdde698c83cb27d7eda59e08b300e73aaa34474ec99 SHA512 941f2a92aaf3852b403daf688cda4ca2eb82ec32ee6566cd2aef3d121f259f1bb0214f872c4d5020c658bd81adba0577313acc5972d2f44b295f21905e107144 WHIRLPOOL eae555567be4943f16542b75e6f68b7c7548d8028f16cfe12f46648ed27bd8cbd87189d1925e7fe16a7c86247f121aca82fa24f9e901844ec6e9f39c7bcff74d
diff --git a/media-gfx/aview/aview-1.3.0_rc1-r1.ebuild b/media-gfx/aview/aview-1.3.0_rc1-r1.ebuild
new file mode 100644
index 000000000000..e3e3ff7c071f
--- /dev/null
+++ b/media-gfx/aview/aview-1.3.0_rc1-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit base
+
+MY_P=${P/_/}
+S=${WORKDIR}/${MY_P/rc*/}
+DESCRIPTION="An ASCII Image Viewer"
+SRC_URI="mirror://sourceforge/aa-project/${MY_P}.tar.gz"
+HOMEPAGE="http://aa-project.sourceforge.net/aview/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=">=media-libs/aalib-1.4_rc4"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-filename-spaces.patch
+ "${FILESDIR}"/${P}-tmp_creation.patch
+ "${FILESDIR}"/${P}-includes.patch
+)
+
+src_compile() {
+ econf || die
+ make aview || die
+}
+
+src_install() {
+ into /usr
+ dobin aview asciiview
+
+ doman *.1
+ dodoc ANNOUNCE ChangeLog README TODO
+}
diff --git a/media-gfx/aview/aview-1.3.0_rc1-r3.ebuild b/media-gfx/aview/aview-1.3.0_rc1-r3.ebuild
new file mode 100644
index 000000000000..ee28b891243e
--- /dev/null
+++ b/media-gfx/aview/aview-1.3.0_rc1-r3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base
+
+MY_P=${P/_/}
+S=${WORKDIR}/${MY_P/rc*/}
+DESCRIPTION="An ASCII Image Viewer"
+SRC_URI="mirror://sourceforge/aa-project/${MY_P}.tar.gz"
+HOMEPAGE="http://aa-project.sourceforge.net/aview/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
+IUSE=""
+
+DEPEND=">=media-libs/aalib-1.4_rc4"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-asciiview.patch
+ "${FILESDIR}"/${P}-includes.patch
+)
+
+src_prepare() {
+ base_src_prepare
+
+ sed -i -e 's:#include <malloc.h>:#include <stdlib.h>:g' "${S}"/*.c || die
+}
+
+src_compile() {
+ make aview
+}
+
+src_install() {
+ dobin aview asciiview
+
+ doman *.1
+ dodoc ANNOUNCE ChangeLog README TODO
+}
diff --git a/media-gfx/aview/files/aview-1.3.0_rc1-asciiview.patch b/media-gfx/aview/files/aview-1.3.0_rc1-asciiview.patch
new file mode 100644
index 000000000000..6d71bbb967b1
--- /dev/null
+++ b/media-gfx/aview/files/aview-1.3.0_rc1-asciiview.patch
@@ -0,0 +1,76 @@
+Support spaces in filenames (bug #39207) based on a patch from
+kyberneticist AT yahoo DOT com with additional fixes to address bug
+#293654 by Kevin McCarthy <signals@gentoo.org>
+
+Fix insecure temporary file permissions (bug #235808) based on a patch from
+Robert Buchholz <rbu@gentoo.org>
+
+Fix ignored interactive keyboard commands when aview is called from the
+asciiview script (bug #293654) by Kevin McCarthy <signals@gentoo.org>
+
+Rollup patch created by Kevin McCarthy <signals@gentoo.org>
+
+--- asciiview
++++ asciiview
+@@ -3,13 +3,13 @@
+ clear()
+ {
+ kill $! 2>/dev/null
+- rm -f /tmp/aview$$.pgm 2>/dev/null
++ rm -rf $tmpdir 2>/dev/null
+ }
+ myconvert()
+ {
+- if anytopnm $1 >/tmp/aview$$.pgm 2>/dev/null ; then
++ if anytopnm "$1" >"$2" 2>/dev/null ; then
+ exit
+- elif convert -colorspace gray $1 pgm:- 2>/dev/null ; then
++ elif convert -colorspace gray "$1" pgm:- 2>/dev/null ; then
+ exit
+ fi
+ echo "Failed to convert file format to PNM by both convert and anytopnm" >&2
+@@ -44,27 +44,34 @@
+ options="$options $1"
+ shift
+ ;;
+- *)
+- filenames="$filenames $1"
++ *)
++ if [ "$filenames" = "" ]
++ then
++ filenames=$1 #avoid leading null
++ else
++ filenames=$(echo -e "$filenames\n$1")
++ fi
+ shift
+ ;;
+ esac
+ done
+ trap clear 0
+-mkfifo /tmp/aview$$.pgm
+-outfile=/tmp/aview$$.pgm
+-for name in $filenames ; do
+-if test -r $name ; then
+-case $name in
++tmpdir=`mktemp -t -d`
++outfile=$tmpdir/aview.pgm
++mkfifo $outfile
++exec 3<&0
++echo "$filenames" | while read name; do
++if test -r "$name" ; then
++case "$name" in
+ *.fli | *.lfc | *.flic )
+ PATH="$PATH:."
+- aaflip $options $name
++ aaflip $options "$name"
+ ;;
+ *)
+- myconvert $name >/tmp/aview$$.pgm &
++ myconvert "$name" "$outfile" >"$outfile" &
+ pid=$!
+ PATH="$PATH:."
+- aview $options /tmp/aview$$.pgm
++ aview $options $outfile <&3
+ kill $pid 2>/dev/null
+ esac
+ else
diff --git a/media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch b/media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch
new file mode 100644
index 000000000000..e42ed0d5c583
--- /dev/null
+++ b/media-gfx/aview/files/aview-1.3.0_rc1-filename-spaces.patch
@@ -0,0 +1,53 @@
+diff -ur aview-1.3.0-orig/asciiview aview-1.3.0/asciiview
+--- aview-1.3.0-orig/asciiview 2005-08-15 21:20:16.000000000 -0400
++++ aview-1.3.0/asciiview 2005-08-15 21:20:19.000000000 -0400
+@@ -7,9 +7,9 @@
+ }
+ myconvert()
+ {
+- if anytopnm $1 >/tmp/aview$$.pgm 2>/dev/null ; then
++ if anytopnm "$1" >/tmp/aview$$.pgm 2>/dev/null ; then
+ exit
+- elif convert -colorspace gray $1 pgm:- 2>/dev/null ; then
++ elif convert -colorspace gray "$1" pgm:- 2>/dev/null ; then
+ exit
+ fi
+ echo "Failed to convert file format to PNM by both convert and anytopnm" >&2
+@@ -44,8 +44,13 @@
+ options="$options $1"
+ shift
+ ;;
+- *)
+- filenames="$filenames $1"
++ *)
++ if [ "$filenames" = "" ]
++ then
++ filenames=$1 #avoid leading null
++ else
++ filenames=$(echo -e "$filenames\000$1")
++ fi
+ shift
+ ;;
+ esac
+@@ -53,15 +58,16 @@
+ trap clear 0
+ mkfifo /tmp/aview$$.pgm
+ outfile=/tmp/aview$$.pgm
+-for name in $filenames ; do
+-if test -r $name ; then
+-case $name in
++IFS=$(echo -e "\000")
++echo $filenames | while read name; do
++if test -r "$name" ; then
++case "$name" in
+ *.fli | *.lfc | *.flic )
+ PATH="$PATH:."
+- aaflip $options $name
++ aaflip $options "$name"
+ ;;
+ *)
+- myconvert $name >/tmp/aview$$.pgm &
++ myconvert "$name" >/tmp/aview$$.pgm &
+ pid=$!
+ PATH="$PATH:."
+ aview $options /tmp/aview$$.pgm
diff --git a/media-gfx/aview/files/aview-1.3.0_rc1-includes.patch b/media-gfx/aview/files/aview-1.3.0_rc1-includes.patch
new file mode 100644
index 000000000000..3e5006b4c549
--- /dev/null
+++ b/media-gfx/aview/files/aview-1.3.0_rc1-includes.patch
@@ -0,0 +1,11 @@
+Index: aview-1.3.0/main.c
+===================================================================
+--- aview-1.3.0.orig/main.c
++++ aview-1.3.0/main.c
+@@ -1,4 +1,6 @@
+ #include <aalib.h>
++#include <string.h>
++#include <stdlib.h>
+ #include "image.h"
+ #include "ui.h"
+ #include "config.h"
diff --git a/media-gfx/aview/files/aview-1.3.0_rc1-tmp_creation.patch b/media-gfx/aview/files/aview-1.3.0_rc1-tmp_creation.patch
new file mode 100644
index 000000000000..f792e8bfebbb
--- /dev/null
+++ b/media-gfx/aview/files/aview-1.3.0_rc1-tmp_creation.patch
@@ -0,0 +1,46 @@
+Fix insecure temporary file creation, see:
+https://bugs.gentoo.org/show_bug.cgi?id=235808
+
+Index: aview-1.3.0/asciiview
+===================================================================
+--- aview-1.3.0.orig/asciiview
++++ aview-1.3.0/asciiview
+@@ -3,11 +3,11 @@
+ clear()
+ {
+ kill $! 2>/dev/null
+- rm -f /tmp/aview$$.pgm 2>/dev/null
++ rm -rf $tmpdir 2>/dev/null
+ }
+ myconvert()
+ {
+- if anytopnm "$1" >/tmp/aview$$.pgm 2>/dev/null ; then
++ if anytopnm "$1" >"$2" 2>/dev/null ; then
+ exit
+ elif convert -colorspace gray "$1" pgm:- 2>/dev/null ; then
+ exit
+@@ -56,8 +56,9 @@ while [ "$1" != "" ]; do
+ esac
+ done
+ trap clear 0
+-mkfifo /tmp/aview$$.pgm
+-outfile=/tmp/aview$$.pgm
++tmpdir=`mktemp -t -d`
++outfile=$tmpdir/aview.pgm
++mkfifo $outfile
+ IFS=$(echo -e "\000")
+ echo $filenames | while read name; do
+ if test -r "$name" ; then
+@@ -67,10 +68,10 @@ case "$name" in
+ aaflip $options "$name"
+ ;;
+ *)
+- myconvert "$name" >/tmp/aview$$.pgm &
++ myconvert "$name" "$outfile" >"$outfile" &
+ pid=$!
+ PATH="$PATH:."
+- aview $options /tmp/aview$$.pgm
++ aview $options $outfile
+ kill $pid 2>/dev/null
+ esac
+ else
diff --git a/media-gfx/aview/metadata.xml b/media-gfx/aview/metadata.xml
new file mode 100644
index 000000000000..98a05a1b7158
--- /dev/null
+++ b/media-gfx/aview/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">aa-project</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/blender/Manifest b/media-gfx/blender/Manifest
new file mode 100644
index 000000000000..17ebd4898350
--- /dev/null
+++ b/media-gfx/blender/Manifest
@@ -0,0 +1 @@
+DIST blender-2.72b.tar.gz 52018242 SHA256 4436c704afa28e2e5e7b28b2c06981806ddedab70565d40972e422c00644bf47 SHA512 9767797621e443ff9b6810d1713dda110f883c33626d40d7fe5dda676f549e3591516dc24b75feebd85823dd13437c34521ca752139cd31ddacf31ea6b14e124 WHIRLPOOL 3687255bc9f4195b25b66a75630676ee15e67cf10a058dca11b3472617b54aae2bebb1810cc16e19c58ca1c09b1ea8b70f72e30c05632ab0bae8910925a37a54
diff --git a/media-gfx/blender/blender-2.72b-r2.ebuild b/media-gfx/blender/blender-2.72b-r2.ebuild
new file mode 100644
index 000000000000..3e366adfd112
--- /dev/null
+++ b/media-gfx/blender/blender-2.72b-r2.ebuild
@@ -0,0 +1,280 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+## BUNDLED-DEPS:
+# extern/cuew
+# extern/Eigen3
+# extern/xdnd
+# extern/carve
+# extern/glew
+# extern/libmv
+# extern/clew
+# extern/colamd
+# extern/lzma
+# extern/gtest
+# extern/rangetree
+# extern/libredcode
+# extern/wcwidth
+# extern/binreloc
+# extern/recastnavigation
+# extern/bullet2
+# extern/lzo
+# extern/libopenjpeg
+# extern/libmv/third_party/msinttypes
+# extern/libmv/third_party/ceres
+# extern/libmv/third_party/gflags
+# extern/libmv/third_party/glog
+
+EAPI=5
+PYTHON_COMPAT=( python3_4 )
+#PATCHSET="1"
+
+inherit multilib fdo-mime gnome2-utils cmake-utils eutils python-single-r1 versionator flag-o-matic toolchain-funcs pax-utils check-reqs
+
+DESCRIPTION="3D Creation/Animation/Publishing System"
+HOMEPAGE="http://www.blender.org"
+
+case ${PV} in
+ *_p*)
+ SRC_URI="http://dev.gentoo.org/~lu_zero/${P}.tar.gz" ;;
+ *)
+ SRC_URI="http://download.blender.org/source/${P}.tar.gz" ;;
+esac
+
+if [[ -n ${PATCHSET} ]]; then
+ SRC_URI+=" http://dev.gentoo.org/~flameeyes/${PN}/${P}-patches-${PATCHSET}.tar.xz"
+fi
+
+SLOT="0"
+LICENSE="|| ( GPL-2 BL )"
+KEYWORDS="~amd64 ~x86"
+IUSE="+boost +bullet collada colorio cycles +dds debug doc +elbeem ffmpeg fftw +game-engine jack jpeg2k ndof nls openal openimageio +opennl openmp +openexr player redcode sdl sndfile cpu_flags_x86_sse cpu_flags_x86_sse2 tiff"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ player? ( game-engine )
+ redcode? ( jpeg2k ffmpeg )
+ cycles? ( boost openexr tiff )
+ nls? ( boost )
+ game-engine? ( boost )"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ >=media-libs/freetype-2.0:2
+ media-libs/glew
+ media-libs/libpng:0
+ media-libs/libsamplerate
+ sci-libs/ldl
+ sys-libs/zlib
+ virtual/glu
+ virtual/jpeg
+ virtual/libintl
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXi
+ x11-libs/libXxf86vm
+ boost? ( >=dev-libs/boost-1.44[nls?,threads(+)] )
+ collada? ( media-libs/opencollada )
+ colorio? ( <=media-libs/opencolorio-1.0.9 )
+ cycles? (
+ media-libs/openimageio
+ )
+ ffmpeg? (
+ || (
+ >=media-video/ffmpeg-2.1.4:0[x264,mp3,encode,theora,jpeg2k?]
+ >=media-video/libav-9[x264,mp3,encode,theora,jpeg2k?]
+ )
+ )
+ fftw? ( sci-libs/fftw:3.0 )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ndof? (
+ app-misc/spacenavd
+ dev-libs/libspnav
+ )
+ nls? ( virtual/libiconv )
+ openal? ( >=media-libs/openal-1.6.372 )
+ openimageio? ( media-libs/openimageio )
+ openexr? ( media-libs/ilmbase media-libs/openexr )
+ sdl? ( media-libs/libsdl[sound,joystick] )
+ sndfile? ( media-libs/libsndfile )
+ tiff? ( media-libs/tiff:0 )"
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen[-nodot(-),dot(+)]
+ dev-python/sphinx
+ )
+ nls? ( sys-devel/gettext )"
+
+pkg_pretend() {
+ if use openmp && ! tc-has-openmp; then
+ eerror "You are using gcc built without 'openmp' USE."
+ eerror "Switch CXX to an OpenMP capable compiler."
+ die "Need openmp"
+ fi
+
+ if use doc; then
+ CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
+ fi
+}
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.68-doxyfile.patch \
+ "${FILESDIR}"/${PN}-2.68-fix-install-rules.patch \
+ "${FILESDIR}"/${PN}-2.70-sse2.patch \
+ "${FILESDIR}"/${PN}-2.72-T42797.diff
+
+ epatch_user
+
+ # we don't want static glew, but it's scattered across
+ # thousand files
+ # !!!CHECK THIS SED ON EVERY VERSION BUMP!!!
+ sed -i \
+ -e '/-DGLEW_STATIC/d' \
+ $(find . -type f -name "CMakeLists.txt") || die
+
+ # linguas cleanup
+ local i
+ if ! use nls; then
+ rm -r "${S}"/release/datafiles/locale || die
+ else
+ if [[ -n "${LINGUAS+x}" ]] ; then
+ cd "${S}"/release/datafiles/locale/po
+ for i in *.po ; do
+ mylang=${i%.po}
+ has ${mylang} ${LINGUAS} || { rm -r ${i} || die ; }
+ done
+ fi
+ fi
+}
+
+src_configure() {
+ # FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
+ # shadows, see bug #276338 for reference
+ append-flags -funsigned-char
+ append-lfs-flags
+
+ # WITH_PYTHON_SECURITY
+ # WITH_PYTHON_SAFETY
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DWITH_INSTALL_PORTABLE=OFF
+ $(cmake-utils_use_with boost BOOST)
+ $(cmake-utils_use_with cycles CYCLES)
+ $(cmake-utils_use_with collada OPENCOLLADA)
+ $(cmake-utils_use_with dds IMAGE_DDS)
+ $(cmake-utils_use_with elbeem MOD_FLUID)
+ $(cmake-utils_use_with ffmpeg CODEC_FFMPEG)
+ $(cmake-utils_use_with fftw FFTW3)
+ $(cmake-utils_use_with fftw MOD_OCEANSIM)
+ $(cmake-utils_use_with game-engine GAMEENGINE)
+ $(cmake-utils_use_with nls INTERNATIONAL)
+ $(cmake-utils_use_with jack JACK)
+ $(cmake-utils_use_with jpeg2k IMAGE_OPENJPEG)
+ $(cmake-utils_use_with openimageio OPENIMAGEIO)
+ $(cmake-utils_use_with openal OPENAL)
+ $(cmake-utils_use_with openexr IMAGE_OPENEXR)
+ $(cmake-utils_use_with openmp OPENMP)
+ $(cmake-utils_use_with opennl OPENNL)
+ $(cmake-utils_use_with player PLAYER)
+ $(cmake-utils_use_with redcode IMAGE_REDCODE)
+ $(cmake-utils_use_with sdl SDL)
+ $(cmake-utils_use_with sndfile CODEC_SNDFILE)
+ $(cmake-utils_use_with cpu_flags_x86_sse RAYOPTIMIZATION)
+ $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
+ $(cmake-utils_use_with bullet BULLET)
+ $(cmake-utils_use_with tiff IMAGE_TIFF)
+ $(cmake-utils_use_with colorio OPENCOLORIO)
+ $(cmake-utils_use_with ndof INPUT_NDOF)
+ -DWITH_PYTHON_INSTALL=OFF
+ -DWITH_PYTHON_INSTALL_NUMPY=OFF
+ -DWITH_STATIC_LIBS=OFF
+ -DWITH_SYSTEM_GLEW=ON
+ -DWITH_SYSTEM_OPENJPEG=ON
+ -DWITH_SYSTEM_BULLET=OFF
+ -DPYTHON_VERSION="${EPYTHON/python/}"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use doc; then
+ einfo "Generating Blender C/C++ API docs ..."
+ cd "${CMAKE_USE_DIR}"/doc/doxygen || die
+ doxygen -u Doxyfile
+ doxygen || die "doxygen failed to build API docs."
+
+ cd "${CMAKE_USE_DIR}" || die
+ einfo "Generating (BPY) Blender Python API docs ..."
+ "${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "blender failed."
+
+ cd "${CMAKE_USE_DIR}"/doc/python_api || die
+ sphinx-build sphinx-in BPY_API || die "sphinx failed."
+ fi
+}
+
+src_test() { :; }
+
+src_install() {
+ local i
+
+ # Pax mark blender for hardened support.
+ pax-mark m "${CMAKE_BUILD_DIR}"/bin/blender
+
+ if use doc; then
+ docinto "API/python"
+ dohtml -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/*
+
+ docinto "API/blender"
+ dohtml -r "${CMAKE_USE_DIR}"/doc/doxygen/html/*
+ fi
+
+ # fucked up cmake will relink binary for no reason
+ emake -C "${CMAKE_BUILD_DIR}" DESTDIR="${D}" install/fast
+
+ # fix doc installdir
+ dohtml "${CMAKE_USE_DIR}"/release/text/readme.html
+ rm -rf "${ED%/}"/usr/share/doc/blender
+
+ python_fix_shebang "${ED%/}"/usr/bin/blender-thumbnailer.py
+ python_optimize "${ED%/}"/usr/share/blender/${PV}/scripts
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ elog
+ elog "Blender uses python integration. As such, may have some"
+ elog "inherit risks with running unknown python scripting."
+ elog
+ elog "It is recommended to change your blender temp directory"
+ elog "from /tmp to /home/user/tmp or another tmp file under your"
+ elog "home directory. This can be done by starting blender, then"
+ elog "dragging the main menu down do display all paths."
+ elog
+ ewarn
+ ewarn "This ebuild does not unbundle the massive amount of 3rd party"
+ ewarn "libraries which are shipped with blender. Note that"
+ ewarn "these have caused security issues in the past."
+ ewarn "If you are concerned about security, file a bug upstream:"
+ ewarn " https://developer.blender.org/"
+ ewarn
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/blender/blender-2.72b-r3.ebuild b/media-gfx/blender/blender-2.72b-r3.ebuild
new file mode 100644
index 000000000000..cd8c51fc9d3b
--- /dev/null
+++ b/media-gfx/blender/blender-2.72b-r3.ebuild
@@ -0,0 +1,278 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+## BUNDLED-DEPS:
+# extern/cuew
+# extern/Eigen3
+# extern/xdnd
+# extern/carve
+# extern/glew
+# extern/libmv
+# extern/clew
+# extern/colamd
+# extern/lzma
+# extern/gtest
+# extern/rangetree
+# extern/libredcode
+# extern/wcwidth
+# extern/binreloc
+# extern/recastnavigation
+# extern/bullet2
+# extern/lzo
+# extern/libopenjpeg
+# extern/libmv/third_party/msinttypes
+# extern/libmv/third_party/ceres
+# extern/libmv/third_party/gflags
+# extern/libmv/third_party/glog
+
+EAPI=5
+PYTHON_COMPAT=( python3_4 )
+#PATCHSET="1"
+
+inherit multilib fdo-mime gnome2-utils cmake-utils eutils python-single-r1 versionator flag-o-matic toolchain-funcs pax-utils check-reqs
+
+DESCRIPTION="3D Creation/Animation/Publishing System"
+HOMEPAGE="http://www.blender.org"
+
+case ${PV} in
+ *_p*)
+ SRC_URI="http://dev.gentoo.org/~lu_zero/${P}.tar.gz" ;;
+ *)
+ SRC_URI="http://download.blender.org/source/${P}.tar.gz" ;;
+esac
+
+if [[ -n ${PATCHSET} ]]; then
+ SRC_URI+=" http://dev.gentoo.org/~flameeyes/${PN}/${P}-patches-${PATCHSET}.tar.xz"
+fi
+
+SLOT="0"
+LICENSE="|| ( GPL-2 BL )"
+KEYWORDS="~amd64 ~x86"
+IUSE="+boost +bullet collada colorio cycles +dds debug doc +elbeem ffmpeg fftw +game-engine jack jpeg2k libav ndof nls openal openimageio +opennl openmp +openexr player redcode sdl sndfile cpu_flags_x86_sse cpu_flags_x86_sse2 tiff"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ player? ( game-engine )
+ redcode? ( jpeg2k ffmpeg )
+ cycles? ( boost openexr tiff )
+ nls? ( boost )
+ game-engine? ( boost )"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ >=media-libs/freetype-2.0:2
+ media-libs/glew
+ media-libs/libpng:0
+ media-libs/libsamplerate
+ sci-libs/ldl
+ sys-libs/zlib
+ virtual/glu
+ virtual/jpeg
+ virtual/libintl
+ virtual/opengl
+ x11-libs/libX11
+ x11-libs/libXi
+ x11-libs/libXxf86vm
+ boost? ( >=dev-libs/boost-1.44[nls?,threads(+)] )
+ collada? ( media-libs/opencollada )
+ colorio? ( <=media-libs/opencolorio-1.0.9 )
+ cycles? (
+ media-libs/openimageio
+ )
+ ffmpeg? (
+ !libav? ( >=media-video/ffmpeg-2.1.4:0=[x264,mp3,encode,theora,jpeg2k?] )
+ libav? ( >=media-video/libav-9:0=[x264,mp3,encode,theora,jpeg2k?] )
+ )
+ fftw? ( sci-libs/fftw:3.0 )
+ jack? ( media-sound/jack-audio-connection-kit )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ ndof? (
+ app-misc/spacenavd
+ dev-libs/libspnav
+ )
+ nls? ( virtual/libiconv )
+ openal? ( >=media-libs/openal-1.6.372 )
+ openimageio? ( media-libs/openimageio )
+ openexr? ( media-libs/ilmbase media-libs/openexr )
+ sdl? ( media-libs/libsdl[sound,joystick] )
+ sndfile? ( media-libs/libsndfile )
+ tiff? ( media-libs/tiff:0 )"
+DEPEND="${RDEPEND}
+ doc? (
+ app-doc/doxygen[-nodot(-),dot(+)]
+ dev-python/sphinx
+ )
+ nls? ( sys-devel/gettext )"
+
+pkg_pretend() {
+ if use openmp && ! tc-has-openmp; then
+ eerror "You are using gcc built without 'openmp' USE."
+ eerror "Switch CXX to an OpenMP capable compiler."
+ die "Need openmp"
+ fi
+
+ if use doc; then
+ CHECKREQS_DISK_BUILD="4G" check-reqs_pkg_pretend
+ fi
+}
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.68-doxyfile.patch \
+ "${FILESDIR}"/${PN}-2.68-fix-install-rules.patch \
+ "${FILESDIR}"/${PN}-2.70-sse2.patch \
+ "${FILESDIR}"/${PN}-2.72-T42797.diff
+
+ epatch_user
+
+ # we don't want static glew, but it's scattered across
+ # thousand files
+ # !!!CHECK THIS SED ON EVERY VERSION BUMP!!!
+ sed -i \
+ -e '/-DGLEW_STATIC/d' \
+ $(find . -type f -name "CMakeLists.txt") || die
+
+ # linguas cleanup
+ local i
+ if ! use nls; then
+ rm -r "${S}"/release/datafiles/locale || die
+ else
+ if [[ -n "${LINGUAS+x}" ]] ; then
+ cd "${S}"/release/datafiles/locale/po
+ for i in *.po ; do
+ mylang=${i%.po}
+ has ${mylang} ${LINGUAS} || { rm -r ${i} || die ; }
+ done
+ fi
+ fi
+}
+
+src_configure() {
+ # FIX: forcing '-funsigned-char' fixes an anti-aliasing issue with menu
+ # shadows, see bug #276338 for reference
+ append-flags -funsigned-char
+ append-lfs-flags
+
+ # WITH_PYTHON_SECURITY
+ # WITH_PYTHON_SAFETY
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX=/usr
+ -DWITH_INSTALL_PORTABLE=OFF
+ $(cmake-utils_use_with boost BOOST)
+ $(cmake-utils_use_with cycles CYCLES)
+ $(cmake-utils_use_with collada OPENCOLLADA)
+ $(cmake-utils_use_with dds IMAGE_DDS)
+ $(cmake-utils_use_with elbeem MOD_FLUID)
+ $(cmake-utils_use_with ffmpeg CODEC_FFMPEG)
+ $(cmake-utils_use_with fftw FFTW3)
+ $(cmake-utils_use_with fftw MOD_OCEANSIM)
+ $(cmake-utils_use_with game-engine GAMEENGINE)
+ $(cmake-utils_use_with nls INTERNATIONAL)
+ $(cmake-utils_use_with jack JACK)
+ $(cmake-utils_use_with jpeg2k IMAGE_OPENJPEG)
+ $(cmake-utils_use_with openimageio OPENIMAGEIO)
+ $(cmake-utils_use_with openal OPENAL)
+ $(cmake-utils_use_with openexr IMAGE_OPENEXR)
+ $(cmake-utils_use_with openmp OPENMP)
+ $(cmake-utils_use_with opennl OPENNL)
+ $(cmake-utils_use_with player PLAYER)
+ $(cmake-utils_use_with redcode IMAGE_REDCODE)
+ $(cmake-utils_use_with sdl SDL)
+ $(cmake-utils_use_with sndfile CODEC_SNDFILE)
+ $(cmake-utils_use_with cpu_flags_x86_sse RAYOPTIMIZATION)
+ $(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
+ $(cmake-utils_use_with bullet BULLET)
+ $(cmake-utils_use_with tiff IMAGE_TIFF)
+ $(cmake-utils_use_with colorio OPENCOLORIO)
+ $(cmake-utils_use_with ndof INPUT_NDOF)
+ -DWITH_PYTHON_INSTALL=OFF
+ -DWITH_PYTHON_INSTALL_NUMPY=OFF
+ -DWITH_STATIC_LIBS=OFF
+ -DWITH_SYSTEM_GLEW=ON
+ -DWITH_SYSTEM_OPENJPEG=ON
+ -DWITH_SYSTEM_BULLET=OFF
+ -DPYTHON_VERSION="${EPYTHON/python/}"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+
+ if use doc; then
+ einfo "Generating Blender C/C++ API docs ..."
+ cd "${CMAKE_USE_DIR}"/doc/doxygen || die
+ doxygen -u Doxyfile
+ doxygen || die "doxygen failed to build API docs."
+
+ cd "${CMAKE_USE_DIR}" || die
+ einfo "Generating (BPY) Blender Python API docs ..."
+ "${BUILD_DIR}"/bin/blender --background --python doc/python_api/sphinx_doc_gen.py -noaudio || die "blender failed."
+
+ cd "${CMAKE_USE_DIR}"/doc/python_api || die
+ sphinx-build sphinx-in BPY_API || die "sphinx failed."
+ fi
+}
+
+src_test() { :; }
+
+src_install() {
+ local i
+
+ # Pax mark blender for hardened support.
+ pax-mark m "${CMAKE_BUILD_DIR}"/bin/blender
+
+ if use doc; then
+ docinto "API/python"
+ dohtml -r "${CMAKE_USE_DIR}"/doc/python_api/BPY_API/*
+
+ docinto "API/blender"
+ dohtml -r "${CMAKE_USE_DIR}"/doc/doxygen/html/*
+ fi
+
+ # fucked up cmake will relink binary for no reason
+ emake -C "${CMAKE_BUILD_DIR}" DESTDIR="${D}" install/fast
+
+ # fix doc installdir
+ dohtml "${CMAKE_USE_DIR}"/release/text/readme.html
+ rm -rf "${ED%/}"/usr/share/doc/blender
+
+ python_fix_shebang "${ED%/}"/usr/bin/blender-thumbnailer.py
+ python_optimize "${ED%/}"/usr/share/blender/${PV}/scripts
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ elog
+ elog "Blender uses python integration. As such, may have some"
+ elog "inherit risks with running unknown python scripting."
+ elog
+ elog "It is recommended to change your blender temp directory"
+ elog "from /tmp to /home/user/tmp or another tmp file under your"
+ elog "home directory. This can be done by starting blender, then"
+ elog "dragging the main menu down do display all paths."
+ elog
+ ewarn
+ ewarn "This ebuild does not unbundle the massive amount of 3rd party"
+ ewarn "libraries which are shipped with blender. Note that"
+ ewarn "these have caused security issues in the past."
+ ewarn "If you are concerned about security, file a bug upstream:"
+ ewarn " https://developer.blender.org/"
+ ewarn
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/blender/files/blender-2.68-doxyfile.patch b/media-gfx/blender/files/blender-2.68-doxyfile.patch
new file mode 100644
index 000000000000..c11c793fda97
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.68-doxyfile.patch
@@ -0,0 +1,19 @@
+commit 62308d9fc24bde22a50497816c44c8ca91f96f63
+Author: hasufell <hasufell@gentoo.org>
+Date: Fri Jul 19 18:36:34 2013 +0200
+
+ remove hhc.exe reference
+
+diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile
+index 397cc30..ac61756 100644
+--- a/doc/doxygen/Doxyfile
++++ b/doc/doxygen/Doxyfile
+@@ -1051,7 +1051,7 @@ CHM_FILE = blender.chm
+ # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+ # the HTML help compiler on the generated index.hhp.
+
+-HHC_LOCATION = "C:/Program Files (x86)/HTML Help Workshop/hhc.exe"
++HHC_LOCATION =
+
+ # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+ # controls if a separate .chi index file is generated (YES) or that
diff --git a/media-gfx/blender/files/blender-2.68-fix-install-rules.patch b/media-gfx/blender/files/blender-2.68-fix-install-rules.patch
new file mode 100644
index 000000000000..aa8ecc9f6174
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.68-fix-install-rules.patch
@@ -0,0 +1,26 @@
+commit 94eed33f878e35a8c7b69b0c23b3b30026460f33
+Author: hasufell <hasufell@gentoo.org>
+Date: Fri Jul 19 18:50:08 2013 +0200
+
+ remove stupid uninstall snippet
+
+ whoever coded this... it is dangerous
+ uninstall methods have NO PLACE in install rules
+
+diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
+index c84d944..2b9bf46 100644
+--- a/source/creator/CMakeLists.txt
++++ b/source/creator/CMakeLists.txt
+@@ -268,12 +268,6 @@ endif()
+ # Install Targets (Generic, All Platforms)
+
+
+-# important to make a clean install each time, else old scripts get loaded.
+-install(
+- CODE
+- "file(REMOVE_RECURSE ${TARGETDIR_VER})"
+-)
+-
+ if(WITH_PYTHON)
+ # install(CODE "message(\"copying blender scripts...\")")
+
diff --git a/media-gfx/blender/files/blender-2.70-sse2.patch b/media-gfx/blender/files/blender-2.70-sse2.patch
new file mode 100644
index 000000000000..6fc870ea3258
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.70-sse2.patch
@@ -0,0 +1,35 @@
+commit 0e0b27a589680e10e38a26575ad4dba8f3af2ec6
+Author: hasufell <hasufell@gentoo.org>
+Date: Fri Jul 19 18:50:19 2013 +0200
+
+ add option to explicitly control sse2 optimization
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 78bb3c6..d5f4576 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -86,6 +86,7 @@
+ #-----------------------------------------------------------------------------
+ # Load some macros.
+ include(build_files/cmake/macros.cmake)
++include(CMakeDependentOption)
+
+
+ #-----------------------------------------------------------------------------
+@@ -251,6 +252,7 @@
+ # Misc
+ option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
+ option(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
++cmake_dependent_option(WITH_SSE2 "SSE2 optimizations" ON WITH_RAYOPTIMIZATION OFF)
+ option(WITH_OPENNL "Enable use of Open Numerical Library" ON)
+ if(UNIX AND NOT APPLE)
+ option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
+@@ -1950,7 +1952,7 @@
+ set(PLATFORM_CFLAGS " ${COMPILER_SSE_FLAG} ${PLATFORM_CFLAGS}")
+ add_definitions(-D__SSE__ -D__MMX__)
+ endif()
+- if(SUPPORT_SSE2_BUILD)
++ if(WITH_SSE2 AND SUPPORT_SSE2_BUILD)
+ set(PLATFORM_CFLAGS " ${COMPILER_SSE2_FLAG} ${PLATFORM_CFLAGS}")
+ add_definitions(-D__SSE2__)
+ if(NOT SUPPORT_SSE_BUILD) # dont double up
diff --git a/media-gfx/blender/files/blender-2.72-T42797.diff b/media-gfx/blender/files/blender-2.72-T42797.diff
new file mode 100644
index 000000000000..d1db31882019
--- /dev/null
+++ b/media-gfx/blender/files/blender-2.72-T42797.diff
@@ -0,0 +1,13 @@
+--- source/blender/blenfont/intern/blf_glyph.c
++++ source/blender/blenfont/intern/blf_glyph.c
+@@ -262,8 +262,8 @@
+ g->xoff = -1;
+ g->yoff = -1;
+ bitmap = slot->bitmap;
+- g->width = bitmap.width;
+- g->height = bitmap.rows;
++ g->width = (int)bitmap.width;
++ g->height = (int)bitmap.rows;
+
+ if (g->width && g->height) {
+ if (sharp) {
diff --git a/media-gfx/blender/metadata.xml b/media-gfx/blender/metadata.xml
new file mode 100644
index 000000000000..f2841cfbe2ea
--- /dev/null
+++ b/media-gfx/blender/metadata.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ </maintainer>
+
+ <maintainer>
+ <email>lu_zero@gentoo.org</email>
+ <name>Luca Barbato</name>
+ </maintainer>
+
+ <longdescription>
+ Blender, the open source software for 3D modeling, animation,
+ rendering, post-production, interactive creation and playback.
+ </longdescription>
+
+ <use>
+ <flag name='game-engine' restrict='&gt;=media-gfx/blender-2.50'>
+ Adds Game Engine support to Blender.
+ </flag>
+ <flag name='collada'>
+ Add support for Collada interchange format through
+ <pkg>media-libs/opencollada</pkg>.
+ </flag>
+ <flag name='cycles'>
+ Build cycles renderer (requires <pkg>media-libs/openimageio</pkg> and
+ <pkg>dev-libs/boost</pkg>).
+ </flag>
+ <flag name='dds'>
+ Adds DDS textures support to Blender.
+ </flag>
+ <flag name='player'>
+ Build the Blender Player. THis requires the Game engine.
+ </flag>
+ <flag name='elbeem'>
+ Adds surface fluid simulation to Blender using El'Beem library.
+ </flag>
+ <flag name="doc">
+ Build C and Python API documentation directly from the source code.
+ </flag>
+ <flag name="redcode">
+ This flag add support for RED CODE camera digital format (5K HD
+ images *.r3d) - EXPERIMENTAL.
+ </flag>
+ <flag name="boost">
+ Enable features depending on boost.
+ </flag>
+ <flag name="bullet">
+ Enable Bullet (Physics Engine).
+ </flag>
+ <flag name="colorio">
+ Enable OpenColorIO color management.
+ </flag>
+ <flag name="ndof">
+ Enable NDOF input devices (SpaceNavigator and friends).
+ </flag>
+ <flag name="openimageio">Enable OpenImageIO Support</flag>
+ <flag name="opennl">Enable use of Open Numerical Library</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/bootsplash-themes/Manifest b/media-gfx/bootsplash-themes/Manifest
new file mode 100644
index 000000000000..0ea98356c4a5
--- /dev/null
+++ b/media-gfx/bootsplash-themes/Manifest
@@ -0,0 +1,176 @@
+DIST Theme-73labAllstar.tar.bz2 784795 SHA256 d5f3b40592fb783c813b6f79f9bf0b91b1cec86895ba1e052ce92ce208614d91
+DIST Theme-ASP.tar.bz2 876566 SHA256 3c402ec2aa29c3de7769e226fb3935c906608ff5221513fff80869c58a85584c
+DIST Theme-ASPLinux.tar.bz2 106075 SHA256 7f0ac5ef9bb62d5564fa24cc899c3ca6b58fb710d9f7eaf33984f88c373262e0
+DIST Theme-AquaMatrix.tar.bz2 280020 SHA256 eddc25145103fb6b67109da4d94fb563e582244fbd904b45700f6a5a2d4d8343
+DIST Theme-Arch.tar.bz2 100598 SHA256 d2947e62167a77011d95ecdbc23023a08569b9b81635321a171acba344e7f38c
+DIST Theme-ArchLinux.tar.bz2 101314 SHA256 1da4f0f8ecabbdb5bed9da7c7c7e0d80956e6ac320b91762568fe34b3353ff36
+DIST Theme-ArchPool.tar.bz2 133676 SHA256 7f408d2844748cb8e2887d0f87c91a992de0b8868578fa791cda73c5831cec9e
+DIST Theme-ArchRelief.tar.bz2 122528 SHA256 854dfc2f5b092d5d3f6f323ccce0ae6920b4a7389650d50b5ca2c2c2c8d70edf
+DIST Theme-AthlonXP.tar.bz2 83527 SHA256 f6f0c2ebe56ad14bb9216e49f11ff613b73702bbc3315dc9c810e41e7db50bca
+DIST Theme-Ayo.tar.bz2 137506 SHA256 68fe65a494bfcb8672d1ef5b209a50f47f0405ea925dbfb2885b992511a24cbf
+DIST Theme-BabyTux.tar.bz2 99004 SHA256 a8e2edaab19617bb266038f29d4272084b0fcca2c3bbc007f363ee3a0c211645
+DIST Theme-Berry.tar.bz2 93159 SHA256 9d4a5b15390fc32b99e8e4e1a25918d09934379d70596758460d7cc69e8962a4
+DIST Theme-Black.tar.bz2 115743 SHA256 334505016601112e26e30eb1b251a4bb716fc2c7f2fb42c70723221a73787c58
+DIST Theme-Burek.tar.bz2 7437 SHA256 98db4fb820f7a52ede7e0ba82162e14a3d9b15a2a21d1446822a52ff1da69289
+DIST Theme-CCux.tar.bz2 193017 SHA256 612dc5a31cb6db3655212c0e408962921aa5a859818300b86effd4d4cc769470
+DIST Theme-CLEE.tar.bz2 59585 SHA256 2233fb3f4f74f1a6c42fd30278961e4957909ab649f9a01ad64e7c874fc9e7d5
+DIST Theme-CM.tar.bz2 1221122 SHA256 80638d959dd8893f539c9a10028155b2f1114480e23d303e1c83d6fdfad9ad9c
+DIST Theme-CRUX.tar.bz2 37445 SHA256 c776446281b10369664a82f46208a125c8996fb14e24d6e1ab8cfe2631433622
+DIST Theme-CaixaMagica.tar.bz2 45267 SHA256 d148a1e26569145ebc263fac0b5e462d28555983175294c54751190389e0037a
+DIST Theme-Cargal.tar.bz2 2727458 SHA256 b85670df9f55173d0c85c43704b9b81cf725597b704ab5346ef0cec24960b06b
+DIST Theme-Compact.tar.bz2 247776 SHA256 039b96cb6f1fd3ae47906c385c03c88e74898bd36744a5aae31ddb7739b64111
+DIST Theme-Cybercity.tar.bz2 118704 SHA256 d4b12099c429320c2b762b76d43419edd4b42904e29ac10619a6af9e2da69d72
+DIST Theme-Cynapses.tar.bz2 296082 SHA256 2e8661e6215cae04d28ffa2440b3709c42228ecc56f2992448e0256d20be550f
+DIST Theme-DangerGirl.tar.bz2 72948 SHA256 e0110c12109ea0cdb248b94a2efddccee74475c81d4a7e97c855b888201e4478
+DIST Theme-Dark-0.1.tar.bz2 32133 SHA256 c2d293a427375085d06e611ae81dca122449d22b73494cea652c24938864aed0
+DIST Theme-Dark-2-0.2.tar.bz2 147219 SHA256 bc0c4a409c51ab0734646a3ba888145ed591e70fdbb497f8d365bec3a6cae42a
+DIST Theme-DarkBlue.tar.bz2 791611 SHA256 ce2d0681174762d5b051c1c54fa4bf0fd183123d88acf2304b0ba8069e7d7d2a
+DIST Theme-DebBlue-Gnome.tar.bz2 470914 SHA256 eaa2b51dc528f12c0fa65d7142412707da585c202066c3a73c4c9028040413ab
+DIST Theme-DebBlue-Gnoppix.tar.bz2 460763 SHA256 9fbb687af3559dd157ec7a67e06e53e6333c1253cf088a8489071dab2dbbfc41
+DIST Theme-DebBlue.tar.bz2 437544 SHA256 326d6ef8142a7e9cef290cc4d36dda8a010d40925173a44d28bb420a30855e94
+DIST Theme-Debian-Mist.tar.bz2 332215 SHA256 4e4b23259c1db1d19749a08ebaa031e07ddde0da52050518affffa9c898d3477
+DIST Theme-Debian-Sarge.tar.bz2 355483 SHA256 ba7380b775550b95182a5cb2c7187d5558a62e485d5683daa18994ef23dd0ba7
+DIST Theme-Debian-Tux-Gnulinex.tar.bz2 319946 SHA256 16145f9324a903e7099320c633b49c8e0280ab05885d8b922ebcff8294362cea
+DIST Theme-Debian-Tux.tar.bz2 36530 SHA256 7bc7fbe347e8dcfd18f9f7c0f71c93141062f72cf82d89cef6827edef5413665
+DIST Theme-Debian-Wave.tar.bz2 39258 SHA256 faef4b1de925050e757ce67254f7ce1087dc30593f7cd9dad97ca475c9c44ed9
+DIST Theme-Debian.tar.bz2 2524384 SHA256 3beea7144e7bc9df329027ad378de8eee409e5edf0cac82086084e57c210cebc
+DIST Theme-Debian2.tar.bz2 36334 SHA256 abe9aea0eb40a9f7b86475f6852529c902247912500e72a880f5aadaec8cfb91
+DIST Theme-Debian3.tar.bz2 29542 SHA256 7abe1f0968a100c32163f41a70ce32c47f6c35c5107384128a1f50bee2c24630
+DIST Theme-Deflorist.tar.bz2 58354 SHA256 aed20cf22b296cf759cfadf0992992f5c901a791853517372a8672e053466b08
+DIST Theme-DimmuBorgir.tar.bz2 153834 SHA256 4ca545809f5700c59a05d8d3e9e95d14411a1b57bf505d96961640d4096c5e96
+DIST Theme-Dolphin.tar.bz2 266837 SHA256 e8abdb8c86bb34662ab098155e8d978f4bfb15ca4952497be9ecac60ae2fe387
+DIST Theme-Dragon.tar.bz2 310124 SHA256 9c2304f3bc173775383742f0fdb78e959ea6ba418c75630bd63c720ca1af5ff6
+DIST Theme-ERPOSS3.tar.bz2 60756 SHA256 9cf3d00db9c64550b139065215758f9081004101f5ba6319aa1999c3cf20510f
+DIST Theme-ElvinTooka.tar.bz2 590257 SHA256 8e4e18c7c993d8a1e7745952c533c9398572febbf73c5b7b8593c0dcb13794be
+DIST Theme-Emergance.tar.bz2 5146952 SHA256 96431e14d8965b538e73787aa9ae07d409b7eae6f780c544d68aa18c03a6b83d
+DIST Theme-Enterprise-spot.tar.bz2 150140 SHA256 187ff18b0368679c1013197507d695f3d5acffc48674a6be36633e7548b457df
+DIST Theme-Enterprise.tar.bz2 229709 SHA256 c7e9b9df7a9ccaf8bdd56d3a6567dc2d14282df040caebe27f8b43d4883d6bd7
+DIST Theme-EvenNewerTux.tar.bz2 71872 SHA256 399fae7cd359431261e94f6fedb5745e1fd2dd4ad7994166633e40488c8b439c
+DIST Theme-FarCry.tar.bz2 1280217 SHA256 ada8846eb1025ee7a941c7e49df6fc8899bb44148d093c4de5c2708803b1ef69
+DIST Theme-Fedora.tar.bz2 934188 SHA256 15492ea494c6fd1ad99d8b5524d3a47c89a3233967f94f534fac57c63aec399f
+DIST Theme-FedoraCore2.tar.bz2 327383 SHA256 c0ab1889afeb8e86047cee69a67204ccf61a9ab8d63df91600c78f195335d4fc
+DIST Theme-Flower.tar.bz2 55729 SHA256 47ce28fd228921b6d980c970f89d865dbedfd25f13b4d11797c43ef9a12d772a
+DIST Theme-Freepia.tar.bz2 157838 SHA256 e03bb84c66762008a00b3e4411aca019facf78ffcf1ccd5e707950816b940d07
+DIST Theme-FrozenBubble.tar.bz2 654458 SHA256 85aeb0ccb8fa8b5e6d62146631ffd7dbf6744ad6afa7bde4f04e5d9c4d0198b1
+DIST Theme-Frugalware.tar.bz2 994818 SHA256 c1a453c85ca20eed39dcacd16594b1f25d72408b98008896eafe49179149735e
+DIST Theme-GANT.tar.bz2 511828 SHA256 d4dfbb384cbf5e414bfd46b8df3a19e60da78fa4ec0faed3678aac1a1caf3bc8
+DIST Theme-GNU.tar.bz2 246036 SHA256 40c14e061f8f5b5eff4397b0c4832463fa46078c84b6683262f04abebb0d49de
+DIST Theme-Galantine.tar.bz2 17017 SHA256 b62f2608ba3a87143768d7593482d3f1c298acb10be1ecc82259ea3186ae81df
+DIST Theme-GalaxySlack2.tar.bz2 619115 SHA256 aeb580723323c74c6978689c9ee14f5a4fd8dd6ae5d38cf3e0e68bd9a4fd3f59
+DIST Theme-GeeXboX-Halloween.tar.bz2 72116 SHA256 d1fb5eb25e333b6e48b5ac6d9f3121c864ce3296545b1c92be3651504738490e
+DIST Theme-GeeXboX-OMC.tar.bz2 93910 SHA256 c70433f0a6335beeb673e4615a0106d02a364eb75b1f1a29f043a0a3553e0014
+DIST Theme-GeeXboX-Xmas.tar.bz2 71215 SHA256 c9abf3c6d64a167959ba72438c96fd907285237b31f2223c487f2a6765ed7b2b
+DIST Theme-GeeXboX.tar.bz2 44022 SHA256 d471b99d1f515ae1275ea7c20d6ac99d9a2be72d2c3e068e80e26ac842d1ace1
+DIST Theme-Gentoo-Hornet.tar.bz2 515773 SHA256 09e0860d82ddc4b977e1ec8bb1fed913b6de1a692313d04ef967c24d2f6d521b
+DIST Theme-Gentoo-LiveCD-2004.0.tar.bz2 116630 SHA256 5f25fdeca91e5baf8c4da90ca6278e35e5dba37cdfeb3b87f71f6d4290918720
+DIST Theme-Gentoo-LiveCD-2004.1.tar.bz2 401040 SHA256 1fbf840609845a9b7457b5fbd436ca74137b9dbd1a331e7ea96a89961957d633
+DIST Theme-Gentoo-LiveCD-2004.2.tar.bz2 563636 SHA256 e52802218a67d2f02c37dedfd69883456e6e9103504fc5227d8b689cfbd891ed
+DIST Theme-Gentoo-LiveCD-2004.3.tar.bz2 1794708 SHA256 3c9784a7c617b6a4fee16ad48407e528036740b0239fb828977d248b0fa84ad8
+DIST Theme-Gentoo.tar.bz2 160689 SHA256 6edd88052a052df8d56d6da3590e1e806783e79dbdc3789cd4cfcdfbfd5286df
+DIST Theme-Gentool.tar.bz2 286565 SHA256 fd68d26e5d4bd1ea841181c611e20231a0a6fdc79944b72464d941ae8bfce6a2
+DIST Theme-GoGentooGo.tar.bz2 94136 SHA256 d6c5be8a6ed03528e1e2ffe676044f8b39d9a035526fc98c11a3aa66f5c1fb6d
+DIST Theme-Ignite.tar.bz2 111923 SHA256 2ffcc2bd4fdb9d987c5d2549b3716c4b6b327bacc4a36816e1603e4b14c9ae4c
+DIST Theme-Jollix.tar.bz2 19617 SHA256 cce145ef72518b7a1874fa58bb85bc126c9d8314660ac8c272e5958bc8e01edf
+DIST Theme-Juicy.tar.bz2 60068 SHA256 812c7c4fb6083f8ec81fd11f0630bf2758006e95b9c544dc89b89006b0f1ba1e
+DIST Theme-Junior.tar.bz2 715631 SHA256 3679dd74cd6d4dfb33ee1223c56529a323ad0fe461263a682104f71bbf173655
+DIST Theme-Kanotix.tar.bz2 87917 SHA256 eaf0633a64b5401270b9e7d107783a1e8eddb298688cfc4fa8277eb44e082c5b
+DIST Theme-Keramik.tar.bz2 197880 SHA256 74c7d4d684d450e993b27bf6711b5538747844a450b19640f97c74c56ce9493b
+DIST Theme-KillBillTux-Grey.tar.bz2 349563 SHA256 74f7b6f9dd8d8783153d3595750d1df28d9ddf78f3619e21073b1d27f4501742
+DIST Theme-KillBillTux-Yellow.tar.bz2 296740 SHA256 bfb86f1fd94aadf00ce5275534e03237851916f9cc55a3ad751986e2828a11a0
+DIST Theme-KnoppMyth.tar.bz2 77720 SHA256 084833699d3a6d1974177b661a6e8e9a2d4f43944e1a07ddc150505a0bb6bcba
+DIST Theme-KnoppixKDE.tar.bz2 51256 SHA256 d60912a1d4885f6526804eeacc4b588822d936550a7e4deae0746945ecd159e3
+DIST Theme-KnoppixLT.tar.bz2 347438 SHA256 015ab70c8213a449d9a3401be20fb32292ad58cf24ff63201881c7889916d908
+DIST Theme-Konsole.tar.bz2 40194 SHA256 f0b844d9dfd30c75bc1cfd20db26d3d42a38ae2c41cb0b4684a02bf5a9c54476
+DIST Theme-KuruminOrgBR.tar.bz2 496830 SHA256 a9c40dfbb86a98d88608593d3400aa1ac31e9104bc6585c7f53711facaa7ec55
+DIST Theme-Leopard.tar.bz2 17986 SHA256 9e13edaec5c281da77afa14f030a8b2a029a643ec61dbcd3a127e539a10cf1e1
+DIST Theme-Lila.tar.bz2 1374439 SHA256 7e5646b810f0dcf5194064dcf933e36071e91f4f3a229bc69b7bdfc56414ccc9
+DIST Theme-Linux.tar.bz2 32102 SHA256 99b66f3b850b53facbadb6b0f07642d782f5cdab7b6b738dd68cd4652c4ef1c0
+DIST Theme-Lunar.tar.bz2 27937 SHA256 824c369d5635097595d8ae300de0c7d53515dd43a6e53f7b232ab703f6fd5036
+DIST Theme-MaiHoshino.tar.bz2 119900 SHA256 428ac01e5bd11f6a2d280e15e5d60dd5c7d81843996ccb405e7a5885da5d064d
+DIST Theme-Mandrake-10.0.tar.bz2 2727424 SHA256 7ea304968b6bd1eee7daab2fb1567518f9846b651655dcc4722ef00c0258b76c
+DIST Theme-Mandrake-9.2.tar.bz2 940925 SHA256 9e6daf2a5f9112efcd9ad973952c75cd424ae5ffc0742a1933a633896bca7c75
+DIST Theme-Master.tar.bz2 373889 SHA256 4414df53c5080db872e46b50c5b153c4cdcf601f5594dc6c1856b4bd7dfd24a8
+DIST Theme-Matrix.tar.bz2 80637 SHA256 ff46ae3e3863f28f15b2f487ba6ed48abfe0eac538cd1b233590a86e40391f8f
+DIST Theme-Metal-Tosh.tar.bz2 344375 SHA256 d857d45e2500a11c759476d1a8fae24f5b79160b715608ed80e5c17203a3333d
+DIST Theme-MetallTux.tar.bz2 465799 SHA256 9d7ac4088f8f09e6f66b9891043d0200f22063723d00e243f91dd0ffdf1f0ec2
+DIST Theme-Misspingus3.tar.bz2 563448 SHA256 211fefb0a85f566a833e120b28ba91d7c9d1d6bcc42938a50d5f5b0fd7aa7a27
+DIST Theme-Misspingus4.tar.bz2 491484 SHA256 9ecd164a2ba385097bafc0f819384b99a49daacc1c16c60f1e7790df214ad70a
+DIST Theme-Momonga.tar.bz2 53372 SHA256 de3664fa315ca2d6e0de073df5d114958e26bd85a0dee9e6f49ac09b92d8b60d
+DIST Theme-Morphix.tar.bz2 33408 SHA256 9c5c7f2f0eceb321f318392829192ae89dcffaf3b0df4f9df3ebd124ea67ede3
+DIST Theme-MyLittleTux.tar.bz2 96060 SHA256 6ee297c45860bd1aabf22197a566da669dd0c100213eadd8b0f881076fc04dff
+DIST Theme-MythTV.tar.bz2 57144 SHA256 bcb5dabe395310acebe3edcf9a41bbcff32414cf31e4a6971dccb554edfc8c06
+DIST Theme-NewFreepia.tar.bz2 157060 SHA256 f61d37261daf95381ec5b60771b35da61b5c497c6c1440043dbeb426e693a912
+DIST Theme-NewLinux-Deb.tar.bz2 236685 SHA256 83d7b57afd4ed1a483004aea9c4d3c3700115965d9f392205d6cbadd8d486433
+DIST Theme-NewLinux.tar.bz2 599559 SHA256 e471839c5112cf13f9c5e072ddf07733aceca42fdc4e99e34969b5e25d13fd4b
+DIST Theme-NewTux.tar.bz2 336178 SHA256 e0081ef1af90e8146d9db18ba528934060b3af79633b0c3c5a44b45de5e3f263
+DIST Theme-NightWorld.tar.bz2 108979 SHA256 e08d80b44d262dd0f51f796f1ba7aae958338b352d2c1065211b63d772dfbc2c
+DIST Theme-Notes.tar.bz2 91586 SHA256 b5198ffb85482c2423fa83507234c8c53ebcf7cdb0634ddc23fc7f09d673ade6
+DIST Theme-OfficeDesktop.tar.bz2 830981 SHA256 e330d3bf7b494e950683d9632fb45ba94dbc81c40823ebf6343424b2c5155e2d
+DIST Theme-Oneill.tar.bz2 175655 SHA256 cf534db0c0ae7d85f7533de8d56e262936efe0ecc929d26ba069822035611337
+DIST Theme-OpenSchool.tar.bz2 62027 SHA256 d502414e05096a3dc5fd7cc80cd87d05582b1dbac1e183776c5ac836bbc155df
+DIST Theme-OpenXchange.tar.bz2 107996 SHA256 3c9030b8cb30d2eb30bea716ed6e6699bfc27bb65fd2ba3dfd8cc7164e8177f1
+DIST Theme-PLF1.tar.bz2 259193 SHA256 a97d89051ecadcea73328bf22887e779fd2993724bc83b39f2b51b12cab8e99d
+DIST Theme-PLF2.tar.bz2 432658 SHA256 3bd4326a58f9674557249997a3b8141c51b4e678c26807962d623028eefe6ded
+DIST Theme-PLF5.tar.bz2 417145 SHA256 cccf36a2c3fd74dce88a9820ea78b067561d051536f9408e216a2f0107c0016f
+DIST Theme-Pativo.tar.bz2 1430390 SHA256 5bbe3013e9cb9ad01a444c5c0abaceebba090debec07f4ac7762fb448fe9490a
+DIST Theme-Pho.tar.bz2 10796 SHA256 76974134cee6f21636196578c034d356cc6b42fd62c517cd17247fc5d4e544fa
+DIST Theme-Popcorn.tar.bz2 46985 SHA256 03f154c112b242dcd5364c43d0337d72f5c73602b3f52ca220119e8c744eeb95
+DIST Theme-PowerBook.tar.bz2 192282 SHA256 d4548625e6f612448d41151144e14bebdb00514fe1244623cebddec8bfc911d8
+DIST Theme-Psychotoxic.tar.bz2 272490 SHA256 63c9441aa6c165992738e124a3baeddd0c12926c345e24a1a7dd4b7516bee263
+DIST Theme-Pyro.tar.bz2 51296 SHA256 4bf1f78a07946af4a1fe228fbf8aa3d8c8aca522fdf905681248fa9e69449f08
+DIST Theme-QiLinux-LiveCD-1.1.tar.bz2 20779 SHA256 85ea3027f9cb953743a75ed1c3c0933c56720316a2440cfca57838bb9a98f70b
+DIST Theme-RH9.tar.bz2 40199 SHA256 a57254901a7279ba21aec9bb30b842725ef81313355e491827e492b97af0913d
+DIST Theme-RadiantStar.tar.bz2 186842 SHA256 2a60c7a9974f6f4cbf21a616f035e69167090ae7586308d05f633a406a670e6b
+DIST Theme-Ratatouille.tar.bz2 11722 SHA256 b5c96ea2096534535230c31a29a4fc60b83666b068ef52d178d592921873d2dd
+DIST Theme-Raziel.tar.bz2 41909 SHA256 a68a1088ba7afb122c993dbef34623879cd5930cdb5532e6aa3c0be5c7092160
+DIST Theme-Redmond.tar.bz2 58717 SHA256 4b2fb6e9cb93bb0dfdb95371e63243c044add75b05ae8c37b6a62198a5ed0f56
+DIST Theme-Rojo.tar.bz2 144647 SHA256 d266b6b3d273dd0dd522baa2bfae21f0e8669406608f9e197d56ad28bbe22598
+DIST Theme-Rollmops.tar.bz2 12993 SHA256 09d071d5b46df9fdb39eef0ce010b37e0322e867d33e14b325c369763cf1c64e
+DIST Theme-Rustenguin.tar.bz2 38710 SHA256 707cd6b3034237b33bc67a2314cdd839d44528071be2a006e1f83a8ca74717cf
+DIST Theme-SMGL.tar.bz2 183775 SHA256 036930ad7e2c98463cfb007e765de5833edfe252e017c105fd0ae96b9d61d1d0
+DIST Theme-Shodan.tar.bz2 1106979 SHA256 5bbb052bb921fe25f5e880d89031600106de941e3fee82f3c55d34a7ab291913
+DIST Theme-Slack-3D.tar.bz2 100704 SHA256 c2f7b36e686a9e794d76919d38bcb2a6877e5417388b7452ab92714645b12d0f
+DIST Theme-Slack-Black-Tux.tar.bz2 52893 SHA256 1dcc952b33c1db8111cb9b81c08074d0b2e9150cde36c1f8aa151d02fca618a8
+DIST Theme-Slack-Blue.tar.bz2 51832 SHA256 d4f40a7f6ba4f7e5f919bfd864376108aaed14d498d12ce5f5d698bc1a2702cd
+DIST Theme-Slack-Glass.tar.bz2 66775 SHA256 d5132fb7646b99befbcc9d8ad0c2a9100434345e1eb832869adf62be26865bbc
+DIST Theme-Slack-Gray-B.tar.bz2 74571 SHA256 6761c0182bd4b631f9be7a414665641f6978a21e289b983647f07e064244c564
+DIST Theme-Slack-Gray.tar.bz2 228060 SHA256 825bb39a84fa6a0212516a642416f3afa103e4103513577ba3eb9e0fd9ef3b29
+DIST Theme-Slack.tar.bz2 51752 SHA256 b9d1b689ff4532c9a8ba9bfbc4bc5e2de0ba22575bbee2e90f9f388398dff43e
+DIST Theme-Slackware.tar.bz2 15541 SHA256 cdb1225f019286caf3807c7d05063faba605c738a8b0b7e6d13664aab4417fa6
+DIST Theme-Slackware2.tar.bz2 21591 SHA256 048abe388c1980c81aa6e529bc815a4f29a5f66e7d7bb4ca899275259b5dc7fe
+DIST Theme-SlackwareLinux.tar.bz2 60328 SHA256 5c332ba379e5580f00052e62750e1876f0bfa531493054ef72df95f2d926e3a9
+DIST Theme-Slide.tar.bz2 316951 SHA256 b13f38879e9422db7c35cf1f368b035e6f16f63d42bfd8f8ae9fc0c53967c49b
+DIST Theme-Spinner.tar.bz2 482881 SHA256 e2ccb8b7fb1a468db92835cf6dfbcfd3ce07d599106c1d9c0eb300cf14c2158e
+DIST Theme-Stargate-Tux.tar.bz2 185069 SHA256 4e6949ceca075b9edb2d37409e67e7c47961e381f2db7ee40f447cbad2ae4041
+DIST Theme-SuSE-7.2.tar.bz2 59857 SHA256 e4add9b1ef82aeccbbd7c05478a9ec6ab470172462271799b2bc748484375649
+DIST Theme-SuSE-7.3.tar.bz2 4700377 SHA256 5f090d9dea9ed4c4974abcd51073bb359dec7db801770d36dec2bceff6e89d48
+DIST Theme-SuSE-8.0.tar.bz2 175360 SHA256 8c2f56b03b56cdeba11436b290d177180037bfa0d3488621c4b7b6cc8c9c1d56
+DIST Theme-SuSE-8.1.tar.bz2 782751 SHA256 2e7b4d164ee6786135848c2ee4395a859f441dc59eccc60be676dca1530fdde7
+DIST Theme-SuSE-8.2.tar.bz2 431613 SHA256 e4b482e956538860c64e2fa19088bf21d42ed8071ddf99f7e1afe5e4b523bfba
+DIST Theme-SuSE-Home.tar.bz2 246575 SHA256 f78e362bffac7749037a124d6f576b89e4c0e2d65b6f48cd7a73fa09519e751c
+DIST Theme-SuSE-SLES.tar.bz2 60132 SHA256 1188d1ce5a9d0f9e2ff4e354f235514b1dc45f5bae36aad0b6f9dc5a9cd96bad
+DIST Theme-SuSE.tar.bz2 160567 SHA256 4c98920e10755705b4a65261063f925e3a994fc24b11dcc0b4fc531a495f5be3
+DIST Theme-SwirlPool.tar.bz2 336125 SHA256 b18423462c6ab3c44b6fc43ef0efa7123d597490af9a65537956c8cde7c603fd
+DIST Theme-ThinkLinux.tar.bz2 254188 SHA256 dac07f73dd1f5290c2a1cc87b108f93067e7df5e2516e26d9f729e89345a5e6f
+DIST Theme-TuxInfo-Conectiva.tar.bz2 789900 SHA256 81eaad1cfe5630f69871b784492de4d0b1e3b43e00d26a9a0d1b2750b46e56eb
+DIST Theme-TuxInfo-Debian.tar.bz2 793535 SHA256 b204b700bc58c4ba9a5f3375016f30c07ea308858bd9f01956cf35196cd179c4
+DIST Theme-TuxInfo-Mandrake.tar.bz2 793386 SHA256 bfc598c90c9c62e96c3f929278c74721a04266d3918f6bf446b09f34deb104ce
+DIST Theme-TuxInfo-RedHat.tar.bz2 791445 SHA256 0d4521cd4d16ba96e80be3106252eefc42e6af2650a48e353eafa5fa509f9743
+DIST Theme-TuxInfo-Slackware.tar.bz2 790916 SHA256 d510ffcb63c33a4bb3886f334ce8cd83a327b85dcf4d8398fab167e57face577
+DIST Theme-TuxInfo-SuSE.tar.bz2 791698 SHA256 10378cec49def0a329980feaa46c09d40f85c7a4f64d5ac9d179dcdbcd819d95
+DIST Theme-TuxInfo.tar.bz2 432888 SHA256 fd77a95ba52795bb4b912b2ad92eb82ae7686dcd8b3ea94f4d7ad04f511dadef
+DIST Theme-TuxNTosh.tar.bz2 364177 SHA256 09ec737792d40f32dfb2cfc760e97f4c80259f83f6820631ec110661acb0e4b6
+DIST Theme-TuxSplash.tar.bz2 189723 SHA256 d07a67e389d19d8ba37be9ceb6dd04639ab6301cea5c016077ace73f9f2bdc78
+DIST Theme-Ubuntu.tar.bz2 130920 SHA256 8e3ff19c8490e3a6d80e42bb03d1eaf9acfb5b7a16fab86680f36d26e8cbec93
+DIST Theme-UnitedLinux.tar.bz2 46702 SHA256 46a55521cdd0bcbaa7ac69afbb10cdbe235e1f3e419954af72c4d78f7a1110c4
+DIST Theme-UrbanVisions-Debian.tar.bz2 300355 SHA256 1e9398f67859bb41cf8aed4c8a2b4446c16213756a2d93cd20ac893dfa3e8ece
+DIST Theme-UrbanVisions-Mandrake.tar.bz2 300935 SHA256 4ecad411c5ce1c37fe0605892f61d398a3cb9918e8199e1c2799cad6f190b125
+DIST Theme-UrbanVisions-SuSE.tar.bz2 230867 SHA256 2845d6b855d0013699a72ff29d66d672b867640c53e61af981a3f1537efdb0f6
+DIST Theme-VDR.tar.bz2 45897 SHA256 5f14c5890925da60cb1826d1f8039315f404040453ac7dfa44cc274525ab0f96
+DIST Theme-Vortex.tar.bz2 82197 SHA256 210644640e80f0e798b149fd81054cfacc6cf6e4a3b395f019be3787b8affe78
+DIST Theme-WarmAqua.tar.bz2 463243 SHA256 be94b5e48a65d0ab23027f949246df30c8067ab1e06592896f848b3fac1e4cd6
+DIST Theme-Warty.tar.bz2 63131 SHA256 6c4344774a6655e5cd100f7815de688899fc4d5285f231090d547abeb3779a08
+DIST Theme-acKme.tar.bz2 233757 SHA256 83cccef1630d0d5ece74ef0d4b102a1818a73e6a4f7c684a6be44438fc894118
+DIST Theme-dotf.tar.bz2 393510 SHA256 c8a3c558ea9ce5e088ee7f2ac7810887cfd5a68dc363e70d948c3fea492dcecf
+DIST Theme-iRu.tar.bz2 81672 SHA256 9a6b6432628ef73a3820cb0f2df2a6fdb18c158af3440b2ca51fce12db9e54f6
+DIST Theme-libertnl.tar.bz2 90035 SHA256 60bd067093f3bb3f4e4a7c9fb754fc65f2eab5f8935ae311f8d47b0e9f58562e
diff --git a/media-gfx/bootsplash-themes/bootsplash-themes-20060913.ebuild b/media-gfx/bootsplash-themes/bootsplash-themes-20060913.ebuild
new file mode 100644
index 000000000000..5ca28482794e
--- /dev/null
+++ b/media-gfx/bootsplash-themes/bootsplash-themes-20060913.ebuild
@@ -0,0 +1,298 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A collection of Bootsplash themes"
+HOMEPAGE="http://dev.gentoo.org/~spock/repos/bootsplash/"
+THEME_URI="mirror://gentoo"
+
+SRC_URI="${THEME_URI}/Theme-73labAllstar.tar.bz2
+ ${THEME_URI}/Theme-acKme.tar.bz2
+ ${THEME_URI}/Theme-AquaMatrix.tar.bz2
+ ${THEME_URI}/Theme-ArchLinux.tar.bz2
+ ${THEME_URI}/Theme-ArchPool.tar.bz2
+ ${THEME_URI}/Theme-ArchRelief.tar.bz2
+ ${THEME_URI}/Theme-Arch.tar.bz2
+ ${THEME_URI}/Theme-ASPLinux.tar.bz2
+ ${THEME_URI}/Theme-ASP.tar.bz2
+ ${THEME_URI}/Theme-AthlonXP.tar.bz2
+ ${THEME_URI}/Theme-Ayo.tar.bz2
+ ${THEME_URI}/Theme-BabyTux.tar.bz2
+ ${THEME_URI}/Theme-Berry.tar.bz2
+ ${THEME_URI}/Theme-Black.tar.bz2
+ ${THEME_URI}/Theme-Burek.tar.bz2
+ ${THEME_URI}/Theme-CaixaMagica.tar.bz2
+ ${THEME_URI}/Theme-Cargal.tar.bz2
+ ${THEME_URI}/Theme-CCux.tar.bz2
+ ${THEME_URI}/Theme-CLEE.tar.bz2
+ ${THEME_URI}/Theme-CM.tar.bz2
+ ${THEME_URI}/Theme-Compact.tar.bz2
+ ${THEME_URI}/Theme-CRUX.tar.bz2
+ ${THEME_URI}/Theme-Cybercity.tar.bz2
+ ${THEME_URI}/Theme-Cynapses.tar.bz2
+ ${THEME_URI}/Theme-DangerGirl.tar.bz2
+ ${THEME_URI}/Theme-Dark-0.1.tar.bz2
+ ${THEME_URI}/Theme-Dark-2-0.2.tar.bz2
+ ${THEME_URI}/Theme-DarkBlue.tar.bz2
+ ${THEME_URI}/Theme-DebBlue-Gnome.tar.bz2
+ ${THEME_URI}/Theme-DebBlue-Gnoppix.tar.bz2
+ ${THEME_URI}/Theme-DebBlue.tar.bz2
+ ${THEME_URI}/Theme-Debian2.tar.bz2
+ ${THEME_URI}/Theme-Debian3.tar.bz2
+ ${THEME_URI}/Theme-Debian-Mist.tar.bz2
+ ${THEME_URI}/Theme-Debian-Sarge.tar.bz2
+ ${THEME_URI}/Theme-Debian.tar.bz2
+ ${THEME_URI}/Theme-Debian-Tux-Gnulinex.tar.bz2
+ ${THEME_URI}/Theme-Debian-Tux.tar.bz2
+ ${THEME_URI}/Theme-Debian-Wave.tar.bz2
+ ${THEME_URI}/Theme-Deflorist.tar.bz2
+ ${THEME_URI}/Theme-DimmuBorgir.tar.bz2
+ ${THEME_URI}/Theme-Dolphin.tar.bz2
+ ${THEME_URI}/Theme-dotf.tar.bz2
+ ${THEME_URI}/Theme-Dragon.tar.bz2
+ ${THEME_URI}/Theme-ElvinTooka.tar.bz2
+ ${THEME_URI}/Theme-Emergance.tar.bz2
+ ${THEME_URI}/Theme-Enterprise-spot.tar.bz2
+ ${THEME_URI}/Theme-Enterprise.tar.bz2
+ ${THEME_URI}/Theme-ERPOSS3.tar.bz2
+ ${THEME_URI}/Theme-EvenNewerTux.tar.bz2
+ ${THEME_URI}/Theme-FarCry.tar.bz2
+ ${THEME_URI}/Theme-FedoraCore2.tar.bz2
+ ${THEME_URI}/Theme-Fedora.tar.bz2
+ ${THEME_URI}/Theme-Flower.tar.bz2
+ ${THEME_URI}/Theme-Freepia.tar.bz2
+ ${THEME_URI}/Theme-FrozenBubble.tar.bz2
+ ${THEME_URI}/Theme-Frugalware.tar.bz2
+ ${THEME_URI}/Theme-Galantine.tar.bz2
+ ${THEME_URI}/Theme-GalaxySlack2.tar.bz2
+ ${THEME_URI}/Theme-GANT.tar.bz2
+ ${THEME_URI}/Theme-GeeXboX-Halloween.tar.bz2
+ ${THEME_URI}/Theme-GeeXboX-OMC.tar.bz2
+ ${THEME_URI}/Theme-GeeXboX.tar.bz2
+ ${THEME_URI}/Theme-GeeXboX-Xmas.tar.bz2
+ ${THEME_URI}/Theme-Gentoo-Hornet.tar.bz2
+ ${THEME_URI}/Theme-Gentoo-LiveCD-2004.0.tar.bz2
+ ${THEME_URI}/Theme-Gentoo-LiveCD-2004.1.tar.bz2
+ ${THEME_URI}/Theme-Gentoo-LiveCD-2004.2.tar.bz2
+ ${THEME_URI}/Theme-Gentoo-LiveCD-2004.3.tar.bz2
+ ${THEME_URI}/Theme-Gentool.tar.bz2
+ ${THEME_URI}/Theme-Gentoo.tar.bz2
+ ${THEME_URI}/Theme-GNU.tar.bz2
+ ${THEME_URI}/Theme-GoGentooGo.tar.bz2
+ ${THEME_URI}/Theme-Ignite.tar.bz2
+ ${THEME_URI}/Theme-iRu.tar.bz2
+ ${THEME_URI}/Theme-Jollix.tar.bz2
+ ${THEME_URI}/Theme-Juicy.tar.bz2
+ ${THEME_URI}/Theme-Junior.tar.bz2
+ ${THEME_URI}/Theme-Kanotix.tar.bz2
+ ${THEME_URI}/Theme-Keramik.tar.bz2
+ ${THEME_URI}/Theme-KillBillTux-Grey.tar.bz2
+ ${THEME_URI}/Theme-KillBillTux-Yellow.tar.bz2
+ ${THEME_URI}/Theme-KnoppixKDE.tar.bz2
+ ${THEME_URI}/Theme-KnoppixLT.tar.bz2
+ ${THEME_URI}/Theme-KnoppMyth.tar.bz2
+ ${THEME_URI}/Theme-Konsole.tar.bz2
+ ${THEME_URI}/Theme-KuruminOrgBR.tar.bz2
+ ${THEME_URI}/Theme-Leopard.tar.bz2
+ ${THEME_URI}/Theme-libertnl.tar.bz2
+ ${THEME_URI}/Theme-Lila.tar.bz2
+ ${THEME_URI}/Theme-Linux.tar.bz2
+ ${THEME_URI}/Theme-Lunar.tar.bz2
+ ${THEME_URI}/Theme-MaiHoshino.tar.bz2
+ ${THEME_URI}/Theme-Mandrake-10.0.tar.bz2
+ ${THEME_URI}/Theme-Mandrake-9.2.tar.bz2
+ ${THEME_URI}/Theme-Master.tar.bz2
+ ${THEME_URI}/Theme-Matrix.tar.bz2
+ ${THEME_URI}/Theme-MetallTux.tar.bz2
+ ${THEME_URI}/Theme-Metal-Tosh.tar.bz2
+ ${THEME_URI}/Theme-Misspingus3.tar.bz2
+ ${THEME_URI}/Theme-Misspingus4.tar.bz2
+ ${THEME_URI}/Theme-Momonga.tar.bz2
+ ${THEME_URI}/Theme-Morphix.tar.bz2
+ ${THEME_URI}/Theme-MyLittleTux.tar.bz2
+ ${THEME_URI}/Theme-MythTV.tar.bz2
+ ${THEME_URI}/Theme-NewFreepia.tar.bz2
+ ${THEME_URI}/Theme-NewLinux-Deb.tar.bz2
+ ${THEME_URI}/Theme-NewLinux.tar.bz2
+ ${THEME_URI}/Theme-NewTux.tar.bz2
+ ${THEME_URI}/Theme-NightWorld.tar.bz2
+ ${THEME_URI}/Theme-Notes.tar.bz2
+ ${THEME_URI}/Theme-OfficeDesktop.tar.bz2
+ ${THEME_URI}/Theme-Oneill.tar.bz2
+ ${THEME_URI}/Theme-OpenSchool.tar.bz2
+ ${THEME_URI}/Theme-OpenXchange.tar.bz2
+ ${THEME_URI}/Theme-Pativo.tar.bz2
+ ${THEME_URI}/Theme-Pho.tar.bz2
+ ${THEME_URI}/Theme-PLF1.tar.bz2
+ ${THEME_URI}/Theme-PLF2.tar.bz2
+ ${THEME_URI}/Theme-PLF5.tar.bz2
+ ${THEME_URI}/Theme-Popcorn.tar.bz2
+ ${THEME_URI}/Theme-PowerBook.tar.bz2
+ ${THEME_URI}/Theme-Psychotoxic.tar.bz2
+ ${THEME_URI}/Theme-Pyro.tar.bz2
+ ${THEME_URI}/Theme-QiLinux-LiveCD-1.1.tar.bz2
+ ${THEME_URI}/Theme-RadiantStar.tar.bz2
+ ${THEME_URI}/Theme-Ratatouille.tar.bz2
+ ${THEME_URI}/Theme-Raziel.tar.bz2
+ ${THEME_URI}/Theme-Redmond.tar.bz2
+ ${THEME_URI}/Theme-RH9.tar.bz2
+ ${THEME_URI}/Theme-Rojo.tar.bz2
+ ${THEME_URI}/Theme-Rollmops.tar.bz2
+ ${THEME_URI}/Theme-Rustenguin.tar.bz2
+ ${THEME_URI}/Theme-Shodan.tar.bz2
+ ${THEME_URI}/Theme-Slack-3D.tar.bz2
+ ${THEME_URI}/Theme-Slack-Black-Tux.tar.bz2
+ ${THEME_URI}/Theme-Slack-Blue.tar.bz2
+ ${THEME_URI}/Theme-Slack-Glass.tar.bz2
+ ${THEME_URI}/Theme-Slack-Gray-B.tar.bz2
+ ${THEME_URI}/Theme-Slack-Gray.tar.bz2
+ ${THEME_URI}/Theme-Slack.tar.bz2
+ ${THEME_URI}/Theme-Slackware2.tar.bz2
+ ${THEME_URI}/Theme-SlackwareLinux.tar.bz2
+ ${THEME_URI}/Theme-Slackware.tar.bz2
+ ${THEME_URI}/Theme-Slide.tar.bz2
+ ${THEME_URI}/Theme-SMGL.tar.bz2
+ ${THEME_URI}/Theme-Spinner.tar.bz2
+ ${THEME_URI}/Theme-Stargate-Tux.tar.bz2
+ ${THEME_URI}/Theme-SuSE-7.2.tar.bz2
+ ${THEME_URI}/Theme-SuSE-7.3.tar.bz2
+ ${THEME_URI}/Theme-SuSE-8.0.tar.bz2
+ ${THEME_URI}/Theme-SuSE-8.1.tar.bz2
+ ${THEME_URI}/Theme-SuSE-8.2.tar.bz2
+ ${THEME_URI}/Theme-SuSE-Home.tar.bz2
+ ${THEME_URI}/Theme-SuSE-SLES.tar.bz2
+ ${THEME_URI}/Theme-SuSE.tar.bz2
+ ${THEME_URI}/Theme-SwirlPool.tar.bz2
+ ${THEME_URI}/Theme-ThinkLinux.tar.bz2
+ ${THEME_URI}/Theme-TuxInfo-Conectiva.tar.bz2
+ ${THEME_URI}/Theme-TuxInfo-Debian.tar.bz2
+ ${THEME_URI}/Theme-TuxInfo-Mandrake.tar.bz2
+ ${THEME_URI}/Theme-TuxInfo-RedHat.tar.bz2
+ ${THEME_URI}/Theme-TuxInfo-Slackware.tar.bz2
+ ${THEME_URI}/Theme-TuxInfo-SuSE.tar.bz2
+ ${THEME_URI}/Theme-TuxInfo.tar.bz2
+ ${THEME_URI}/Theme-TuxNTosh.tar.bz2
+ ${THEME_URI}/Theme-TuxSplash.tar.bz2
+ ${THEME_URI}/Theme-Ubuntu.tar.bz2
+ ${THEME_URI}/Theme-UnitedLinux.tar.bz2
+ ${THEME_URI}/Theme-UrbanVisions-Debian.tar.bz2
+ ${THEME_URI}/Theme-UrbanVisions-Mandrake.tar.bz2
+ ${THEME_URI}/Theme-UrbanVisions-SuSE.tar.bz2
+ ${THEME_URI}/Theme-VDR.tar.bz2
+ ${THEME_URI}/Theme-Vortex.tar.bz2
+ ${THEME_URI}/Theme-WarmAqua.tar.bz2
+ ${THEME_URI}/Theme-Warty.tar.bz2"
+SLOT="0"
+LICENSE="freedist"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+RDEPEND=">=media-gfx/splashutils-1.1.9.6"
+DEPEND="net-misc/wget ${RDEPEND}"
+S="${WORKDIR}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # clean it up a little, it's supposed to be config files, not scripts
+ elog "Cleaning up the themes"
+ find -name *.sh -exec rm -f "{}" \; 2>/dev/null
+ find -name rc.d -exec rm -rf "{}" \; 2>/dev/null
+ find -name rc* -exec rm -f "{}" \; 2>/dev/null
+ find -name 'Slackware 9.1.scripts' -exec rm -rf "{}" \; 2>/dev/null
+ find -name bootloader -exec rm -rf "{}" \; 2>/dev/null
+ find -name lilo -exec rm -rf "{}" \; 2>/dev/null
+ find -name Scripts -exec rm -rf "{}" \; 2>/dev/null
+ find -name example -exec rm -rf "{}" \; 2>/dev/null
+ find -name ".xvpics" -exec rm -rf "{}" \; 2>/dev/null
+ find -name INSTALL -exec rm -f "{}" \; 2>/dev/null
+ rm -rf "./SuSE-Home/var"
+
+ # backup files? no, thank you.
+ find -regex '.*~$' -exec rm -f "{}" \;
+
+ # we don't have images for these resolutions
+ rm -f Mandrake-10.0/config/bootsplash-1600x1200.cfg
+ rm -f Ayo/config/bootsplash-1600x1200.cfg
+
+ # gentooify all paths
+ elog "Gentoo-ifying all paths"
+ for i in `grep "/etc/bootsplash/themes" -lR *` ; do
+ sed -i 's#/etc/bootsplash/themes#/etc/bootsplash#g' "$i"
+ done
+}
+
+src_install() {
+ local mypath
+
+ if has_version "media-gfx/splashutils" ; then
+ dodir /etc/splash
+ mypath="/etc/splash"
+ else
+ dodir /etc/bootsplash
+ mypath="/etc/bootsplash"
+ fi
+
+ cd "${S}"
+
+ if has_version "media-gfx/splashutils" ; then
+ for i in * ; do
+ elog "Converting ${i}"
+ [ -z "$(cd ${i} ; find -regex '.*config/bootsplash-[0-9]+x[0-9]+.cfg')" ] && continue
+ sed -i "s#/etc/bootsplash#${S}#g" ${i}/config/*.cfg
+ bootsplash2fbsplash --bootsplash-path "${S}" --fbsplash-path "${D}/etc/splash" "${i}"
+ sed -i "s#${D}#/#g" "${D}"/etc/splash/${i}/*.cfg
+ done
+
+ # Add images that might not have been copied by the conversion script
+ cp Cybercity/images/bootsplash-1024x768.jpg "${D}"/etc/splash/Cybercity/images/verbose-1024x768.jpg
+ cp OpenSchool/images/bootsplash-800x600.jpg "${D}"/etc/splash/OpenSchool/images/verbose-800x600.jpg
+ cp OpenSchool/images/bootsplash-1024x768.jpg "${D}"/etc/splash/OpenSchool/images/verbose-1024x768.jpg
+ cp OpenSchool/images/bootsplash-1280x1024.jpg "${D}"/etc/splash/OpenSchool/images/verbose-1280x1024.jpg
+ cp OpenSchool/images/bootsplash-1600x1200.jpg "${D}"/etc/splash/OpenSchool/images/verbose-1600x1200.jpg
+
+ # Fix symlinks
+ for i in "${D}"/etc/splash/*/images/*.{png,jpg} ; do
+ if [ -L ${i} ]; then
+ tg=`readlink ${i} | sed -e "s#${D}etc/splash/[^/]*/images/##"`
+ rm -f ${i}
+ i=${i/${D}///}
+ dosym ${tg} ${i}
+ fi
+ done
+ else
+ mv * "${D}/etc/bootsplash"
+ fi
+
+ chown -R root:0 "${D}/${mypath}"
+ chmod -R o-w "${D}/${mypath}"
+}
+
+pkg_postinst() {
+ elog "The themes provided in this package come directly from bootsplash.de"
+ elog "with only some very basic fixes applied along the way. Some of them"
+ elog "might not work properly on your system, some might not support verbose"
+ elog "or silent mode, or might only support a single resolution."
+ elog ""
+
+ if has_version "media-gfx/splashutils" ; then
+ elog "The themes have been automatically converted to a format recognized"
+ elog "by splashutils. Note that the conversion process is purely automatical"
+ elog "and therefore 'dumb'. Some themes might not work, or work incorrectly."
+ elog "If you happen to find a theme that you like, but which doesn't work"
+ elog "after it has been automatically converted to the new format, please"
+ elog "fix it manually and submit for inclusion into a generic splashutils"
+ elog "theme package by posting it on bugzilla (http://bugs.gentoo.org/)"
+ elog "or sending it directly to the maintainer of this package."
+ else
+ elog "When testing the themes, please make sure you're running in a 16bpp"
+ elog "mode. 16bpp was the only supported color depth in the original bootsplash"
+ elog "patches. The version of the patch that you happen to be using might"
+ elog "work with other depths, but only 16bpp is guaranteed to be supported."
+ elog ""
+ elog "You might want to use:"
+ elog " /sbin/splash -s -u 0 /etc/bootsplash/<theme>/config/<configfile>.cfg"
+ elog "to test the themes. Note, that some of them don't support verbose mode."
+ fi
+}
diff --git a/media-gfx/bootsplash-themes/metadata.xml b/media-gfx/bootsplash-themes/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/media-gfx/bootsplash-themes/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/brlcad/Manifest b/media-gfx/brlcad/Manifest
new file mode 100644
index 000000000000..7c9c4ed975d7
--- /dev/null
+++ b/media-gfx/brlcad/Manifest
@@ -0,0 +1 @@
+DIST brlcad-7.18.4.tar.gz 55406130 SHA256 90bd0c5afaa7a5c48846f6d4f4a59ae482c231b666e457ccf4ad7524236e928f
diff --git a/media-gfx/brlcad/brlcad-7.18.4.ebuild b/media-gfx/brlcad/brlcad-7.18.4.ebuild
new file mode 100644
index 000000000000..628b6cc1cd2d
--- /dev/null
+++ b/media-gfx/brlcad/brlcad-7.18.4.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+inherit eutils java-pkg-opt-2 multilib
+
+DESCRIPTION="Constructive solid geometry modeling system"
+HOMEPAGE="http://brlcad.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="benchmarks debug doc examples java opengl smp"
+
+RDEPEND="media-libs/libpng
+ sys-libs/zlib
+ >=sci-libs/tnt-3
+ sci-libs/jama
+ =dev-tcltk/itcl-3.4*
+ =dev-tcltk/itk-3.4*
+ dev-tcltk/iwidgets
+ dev-tcltk/tkimg
+ dev-tcltk/tkpng
+ sys-libs/libtermcap-compat
+ media-libs/urt
+ x11-libs/libXt
+ x11-libs/libXi
+ java? ( >=virtual/jre-1.5 )"
+
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ java? ( >=virtual/jdk-1.5 )
+ doc? ( dev-libs/libxslt )"
+
+BRLCAD_DIR="${EPREFIX}/usr/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+
+ java-pkg-opt-2_src_prepare
+}
+
+src_configure() {
+ local myconf="--without-jdk"
+ use java && myconf="--with-jdk=$(java-config -O)"
+
+ econf \
+ --disable-strict-build \
+ --prefix="${BRLCAD_DIR}" \
+ --datadir="${BRLCAD_DIR}/share" \
+ --mandir="${BRLCAD_DIR}/man" \
+ --disable-almost-everything \
+ --disable-regex-build \
+ --disable-png-build \
+ --disable-zlib-build \
+ --disable-urt-build \
+ --disable-tcl-build \
+ --disable-tk-build \
+ --disable-itcl-build \
+ --disable-tkimg-build \
+ --disable-jove-build \
+ --disable-tnt-install \
+ --disable-iwidgets-install \
+ --enable-opennurbs-build \
+ --with-ldflags="-L${EPREFIX}/usr/$(get_libdir)/itcl3.4 -L${EPREFIX}/usr/$(get_libdir)/itk3.4" \
+ --with-x \
+ --with-x11 \
+ $(use_enable debug) \
+ $(use_enable debug optimization) \
+ $(use_enable debug runtime-debug) \
+ $(use_enable debug verbose) \
+ $(use_enable debug warnings) \
+ $(use_enable debug progress) \
+ $(use_enable doc documentation) \
+ $(use_enable examples models-install) \
+ $(use_enable smp parallel) \
+ $(use_with opengl ogl) \
+ ${myconf}
+}
+
+src_test() {
+ emake check || die "emake check failed"
+ if use benchmarks; then
+ emake benchmark || die "emake benchmark failed"
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ rm -f "${D}"usr/share/brlcad/{README,NEWS,AUTHORS,HACKING,INSTALL,COPYING}
+ dodoc AUTHORS NEWS README HACKING TODO BUGS ChangeLog
+ echo "PATH=\"${BRLCAD_DIR}/bin\"" > 99brlcad
+ echo "MANPATH=\"${BRLCAD_DIR}/man\"" >> 99brlcad
+ doenvd 99brlcad || die
+ newicon misc/macosx/Resources/ReadMe.rtfd/brlcad_logo_tiny.png brlcad.png
+ make_desktop_entry mged "BRL-CAD" brlcad "Graphics;Engineering"
+}
diff --git a/media-gfx/brlcad/files/brlcad-7.18.4-libpng15.patch b/media-gfx/brlcad/files/brlcad-7.18.4-libpng15.patch
new file mode 100644
index 000000000000..e0d42d1e22f9
--- /dev/null
+++ b/media-gfx/brlcad/files/brlcad-7.18.4-libpng15.patch
@@ -0,0 +1,42 @@
+http://bugs.gentoo.org/378273
+
+--- src/libged/png.c
++++ src/libged/png.c
+@@ -30,6 +30,8 @@
+ #include <string.h>
+ #include "bio.h"
+
++#include <zlib.h> /* Z_BEST_COMPRESSION */
++
+ #include "png.h"
+ #include "bu.h"
+ #include "vmath.h"
+--- src/fb/fb-png.c 2011-04-12 14:31:56.000000000 -0400
++++ src/fb/fb-png.c.new 2011-09-19 13:18:08.000000000 -0400
+@@ -38,13 +38,13 @@
+ # include <unistd.h>
+ #endif
+
++#include "zlib.h"
+ #include "png.h"
+ #include "bu.h"
+ #include "fb.h"
+
+ #include "pkg.h"
+
+-
+ /* in cmap-crunch.c */
+ extern void cmap_crunch(RGBpixel (*scan_buf), int pixel_ct, ColorMap *colormap);
+
+--- src/util/pix-png.c 2011-04-12 14:34:24.000000000 -0400
++++ src/util/pix-png.c.new 2011-09-19 13:18:59.000000000 -0400
+@@ -36,7 +36,8 @@
+ #include "bio.h"
+
+ #include "zlib.h"
+-#include "pngconf.h"
++/* removed as png.h includes this and including it in the wrong order seems to cause bugs
++#include "pngconf.h" */
+ #include "png.h"
+
+ #include "bu.h"
diff --git a/media-gfx/brlcad/metadata.xml b/media-gfx/brlcad/metadata.xml
new file mode 100644
index 000000000000..83f8886b3bf8
--- /dev/null
+++ b/media-gfx/brlcad/metadata.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>dongxuli2011@gmail.com</email>
+ <description>please assign bugs</description>
+ </maintainer>
+ <longdescription lang="en">
+ BRL-CAD is a Combinatorial/Constructive Solid Geometry (CSG)
+ solid modeling system that includes an interactive geometry editor,
+ ray-tracing support for rendering and geometric analysis,
+ network-distributed framebuffer support, image and signal-processing
+ tools, and an embedded scripting language.
+
+ The package is a collection of over 400 tools and utilities. Included
+ is support for various geometric data format conversions, image and
+ signal processing capabilities, ray-tracing based lighting models,
+ network distributed ray-tracing, parallel ray-tracing, animation
+ capabilities, data compression, image handling, and interactive 3-D
+ geometric editing, and also an implementation of Weiler's n-Manifold
+ Geometry (NMG) data structures for surface-based solid models and
+ photon mapping.
+</longdescription>
+ <use>
+ <flag name="benchmarks">
+ Run benchmarks during test phase (need test option enabled)
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">brlcad</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/cairosvg/Manifest b/media-gfx/cairosvg/Manifest
new file mode 100644
index 000000000000..7bb700ec9bd6
--- /dev/null
+++ b/media-gfx/cairosvg/Manifest
@@ -0,0 +1,2 @@
+DIST CairoSVG-1.0.7.tar.gz 29648 SHA256 2ccdfd8cdfc6797da1f63d8f15fd76fa72d482d618a4807bb02f0b37662bca39 SHA512 1b10657f1e53b486f624ec00e952c3d2ba2f28b2a5d6cb6f66eb6441e8c51190bd75315e7a537d37eadff5ce4e0a52d3f4ebd7b36d81b2e9fd804ac92f2d83db WHIRLPOOL aa7affdc656444c0558bcc9be9b66fb385a81e33d60c04aad81930041096782ecbbc40a4e26c4c76e1580d882411c3759244c85c23e0671dc48104224a99ba18
+DIST CairoSVG-1.0.tar.gz 28573 SHA256 65f613e9521c37066b92e24532f702dbf4b7049ce0fa5fb75d21afa467a38b9b SHA512 26046de33feb5d7cbd8438d5fdf7f0e86e4f252c21478b51e764d7bf7800c8392a11a42a87666af6e008ad1e09f0749b57d06c566101d2a3e630e151703a3bb9 WHIRLPOOL 166c14d1c0ec9c1c455ded7c69c60940d102224c00a9bf1c6882ab1134b2a1eec415c9fe1f82bf9921a84feb8bc8f1055aa38830916dae233783fae551b31cb3
diff --git a/media-gfx/cairosvg/cairosvg-1.0.7.ebuild b/media-gfx/cairosvg/cairosvg-1.0.7.ebuild
new file mode 100644
index 000000000000..84daf3f84cd9
--- /dev/null
+++ b/media-gfx/cairosvg/cairosvg-1.0.7.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1
+
+MY_PN="CairoSVG"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A simple cairo based SVG converter with support for PDF, PostScript and PNG formats"
+HOMEPAGE="http://cairosvg.org/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/tinycss[${PYTHON_USEDEP}]
+ dev-python/cssselect[${PYTHON_USEDEP}]
+ dev-python/cairocffi[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( NEWS.rst README.rst TODO.rst )
diff --git a/media-gfx/cairosvg/cairosvg-1.0.ebuild b/media-gfx/cairosvg/cairosvg-1.0.ebuild
new file mode 100644
index 000000000000..f63e8d2bcfee
--- /dev/null
+++ b/media-gfx/cairosvg/cairosvg-1.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3} )
+
+inherit distutils-r1
+
+MY_PN="CairoSVG"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A simple cairo based SVG converter with support for PDF, PostScript and PNG formats"
+HOMEPAGE="http://cairosvg.org/"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-python/lxml[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/tinycss[${PYTHON_USEDEP}]
+ dev-python/cssselect[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( NEWS.rst README.rst TODO.rst )
diff --git a/media-gfx/cairosvg/metadata.xml b/media-gfx/cairosvg/metadata.xml
new file mode 100644
index 000000000000..995bd87ffbb2
--- /dev/null
+++ b/media-gfx/cairosvg/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="pypi">CairoSVG</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/cellwriter/Manifest b/media-gfx/cellwriter/Manifest
new file mode 100644
index 000000000000..67fb925e3563
--- /dev/null
+++ b/media-gfx/cellwriter/Manifest
@@ -0,0 +1,2 @@
+DIST cellwriter-1.3.4.tar.gz 284647 SHA256 6ab6fa697938af0fc8b587ccd7c5889087800569e558b97797963c6ee2fada0c
+DIST cellwriter-1.3.5.tar.gz 293241 SHA256 c7ea0dd4b512c80235569c033cefda7c471f335deeb472220e27c31e511e06ef SHA512 a9b682babda4335ea18716032ac52e73578459e9ab8866b20177f6d0cb606b9da2bf5a3fae2e2547277351db2533c7e92461f5c6a6ebc542ffe5844ff7ae65d6 WHIRLPOOL 6db9f3c3e9cfec653d0f69d2a8e70153372d529db53b772b9560cfeb57100d7c420dd2f605957c780b0b19dc53300e084a14f9db434a3d89ee424fed7245f0a1
diff --git a/media-gfx/cellwriter/cellwriter-1.3.4.ebuild b/media-gfx/cellwriter/cellwriter-1.3.4.ebuild
new file mode 100644
index 000000000000..a5033880d3b6
--- /dev/null
+++ b/media-gfx/cellwriter/cellwriter-1.3.4.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="Grid-entry natural handwriting input panel"
+HOMEPAGE="http://risujin.org/cellwriter/"
+SRC_URI="http://pub.risujin.org/cellwriter/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="gnome"
+
+RDEPEND="x11-libs/libXtst
+ >=x11-libs/gtk+-2.10:2
+ gnome? ( gnome-base/libgnome )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-proto/inputproto"
+
+src_configure() {
+ econf $(use_with gnome)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/media-gfx/cellwriter/cellwriter-1.3.5.ebuild b/media-gfx/cellwriter/cellwriter-1.3.5.ebuild
new file mode 100644
index 000000000000..412016de9ef3
--- /dev/null
+++ b/media-gfx/cellwriter/cellwriter-1.3.5.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit gnome2-utils
+
+DESCRIPTION="Grid-entry natural handwriting input panel"
+HOMEPAGE="http://risujin.org/cellwriter/"
+SRC_URI="http://pub.risujin.org/cellwriter/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/libXtst"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ x11-proto/xproto"
+
+DOCS="AUTHORS ChangeLog README TODO" # NEWS is no-op
+
+src_prepare() {
+ sed -i -e '/Encoding/d' ${PN}.desktop || die
+}
+
+pkg_preinst() { gnome2_icon_savelist; }
+pkg_postinst() { gnome2_icon_cache_update; }
+pkg_postrm() { gnome2_icon_cache_update; }
diff --git a/media-gfx/cellwriter/metadata.xml b/media-gfx/cellwriter/metadata.xml
new file mode 100644
index 000000000000..530e784188f3
--- /dev/null
+++ b/media-gfx/cellwriter/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
+
diff --git a/media-gfx/colorhug-client/Manifest b/media-gfx/colorhug-client/Manifest
new file mode 100644
index 000000000000..7b504f959b4f
--- /dev/null
+++ b/media-gfx/colorhug-client/Manifest
@@ -0,0 +1,2 @@
+DIST colorhug-client-0.2.5.tar.xz 799552 SHA256 215d7d493c06030611584f84fc2d06d31c1124e8756c2c3725b241bb8c8f8449 SHA512 68eb99bdbe4739ac74b9cbb80b97af05874277bfa3fc0aefc98c1e8fe805e719109e2fc933430c1d5ba4a32490d331a41a75203022e4c433b1916c68b86b07ac WHIRLPOOL a8535198e6257d683ea06f828f18097f8c201c22c8a00a654eee30c83ab6a12b85f29c511421ba051ed2c078d0a8bbc568c4a5f5761f60cecfb45a2d964878f9
+DIST colorhug-client-0.2.7.tar.xz 884696 SHA256 16965e11f6983c0cef88c321d9d806fd750013849f4b84006b42063b6d3bb16b SHA512 06c7c44d1dd5f5e39e1e213fdbe45ef0a50fefbde56e05146ae99f32a94e897cc68c65e5856bc7391ef6bfe965b4c420b05add21715607c1f51af1b498ea05f6 WHIRLPOOL fff3c1d50520cb98bfe1189a273edbbb6252c5c005ff84ebeaa2df8f382ab3d815468f1b05987addc983a36454de20529efc381fbe0bda0979ae5d370c3675db
diff --git a/media-gfx/colorhug-client/colorhug-client-0.2.5.ebuild b/media-gfx/colorhug-client/colorhug-client-0.2.5.ebuild
new file mode 100644
index 000000000000..9439b4a56e7c
--- /dev/null
+++ b/media-gfx/colorhug-client/colorhug-client-0.2.5.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+
+inherit bash-completion-r1 eutils gnome2
+
+DESCRIPTION="Client tools for the ColorHug display colorimeter"
+HOMEPAGE="http://www.hughski.com/"
+SRC_URI="http://people.freedesktop.org/~hughsient/releases/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="
+ dev-db/sqlite:3
+ >=dev-libs/glib-2.31.10:2
+ >=dev-libs/libgusb-0.2.2
+ media-libs/lcms:2
+ >=media-libs/libcanberra-0.10[gtk3]
+ net-libs/libsoup:2.4
+ >=x11-libs/gtk+-3.11.2:3
+ >=x11-misc/colord-1.2.6:0=
+ >=x11-libs/colord-gtk-0.1.24
+"
+DEPEND="${RDEPEND}
+ app-text/docbook-sgml-dtd:4.1
+ app-text/docbook-sgml-utils
+ app-text/yelp-tools
+ >=dev-util/intltool-0.50
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+"
+# docbook stuff needed for man pages
+
+src_prepare() {
+ # Fix .desktop
+ sed -e '/Terminal=/ d' -i data/colorhug-docs.desktop || die
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # introspection checked but not needed by anything
+ gnome2_src_configure --disable-introspection
+}
+
+src_install() {
+ gnome2_src_install bashcompletiondir="$(get_bashcompdir)"
+}
diff --git a/media-gfx/colorhug-client/colorhug-client-0.2.7.ebuild b/media-gfx/colorhug-client/colorhug-client-0.2.7.ebuild
new file mode 100644
index 000000000000..13246537f320
--- /dev/null
+++ b/media-gfx/colorhug-client/colorhug-client-0.2.7.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="no"
+
+inherit bash-completion-r1 eutils gnome2
+
+DESCRIPTION="Client tools for the ColorHug display colorimeter"
+HOMEPAGE="http://www.hughski.com/"
+SRC_URI="http://people.freedesktop.org/~hughsient/releases/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+# Tests need valgrind, that needs glibc with debugging symbols
+RESTRICT="test"
+
+RDEPEND="
+ dev-db/sqlite:3
+ >=dev-libs/glib-2.31.10:2
+ >=dev-libs/libgusb-0.2.2
+ media-libs/lcms:2
+ >=media-libs/libcanberra-0.10[gtk3]
+ net-libs/libsoup:2.4
+ >=x11-libs/gtk+-3.11.2:3
+ >=x11-misc/colord-1.2.9:0=
+ >=x11-libs/colord-gtk-0.1.24
+"
+DEPEND="${RDEPEND}
+ app-text/docbook-sgml-dtd:4.1
+ app-text/docbook-sgml-utils
+ app-text/yelp-tools
+ >=dev-util/intltool-0.50
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+"
+# docbook stuff needed for man pages
+
+src_configure() {
+ # introspection checked but not needed by anything
+ # Install completions manually to prevent dependency on bash-completion, bug #546166
+ gnome2_src_configure --disable-introspection --disable-bash-completion
+}
+
+src_install() {
+ gnome2_src_install
+ dobashcomp data/bash/colorhug-cmd
+}
diff --git a/media-gfx/colorhug-client/metadata.xml b/media-gfx/colorhug-client/metadata.xml
new file mode 100644
index 000000000000..8b406a44083e
--- /dev/null
+++ b/media-gfx/colorhug-client/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+ <maintainer>
+ <email>gregkh@gentoo.org</email>
+ <name>Greg Kroah-Hartman</name>
+ <description>Please CC him on bugs and assign to herd</description>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/comical/Manifest b/media-gfx/comical/Manifest
new file mode 100644
index 000000000000..4a773066af31
--- /dev/null
+++ b/media-gfx/comical/Manifest
@@ -0,0 +1 @@
+DIST comical-0.8.tar.gz 480270 SHA256 0b6527cc06b25a937041f1eb248d0fd881cf055362097036b939817f785ab85e
diff --git a/media-gfx/comical/comical-0.8-r3.ebuild b/media-gfx/comical/comical-0.8-r3.ebuild
new file mode 100644
index 000000000000..df2d14d13caa
--- /dev/null
+++ b/media-gfx/comical/comical-0.8-r3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils gnome2-utils toolchain-funcs wxwidgets
+
+DESCRIPTION="A sequential image display program, to deal with .cbr and .cbz files"
+HOMEPAGE="http://comical.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND=">=app-arch/unrar-4.1.4-r2
+ sys-libs/zlib[minizip]
+ x11-libs/wxGTK:2.8[X]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ export WX_GTK_VER=2.8
+ need-wxwidgets unicode
+
+ epatch \
+ "${FILESDIR}"/${P}-wxGTK-2.8.patch \
+ "${FILESDIR}"/${P}-syslibs.patch
+
+ sed -i -e "s:wx-config:${WX_CONFIG}:" {.,src}/Makefile || die
+
+ rm -rf un{rar,zip}
+}
+
+src_compile() {
+ tc-export CXX
+ emake -j1
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc AUTHORS ChangeLog README TODO
+
+ doicon 'Comical Icons'/${PN}.xpm
+ doicon -s 128 'Comical Icons'/${PN}.png
+
+ domenu "${FILESDIR}"/${PN}.desktop
+}
+
+pkg_preinst() { gnome2_icon_savelist; }
+pkg_postinst() { gnome2_icon_cache_update; }
+pkg_postrm() { gnome2_icon_cache_update; }
diff --git a/media-gfx/comical/files/comical-0.8-syslibs.patch b/media-gfx/comical/files/comical-0.8-syslibs.patch
new file mode 100644
index 000000000000..e831bc82c4a7
--- /dev/null
+++ b/media-gfx/comical/files/comical-0.8-syslibs.patch
@@ -0,0 +1,91 @@
+Use system libminizip (zlib) wrt http://bugs.gentoo.org/407269.
+Use system libunrar. Use CXX and CXXFLAGS instead of CC and CFLAGS for g++.
+Stop using passing libraries from LDFLAGS and use LDLIBS instead.
+
+--- Makefile
++++ Makefile
+@@ -1,5 +1,5 @@
+-CC = `wx-config --cxx`
+-LDFLAGS = `wx-config --libs` -Lunrar -lunrar -Lunzip -lminiunzip
++CXX ?= `wx-config --cxx`
++LDLIBS = `wx-config --libs` -lunrar `pkg-config --libs minizip`
+ INSTALL = install
+ INSTALL_PROGRAM = $(INSTALL)
+ prefix = /usr/local
+@@ -12,18 +12,12 @@
+
+ all: comical
+
+-comical: $(OBJS) unrar/libunrar.a unzip/libminiunzip.a
+- $(CC) -o $@ $(OBJS) $(LDFLAGS)
++comical: $(OBJS)
++ $(CXX) $(LDFLAGS) $(CXXFLAGS) -o $@ $(OBJS) $(LDLIBS)
+
+ $(OBJS):
+ $(MAKE) -C src
+
+-unrar/libunrar.a:
+- $(MAKE) lib -C unrar -f makefile.linux
+-
+-unzip/libminiunzip.a:
+- $(MAKE) -C unzip
+-
+ install: comical
+ $(INSTALL_PROGRAM) comical $(DESTDIR)$(bindir)/comical
+
+@@ -39,8 +33,6 @@
+
+ distclean:
+ $(MAKE) clean
+- $(MAKE) clean -C unrar -f makefile.linux
+- $(MAKE) clean -C unzip
+ rm -f $(DEPS) bin2h src/bin2h.o
+
+ .PHONY : install install-strip uninstall clean distclean
+--- src/ComicBookRAR.h
++++ src/ComicBookRAR.h
+@@ -29,7 +29,7 @@
+ #define _ComicBookRAR_h_
+
+ #include "ComicBook.h"
+-#include "dll.hpp"
++#include <dll.hpp>
+
+ class ComicBookRAR : public ComicBook {
+
+--- src/ComicBookZIP.cpp
++++ src/ComicBookZIP.cpp
+@@ -27,7 +27,7 @@
+
+ #include "ComicBookZIP.h"
+ #include <wx/mstream.h>
+-#include "unzip.h"
++#include <unzip.h>
+ #include "Exceptions.h"
+ #include <cstring>
+ #include <errno.h>
+--- src/Makefile
++++ src/Makefile
+@@ -1,6 +1,5 @@
+-INCLUDE = -I../unrar -I../unzip
+-CFLAGS = -O2 -Wall -pipe
+-CPPFLAGS = `wx-config --cxxflags` $(CFLAGS) -D_UNIX $(INCLUDE)
++CXXFLAGS += -Wall `wx-config --cxxflags` `pkg-config --cflags minizip` -I/usr/include/libunrar
++CPPFLAGS += -D_UNIX $(CXXFLAGS)
+
+ .SUFFIXES: .cpp .png .h .d .o
+
+@@ -21,11 +20,11 @@
+ @echo -e "};\n\n#endif" >> $@
+
+ %.o : %.cpp
+- $(CC) $(CPPFLAGS) -c -o $*.o $<
++ $(CXX) $(CPPFLAGS) -c -o $*.o $<
+
+ %.d : %.cpp
+ @set -e; rm -f $@; \
+- $(CC) -MM -MG $(CPPFLAGS) -MT '$*.o' $< > $@.$$$$; \
++ $(CXX) -MM -MG $(CPPFLAGS) -MT '$*.o' $< > $@.$$$$; \
+ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
diff --git a/media-gfx/comical/files/comical-0.8-wxGTK-2.8.patch b/media-gfx/comical/files/comical-0.8-wxGTK-2.8.patch
new file mode 100644
index 000000000000..007aab3e3738
--- /dev/null
+++ b/media-gfx/comical/files/comical-0.8-wxGTK-2.8.patch
@@ -0,0 +1,12 @@
+http://comical.svn.sourceforge.net/viewvc/comical/trunk/src/ComicalApp.cpp?r1=170&r2=171
+
+--- src/ComicalApp.cpp
++++ src/ComicalApp.cpp
+@@ -28,6 +28,7 @@
+ #include "ComicalApp.h"
+ #include "ComicalFrame.h"
+ #include <wx/log.h>
++#include <wx/icon.h>
+
+ #if !defined(__WXMAC__) && !defined(__WXCOCOA__) && !defined(__WXMSW__) && !defined(__WXPM__)
+ #include "../Comical Icons/comical.xpm"
diff --git a/media-gfx/comical/files/comical.desktop b/media-gfx/comical/files/comical.desktop
new file mode 100644
index 000000000000..14a3a08e8202
--- /dev/null
+++ b/media-gfx/comical/files/comical.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Comical
+GenericName=Comic Book Reader
+Exec=comical %F
+Icon=comical
+Type=Application
+Terminal=false
+Categories=Graphics;Viewer;
+MimeType=application/x-cbr;application/x-cbz;
diff --git a/media-gfx/comical/metadata.xml b/media-gfx/comical/metadata.xml
new file mode 100644
index 000000000000..20cf5ef857a0
--- /dev/null
+++ b/media-gfx/comical/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">comical</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/comix/Manifest b/media-gfx/comix/Manifest
new file mode 100644
index 000000000000..2a83e99f30ef
--- /dev/null
+++ b/media-gfx/comix/Manifest
@@ -0,0 +1 @@
+DIST comix-4.0.4.tar.gz 481687 SHA256 9352169de856957a16de76867fbd7dc711648edfbac7ce76191b55e5f6cd546a SHA512 9cbc5b1cc100ee50b48b794ce9a7f08130fc7a79376533f0f55904be0e2e8cfe5f8b1deeff2f76e7038a3f81b0f709ce5eea88a709199e1584b73f5259df5f8e WHIRLPOOL 0016cb64185a6cd8983b7ecec7877f64f29a36dafd4d80b7dddcfdc8ebd1a13453faaad50d068c75bb250fbf421b7f2a9235f5472ec7d35073f62ac2731f1534
diff --git a/media-gfx/comix/comix-4.0.4-r1.ebuild b/media-gfx/comix/comix-4.0.4-r1.ebuild
new file mode 100644
index 000000000000..6cc76181ef6d
--- /dev/null
+++ b/media-gfx/comix/comix-4.0.4-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PLOCALES="ca cs es fr hr hu id ja ko pl pt_BR ru sv zh_CN zh_TW"
+
+inherit eutils fdo-mime gnome2-utils l10n python-single-r1
+
+DESCRIPTION="A GTK image viewer specifically designed to handle comic books"
+HOMEPAGE="http://comix.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~x86-fbsd"
+IUSE="rar"
+
+DEPEND="${PYTHON_DEPS}
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ >=dev-python/pygtk-2.12[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ rar? ( || ( app-arch/unrar app-arch/rar ) )"
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ l10n_find_plocales_changes messages "" "/LC_MESSAGES/comix.po"
+
+ epatch "${FILESDIR}/${P}-pillow.patch" #471522, https://sourceforge.net/p/comix/patches/50/
+
+ # do not install .pyc into /usr/share
+ local pythondir="$(python_get_sitedir)/comix"
+ pythondir="${pythondir#${EPREFIX}/usr/}"
+ sed -i -e "s:share/comix/src:${pythondir}:g" install.py || die
+ python_fix_shebang mime/comicthumb src/comix.py
+}
+
+src_install() {
+ dodir /usr
+ "${PYTHON}" install.py install --no-mime --dir "${D}"usr || die
+
+ insinto /usr/share/mime/packages
+ doins mime/comix.xml
+
+ insinto /etc/gconf/schemas
+ doins mime/comicbook.schemas
+
+ dobin mime/comicthumb
+ dodoc ChangeLog README
+
+ remove_locale() {
+ rm -r "${ED}/usr/share/locale/"$1 || die
+ }
+ l10n_for_each_disabled_locale_do remove_locale
+}
+
+pkg_preinst() {
+ gnome2_gconf_savelist
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_gconf_install
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-gfx/comix/files/comix-4.0.4-pillow.patch b/media-gfx/comix/files/comix-4.0.4-pillow.patch
new file mode 100644
index 000000000000..f91bfcd8b821
--- /dev/null
+++ b/media-gfx/comix/files/comix-4.0.4-pillow.patch
@@ -0,0 +1,153 @@
+From 9d31aa97c8bcc7828e6d04ec4375a75a9bf06836 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Sun, 16 Jun 2013 13:36:08 -0400
+Subject: [PATCH] Update PIL import statements for compatibility with Pillow
+ (PIL-2)
+
+https://bugs.gentoo.org/show_bug.cgi?id=471522
+---
+ install.py | 2 +-
+ mime/comicthumb | 2 +-
+ src/comix.py | 2 +-
+ src/histogram.py | 6 +++---
+ src/image.py | 8 ++++----
+ src/library.py | 4 ++--
+ src/thumbbar.py | 4 ++--
+ src/thumbnail.py | 2 +-
+ src/thumbremover.py | 2 +-
+ 9 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/install.py b/install.py
+index f8be7cb..d72d8d1 100755
+--- a/install.py
++++ b/install.py
+@@ -240,7 +240,7 @@ def check_dependencies():
+ print ' !!! PyGTK .................... Not found'
+ required_found = False
+ try:
+- import Image
++ from PIL import Image
+ assert Image.VERSION >= '1.1.5'
+ print ' Python Imaging Library ....... OK'
+ except ImportError:
+diff --git a/mime/comicthumb b/mime/comicthumb
+index 1081dac..a3e6a83 100755
+--- a/mime/comicthumb
++++ b/mime/comicthumb
+@@ -22,7 +22,7 @@ import tarfile
+ import subprocess
+
+ try:
+- import Image
++ from PIL import Image
+ except ImportError:
+ print '! Could not import the Image module (PIL).'
+ print __doc__
+diff --git a/src/comix.py b/src/comix.py
+index f3f9e1b..ebc73e9 100755
+--- a/src/comix.py
++++ b/src/comix.py
+@@ -51,7 +51,7 @@ except ImportError:
+ sys.exit(1)
+
+ try:
+- import Image
++ from PIL import Image
+ assert Image.VERSION >= '1.1.5'
+ except AssertionError:
+ print "You don't have the required version of the Python Imaging",
+diff --git a/src/histogram.py b/src/histogram.py
+index e9fc68d..42ac9b8 100644
+--- a/src/histogram.py
++++ b/src/histogram.py
+@@ -1,9 +1,9 @@
+ """histogram.py - Draw histograms (RGB) from pixbufs."""
+
+ import gtk
+-import Image
+-import ImageDraw
+-import ImageOps
++from PIL import Image
++from PIL import ImageDraw
++from PIL import ImageOps
+
+ import image
+
+diff --git a/src/image.py b/src/image.py
+index 0603f0a..db51525 100644
+--- a/src/image.py
++++ b/src/image.py
+@@ -1,10 +1,10 @@
+ """image.py - Various image manipulations."""
+
+ import gtk
+-import Image
+-import ImageEnhance
+-import ImageOps
+-import ImageStat
++from PIL import Image
++from PIL import ImageEnhance
++from PIL import ImageOps
++from PIL import ImageStat
+
+ from preferences import prefs
+
+diff --git a/src/library.py b/src/library.py
+index a4fc29b..e14a197 100644
+--- a/src/library.py
++++ b/src/library.py
+@@ -8,8 +8,8 @@ from xml.sax.saxutils import escape as xmlescape
+ import gtk
+ import gobject
+ import pango
+-import Image
+-import ImageDraw
++from PIL import Image
++from PIL import ImageDraw
+
+ import archive
+ import encoding
+diff --git a/src/thumbbar.py b/src/thumbbar.py
+index ba4b94c..0a4c33f 100644
+--- a/src/thumbbar.py
++++ b/src/thumbbar.py
+@@ -4,8 +4,8 @@ import urllib
+
+ import gtk
+ import gobject
+-import Image
+-import ImageDraw
++from PIL import Image
++from PIL import ImageDraw
+
+ import image
+ from preferences import prefs
+diff --git a/src/thumbnail.py b/src/thumbnail.py
+index 25f333e..b565162 100644
+--- a/src/thumbnail.py
++++ b/src/thumbnail.py
+@@ -15,7 +15,7 @@ import shutil
+ import tempfile
+
+ import gtk
+-import Image
++from PIL import Image
+
+ import archive
+ import constants
+diff --git a/src/thumbremover.py b/src/thumbremover.py
+index fc2fa37..03aa6e6 100644
+--- a/src/thumbremover.py
++++ b/src/thumbremover.py
+@@ -7,7 +7,7 @@ import urllib
+
+ import gtk
+ import pango
+-import Image
++from PIL import Image
+
+ import encoding
+ import labels
+--
+1.8.2.1
+
diff --git a/media-gfx/comix/metadata.xml b/media-gfx/comix/metadata.xml
new file mode 100644
index 000000000000..2d8ef46af84b
--- /dev/null
+++ b/media-gfx/comix/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="rar">
+ Pulls app-arch/unrar for rar file support
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">comix</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/converseen/Manifest b/media-gfx/converseen/Manifest
new file mode 100644
index 000000000000..406d8b25ac6d
--- /dev/null
+++ b/media-gfx/converseen/Manifest
@@ -0,0 +1,2 @@
+DIST converseen-0.6.4.tar.bz2 223060 SHA256 eac85f576018080d4a0ce904e4e8bc8a37365a4bbfec6f1ba410d4ac67625ad3 SHA512 432403cf13bb5eb1b6d0438775379295e05b250902c259bf0117efea7e21d1768cb0fe4fb8ed9bffcdca4b055a5b95612fb5e3c24b3061813b10b6db736314a9 WHIRLPOOL 257a863d4faa77c6b304aba732cf8b04159e7da4ffb04dde65cc78505d24b6b963d5ed7bfd4f01de215fb8d710219b639bb0fe142eeb1690c727ff051fab51d4
+DIST converseen-0.6.8.tar.bz2 226559 SHA256 e82c7c2cc494c7606d42e7ff2cafba8bb4d35cb5471912ae943a617ab2477e9e SHA512 add32cb213a708f5311a7b885a2f50333c9cc1b83fc08a4e4e836882eabcf7ce170e514b2de08cc6b66c1680873ed65f774bcb62c7f69c55ba061c37bbab2836 WHIRLPOOL 9d36b776faa837e9ab8ca792b14a14fdb23d53e3644b93052db53ee380b8f295ab39748f76496cb58af93f1c364890580b715b1dea1cd0430db7c2b999a8499a
diff --git a/media-gfx/converseen/converseen-0.6.4.ebuild b/media-gfx/converseen/converseen-0.6.4.ebuild
new file mode 100644
index 000000000000..8f56c316c097
--- /dev/null
+++ b/media-gfx/converseen/converseen-0.6.4.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+LANGSLONG="cs_CZ de_DE fr_FR hu_HU it_IT pl_PL pt_BR ru_RU tr_TR"
+LANGS="es_CL"
+
+inherit cmake-utils
+
+DESCRIPTION="Batch image converter and resizer based on ImageMagick"
+HOMEPAGE="http://converseen.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+for x in ${LANGS}; do
+ IUSE="${IUSE} linguas_${x}"
+done
+for x in ${LANGSLONG}; do
+ IUSE="${IUSE} linguas_${x%_*}"
+done
+
+# FIXME: graphicsmagick dependency does not work properly, failures when compiling
+# || ( media-gfx/imagemagick[cxx] media-gfx/graphicsmagick[cxx,imagemagick] )
+RDEPEND="
+ dev-qt/qtgui:4
+ media-gfx/imagemagick[cxx]
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( README.md )
+
+src_prepare() {
+ for x in ${LANGSLONG}; do
+ if use !linguas_${x%_*}; then
+ rm -f "loc/${PN}_${x}."* || die
+ sed -i -e "\,/${PN}_${x}\...,d" CMakeLists.txt || die
+ fi
+ done
+ for x in ${LANGS}; do
+ if use !linguas_${x}; then
+ rm -f "loc/${PN}_${x}."* || die
+ sed -i -e "\,/${PN}_${x}\...,d" CMakeLists.txt || die
+ fi
+ done
+}
diff --git a/media-gfx/converseen/converseen-0.6.8.ebuild b/media-gfx/converseen/converseen-0.6.8.ebuild
new file mode 100644
index 000000000000..629f2c9966f5
--- /dev/null
+++ b/media-gfx/converseen/converseen-0.6.8.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+LANGSLONG="cs_CZ de_DE fr_FR hu_HU it_IT ja_JP pl_PL pt_BR ru_RU tr_TR"
+LANGS="es_CL"
+
+inherit cmake-utils
+
+DESCRIPTION="Batch image converter and resizer based on ImageMagick"
+HOMEPAGE="http://converseen.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+for x in ${LANGS}; do
+ IUSE="${IUSE} linguas_${x}"
+done
+for x in ${LANGSLONG}; do
+ IUSE="${IUSE} linguas_${x%_*}"
+done
+
+# FIXME: graphicsmagick dependency does not work properly, failures when compiling
+# || ( media-gfx/imagemagick[cxx] media-gfx/graphicsmagick[cxx,imagemagick] )
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ media-gfx/imagemagick[cxx]
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( README.md )
+
+src_prepare() {
+ for x in ${LANGSLONG}; do
+ if use !linguas_${x%_*}; then
+ rm -f "loc/${PN}_${x}."* || die
+ sed -i -e "\,/${PN}_${x}\...,d" CMakeLists.txt || die
+ fi
+ done
+ for x in ${LANGS}; do
+ if use !linguas_${x}; then
+ rm -f "loc/${PN}_${x}."* || die
+ sed -i -e "\,/${PN}_${x}\...,d" CMakeLists.txt || die
+ fi
+ done
+}
diff --git a/media-gfx/converseen/metadata.xml b/media-gfx/converseen/metadata.xml
new file mode 100644
index 000000000000..f40b4c7dfbaf
--- /dev/null
+++ b/media-gfx/converseen/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>nikoli@gmx.us</email>
+ <name>Nikoli</name>
+ </maintainer>
+ <maintainer>
+ <email>maksbotan@gentoo.org</email>
+ <name>Maxim Koltsov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">converseen</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/cptutils/Manifest b/media-gfx/cptutils/Manifest
new file mode 100644
index 000000000000..1e95ced59b1b
--- /dev/null
+++ b/media-gfx/cptutils/Manifest
@@ -0,0 +1,2 @@
+DIST cptutils-1.54.tar.gz 587268 SHA256 07848a1e76337595c1ee7619638f16b6c0818717b2460096093078866402cc22 SHA512 8bae9d5d9d5b2ae0e39eda6e157734fa17afe6225b4966c93db4072f31e7ec91c7c0a7b4b1cf0bfdd696444485a61e93da725c2d94854b4de5e1c9936bec3e37 WHIRLPOOL fb39ef953fd92a177f25a262b9122decad22713019a1821d8a8a048b12ddbbd125e860fec923148e1529b54883a6feb9b155b5b28c18be00ef763b0b6ae0137c
+DIST cptutils-1.59.tar.gz 599033 SHA256 d4f3adf55bc1643d64d513371c0948d37ad4f0bb614ea90557c23d7ebd860616 SHA512 b8e78eadb7353d6cbb8b01eb3eb2791e425697ccff6df50125392cb476e7b1bdb5c83b40e27d9c28899f4ed364e46e195febaa28374ffe5abca697665838f7fe WHIRLPOOL ad7c95a5be927199e83f24ff94950c2595738139c8fe84c489561d0d26c61509c493966b806213cd91d87c3efd87b5ec15fc1ec9dc2bb8fd74278f78cba0e35f
diff --git a/media-gfx/cptutils/cptutils-1.54.ebuild b/media-gfx/cptutils/cptutils-1.54.ebuild
new file mode 100644
index 000000000000..4c5e7200184a
--- /dev/null
+++ b/media-gfx/cptutils/cptutils-1.54.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 eutils
+
+DESCRIPTION="A number of utilities for the manipulation of color gradient files"
+HOMEPAGE="http://soliton.vm.bytemark.co.uk/pub/jjg/en/code/cptutils.html"
+SRC_URI="http://soliton.vm.bytemark.co.uk/pub/jjg/code/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+CDEPEND="dev-libs/libxml2:2
+ media-libs/libpng:0="
+RDEPEND="${CDEPEND}
+ ${PYTHON_DEPS}"
+DEPEND="${CDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-parallel-make.patch
+ python_fix_shebang src/gradient-convert/gradient-convert.py
+}
diff --git a/media-gfx/cptutils/cptutils-1.59.ebuild b/media-gfx/cptutils/cptutils-1.59.ebuild
new file mode 100644
index 000000000000..4fd45152bd16
--- /dev/null
+++ b/media-gfx/cptutils/cptutils-1.59.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 eutils
+
+DESCRIPTION="A number of utilities for the manipulation of color gradient files"
+HOMEPAGE="http://soliton.vm.bytemark.co.uk/pub/jjg/en/code/cptutils/"
+SRC_URI="http://soliton.vm.bytemark.co.uk/pub/jjg/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+CDEPEND="dev-libs/libxml2:2
+ media-libs/libpng:0="
+RDEPEND="${CDEPEND}
+ ${PYTHON_DEPS}"
+DEPEND="${CDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.54-parallel-make.patch
+ python_fix_shebang src/gradient-convert/gradient-convert.py
+}
diff --git a/media-gfx/cptutils/files/cptutils-1.54-parallel-make.patch b/media-gfx/cptutils/files/cptutils-1.54-parallel-make.patch
new file mode 100644
index 000000000000..c3497763b2ed
--- /dev/null
+++ b/media-gfx/cptutils/files/cptutils-1.54-parallel-make.patch
@@ -0,0 +1,30 @@
+--- cptutils-1.54/Makefile.in
++++ cptutils-1.54/Makefile.in
+@@ -8,23 +8,22 @@
+ RUBBISH = *~
+ CONFFILES = config.cache config.log config.status configure Makefile
+ DIST = cptutils-$(VERSION)
+-MAKE_SRC = $(MAKE) -C src
+
+ # targets
+
+ default : all
+
+ all :
+- $(MAKE_SRC) all
++ $(MAKE) -C src all
+
+ install :
+- $(MAKE_SRC) install
++ $(MAKE) -C src install
+
+ test check :
+- $(MAKE_SRC) --quiet test
++ $(MAKE) -C src --quiet test
+
+ unit :
+- $(MAKE_SRC) --quiet unit
++ $(MAKE) -C src --quiet unit
+
+ clean :
+ $(RM) $(RUBBISH)
diff --git a/media-gfx/cptutils/metadata.xml b/media-gfx/cptutils/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/cptutils/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/cropgui/Manifest b/media-gfx/cropgui/Manifest
new file mode 100644
index 000000000000..168914950916
--- /dev/null
+++ b/media-gfx/cropgui/Manifest
@@ -0,0 +1 @@
+DIST cropgui_0.1.1.tar.gz 13142 SHA256 d2bab11c2bafdbcbe9c8cac7827a7e25b909b2962cef29e1ce7181ccb2834a75 SHA512 abfe8dfd46a316e970b0355f6b05e2d2a4a54243e201dfc8434ee09f31c8715471dd1f00bd0c6cda646406e6398e5b43da3269bf74d1f2d9d436d5931d2b968f WHIRLPOOL 1e4f9fca887d2d988c6d944f85cae6125472ea08118e84b5601123e2af603b16d49ed54385f9552f1cd819f447b2ceace742ee4fd1e95f5d0461f4c173a1ef7e
diff --git a/media-gfx/cropgui/cropgui-0.1.1-r3.ebuild b/media-gfx/cropgui/cropgui-0.1.1-r3.ebuild
new file mode 100644
index 000000000000..40548f2b2b92
--- /dev/null
+++ b/media-gfx/cropgui/cropgui-0.1.1-r3.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils python-r1
+
+DESCRIPTION="GUI for lossless cropping of jpeg images"
+HOMEPAGE="http://emergent.unpythonic.net/01248401946"
+SRC_URI="http://media.unpythonic.net/emergent-files/01248401946/${PN}_${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${PYTHON_DEPS}
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ sed -i -e '/Encoding/d' \
+ -e '/Version/d' \
+ -e '/MimeType/s/$/&;/' \
+ -e '/Categories/s/Application;//' \
+ cropgui.desktop || die 'sed on cropgui.desktop failed'
+ # bug 471530
+ epatch "${FILESDIR}/${P}-PIL.patch"
+
+ epatch_user
+}
+
+install_cropgui_wrapper() {
+ python_domodule cropgtk.py cropgui_common.py filechooser.py cropgui.glade
+ make_wrapper "${PN}.tmp" "${PYTHON} $(python_get_sitedir)/${PN}/cropgtk.py"
+ python_newexe "${ED%/}/usr/bin/${PN}.tmp" "${PN}"
+ rm "${ED%/}/usr/bin/${PN}.tmp" || die
+}
+
+src_install() {
+ local python_moduleroot="${PN}"
+ python_foreach_impl install_cropgui_wrapper
+
+ domenu "${PN}.desktop"
+ doicon "${PN}.png"
+}
diff --git a/media-gfx/cropgui/files/cropgui-0.1.1-PIL.patch b/media-gfx/cropgui/files/cropgui-0.1.1-PIL.patch
new file mode 100644
index 000000000000..88f7ffbfed81
--- /dev/null
+++ b/media-gfx/cropgui/files/cropgui-0.1.1-PIL.patch
@@ -0,0 +1,29 @@
+Только в cropgui: cropgui-0.1.1-PIL.patch
+diff -ru cropgui.orig/cropgui_common.py cropgui/cropgui_common.py
+--- cropgui.orig/cropgui_common.py 2009-07-24 06:15:12.000000000 +0400
++++ cropgui/cropgui_common.py 2013-05-28 21:48:24.000000000 +0400
+@@ -13,9 +13,9 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program; if not, write to the Free Software
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-import Image
+-import ImageFilter
+-import ImageDraw
++from PIL import Image
++from PIL import ImageFilter
++from PIL import ImageDraw
+ import subprocess
+ import threading
+ import Queue
+diff -ru cropgui.orig/filechooser.py cropgui/filechooser.py
+--- cropgui.orig/filechooser.py 2009-07-24 06:15:12.000000000 +0400
++++ cropgui/filechooser.py 2013-05-28 21:50:16.000000000 +0400
+@@ -8,7 +8,7 @@
+ import gobject
+
+ import os
+-import Image
++from PIL import Image
+
+ HIGH_WATER, LOW_WATER = 25, 5
+ image_cache = {}
diff --git a/media-gfx/cropgui/metadata.xml b/media-gfx/cropgui/metadata.xml
new file mode 100644
index 000000000000..1b9fb5b7d4b0
--- /dev/null
+++ b/media-gfx/cropgui/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>zlogene@gentoo.org</email>
+ <name>Mikle Kolyada</name>
+ </maintainer>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/crwinfo/Manifest b/media-gfx/crwinfo/Manifest
new file mode 100644
index 000000000000..21fd48b974db
--- /dev/null
+++ b/media-gfx/crwinfo/Manifest
@@ -0,0 +1 @@
+DIST CRWInfo-0.2.tar.gz 10717 SHA256 a7b0572e96cfa895d2ca04c10618514f7c86c038332d900dcf5715463c851478
diff --git a/media-gfx/crwinfo/crwinfo-0.2.ebuild b/media-gfx/crwinfo/crwinfo-0.2.ebuild
new file mode 100644
index 000000000000..a70c54a3af57
--- /dev/null
+++ b/media-gfx/crwinfo/crwinfo-0.2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Canon raw image (CRW) information and thumbnail extractor"
+HOMEPAGE="http://freshmeat.net/projects/crwinfo/"
+SRC_URI="http://neuemuenze.heim1.tu-clausthal.de/~sven/crwinfo/CRWInfo-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 ppc sparc amd64 alpha ia64 hppa ppc64"
+IUSE=""
+
+S="${WORKDIR}/CRWInfo-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}.patch
+ sed \
+ -e '/gcc/s:^.*$:\t$(CC) $(CFLAGS) -Wall -c crwinfo.c\n\t$(CC) $(LDFLAGS) -o crwinfo crwinfo.o:g' \
+ -i Makefile || die
+ tc-export CC
+}
+
+src_install() {
+ dobin crwinfo
+ dodoc README spec
+}
diff --git a/media-gfx/crwinfo/files/crwinfo-0.2.patch b/media-gfx/crwinfo/files/crwinfo-0.2.patch
new file mode 100644
index 000000000000..18170b10d71e
--- /dev/null
+++ b/media-gfx/crwinfo/files/crwinfo-0.2.patch
@@ -0,0 +1,17 @@
+--- crwinfo.c.orig 2002-07-30 11:17:03.000000000 -0600
++++ crwinfo.c 2005-01-21 15:24:54.256888228 -0700
+@@ -95,10 +95,10 @@
+ fprintf( stderr, "-m show misc. information (whitepoint, AF mode etc)\n" );
+ fprintf( stderr, "-f show flash information (flash mode etc)\n" );
+ fprintf( stderr, "-cf show custom function settings\n" );
+- fprintf( stderr, "-t extract the thumbnail to the optional filename.
+- If no filename for the thumbnail is given, the
+- name of the CRW-file is used with a .jpg
+- extension\n" );
++ fprintf( stderr, "-t extract the thumbnail to the optional filename. \n" );
++ fprintf( stderr, " If no filename for the thumbnail is given, the\n" );
++ fprintf( stderr, " name of the CRW-file is used with a .jpg\n" );
++ fprintf( stderr, " extension\n" );
+ fprintf( stderr, "-x show experimental information (don't rely on it)\n" );
+ exit(0);
+ }
diff --git a/media-gfx/crwinfo/metadata.xml b/media-gfx/crwinfo/metadata.xml
new file mode 100644
index 000000000000..63d348245aec
--- /dev/null
+++ b/media-gfx/crwinfo/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+ <longdescription lang="en">
+ Utility to extract thumbnails and information from Canon raw (CRW)
+ files.
+ </longdescription>
+ <upstream>
+ <remote-id type="freshmeat">crwinfo</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/cthumb/Manifest b/media-gfx/cthumb/Manifest
new file mode 100644
index 000000000000..0ec2cf8b8961
--- /dev/null
+++ b/media-gfx/cthumb/Manifest
@@ -0,0 +1 @@
+DIST cthumb-4.2.tar.gz 438163 SHA256 d31536549d5aad50a2620c87729f24efcbeda1f5e4930c5f07958b77fd1058aa
diff --git a/media-gfx/cthumb/cthumb-4.2.ebuild b/media-gfx/cthumb/cthumb-4.2.ebuild
new file mode 100644
index 000000000000..9c2fcdd4a633
--- /dev/null
+++ b/media-gfx/cthumb/cthumb-4.2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Create a statical HTML Image gallery with captions for each image"
+
+HOMEPAGE="http://cthumb.sourceforge.net"
+SRC_URI="mirror://sourceforge/cthumb/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha ~amd64 ppc ~sparc x86"
+IUSE=""
+
+DEPEND="dev-perl/URI
+ dev-perl/HTML-Parser
+ media-libs/netpbm"
+
+src_compile() {
+ ./configure \
+ --host=${CHOST} \
+ --prefix=/usr \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man || die "./configure failed"
+}
+
+src_install () {
+ make \
+ prefix=${D}/usr \
+ mandir=${D}/usr/share/man \
+ infodir=${D}/usr/share/info \
+ install || die
+}
diff --git a/media-gfx/cthumb/metadata.xml b/media-gfx/cthumb/metadata.xml
new file mode 100644
index 000000000000..152d41c462d6
--- /dev/null
+++ b/media-gfx/cthumb/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">cthumb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/cutycapt/Manifest b/media-gfx/cutycapt/Manifest
new file mode 100644
index 000000000000..e5feaedc3b5d
--- /dev/null
+++ b/media-gfx/cutycapt/Manifest
@@ -0,0 +1 @@
+DIST cutycapt-0_p20120409.tar.gz 7053 SHA256 5e5feb898379f7beca2cf1c6d37eefe2926d73453ad530e8866c0cb013ea04ed
diff --git a/media-gfx/cutycapt/cutycapt-0_p20120409.ebuild b/media-gfx/cutycapt/cutycapt-0_p20120409.ebuild
new file mode 100644
index 000000000000..9694e462b0b9
--- /dev/null
+++ b/media-gfx/cutycapt/cutycapt-0_p20120409.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit qt4-r2
+
+DESCRIPTION="Qt WebKit Web Page Rendering Capture Utility"
+HOMEPAGE="http://cutycapt.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~mattm/${P}.tar.gz"
+LICENSE="LGPL-2.1"
+SLOT="0"
+
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND="dev-qt/qtgui:4 dev-qt/qtwebkit:4 dev-qt/qtcore:4 dev-qt/qtsvg:4"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ eqmake4 CutyCapt.pro
+}
+
+src_install() {
+ dobin CutyCapt
+}
+
+pkg_postinst() {
+ einfo "Upstream is no longer actively developing package."
+ einfo "Recommends switching to PhantomJS instead."
+ einfo ""
+ einfo "You cannot use CutyCapt without an X server, but you"
+ einfo "can use e.g. Xvfb as light-weight server."
+ einfo "See ${HOMEPAGE} for usage."
+}
diff --git a/media-gfx/cutycapt/metadata.xml b/media-gfx/cutycapt/metadata.xml
new file mode 100644
index 000000000000..64d7e1e97cd7
--- /dev/null
+++ b/media-gfx/cutycapt/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mattm@gentoo.org</email>
+ <name>Mathew Marlowe</name>
+ </maintainer>
+ <longdescription>
+ A Qt WebKit Web Page Rendering Capture Utility
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/darktable/Manifest b/media-gfx/darktable/Manifest
new file mode 100644
index 000000000000..ab3daf6fc6ec
--- /dev/null
+++ b/media-gfx/darktable/Manifest
@@ -0,0 +1,4 @@
+DIST darktable-1.6.6.tar.xz 3097760 SHA256 f85e4b8219677eba34f5a41e1a0784cc6ec06576326a99f04e460a4f41fd21a5 SHA512 96f0371c0044c40e22c0cf729076032e487fd0af30d27d28ed42ea8bcc3e29971b09d9f628e3b734147265b02fa0243217e687a8e6237b2c0c14b9db330df09c WHIRLPOOL d04e77777fdcfdd5933d7c915375b7418647918af7ef4a5b19703724a113ee5fdfe8db6bb839e9638eecca6c0c9c7542088d12b45634fca57d3b453fa120d7f6
+DIST darktable-1.6.7.tar.xz 3113804 SHA256 a75073b49df0a30cd2686624feeb6210bc083bc37112ae6e045f8523db4c4c98 SHA512 6fadc62dc9ac0dd8b11d7d1a1ef1c23bd07abb7e66159d0bd26dd4bb9b36162e390c4f1559dd7c433c18dd55ebff98157234137567e12467995f7f26915b0ea0 WHIRLPOOL 69228b8c734b53b17483ae453df8cd73caf78b5fcbcee6b5cae5f8396c5dd1038ba6036048ab50e15c85cc35adeac0bd49de03f3acb30dbcb822fae2e02b73bf
+DIST darktable-1.6.8.tar.xz 3118776 SHA256 b676f81bd8cc661a8f76e03ad449da4444f770b6bec3e9accf013c636f690905 SHA512 8811e8f931299b4fb86d3611696061404253985328178231902e749dc55b4f02d5193ce2e2eaf8c6351f9f7374870bcbdc55b145dfb75cd7669556494b457bbb WHIRLPOOL acfe83ebcc697904246a11583d0ff521365639d2006629e76123db93c35ea7ed39cbd7fed54470e5ed0e27cc6b28d70559738d68f36c31be63391c539c5323cb
+DIST darktable-usermanual-1.6.0.pdf 12827069 SHA256 f5c46dbf0a2dd2d391f92555abdefe735c6362e51a755b296d71779492b7e945 SHA512 39ee8c1b4f23883025750416d9d1f73d1dfbec0e6ac3eeef0f15778ced66a373c00b0a46cb3a54b1cfd6e04313313f63e8e3cd3d0cbea011acaa07a725d0ab02 WHIRLPOOL 49a234e57c14d23ccb85eadf2ad03c52eae7f90b0371dce025c04019a7a5cca41858084f735fe0965f93958ab83601571ab3e33acd27c2bcbd381bb0c9da4794
diff --git a/media-gfx/darktable/darktable-1.6.6.ebuild b/media-gfx/darktable/darktable-1.6.6.ebuild
new file mode 100644
index 000000000000..9bf8f076ffef
--- /dev/null
+++ b/media-gfx/darktable/darktable-1.6.6.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils flag-o-matic toolchain-funcs gnome2-utils fdo-mime pax-utils eutils
+
+DOC_PV="1.6.0"
+
+DESCRIPTION="A virtual lighttable and darkroom for photographers"
+HOMEPAGE="http://www.darktable.org/"
+SRC_URI="https://github.com/darktable-org/${PN}/releases/download/release-${PV}/${P}.tar.xz
+ doc? ( https://github.com/darktable-org/${PN}/releases/download/release-${DOC_PV}/${PN}-usermanual.pdf -> ${PN}-usermanual-${DOC_PV}.pdf )"
+
+LICENSE="GPL-3 CC-BY-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LANGS=" ca cs da de el es fr it ja nl pl pt_BR pt_PT ru sq sv uk"
+# TODO add lua once dev-lang/lua-5.2 is unmasked
+IUSE="colord cpu_flags_x86_sse3 doc flickr geo gphoto2 graphicsmagick jpeg2k kde libsecret
+nls opencl openmp openexr pax_kernel +rawspeed +slideshow +squish web-services webp
+${LANGS// / linguas_}"
+
+# sse3 support is required to build darktable
+REQUIRED_USE="cpu_flags_x86_sse3"
+
+CDEPEND="
+ dev-db/sqlite:3
+ >=dev-libs/glib-2.28:2
+ dev-libs/libxml2:2
+ gnome-base/librsvg:2
+ media-gfx/exiv2:0=[xmp]
+ media-libs/lcms:2
+ >=media-libs/lensfun-0.2.3
+ media-libs/libpng:0=
+ media-libs/tiff:0
+ net-misc/curl
+ virtual/jpeg:0
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ x11-libs/pango
+ colord? ( x11-misc/colord:0= )
+ flickr? ( media-libs/flickcurl )
+ geo? ( net-libs/libsoup:2.4 )
+ gphoto2? ( media-libs/libgphoto2:= )
+ graphicsmagick? ( media-gfx/graphicsmagick )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ libsecret? (
+ >=app-crypt/libsecret-0.18
+ dev-libs/json-glib
+ )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr:0= )
+ slideshow? (
+ media-libs/libsdl
+ virtual/glu
+ virtual/opengl
+ )
+ web-services? ( dev-libs/json-glib )
+ webp? ( media-libs/libwebp:0= )"
+RDEPEND="${CDEPEND}
+ x11-themes/gtk-engines:2
+ kde? ( kde-apps/kwalletd:4 )"
+DEPEND="${CDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_prepare() {
+ use cpu_flags_x86_sse3 && append-flags -msse3
+
+ sed -e "s:\(/share/doc/\)darktable:\1${PF}:" \
+ -e "s:\(\${SHARE_INSTALL}/doc/\)darktable:\1${PF}:" \
+ -e "s:LICENSE::" \
+ -i doc/CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_use colord COLORD)
+ $(cmake-utils_use_use flickr FLICKR)
+ $(cmake-utils_use_use geo GEO)
+ $(cmake-utils_use_use gphoto2 CAMERA_SUPPORT)
+ $(cmake-utils_use_use graphicsmagick GRAPHICSMAGICK)
+ $(cmake-utils_use_use jpeg2k OPENJPEG)
+ $(cmake-utils_use_use kde KWALLET)
+ $(cmake-utils_use_use libsecret LIBSECRET)
+ $(cmake-utils_use_use libsecret GLIBJSON)
+ $(cmake-utils_use_use nls NLS)
+ $(cmake-utils_use_use opencl OPENCL)
+ $(cmake-utils_use_use openexr OPENEXR)
+ $(cmake-utils_use_use openmp OPENMP)
+ $(cmake-utils_use !rawspeed DONT_USE_RAWSPEED)
+ $(cmake-utils_use_use squish SQUISH)
+ $(cmake-utils_use_build slideshow SLIDESHOW)
+ $(cmake-utils_use_use web-services GLIBJSON)
+ $(cmake-utils_use_use webp WEBP)
+ -DUSE_LUA=OFF
+ -DCUSTOM_CFLAGS=ON
+ -DINSTALL_IOP_EXPERIMENTAL=ON
+ -DINSTALL_IOP_LEGACY=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.pdf
+
+ for lang in ${LANGS} ; do
+ use linguas_${lang} || rm -r "${ED}"/usr/share/locale/${lang}
+ done
+
+ if use pax_kernel && use opencl ; then
+ pax-mark Cm "${ED}"/usr/bin/${PN} || die
+ eqawarn "USE=pax_kernel is set meaning that ${PN} will be run"
+ eqawarn "under a PaX enabled kernel. To do so, the ${PN} binary"
+ eqawarn "must be modified and this *may* lead to breakage! If"
+ eqawarn "you suspect that ${PN} is broken by this modification,"
+ eqawarn "please open a bug."
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/darktable/darktable-1.6.7.ebuild b/media-gfx/darktable/darktable-1.6.7.ebuild
new file mode 100644
index 000000000000..9bf8f076ffef
--- /dev/null
+++ b/media-gfx/darktable/darktable-1.6.7.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils flag-o-matic toolchain-funcs gnome2-utils fdo-mime pax-utils eutils
+
+DOC_PV="1.6.0"
+
+DESCRIPTION="A virtual lighttable and darkroom for photographers"
+HOMEPAGE="http://www.darktable.org/"
+SRC_URI="https://github.com/darktable-org/${PN}/releases/download/release-${PV}/${P}.tar.xz
+ doc? ( https://github.com/darktable-org/${PN}/releases/download/release-${DOC_PV}/${PN}-usermanual.pdf -> ${PN}-usermanual-${DOC_PV}.pdf )"
+
+LICENSE="GPL-3 CC-BY-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LANGS=" ca cs da de el es fr it ja nl pl pt_BR pt_PT ru sq sv uk"
+# TODO add lua once dev-lang/lua-5.2 is unmasked
+IUSE="colord cpu_flags_x86_sse3 doc flickr geo gphoto2 graphicsmagick jpeg2k kde libsecret
+nls opencl openmp openexr pax_kernel +rawspeed +slideshow +squish web-services webp
+${LANGS// / linguas_}"
+
+# sse3 support is required to build darktable
+REQUIRED_USE="cpu_flags_x86_sse3"
+
+CDEPEND="
+ dev-db/sqlite:3
+ >=dev-libs/glib-2.28:2
+ dev-libs/libxml2:2
+ gnome-base/librsvg:2
+ media-gfx/exiv2:0=[xmp]
+ media-libs/lcms:2
+ >=media-libs/lensfun-0.2.3
+ media-libs/libpng:0=
+ media-libs/tiff:0
+ net-misc/curl
+ virtual/jpeg:0
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ x11-libs/pango
+ colord? ( x11-misc/colord:0= )
+ flickr? ( media-libs/flickcurl )
+ geo? ( net-libs/libsoup:2.4 )
+ gphoto2? ( media-libs/libgphoto2:= )
+ graphicsmagick? ( media-gfx/graphicsmagick )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ libsecret? (
+ >=app-crypt/libsecret-0.18
+ dev-libs/json-glib
+ )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr:0= )
+ slideshow? (
+ media-libs/libsdl
+ virtual/glu
+ virtual/opengl
+ )
+ web-services? ( dev-libs/json-glib )
+ webp? ( media-libs/libwebp:0= )"
+RDEPEND="${CDEPEND}
+ x11-themes/gtk-engines:2
+ kde? ( kde-apps/kwalletd:4 )"
+DEPEND="${CDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_prepare() {
+ use cpu_flags_x86_sse3 && append-flags -msse3
+
+ sed -e "s:\(/share/doc/\)darktable:\1${PF}:" \
+ -e "s:\(\${SHARE_INSTALL}/doc/\)darktable:\1${PF}:" \
+ -e "s:LICENSE::" \
+ -i doc/CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_use colord COLORD)
+ $(cmake-utils_use_use flickr FLICKR)
+ $(cmake-utils_use_use geo GEO)
+ $(cmake-utils_use_use gphoto2 CAMERA_SUPPORT)
+ $(cmake-utils_use_use graphicsmagick GRAPHICSMAGICK)
+ $(cmake-utils_use_use jpeg2k OPENJPEG)
+ $(cmake-utils_use_use kde KWALLET)
+ $(cmake-utils_use_use libsecret LIBSECRET)
+ $(cmake-utils_use_use libsecret GLIBJSON)
+ $(cmake-utils_use_use nls NLS)
+ $(cmake-utils_use_use opencl OPENCL)
+ $(cmake-utils_use_use openexr OPENEXR)
+ $(cmake-utils_use_use openmp OPENMP)
+ $(cmake-utils_use !rawspeed DONT_USE_RAWSPEED)
+ $(cmake-utils_use_use squish SQUISH)
+ $(cmake-utils_use_build slideshow SLIDESHOW)
+ $(cmake-utils_use_use web-services GLIBJSON)
+ $(cmake-utils_use_use webp WEBP)
+ -DUSE_LUA=OFF
+ -DCUSTOM_CFLAGS=ON
+ -DINSTALL_IOP_EXPERIMENTAL=ON
+ -DINSTALL_IOP_LEGACY=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.pdf
+
+ for lang in ${LANGS} ; do
+ use linguas_${lang} || rm -r "${ED}"/usr/share/locale/${lang}
+ done
+
+ if use pax_kernel && use opencl ; then
+ pax-mark Cm "${ED}"/usr/bin/${PN} || die
+ eqawarn "USE=pax_kernel is set meaning that ${PN} will be run"
+ eqawarn "under a PaX enabled kernel. To do so, the ${PN} binary"
+ eqawarn "must be modified and this *may* lead to breakage! If"
+ eqawarn "you suspect that ${PN} is broken by this modification,"
+ eqawarn "please open a bug."
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/darktable/darktable-1.6.8.ebuild b/media-gfx/darktable/darktable-1.6.8.ebuild
new file mode 100644
index 000000000000..9bf8f076ffef
--- /dev/null
+++ b/media-gfx/darktable/darktable-1.6.8.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils flag-o-matic toolchain-funcs gnome2-utils fdo-mime pax-utils eutils
+
+DOC_PV="1.6.0"
+
+DESCRIPTION="A virtual lighttable and darkroom for photographers"
+HOMEPAGE="http://www.darktable.org/"
+SRC_URI="https://github.com/darktable-org/${PN}/releases/download/release-${PV}/${P}.tar.xz
+ doc? ( https://github.com/darktable-org/${PN}/releases/download/release-${DOC_PV}/${PN}-usermanual.pdf -> ${PN}-usermanual-${DOC_PV}.pdf )"
+
+LICENSE="GPL-3 CC-BY-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LANGS=" ca cs da de el es fr it ja nl pl pt_BR pt_PT ru sq sv uk"
+# TODO add lua once dev-lang/lua-5.2 is unmasked
+IUSE="colord cpu_flags_x86_sse3 doc flickr geo gphoto2 graphicsmagick jpeg2k kde libsecret
+nls opencl openmp openexr pax_kernel +rawspeed +slideshow +squish web-services webp
+${LANGS// / linguas_}"
+
+# sse3 support is required to build darktable
+REQUIRED_USE="cpu_flags_x86_sse3"
+
+CDEPEND="
+ dev-db/sqlite:3
+ >=dev-libs/glib-2.28:2
+ dev-libs/libxml2:2
+ gnome-base/librsvg:2
+ media-gfx/exiv2:0=[xmp]
+ media-libs/lcms:2
+ >=media-libs/lensfun-0.2.3
+ media-libs/libpng:0=
+ media-libs/tiff:0
+ net-misc/curl
+ virtual/jpeg:0
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ x11-libs/pango
+ colord? ( x11-misc/colord:0= )
+ flickr? ( media-libs/flickcurl )
+ geo? ( net-libs/libsoup:2.4 )
+ gphoto2? ( media-libs/libgphoto2:= )
+ graphicsmagick? ( media-gfx/graphicsmagick )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ libsecret? (
+ >=app-crypt/libsecret-0.18
+ dev-libs/json-glib
+ )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr:0= )
+ slideshow? (
+ media-libs/libsdl
+ virtual/glu
+ virtual/opengl
+ )
+ web-services? ( dev-libs/json-glib )
+ webp? ( media-libs/libwebp:0= )"
+RDEPEND="${CDEPEND}
+ x11-themes/gtk-engines:2
+ kde? ( kde-apps/kwalletd:4 )"
+DEPEND="${CDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_prepare() {
+ use cpu_flags_x86_sse3 && append-flags -msse3
+
+ sed -e "s:\(/share/doc/\)darktable:\1${PF}:" \
+ -e "s:\(\${SHARE_INSTALL}/doc/\)darktable:\1${PF}:" \
+ -e "s:LICENSE::" \
+ -i doc/CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_use colord COLORD)
+ $(cmake-utils_use_use flickr FLICKR)
+ $(cmake-utils_use_use geo GEO)
+ $(cmake-utils_use_use gphoto2 CAMERA_SUPPORT)
+ $(cmake-utils_use_use graphicsmagick GRAPHICSMAGICK)
+ $(cmake-utils_use_use jpeg2k OPENJPEG)
+ $(cmake-utils_use_use kde KWALLET)
+ $(cmake-utils_use_use libsecret LIBSECRET)
+ $(cmake-utils_use_use libsecret GLIBJSON)
+ $(cmake-utils_use_use nls NLS)
+ $(cmake-utils_use_use opencl OPENCL)
+ $(cmake-utils_use_use openexr OPENEXR)
+ $(cmake-utils_use_use openmp OPENMP)
+ $(cmake-utils_use !rawspeed DONT_USE_RAWSPEED)
+ $(cmake-utils_use_use squish SQUISH)
+ $(cmake-utils_use_build slideshow SLIDESHOW)
+ $(cmake-utils_use_use web-services GLIBJSON)
+ $(cmake-utils_use_use webp WEBP)
+ -DUSE_LUA=OFF
+ -DCUSTOM_CFLAGS=ON
+ -DINSTALL_IOP_EXPERIMENTAL=ON
+ -DINSTALL_IOP_LEGACY=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc "${DISTDIR}"/${PN}-usermanual-${DOC_PV}.pdf
+
+ for lang in ${LANGS} ; do
+ use linguas_${lang} || rm -r "${ED}"/usr/share/locale/${lang}
+ done
+
+ if use pax_kernel && use opencl ; then
+ pax-mark Cm "${ED}"/usr/bin/${PN} || die
+ eqawarn "USE=pax_kernel is set meaning that ${PN} will be run"
+ eqawarn "under a PaX enabled kernel. To do so, the ${PN} binary"
+ eqawarn "must be modified and this *may* lead to breakage! If"
+ eqawarn "you suspect that ${PN} is broken by this modification,"
+ eqawarn "please open a bug."
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/darktable/darktable-9999.ebuild b/media-gfx/darktable/darktable-9999.ebuild
new file mode 100644
index 000000000000..e2ddc61dcfc9
--- /dev/null
+++ b/media-gfx/darktable/darktable-9999.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils flag-o-matic toolchain-funcs gnome2-utils fdo-mime git-r3 pax-utils eutils
+
+EGIT_REPO_URI="git://github.com/darktable-org/darktable.git"
+
+DESCRIPTION="A virtual lighttable and darkroom for photographers"
+HOMEPAGE="http://www.darktable.org/"
+
+LICENSE="GPL-3 CC-BY-3.0"
+SLOT="0"
+#KEYWORDS="~amd64 ~x86"
+LANGS=" ca cs da de el es fr it ja nl pl pt_BR pt_PT ru sq sv uk"
+# TODO add lua once dev-lang/lua-5.2 is unmasked
+IUSE="colord cpu_flags_x86_sse3 doc flickr geo gphoto2 graphicsmagick jpeg2k kde libsecret
+nls opencl openmp openexr pax_kernel +rawspeed +slideshow +squish web-services webp
+${LANGS// / linguas_}"
+
+# sse3 support is required to build darktable
+REQUIRED_USE="cpu_flags_x86_sse3"
+
+CDEPEND="
+ dev-db/sqlite:3
+ >=dev-libs/glib-2.28:2
+ dev-libs/libxml2:2
+ gnome-base/librsvg:2
+ media-gfx/exiv2:0=[xmp]
+ media-libs/lcms:2
+ >=media-libs/lensfun-0.2.3
+ media-libs/libpng:0=
+ media-libs/tiff:0
+ net-misc/curl
+ virtual/jpeg:0
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ x11-libs/pango
+ colord? ( x11-misc/colord:0= )
+ flickr? ( media-libs/flickcurl )
+ geo? ( net-libs/libsoup:2.4 )
+ gphoto2? ( media-libs/libgphoto2:= )
+ graphicsmagick? ( media-gfx/graphicsmagick )
+ jpeg2k? ( media-libs/openjpeg:0 )
+ libsecret? (
+ >=app-crypt/libsecret-0.18
+ dev-libs/json-glib
+ )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr:0= )
+ slideshow? (
+ media-libs/libsdl
+ virtual/glu
+ virtual/opengl
+ )
+ web-services? ( dev-libs/json-glib )
+ webp? ( media-libs/libwebp:0= )"
+RDEPEND="${CDEPEND}
+ x11-themes/gtk-engines:2
+ kde? ( kde-apps/kwalletd:4 )"
+DEPEND="${CDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_prepare() {
+ use cpu_flags_x86_sse3 && append-flags -msse3
+
+ sed -e "s:\(/share/doc/\)darktable:\1${PF}:" \
+ -e "s:\(\${SHARE_INSTALL}/doc/\)darktable:\1${PF}:" \
+ -e "s:LICENSE::" \
+ -i doc/CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_use colord COLORD)
+ $(cmake-utils_use_use flickr FLICKR)
+ $(cmake-utils_use_use geo GEO)
+ $(cmake-utils_use_use gphoto2 CAMERA_SUPPORT)
+ $(cmake-utils_use_use graphicsmagick GRAPHICSMAGICK)
+ $(cmake-utils_use_use jpeg2k OPENJPEG)
+ $(cmake-utils_use_use kde KWALLET)
+ $(cmake-utils_use_use libsecret LIBSECRET)
+ $(cmake-utils_use_use libsecret GLIBJSON)
+ $(cmake-utils_use_use nls NLS)
+ $(cmake-utils_use_use opencl OPENCL)
+ $(cmake-utils_use_use openexr OPENEXR)
+ $(cmake-utils_use_use openmp OPENMP)
+ $(cmake-utils_use !rawspeed DONT_USE_RAWSPEED)
+ $(cmake-utils_use_use squish SQUISH)
+ $(cmake-utils_use_build slideshow SLIDESHOW)
+ $(cmake-utils_use_use web-services GLIBJSON)
+ $(cmake-utils_use_use webp WEBP)
+ -DUSE_LUA=OFF
+ -DCUSTOM_CFLAGS=ON
+ -DINSTALL_IOP_EXPERIMENTAL=ON
+ -DINSTALL_IOP_LEGACY=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ for lang in ${LANGS} ; do
+ use linguas_${lang} || rm -r "${ED}"/usr/share/locale/${lang}
+ done
+
+ if use pax_kernel && use opencl ; then
+ pax-mark Cm "${ED}"/usr/bin/${PN} || die
+ eqawarn "USE=pax_kernel is set meaning that ${PN} will be run"
+ eqawarn "under a PaX enabled kernel. To do so, the ${PN} binary"
+ eqawarn "must be modified and this *may* lead to breakage! If"
+ eqawarn "you suspect that ${PN} is broken by this modification,"
+ eqawarn "please open a bug."
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/darktable/metadata.xml b/media-gfx/darktable/metadata.xml
new file mode 100644
index 000000000000..5eef5f7bb134
--- /dev/null
+++ b/media-gfx/darktable/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="colord">Support color management using <pkg>x11-misc/colord</pkg></flag>
+ <flag name="graphicsmagick">Use <pkg>media-gfx/graphicsmagick</pkg> for image importing</flag>
+ <flag name="flickr">Add support for uploading photos to flickr</flag>
+ <flag name="geo">Enable geotagging support</flag>
+ <flag name="libsecret">Enable libsecret support to store login credentials</flag>
+ <flag name="opencl">Enable opencl support</flag>
+ <flag name="pax_kernel">Triggers paxmarking of main darktable binary</flag>
+ <flag name="rawspeed">Enable the rawspeed backend</flag>
+ <flag name="slideshow">Build the opengl slideshow viewer</flag>
+ <flag name="squish">Enable thumbnail compression via libsquish</flag>
+ <flag name="web-services">Add support for uploading photos to facebook and picasa</flag>
+ <flag name="webp">Enable WebP export support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">darktable-org/darktable</remote-id>
+ <remote-id type="sourceforge">darktable</remote-id>
+ </upstream>
+</pkgmetadata>
+
diff --git a/media-gfx/dawn/Manifest b/media-gfx/dawn/Manifest
new file mode 100644
index 000000000000..b31a8da04bf0
--- /dev/null
+++ b/media-gfx/dawn/Manifest
@@ -0,0 +1 @@
+DIST dawn_3_90b.tgz 1334732 SHA256 be9461b490a4acfd87152407adbbe423f3735d9f00a88a9573ecaa9db24ac676
diff --git a/media-gfx/dawn/dawn-3.90b.ebuild b/media-gfx/dawn/dawn-3.90b.ebuild
new file mode 100644
index 000000000000..d8b6c444f18f
--- /dev/null
+++ b/media-gfx/dawn/dawn-3.90b.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils toolchain-funcs versionator
+
+MYP=${PN}_$(replace_version_separator 1 _)
+
+DESCRIPTION="3D geometrical postscript renderer"
+HOMEPAGE="http://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html"
+SRC_URI="http://geant4.kek.jp/~tanaka/src/${MYP}.tgz"
+
+LICENSE="public-domain"
+SLOT="0"
+
+KEYWORDS="amd64 hppa ppc x86"
+IUSE="doc opengl X"
+
+RDEPEND="dev-lang/tk
+ X? ( x11-libs/libX11 )
+ opengl? ( virtual/opengl )"
+DEPEND="${RDEPEND}
+ app-shells/tcsh
+ doc? ( virtual/latex-base )"
+
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-interactive.patch
+ sed -i -e "s/\$(LIB_DIR)/\$(LDFLAGS) &/" \
+ -e '/strip/d' Makefile*in || die
+}
+
+src_compile() {
+ tc-export CXX
+ emake clean
+ emake guiclean
+ if use X; then
+ ./configure_xwin || die
+ else
+ ./configure || die
+ fi
+ einfo "Compiling"
+ emake || die
+}
+
+src_install() {
+ dodir /usr/bin
+ emake DESTDIR="${D}" install || die
+ dodoc README.txt
+ if use doc; then
+ pdflatex DOC/G4PRIM_FORMAT_24.tex || die "pdf generation failed"
+ insinto /usr/share/doc/${PF}
+ doins DOC/G4PRIM_FORMAT_24.pdf
+ dohtml DOC/*.html
+ fi
+}
diff --git a/media-gfx/dawn/files/dawn-3.88a-no-interactive.patch b/media-gfx/dawn/files/dawn-3.88a-no-interactive.patch
new file mode 100644
index 000000000000..2280f35c8496
--- /dev/null
+++ b/media-gfx/dawn/files/dawn-3.88a-no-interactive.patch
@@ -0,0 +1,292 @@
+--- configure_min.orig 2008-04-02 22:58:34.504868912 +0100
++++ configure_min 2008-04-02 23:47:56.967829265 +0100
+@@ -13,22 +13,22 @@
+ #----- C++ compiler name
+ echo "Input C++ compiler name (e.g. g++, no default)."
+ echo -n " :"
+-set cpp_compiler=$<
++set cpp_compiler=
+
+ #----- Optimization option of the C++ compiler
+ echo "Input optimization option (e.g. -O2, no default)"
+ echo -n " :"
+-set optimize=$<
++set optimize=
+
+ #----- Input Tcl/Tk window shell name
+ echo "Input Tcl/Tk window shell name"
+ echo -n " (e.g. wish, no default): "
+-set wish=$<
++set wish=wish
+
+ #----- Input directory name to install dawn and DAWN_GUI
+ echo "Input directory to install executable files"
+ echo -n " (e.g. /usr/local/bin, no default ): "
+-set install_dir=$<
++set install_dir=
+
+
+ ##### DELETE #####
+@@ -57,14 +57,14 @@
+
+ echo "### C++ compiler" >> Makefile
+ #echo "ifndef CXX" >> Makefile
+-echo "CC = $cpp_compiler" >> Makefile
++#echo "CC = $cpp_compiler" >> Makefile
+ #echo "else" >> Makefile
+-#echo 'CC = $(CXX)' >> Makefile
++echo 'CC = $(CXX)' >> Makefile
+ #echo "endif" >> Makefile
+ echo "" >> Makefile
+
+ echo "### Optimization" >> Makefile
+-echo "OPTIMIZE = $optimize" >> Makefile
++echo 'OPTIMIZE = $(CXXFLAGS)' >> Makefile
+ echo "" >> Makefile
+
+ echo "### Waring level" >> Makefile
+@@ -78,7 +78,7 @@
+
+
+ echo "### Directory where to install executable files" >> Makefile
+-echo "INSTALL_DIR = $install_dir" >> Makefile
++echo 'INSTALL_DIR = $(DESTDIR)/usr/bin' >> Makefile
+ echo "" >> Makefile
+
+ echo "" >> Makefile
+--- configure.orig 2008-04-02 22:58:23.660250913 +0100
++++ configure 2008-04-03 00:06:20.081610809 +0100
+@@ -17,19 +17,19 @@
+ #----- C++ compiler name
+ echo "Input C++ compiler name (e.g. g++, no default)."
+ echo -n " : "
+-set cpp_compiler=$<
++set cpp_compiler=
+ echo ""
+
+ #----- Optimization option of the C++ compiler
+ echo "Input optimization option (e.g. -O2, no default)"
+ echo -n " : "
+-set optimize=$<
++set optimize=
+ echo ""
+
+ #----- Input Tcl/Tk window shell name
+ echo "Input Tcl/Tk window shell name"
+ echo -n " (e.g. wish, no default): "
+-set wish=$<
++set wish=wish
+ echo ""
+
+ #-----
+@@ -37,7 +37,7 @@
+ echo " (e.g. -I/usr/X11R6/include) "
+ echo " Hit return key if path is already set properly. )"
+ echo -n " : "
+-set xlib_inc=$<
++set xlib_inc=
+ echo ""
+
+
+@@ -46,7 +46,7 @@
+ echo " (e.g. -L/usr/X11R6/lib) "
+ echo " Hit return key if path is already set properly.)"
+ echo -n " : "
+-set xlib_lib=$<
++set xlib_lib=
+ echo ""
+
+
+@@ -55,7 +55,7 @@
+ echo " (e.g. -I/usr/X11R6/include) "
+ echo " Hit return key if path is already set properly. )"
+ echo -n " : "
+-set openglinc=$<
++set openglinc=
+ echo ""
+
+ #-----
+@@ -63,7 +63,7 @@
+ echo " (e.g. -I/usr/X11R6/include/GL "
+ echo " Hit return key if path is already set properly. )"
+ echo -n " : "
+-set openglinc2=$<
++set openglinc2=
+ echo ""
+
+
+@@ -72,24 +72,24 @@
+ echo " (e.g. -L/usr/X11R6/lib "
+ echo " Hit return key if path is already set properly.)"
+ echo -n " : "
+-set opengllib=$<
++set opengllib=
+ echo ""
+
+ #-----
+ echo -n "Select OpenGL/Mesa or old Masa (0: OpenGL/Mesa , 1: Old Mesa (ver.3.0)): "
+-set opengl_type=$<
++set opengl_type=0
+ echo ""
+
+
+ #----- Input directory name to install dawn and DAWN_GUI
+ echo "Input directory to install executable files"
+ echo -n " (e.g. /usr/local/bin, no default ): "
+-set install_dir=$<
++set install_dir=
+ echo ""
+
+ #----- Input system name
+ echo -n "Select a system (0: Defalut, 1: AIX, 2: IRIX, 3: Solaris, 4: RedHat/FedoraCore): "
+-set sysid=$<
++set sysid=0
+ switch ($sysid)
+ case "0":
+ set sysname = "Default"
+@@ -116,7 +116,7 @@
+ echo "Do you use remote-visualization function? (y/n, no default)"
+ echo " (Select n if your compilation fails for FRClientServer.cc)"
+ echo -n " : "
+-set ynflag_socket=$<
++set ynflag_socket=n
+ switch ($ynflag_socket)
+ case "y":
+ set macro_socket = '#define USE_SOCKET'
+@@ -159,14 +159,14 @@
+
+ echo "### C++ compiler" >> Makefile
+ #echo "ifndef CXX" >> Makefile
+-echo "CC = $cpp_compiler" >> Makefile
++#echo "CC = $cpp_compiler" >> Makefile
+ #echo "else" >> Makefile
+-#echo 'CC = $(CXX)' >> Makefile
++echo 'CC = $(CXX)' >> Makefile
+ #echo "endif" >> Makefile
+ echo "" >> Makefile
+
+ echo "### Optimization" >> Makefile
+-echo "OPTIMIZE = $optimize" >> Makefile
++echo 'OPTIMIZE = $(CXXFLAGS)' >> Makefile
+ echo "" >> Makefile
+
+ echo "### Waring level" >> Makefile
+@@ -224,7 +224,7 @@
+ echo "" >> Makefile
+
+ echo "### Directory where to install executable files" >> Makefile
+-echo "INSTALL_DIR = $install_dir" >> Makefile
++echo 'INSTALL_DIR = $(DESTDIR)/usr/bin' >> Makefile
+ echo "" >> Makefile
+
+ echo "### Socket libraries to be linked " >> Makefile
+@@ -313,6 +313,6 @@
+ echo ""
+ echo 'After compilation, type "make install" for installation.'
+ echo 'Then four executable files "dawn", "DAWN_GUI",'
+-echo '"dawnunixd", and "dawninetd" will be installed to '
++echo '"dawnunixd", and "dawninetd" will be installed'
+ echo "$install_dir."
+ echo ""
+--- configure_xwin.orig 2008-04-02 22:58:44.973465484 +0100
++++ configure_xwin 2008-04-03 00:02:15.950190359 +0100
+@@ -16,17 +16,17 @@
+ #----- C++ compiler name
+ echo "Input C++ compiler name (e.g. g++, no default)."
+ echo -n " :"
+-set cpp_compiler=$<
++set cpp_compiler=
+
+ #----- Optimization option of the C++ compiler
+ echo "Input optimization option (e.g. -O2, no default)"
+ echo -n " :"
+-set optimize=$<
++set optimize=
+
+ #----- Input Tcl/Tk window shell name
+ echo "Input Tcl/Tk window shell name"
+ echo -n " (e.g. wish, no default): "
+-set wish=$<
++set wish=wish
+
+
+ #-----
+@@ -34,7 +34,7 @@
+ echo " (e.g. -I/usr/X11R6/include) "
+ echo " Hit return key if path is already set properly. )"
+ echo -n " : "
+-set xlib_inc=$<
++set xlib_inc=
+ echo ""
+
+
+@@ -43,17 +43,17 @@
+ echo " (e.g. -L/usr/X11R6/lib) "
+ echo " Hit return key if path is already set properly.)"
+ echo -n " : "
+-set xlib_lib=$<
++set xlib_lib=
+ echo ""
+
+ #----- Input directory name to install dawn and DAWN_GUI
+ echo "Input directory to install executable files"
+ echo -n " (e.g. /usr/local/bin, no default ): "
+-set install_dir=$<
++set install_dir=
+
+ #----- Input system name
+ echo -n "Select a system (0: Defalut, 1: AIX, 2: IRIX, 3: Solaris, 4: RedHat/FedoraCore): "
+-set sysid=$<
++set sysid=0
+ switch ($sysid)
+ case "0":
+ set sysname = "Default"
+@@ -80,7 +80,7 @@
+ echo "Do you use remote-visualization function? (y/n, no default)"
+ echo " (Select n if your compilation fails for FRClientServer.cc)"
+ echo -n " : "
+-set ynflag_socket=$<
++set ynflag_socket=n
+ switch ($ynflag_socket)
+ case "y":
+ set macro_socket = '#define USE_SOCKET'
+@@ -123,14 +123,14 @@
+
+ echo "### C++ compiler" >> Makefile
+ #echo "ifndef CXX" >> Makefile
+-echo "CC = $cpp_compiler" >> Makefile
++#echo "CC = $cpp_compiler" >> Makefile
+ #echo "else" >> Makefile
+-#echo 'CC = $(CXX)' >> Makefile
++echo 'CC = $(CXX)' >> Makefile
+ #echo "endif" >> Makefile
+ echo "" >> Makefile
+
+ echo "### Optimization" >> Makefile
+-echo "OPTIMIZE = $optimize" >> Makefile
++echo 'OPTIMIZE = $(CXXFLAGS)' >> Makefile
+ echo "" >> Makefile
+
+ echo "### Waring level" >> Makefile
+@@ -152,7 +152,7 @@
+ echo "" >> Makefile
+
+ echo "### Directory where to install executable files" >> Makefile
+-echo "INSTALL_DIR = $install_dir" >> Makefile
++echo 'INSTALL_DIR = $(DESTDIR)/usr/bin' >> Makefile
+ echo "" >> Makefile
+
+ echo "### Socket libraries to be linked " >> Makefile
+--- FRSocketMacro.h.orig 2008-04-02 23:58:51.126518123 +0100
++++ FRSocketMacro.h 2008-04-02 23:59:03.443220012 +0100
+@@ -14,8 +14,8 @@
+ #elif defined SOCKET_REDHAT61
+ #define CLIENT_ADDR_LENGTH socklen_t
+ #else
+- #define CLIENT_ADDR_LENGTH int
+-// #define CLIENT_ADDR_LENGTH size_t
++// #define CLIENT_ADDR_LENGTH int
++ #define CLIENT_ADDR_LENGTH size_t
+ #endif
+
+ //----- gethostname
diff --git a/media-gfx/dawn/files/dawn-3.90b-no-interactive.patch b/media-gfx/dawn/files/dawn-3.90b-no-interactive.patch
new file mode 100644
index 000000000000..244948ec5262
--- /dev/null
+++ b/media-gfx/dawn/files/dawn-3.90b-no-interactive.patch
@@ -0,0 +1,158 @@
+--- configure_xwin.orig 2008-04-02 22:58:44.973465484 +0100
++++ configure_xwin 2008-04-03 00:02:15.950190359 +0100
+@@ -16,17 +16,17 @@
+ #----- C++ compiler name
+ echo "Input C++ compiler name (e.g. g++, no default)."
+ echo -n " :"
+-set cpp_compiler=$<
++set cpp_compiler=
+
+ #----- Optimization option of the C++ compiler
+ echo "Input optimization option (e.g. -O2, no default)"
+ echo -n " :"
+-set optimize=$<
++set optimize=
+
+ #----- Input Tcl/Tk window shell name
+ echo "Input Tcl/Tk window shell name"
+ echo -n " (e.g. wish, no default): "
+-set wish=$<
++set wish=wish
+
+
+ #-----
+@@ -34,7 +34,7 @@
+ echo " (e.g. -I/usr/X11R6/include) "
+ echo " Hit return key if path is already set properly. )"
+ echo -n " : "
+-set xlib_inc=$<
++set xlib_inc=
+ echo ""
+
+
+@@ -43,17 +43,17 @@
+ echo " (e.g. -L/usr/X11R6/lib) "
+ echo " Hit return key if path is already set properly.)"
+ echo -n " : "
+-set xlib_lib=$<
++set xlib_lib=
+ echo ""
+
+ #----- Input directory name to install dawn and DAWN_GUI
+ echo "Input directory to install executable files"
+ echo -n " (e.g. /usr/local/bin, no default ): "
+-set install_dir=$<
++set install_dir=
+
+ #----- Input system name
+ echo -n "Select a system (0: Defalut, 1: AIX, 2: IRIX, 3: Solaris, 4: RedHat/FedoraCore): "
+-set sysid=$<
++set sysid=0
+ switch ($sysid)
+ case "0":
+ set sysname = "Default"
+@@ -80,7 +80,7 @@
+ echo "Do you use remote-visualization function? (y/n, no default)"
+ echo " (Select n if your compilation fails for FRClientServer.cc)"
+ echo -n " : "
+-set ynflag_socket=$<
++set ynflag_socket=n
+ switch ($ynflag_socket)
+ case "y":
+ set macro_socket = '#define USE_SOCKET'
+@@ -123,14 +123,14 @@
+
+ echo "### C++ compiler" >> Makefile
+ #echo "ifndef CXX" >> Makefile
+-echo "CC = $cpp_compiler" >> Makefile
++#echo "CC = $cpp_compiler" >> Makefile
+ #echo "else" >> Makefile
+-#echo 'CC = $(CXX)' >> Makefile
++echo 'CC = $(CXX)' >> Makefile
+ #echo "endif" >> Makefile
+ echo "" >> Makefile
+
+ echo "### Optimization" >> Makefile
+-echo "OPTIMIZE = $optimize" >> Makefile
++echo 'OPTIMIZE = $(CXXFLAGS)' >> Makefile
+ echo "" >> Makefile
+
+ echo "### Waring level" >> Makefile
+@@ -152,7 +152,7 @@
+ echo "" >> Makefile
+
+ echo "### Directory where to install executable files" >> Makefile
+-echo "INSTALL_DIR = $install_dir" >> Makefile
++echo 'INSTALL_DIR = $(DESTDIR)/usr/bin' >> Makefile
+ echo "" >> Makefile
+
+ echo "### Socket libraries to be linked " >> Makefile
+--- FRSocketMacro.h.orig 2008-04-02 23:58:51.126518123 +0100
++++ FRSocketMacro.h 2008-04-02 23:59:03.443220012 +0100
+@@ -14,8 +14,8 @@
+ #elif defined SOCKET_REDHAT61
+ #define CLIENT_ADDR_LENGTH socklen_t
+ #else
+- #define CLIENT_ADDR_LENGTH int
+-// #define CLIENT_ADDR_LENGTH size_t
++// #define CLIENT_ADDR_LENGTH int
++ #define CLIENT_ADDR_LENGTH size_t
+ #endif
+
+ //----- gethostname
+--- configure.orig 2010-08-21 14:22:18.000000000 +0100
++++ configure 2010-09-23 05:57:02.000000000 +0100
+@@ -13,22 +13,22 @@
+ #----- C++ compiler name
+ echo "Input C++ compiler name (e.g. g++, no default)."
+ echo -n " :"
+-set cpp_compiler=$<
++set cpp_compiler=
+
+ #----- Optimization option of the C++ compiler
+ echo "Input optimization option (e.g. -O2, no default)"
+ echo -n " :"
+-set optimize=$<
++set optimize=
+
+ #----- Input Tcl/Tk window shell name
+ echo "Input Tcl/Tk window shell name"
+ echo -n " (e.g. wish, no default): "
+-set wish=$<
++set wish=wish
+
+ #----- Input directory name to install dawn and DAWN_GUI
+ echo "Input directory to install executable files"
+ echo -n " (e.g. /usr/local/bin, no default ): "
+-set install_dir=$<
++set install_dir=
+
+
+ ##### DELETE #####
+@@ -57,14 +57,14 @@
+
+ echo "### C++ compiler" >> Makefile
+ #echo "ifndef CXX" >> Makefile
+-echo "CC = $cpp_compiler" >> Makefile
++#echo "CC = $cpp_compiler" >> Makefile
+ #echo "else" >> Makefile
+-#echo 'CC = $(CXX)' >> Makefile
++echo 'CC = $(CXX)' >> Makefile
+ #echo "endif" >> Makefile
+ echo "" >> Makefile
+
+ echo "### Optimization" >> Makefile
+-echo "OPTIMIZE = $optimize" >> Makefile
++echo 'OPTIMIZE = $(CXXFLAGS)' >> Makefile
+ echo "" >> Makefile
+
+ echo "### Waring level" >> Makefile
+@@ -78,7 +78,7 @@
+
+
+ echo "### Directory where to install executable files" >> Makefile
+-echo "INSTALL_DIR = $install_dir" >> Makefile
++echo 'INSTALL_DIR = $(DESTDIR)/usr/bin' >> Makefile
+ echo "" >> Makefile
+
+ echo "" >> Makefile
diff --git a/media-gfx/dawn/metadata.xml b/media-gfx/dawn/metadata.xml
new file mode 100644
index 000000000000..7e312f55fd62
--- /dev/null
+++ b/media-gfx/dawn/metadata.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-physics</herd>
+<longdescription lang="en">
+ Fukui Renderer DAWN (Drawer for Academic WritiNgs)
+ is a renderer, which reads 3D geometrical data and visualize them.
+ It is a vectorized 3D PostScript processor with analytical
+ hidden line/surface removal.
+ It aims at precise technical drawing of complicated objects.
+ It performs geometrical hidden line/surface removal and calculates
+ out all visible parts of the 3D data before drawing. This drawing
+ algorithm realizes device-independent technical high quality of
+ vectorized graphics.
+ 3D Data files should be generated by a modeler or by hands
+ separately. If you use DAWN as a visualizer of,
+ say, a simulator of physical experiments,
+ the simulator application itself is recognized as a modeler.
+ An important feature of DAWN is that it has been developed to
+ visualize 3D data generated by a high-energy experimental detector
+ simulator "GEANT4".
+</longdescription>
+</pkgmetadata>
diff --git a/media-gfx/dcraw/Manifest b/media-gfx/dcraw/Manifest
new file mode 100644
index 000000000000..23c9d475f606
--- /dev/null
+++ b/media-gfx/dcraw/Manifest
@@ -0,0 +1,5 @@
+DIST dcraw-9.24.4.tar.gz 183925 SHA256 678b310934ba40cbc6b82b21e6e44cf7f12e0e0e788e439a548ba077712509b3 SHA512 af2534442823a9f920a3eeb48af55bd70d39688be738df733118bf565d5f4faf2067e2489ca78a530026f19c01590c386cff46b8908490d4b3b1383dc4049f70 WHIRLPOOL d768eb247d46d6c4180d4e0913bad921c534075dbc0a056d4b66bbacf6c8b6fa7e515c47cdc82c8bc39b99934a9328296a0d48299b09a94cd6c018371584b1e2
+DIST dcraw-9.25.0.tar.gz 189790 SHA256 90e3b39912bd1f0888ac6ae0e830159f1e0a19747a407867d4f4d4992435b386 SHA512 5e1ff28425a564abc2bde2bb58722420e5140297e31551b9b15deeb5db87992e9492c8b8b0ed6055f03e83f0cea1aeb54951a5cb9ef7add5fcf9ea57732368f2 WHIRLPOOL ac8b1a7f4c8d9857e44666fede7425758e8b03f4b34a8a8895427c759e36cb31e564c9ab4db24a8e761c7744105f35a1aad8e1716fa654acb50b0f5a5755f574
+DIST dcraw-9.26.0.tar.gz 190647 SHA256 85791d529e037ad5ca09770900ae975e2e4cc1587ca1da4192ca072cbbfafba3 SHA512 ae6e3e9093155d494d9553e2016edf0b568aad948cd01edbb72baec86e6e256c08ec99d7d8a071f2bb50ecd36d6e2d27fc035ac9b0850499ddf7974d0ad7f0f3 WHIRLPOOL 58aad287c07b9f37d8b44b51441fa0337ddd4a505642eafc69a8cf7bef0973bbffec72f632699b2aabb25832f64941e4169ef79739552a943a3b799b71c7f796
+DIST parse-1.73.tar.bz2 8186 SHA256 51f75837b7fa7f6389f43c875ad8320c41a44c4213922dc767e16dc424462c3c SHA512 06ffaf72695dc86bfc2bdd10d4f732bc428b72d427f4c10e93fc58536513477cf297adb56fb9cfc5ba5fd5b6b4cd197c33d8dac957a0a1bbe65b23393b64278c WHIRLPOOL 1abc642a60f3f5b54efa29722ff7674457b88811ef25e557b7823ff05f6ee55989e35c0b9dad04d74c769bcca1cb45f580985de92bb4e40cd63b6d0a35b3a0e2
+DIST rawphoto-1.32.tar.bz2 3841 SHA256 3348a83a44fa941924a4e743f88d993b71d28ba995f80e6765d6c19b6eeaea4c SHA512 6ee5b6c4e4266c8e04221c894c4e737f8a6d2c6f0cc9c82db73064afd68488bd60de19b86b2d7b82780283bbb9f8156ef3149c1c730f09a00dce632744b44d56 WHIRLPOOL af840eae74d74f83b7874a769e30ff0e613a5f1dba4d20fa315f6d9685fabffbe804ad878174f3ee274a6083105f1baa317f52b346afb493c34cea0e5c09c566
diff --git a/media-gfx/dcraw/dcraw-9.24.4.ebuild b/media-gfx/dcraw/dcraw-9.24.4.ebuild
new file mode 100644
index 000000000000..a37fcab61384
--- /dev/null
+++ b/media-gfx/dcraw/dcraw-9.24.4.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils readme.gentoo toolchain-funcs
+
+DESCRIPTION="Converts the native (RAW) format of various digital cameras into netpbm portable pixmap (.ppm) image"
+HOMEPAGE="http://www.cybercom.net/~dcoffin/dcraw/"
+SRC_URI="http://www.cybercom.net/~dcoffin/dcraw/archive/${P}.tar.gz
+ mirror://gentoo/parse-1.73.tar.bz2
+ gimp? ( mirror://gentoo/rawphoto-1.32.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-solaris"
+LANGS=" ca cs de da eo es fr hu it nl pl pt ru sv zh_CN zh_TW"
+IUSE="nls gimp jpeg jpeg2k lcms ${LANGS// / linguas_}"
+
+COMMON_DEPEND="
+ jpeg? ( virtual/jpeg )
+ lcms? ( media-libs/lcms:2 )
+ jpeg2k? ( media-libs/jasper )
+ gimp? ( media-gfx/gimp )
+"
+DEPEND="${COMMON_DEPEND}
+ nls? ( sys-devel/gettext )
+ gimp? ( virtual/pkgconfig )
+"
+RDEPEND="${COMMON_DEPEND}
+ media-libs/netpbm
+"
+
+S=${WORKDIR}/dcraw
+
+DOC_CONTENTS="
+ See conversion-examples.txt.gz on how to convert
+ the PPM files produced by dcraw to other image formats.\n
+
+ \nThe functionality of the external program 'fujiturn' was
+ incorporated into dcraw and is automatically used now.\n
+
+ \nThere's an example wrapper script included called 'dcwrap'.
+ This package also includes 'dcparse', which extracts
+ thumbnail images (preferably JPEGs) from any raw digital
+ camera formats that have them, and shows table contents.
+"
+
+run_build() {
+ einfo "${@}"
+ ${@} || die
+}
+
+src_prepare() {
+ rename dcraw_ dcraw. dcraw_*.1 || die "Failed to rename"
+}
+
+src_compile() {
+ local ECFLAGS="-O2" # Without optimisation build fails
+ local ELIBS="-lm"
+
+ use lcms && ELIBS="-llcms2 ${ELIBS}" || ECFLAGS+=" -DNO_LCMS=yes"
+ use jpeg && ELIBS="-ljpeg ${ELIBS}" || ECFLAGS+=" -DNO_JPEG=yes"
+ use jpeg2k && ELIBS="-ljasper ${ELIBS}" || ECFLAGS+=" -DNO_JASPER=yes"
+ use nls && ECFLAGS+=" -DLOCALEDIR=\"/usr/share/locale/\""
+
+ run_build $(tc-getCC) ${ECFLAGS} ${CFLAGS} ${LDFLAGS} -o dcraw dcraw.c ${ELIBS}
+
+ run_build $(tc-getCC) -O2 ${CFLAGS} ${LDFLAGS} -o dcparse parse.c
+
+ # rawphoto gimp plugin
+ if use gimp; then
+ run_build $(tc-getCC) ${CFLAGS} ${LDFLAGS} \
+ $(pkg-config --cflags gimpui-2.0) rawphoto.c -o rawphoto \
+ $(pkg-config --libs gimpui-2.0)
+ fi
+
+ if use nls; then
+ for lang in ${LANGS}; do
+ use linguas_${lang} && run_build msgfmt -c -o dcraw_${lang}.mo dcraw_${lang}.po
+ done
+ fi
+}
+
+src_install() {
+ dobin dcraw dcparse
+ dodoc "${FILESDIR}"/{conversion-examples.txt,dcwrap}
+
+ # rawphoto gimp plugin
+ if use gimp; then
+ insinto "$(pkg-config --variable=gimplibdir gimp-2.0)/plug-ins"
+ insopts -m0755
+ doins rawphoto
+ fi
+
+ doman dcraw.1
+
+ if use nls; then
+ for lang in ${LANGS}; do
+ if use linguas_${lang}; then
+ [[ -f dcraw.${lang}.1 ]] && doman dcraw.${lang}.1
+ insinto /usr/share/locale/${lang}/LC_MESSAGES
+ newins dcraw_${lang}.mo dcraw.mo || die "failed to install dcraw_${lang}.mo"
+ fi
+ done
+ fi
+
+ readme.gentoo_create_doc
+}
diff --git a/media-gfx/dcraw/dcraw-9.25.0.ebuild b/media-gfx/dcraw/dcraw-9.25.0.ebuild
new file mode 100644
index 000000000000..e1e6dc079b1b
--- /dev/null
+++ b/media-gfx/dcraw/dcraw-9.25.0.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils readme.gentoo toolchain-funcs
+
+DESCRIPTION="Converts the native (RAW) format of various digital cameras into netpbm portable pixmap (.ppm) image"
+HOMEPAGE="http://www.cybercom.net/~dcoffin/dcraw/"
+SRC_URI="http://www.cybercom.net/~dcoffin/dcraw/archive/${P}.tar.gz
+ mirror://gentoo/parse-1.73.tar.bz2
+ gimp? ( mirror://gentoo/rawphoto-1.32.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
+LANGS=" ca cs de da eo es fr hu it nl pl pt ru sv zh_CN zh_TW"
+IUSE="nls gimp jpeg jpeg2k lcms ${LANGS// / linguas_}"
+
+COMMON_DEPEND="
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( media-libs/lcms:2 )
+ jpeg2k? ( media-libs/jasper )
+ gimp? ( media-gfx/gimp )
+"
+DEPEND="${COMMON_DEPEND}
+ nls? ( sys-devel/gettext )
+ gimp? ( virtual/pkgconfig )
+"
+RDEPEND="${COMMON_DEPEND}
+ media-libs/netpbm
+"
+
+S=${WORKDIR}/dcraw
+
+DOC_CONTENTS="
+ See conversion-examples.txt.gz on how to convert
+ the PPM files produced by dcraw to other image formats.\n
+
+ \nThe functionality of the external program 'fujiturn' was
+ incorporated into dcraw and is automatically used now.\n
+
+ \nThere's an example wrapper script included called 'dcwrap'.
+ This package also includes 'dcparse', which extracts
+ thumbnail images (preferably JPEGs) from any raw digital
+ camera formats that have them, and shows table contents.
+"
+
+run_build() {
+ einfo "${@}"
+ ${@} || die
+}
+
+src_prepare() {
+ rename dcraw_ dcraw. dcraw_*.1 || die "Failed to rename"
+}
+
+src_compile() {
+ local ECFLAGS="-O2" # Without optimisation build fails
+ local ELIBS="-lm"
+
+ use lcms && ELIBS="-llcms2 ${ELIBS}" || ECFLAGS+=" -DNO_LCMS=yes"
+ use jpeg && ELIBS="-ljpeg ${ELIBS}" || ECFLAGS+=" -DNO_JPEG=yes"
+ use jpeg2k && ELIBS="-ljasper ${ELIBS}" || ECFLAGS+=" -DNO_JASPER=yes"
+ use nls && ECFLAGS+=" -DLOCALEDIR=\"/usr/share/locale/\""
+
+ run_build $(tc-getCC) ${ECFLAGS} ${CFLAGS} ${LDFLAGS} -o dcraw dcraw.c ${ELIBS}
+
+ run_build $(tc-getCC) -O2 ${CFLAGS} ${LDFLAGS} -o dcparse parse.c
+
+ # rawphoto gimp plugin
+ if use gimp; then
+ run_build $(tc-getCC) ${CFLAGS} ${LDFLAGS} \
+ $(pkg-config --cflags gimpui-2.0) rawphoto.c -o rawphoto \
+ $(pkg-config --libs gimpui-2.0)
+ fi
+
+ if use nls; then
+ for lang in ${LANGS}; do
+ use linguas_${lang} && run_build msgfmt -c -o dcraw_${lang}.mo dcraw_${lang}.po
+ done
+ fi
+}
+
+src_install() {
+ dobin dcraw dcparse
+ dodoc "${FILESDIR}"/{conversion-examples.txt,dcwrap}
+
+ # rawphoto gimp plugin
+ if use gimp; then
+ insinto "$(pkg-config --variable=gimplibdir gimp-2.0)/plug-ins"
+ insopts -m0755
+ doins rawphoto
+ fi
+
+ doman dcraw.1
+
+ if use nls; then
+ for lang in ${LANGS}; do
+ if use linguas_${lang}; then
+ [[ -f dcraw.${lang}.1 ]] && doman dcraw.${lang}.1
+ insinto /usr/share/locale/${lang}/LC_MESSAGES
+ newins dcraw_${lang}.mo dcraw.mo || die "failed to install dcraw_${lang}.mo"
+ fi
+ done
+ fi
+
+ readme.gentoo_create_doc
+}
diff --git a/media-gfx/dcraw/dcraw-9.26.0.ebuild b/media-gfx/dcraw/dcraw-9.26.0.ebuild
new file mode 100644
index 000000000000..e1e6dc079b1b
--- /dev/null
+++ b/media-gfx/dcraw/dcraw-9.26.0.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils readme.gentoo toolchain-funcs
+
+DESCRIPTION="Converts the native (RAW) format of various digital cameras into netpbm portable pixmap (.ppm) image"
+HOMEPAGE="http://www.cybercom.net/~dcoffin/dcraw/"
+SRC_URI="http://www.cybercom.net/~dcoffin/dcraw/archive/${P}.tar.gz
+ mirror://gentoo/parse-1.73.tar.bz2
+ gimp? ( mirror://gentoo/rawphoto-1.32.tar.bz2 )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
+LANGS=" ca cs de da eo es fr hu it nl pl pt ru sv zh_CN zh_TW"
+IUSE="nls gimp jpeg jpeg2k lcms ${LANGS// / linguas_}"
+
+COMMON_DEPEND="
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( media-libs/lcms:2 )
+ jpeg2k? ( media-libs/jasper )
+ gimp? ( media-gfx/gimp )
+"
+DEPEND="${COMMON_DEPEND}
+ nls? ( sys-devel/gettext )
+ gimp? ( virtual/pkgconfig )
+"
+RDEPEND="${COMMON_DEPEND}
+ media-libs/netpbm
+"
+
+S=${WORKDIR}/dcraw
+
+DOC_CONTENTS="
+ See conversion-examples.txt.gz on how to convert
+ the PPM files produced by dcraw to other image formats.\n
+
+ \nThe functionality of the external program 'fujiturn' was
+ incorporated into dcraw and is automatically used now.\n
+
+ \nThere's an example wrapper script included called 'dcwrap'.
+ This package also includes 'dcparse', which extracts
+ thumbnail images (preferably JPEGs) from any raw digital
+ camera formats that have them, and shows table contents.
+"
+
+run_build() {
+ einfo "${@}"
+ ${@} || die
+}
+
+src_prepare() {
+ rename dcraw_ dcraw. dcraw_*.1 || die "Failed to rename"
+}
+
+src_compile() {
+ local ECFLAGS="-O2" # Without optimisation build fails
+ local ELIBS="-lm"
+
+ use lcms && ELIBS="-llcms2 ${ELIBS}" || ECFLAGS+=" -DNO_LCMS=yes"
+ use jpeg && ELIBS="-ljpeg ${ELIBS}" || ECFLAGS+=" -DNO_JPEG=yes"
+ use jpeg2k && ELIBS="-ljasper ${ELIBS}" || ECFLAGS+=" -DNO_JASPER=yes"
+ use nls && ECFLAGS+=" -DLOCALEDIR=\"/usr/share/locale/\""
+
+ run_build $(tc-getCC) ${ECFLAGS} ${CFLAGS} ${LDFLAGS} -o dcraw dcraw.c ${ELIBS}
+
+ run_build $(tc-getCC) -O2 ${CFLAGS} ${LDFLAGS} -o dcparse parse.c
+
+ # rawphoto gimp plugin
+ if use gimp; then
+ run_build $(tc-getCC) ${CFLAGS} ${LDFLAGS} \
+ $(pkg-config --cflags gimpui-2.0) rawphoto.c -o rawphoto \
+ $(pkg-config --libs gimpui-2.0)
+ fi
+
+ if use nls; then
+ for lang in ${LANGS}; do
+ use linguas_${lang} && run_build msgfmt -c -o dcraw_${lang}.mo dcraw_${lang}.po
+ done
+ fi
+}
+
+src_install() {
+ dobin dcraw dcparse
+ dodoc "${FILESDIR}"/{conversion-examples.txt,dcwrap}
+
+ # rawphoto gimp plugin
+ if use gimp; then
+ insinto "$(pkg-config --variable=gimplibdir gimp-2.0)/plug-ins"
+ insopts -m0755
+ doins rawphoto
+ fi
+
+ doman dcraw.1
+
+ if use nls; then
+ for lang in ${LANGS}; do
+ if use linguas_${lang}; then
+ [[ -f dcraw.${lang}.1 ]] && doman dcraw.${lang}.1
+ insinto /usr/share/locale/${lang}/LC_MESSAGES
+ newins dcraw_${lang}.mo dcraw.mo || die "failed to install dcraw_${lang}.mo"
+ fi
+ done
+ fi
+
+ readme.gentoo_create_doc
+}
diff --git a/media-gfx/dcraw/files/conversion-examples.txt b/media-gfx/dcraw/files/conversion-examples.txt
new file mode 100644
index 000000000000..8f179e2ed1e6
--- /dev/null
+++ b/media-gfx/dcraw/files/conversion-examples.txt
@@ -0,0 +1,18 @@
+Conversion examples
+===================
+
+CCD-RAW -> TIFF, using 'pnmtotiff' from the 'media-libs/netpbm' package:
+
+ $ dcraw -c crw_0001.crw | pnmtotiff -truecolor > crw_0001.tiff
+
+CCD-RAW -> PNG, using 'pnmtopng' from the 'media-libs/netpbm' package:
+
+ $ dcraw -c crw_0001.crw | pnmtopng > crw_0001.png
+
+CCD-RAW -> BMP, using 'ppmtobmp' from the 'media-libs/netpbm' package:
+
+ $ dcraw -c crw_0001.crw | ppmtobmp > crw_0001.bmp
+
+CCD-RAW -> JPEG, using 'cjpeg' from the 'media-libs/jpeg' package:
+
+ $ dcraw -c crw_0001.crw | cjpeg > crw_0001.jpeg
diff --git a/media-gfx/dcraw/files/dcwrap b/media-gfx/dcraw/files/dcwrap
new file mode 100644
index 000000000000..4d81e011c67d
--- /dev/null
+++ b/media-gfx/dcraw/files/dcwrap
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Rough equivalents to XV's Sharpen algorithm
+
+cat > sharpen50.pgm << xx
+P2 3 3 18
+8 8 8 8 26 8 8 8 8
+xx
+cat > sharpen66.pgm << xx
+P2 3 3 18
+7 7 7 7 34 7 7 7 7
+xx
+cat > sharpen75.pgm << xx
+P2 3 3 6
+2 2 2 2 14 2 2 2 2
+xx
+cat > sharpen90.pgm << xx
+P2 3 3 2
+0 0 0 0 10 0 0 0 0
+xx
+
+for x in `ls *.crw | cut -d. -f1`
+do
+ dcraw -f -c $x.crw | pnmconvol sharpen66.pgm \
+ | cjpeg -quality 90 > $x.jpeg
+ touch -r $x.crw $x.jpeg
+done
diff --git a/media-gfx/dcraw/metadata.xml b/media-gfx/dcraw/metadata.xml
new file mode 100644
index 000000000000..6e97918e06d0
--- /dev/null
+++ b/media-gfx/dcraw/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription>
+ This utility converts the native (RAW), format of various digital cameras into
+ netpbm portable pixmap (.ppm) image. Supports the following models: Canon,
+ Kodak, Olympus, Nikon, Fuji, Minolta and Sigma (see
+ http://www.cybercom.net/~dcoffin/dcraw/ for full list) Note: This utility does
+ not read directly from the cameras, only the files after they have been
+ downloaded, use gphoto2 for that.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/digikam/Manifest b/media-gfx/digikam/Manifest
new file mode 100644
index 000000000000..d9b60e0ce7c5
--- /dev/null
+++ b/media-gfx/digikam/Manifest
@@ -0,0 +1,4 @@
+DIST digikam-4.10.0.tar.bz2 69413654 SHA256 4207e68b6221307111b66bb69485d3e88150df95dae014a99f6f161a3da0c725 SHA512 a2f1d5f44719409ee45158106cc44541e7226e3c948b722045e104bc398f96233481d60e11dd198e96bfe3028201dac335be403ec74af1ef07e3137c3e9221a4 WHIRLPOOL 5d7997787c549318e5d7d677edc68ee2ebaa95c789b7d5f05e3ea5dea48d56afc23aa7bf3afa33f44353f4189644df7573683580486c0d248352ffb534215f37
+DIST digikam-4.12.0.tar.bz2 69527960 SHA256 15043afb04733e059460165bc3cdf58dc42a67d7a349fbe12c2ebbe1946e3420 SHA512 a5ebe481ef9803475cd2d4d198b0d093753ecb71367662f0e83a151ab34a2ff071139b28c1d9600279463fed96745b025db86d24b059b0794bc4a2b50338df85 WHIRLPOOL cf29c3555ce41a298c9760287996d8edee76ff8a6ec42b503f55059e40b35f91cf56afb054f641e800f6e630d851491c2f77e0bd67020feefe8d6adf36a643f5
+DIST digikam-4.4.0.tar.bz2 68871203 SHA256 5c68a2d200f5b502706128ea64839319aad333fb79548f49ecc92594e280d4e9 SHA512 4992fad1e574fc44eac53f3ac8d4ab78ccbf8e04beb54a211a9afc20af1efb6f8bacedea07e403f490e7f70a74ed5ac02d4f9b939dfaf25f64a4a9bda0a7d94a WHIRLPOOL 7a05ab9926227232a1cf52bf68da45b849b982e840b171f702610acce85a1ce8e59967a02e845a0ef19c316daee835861573aca40dc7b28422cf7d6d56119e2c
+DIST digikam-4.7.0-1.tar.bz2 70151058 SHA256 230a5841754107d273c953ad4aeef2b57265c4623decc74a454c437175468002 SHA512 a9e162c83d83b2183a4e8f254b971993b884677e24676b3dd58dcf8e90ca87f1046c099ea33083ee0f58eedd13aee69a242fbc3d1eab70e285956393637f3dd4 WHIRLPOOL e454bd9c95b3aa9a4c9007065c8ee3e1da595b389fc868a6a21cacba761d8101d4be507c299fd7651d8ab0c0ddff5fb4038bf49f73213a8ec2b69bcdce02808b
diff --git a/media-gfx/digikam/digikam-4.10.0.ebuild b/media-gfx/digikam/digikam-4.10.0.ebuild
new file mode 100644
index 000000000000..ea51c0e9884d
--- /dev/null
+++ b/media-gfx/digikam/digikam-4.10.0.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="af ar az be bg bn br bs ca cs csb cy da de el en_GB eo es et eu fa fi fo fr fy ga gl ha he hi hr hsb
+hu id is it ja ka kk km ko ku lb lo lt lv mi mk mn ms mt nb nds ne nl nn nso oc pa pl pt pt_BR ro ru
+rw se sk sl sq sr sr@Latn ss sv ta te tg th tr tt uk uz uz@cyrillic ven vi wa xh zh_CN zh_HK zh_TW zu"
+
+KDE_HANDBOOK="optional"
+KDE_MINIMAL="4.10"
+
+KDE_DOC_DIRS="doc-digikam doc-showfoto"
+
+inherit kde4-base
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Digital photo management application for KDE"
+HOMEPAGE="http://www.digikam.org/"
+SRC_URI="mirror://kde/stable/${PN}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2
+ handbook? ( FDL-1.2 )"
+KEYWORDS="~amd64 ~x86"
+SLOT="4"
+IUSE="addressbook debug doc gphoto2 mysql semantic-desktop +thumbnails video"
+
+CDEPEND="
+ kde-apps/kdebase-kioslaves:4
+ kde-apps/libkdcraw:4=
+ kde-apps/libkexiv2:4=
+ kde-apps/libkipi:4
+ kde-apps/marble:4=[plasma]
+ kde-apps/kcmshell:4
+ dev-qt/qtgui:4
+ media-libs/jasper
+ media-libs/lcms:2
+ >=media-libs/lensfun-0.2.6
+ || ( >=kde-apps/libkface-14.12.0:4 >=media-libs/libkface-4.6.0 )
+ >=media-libs/libkgeomap-4.6.0:=
+ media-libs/liblqr
+ >=media-libs/libpgf-6.12.27
+ media-libs/libpng:0=
+ >=media-libs/opencv-2.4.9
+ media-libs/phonon[qt4]
+ >=media-libs/tiff-3.8.2:0
+ virtual/jpeg:0
+ x11-libs/libX11
+ || ( dev-qt/qtsql:4[mysql] dev-qt/qtsql:4[sqlite] )
+ addressbook? ( $(add_kdebase_dep kdepimlibs) )
+ gphoto2? ( media-libs/libgphoto2:= )
+ mysql? ( virtual/mysql )
+ semantic-desktop? (
+ $(add_kdebase_dep baloo '' 4.12.0)
+ )
+"
+RDEPEND="${CDEPEND}
+ kde-apps/kreadconfig:4
+ media-plugins/kipi-plugins
+ video? (
+ || (
+ kde-apps/ffmpegthumbs:4
+ kde-apps/mplayerthumbs:4
+ $(add_kdeapps_dep mplayerthumbs)
+ $(add_kdeapps_dep ffmpegthumbs)
+ )
+ )
+"
+DEPEND="${CDEPEND}
+ dev-cpp/eigen:3
+ dev-libs/boost
+ sys-devel/gettext
+ doc? ( app-doc/doxygen )
+"
+
+S="${WORKDIR}/${MY_P}/core"
+
+RESTRICT=test
+# bug 366505
+
+src_prepare() {
+ # just to make absolutely sure
+ rm -rf "${WORKDIR}/${MY_P}/extra" || die
+
+ # prepare the handbook
+ mkdir doc-digikam doc-showfoto || die
+ echo "add_subdirectory( en )" > doc-digikam/CMakeLists.txt || die
+ mv "${WORKDIR}/${MY_P}/doc/${PN}/digikam" doc-digikam/en || die
+ echo "add_subdirectory( en )" > doc-showfoto/CMakeLists.txt || die
+ mv "${WORKDIR}/${MY_P}/doc/${PN}/showfoto" doc-showfoto/en || die
+ sed -i -e 's:../digikam/:../../doc-digikam/en/:g' doc-showfoto/en/index.docbook || die
+
+ # prepare the translations
+ mv "${WORKDIR}/${MY_P}/po" po || die
+ find po -name "*.po" -and -not -name "digikam.po" -exec rm {} +
+
+ echo "find_package(Msgfmt REQUIRED)" >> CMakeLists.txt || die
+ echo "find_package(Gettext REQUIRED)" >> CMakeLists.txt || die
+ echo "add_subdirectory( po )" >> CMakeLists.txt || die
+
+ kde4-base_src_prepare
+
+ if use handbook; then
+ echo "add_subdirectory( doc-digikam )" >> CMakeLists.txt
+ echo "add_subdirectory( doc-showfoto )" >> CMakeLists.txt
+ fi
+}
+
+src_configure() {
+ # LQR = only allows to choose between bundled/external
+ local mycmakeargs=(
+ -DENABLE_LCMS2=ON
+ -DWITH_LQR=ON
+ -DWITH_LENSFUN=ON
+ $(cmake-utils_use_enable addressbook KDEPIMLIBSSUPPORT)
+ -DWITH_MarbleWidget=ON
+ $(cmake-utils_use_enable gphoto2 GPHOTO2)
+ $(cmake-utils_use_with gphoto2)
+ $(cmake-utils_use_enable thumbnails THUMBS_DB)
+ $(cmake-utils_use_enable mysql INTERNALMYSQL)
+ $(cmake-utils_use_enable mysql MYSQLSUPPORT)
+ $(cmake-utils_use_enable debug DEBUG_MESSAGES)
+ $(cmake-utils_use_enable semantic-desktop BALOOSUPPORT)
+ )
+
+ kde4-base_src_configure
+}
+
+src_compile() {
+ local mytargets="all"
+ use doc && mytargets+=" doc"
+
+ kde4-base_src_compile ${mytargets}
+}
+
+src_install() {
+ kde4-base_src_install
+
+ if use doc; then
+ # install the api documentation
+ insinto /usr/share/doc/${PF}/
+ doins -r ${CMAKE_BUILD_DIR}/api/html
+ fi
+}
+
+pkg_postinst() {
+ kde4-base_pkg_postinst
+
+ if use doc; then
+ einfo "The digikam api documentation has been installed at /usr/share/doc/${PF}/html"
+ fi
+}
diff --git a/media-gfx/digikam/digikam-4.12.0.ebuild b/media-gfx/digikam/digikam-4.12.0.ebuild
new file mode 100644
index 000000000000..458ca3441bc3
--- /dev/null
+++ b/media-gfx/digikam/digikam-4.12.0.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="af ar az be bg bn br bs ca cs csb cy da de el en_GB eo es et eu fa fi fo fr fy ga gl ha he hi hr hsb
+hu id is it ja ka kk km ko ku lb lo lt lv mi mk mn ms mt nb nds ne nl nn nso oc pa pl pt pt_BR ro ru
+rw se sk sl sq sr sr@Latn ss sv ta te tg th tr tt uk uz uz@cyrillic ven vi wa xh zh_CN zh_HK zh_TW zu"
+KDE_HANDBOOK="optional"
+KDE_DOC_DIRS="doc-digikam doc-showfoto"
+inherit kde4-base
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Digital photo management application for KDE"
+HOMEPAGE="http://www.digikam.org/"
+SRC_URI="mirror://kde/stable/${PN}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2
+ handbook? ( FDL-1.2 )"
+KEYWORDS="~amd64 ~x86"
+SLOT="4"
+IUSE="addressbook debug doc gphoto2 mysql semantic-desktop +thumbnails video"
+
+CDEPEND="
+ kde-apps/kdebase-kioslaves:4
+ kde-apps/libkdcraw:4=
+ kde-apps/libkexiv2:4=
+ || ( kde-apps/libkface:4 >=media-libs/libkface-4.12.0 )
+ || ( kde-apps/libkgeomap:4= >=media-libs/libkgeomap-4.12.0:= )
+ kde-apps/libkipi:4
+ kde-apps/marble:4=[plasma]
+ kde-apps/kcmshell:4
+ dev-qt/qtgui:4
+ || ( dev-qt/qtsql:4[mysql] dev-qt/qtsql:4[sqlite] )
+ media-libs/jasper
+ media-libs/lcms:2
+ >=media-libs/lensfun-0.2.6
+ media-libs/liblqr
+ >=media-libs/libpgf-6.12.27
+ media-libs/libpng:0=
+ >=media-libs/opencv-2.4.9
+ media-libs/phonon[qt4]
+ >=media-libs/tiff-3.8.2:0
+ virtual/jpeg:0
+ x11-libs/libX11
+ addressbook? ( $(add_kdebase_dep kdepimlibs) )
+ gphoto2? ( media-libs/libgphoto2:= )
+ mysql? ( virtual/mysql )
+ semantic-desktop? ( $(add_kdebase_dep baloo '' 4.12.0) )
+"
+RDEPEND="${CDEPEND}
+ $(add_kdeapps_dep kreadconfig)
+ media-plugins/kipi-plugins:4
+ video? ( || (
+ $(add_kdeapps_dep ffmpegthumbs)
+ $(add_kdeapps_dep mplayerthumbs)
+ ) )
+"
+DEPEND="${CDEPEND}
+ dev-cpp/eigen:3
+ dev-libs/boost
+ sys-devel/gettext
+ doc? ( app-doc/doxygen )
+"
+
+S="${WORKDIR}/${MY_P}/core"
+
+RESTRICT=test
+# bug 366505
+
+src_prepare() {
+ # just to make absolutely sure
+ rm -rf "${WORKDIR}/${MY_P}/extra" || die
+
+ # prepare the handbook
+ mkdir doc-digikam doc-showfoto || die
+ echo "add_subdirectory( en )" > doc-digikam/CMakeLists.txt || die
+ mv "${WORKDIR}/${MY_P}/doc/${PN}/digikam" doc-digikam/en || die
+ echo "add_subdirectory( en )" > doc-showfoto/CMakeLists.txt || die
+ mv "${WORKDIR}/${MY_P}/doc/${PN}/showfoto" doc-showfoto/en || die
+ sed -i -e 's:../digikam/:../../doc-digikam/en/:g' doc-showfoto/en/index.docbook || die
+
+ # prepare the translations
+ mv "${WORKDIR}/${MY_P}/po" po || die
+ find po -name "*.po" -and -not -name "digikam.po" -exec rm {} +
+
+ echo "find_package(Msgfmt REQUIRED)" >> CMakeLists.txt || die
+ echo "find_package(Gettext REQUIRED)" >> CMakeLists.txt || die
+ echo "add_subdirectory( po )" >> CMakeLists.txt || die
+
+ kde4-base_src_prepare
+
+ if use handbook; then
+ echo "add_subdirectory( doc-digikam )" >> CMakeLists.txt
+ echo "add_subdirectory( doc-showfoto )" >> CMakeLists.txt
+ fi
+}
+
+src_configure() {
+ # LQR = only allows to choose between bundled/external
+ local mycmakeargs=(
+ -DENABLE_LCMS2=ON
+ -DWITH_LQR=ON
+ -DWITH_LENSFUN=ON
+ $(cmake-utils_use_enable addressbook KDEPIMLIBSSUPPORT)
+ -DWITH_MarbleWidget=ON
+ $(cmake-utils_use_enable gphoto2 GPHOTO2)
+ $(cmake-utils_use_with gphoto2)
+ $(cmake-utils_use_enable thumbnails THUMBS_DB)
+ $(cmake-utils_use_enable mysql INTERNALMYSQL)
+ $(cmake-utils_use_enable mysql MYSQLSUPPORT)
+ $(cmake-utils_use_enable debug DEBUG_MESSAGES)
+ $(cmake-utils_use_enable semantic-desktop BALOOSUPPORT)
+ )
+
+ kde4-base_src_configure
+}
+
+src_compile() {
+ local mytargets="all"
+ use doc && mytargets+=" doc"
+
+ kde4-base_src_compile ${mytargets}
+}
+
+src_install() {
+ kde4-base_src_install
+
+ if use doc; then
+ # install the api documentation
+ insinto /usr/share/doc/${PF}/
+ doins -r ${CMAKE_BUILD_DIR}/api/html
+ fi
+}
+
+pkg_postinst() {
+ kde4-base_pkg_postinst
+
+ if use doc; then
+ einfo "The digikam api documentation has been installed at /usr/share/doc/${PF}/html"
+ fi
+}
diff --git a/media-gfx/digikam/digikam-4.4.0-r1.ebuild b/media-gfx/digikam/digikam-4.4.0-r1.ebuild
new file mode 100644
index 000000000000..2fc0e3852560
--- /dev/null
+++ b/media-gfx/digikam/digikam-4.4.0-r1.ebuild
@@ -0,0 +1,167 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="af ar az be bg bn br bs ca cs csb cy da de el en_GB eo es et eu fa fi fo fr fy ga gl ha he hi hr hsb
+hu id is it ja ka kk km ko ku lb lo lt lv mi mk mn ms mt nb nds ne nl nn nso oc pa pl pt pt_BR ro ru
+rw se sk sl sq sr sr@Latn ss sv ta te tg th tr tt uk uz uz@cyrillic ven vi wa xh zh_CN zh_HK zh_TW zu"
+
+KDE_HANDBOOK="optional"
+CMAKE_MIN_VERSION="2.8"
+KDE_MINIMAL="4.10"
+
+KDE_DOC_DIRS="doc-digikam doc-showfoto"
+
+inherit kde4-base
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Digital photo management application for KDE"
+HOMEPAGE="http://www.digikam.org/"
+SRC_URI="mirror://kde/stable/${PN}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2
+ handbook? ( FDL-1.2 )"
+KEYWORDS="amd64 x86"
+SLOT="4"
+IUSE="addressbook debug doc gphoto2 mysql nepomuk semantic-desktop themedesigner +thumbnails video"
+
+CDEPEND="
+ kde-apps/kdebase-kioslaves:4
+ kde-apps/libkdcraw:4=
+ kde-apps/libkexiv2:4=
+ kde-apps/libkipi:4
+ kde-apps/marble:4=[plasma]
+ media-libs/jasper
+ media-libs/lcms:2
+ media-libs/lensfun
+ || ( kde-apps/libkface:4 <=media-libs/libkface-4.4.0 )
+ media-libs/libkgeomap
+ media-libs/liblqr
+ >=media-libs/libpgf-6.12.27
+ media-libs/libpng:0=
+ >=media-libs/opencv-2.4.9
+ media-libs/tiff
+ virtual/jpeg
+ dev-qt/qtgui:4
+ || ( dev-qt/qtsql:4[mysql] dev-qt/qtsql:4[sqlite] )
+ addressbook? ( $(add_kdebase_dep kdepimlibs) )
+ gphoto2? ( media-libs/libgphoto2:= )
+ mysql? ( virtual/mysql )
+ nepomuk? (
+ dev-libs/shared-desktop-ontologies
+ dev-libs/soprano
+ $(add_kdebase_dep kdelibs 'semantic-desktop(+)')
+ $(add_kdebase_dep nepomuk-core)
+ )
+ semantic-desktop? (
+ $(add_kdebase_dep baloo)
+ )
+"
+RDEPEND="${CDEPEND}
+ kde-apps/kreadconfig:4
+ media-plugins/kipi-plugins
+ video? (
+ || (
+ kde-apps/ffmpegthumbs:4
+ kde-apps/mplayerthumbs:4
+ $(add_kdeapps_dep mplayerthumbs)
+ $(add_kdeapps_dep ffmpegthumbs)
+ )
+ )
+"
+DEPEND="${CDEPEND}
+ dev-cpp/eigen:3
+ dev-libs/boost
+ sys-devel/gettext
+ doc? ( app-doc/doxygen )
+"
+
+S="${WORKDIR}/${MY_P}/core"
+
+RESTRICT=test
+# bug 366505
+
+PATCHES=(
+ "${FILESDIR}/${P}-libkexiv2.patch"
+ "${FILESDIR}/${P}-hang.patch"
+)
+
+src_prepare() {
+ # just to make absolutely sure
+ rm -rf "${WORKDIR}/${MY_P}/extra" || die
+
+ # prepare the handbook
+ mkdir doc-digikam doc-showfoto || die
+ echo "add_subdirectory( en )" > doc-digikam/CMakeLists.txt || die
+ mv "${WORKDIR}/${MY_P}/doc/${PN}/digikam" doc-digikam/en || die
+ echo "add_subdirectory( en )" > doc-showfoto/CMakeLists.txt || die
+ mv "${WORKDIR}/${MY_P}/doc/${PN}/showfoto" doc-showfoto/en || die
+ sed -i -e 's:../digikam/:../../doc-digikam/en/:g' doc-showfoto/en/index.docbook || die
+
+ # prepare the translations
+ mv "${WORKDIR}/${MY_P}/po" po || die
+ find po -name "*.po" -and -not -name "digikam.po" -exec rm {} +
+
+ echo "find_package(Msgfmt REQUIRED)" >> CMakeLists.txt || die
+ echo "find_package(Gettext REQUIRED)" >> CMakeLists.txt || die
+ echo "add_subdirectory( po )" >> CMakeLists.txt || die
+
+ kde4-base_src_prepare
+
+ if use handbook; then
+ echo "add_subdirectory( doc-digikam )" >> CMakeLists.txt
+ echo "add_subdirectory( doc-showfoto )" >> CMakeLists.txt
+ fi
+}
+
+src_configure() {
+ # LQR = only allows to choose between bundled/external
+ local mycmakeargs=(
+ -DENABLE_LCMS2=ON
+ -DFORCED_UNBUNDLE=ON
+ -DWITH_LQR=ON
+ -DWITH_LENSFUN=ON
+ $(cmake-utils_use_enable addressbook KDEPIMLIBSSUPPORT)
+ -DWITH_MarbleWidget=ON
+ $(cmake-utils_use_enable gphoto2 GPHOTO2)
+ $(cmake-utils_use_with gphoto2)
+ $(cmake-utils_use_with nepomuk Soprano)
+ $(cmake-utils_use_enable themedesigner)
+ $(cmake-utils_use_enable thumbnails THUMBS_DB)
+ $(cmake-utils_use_enable mysql INTERNALMYSQL)
+ $(cmake-utils_use_enable debug DEBUG_MESSAGES)
+ $(cmake-utils_use_enable nepomuk NEPOMUKSUPPORT)
+ $(cmake-utils_use_enable semantic-desktop BALOOSUPPORT)
+ )
+
+ kde4-base_src_configure
+}
+
+src_compile() {
+ local mytargets="all"
+ use doc && mytargets+=" doc"
+
+ kde4-base_src_compile ${mytargets}
+}
+
+src_install() {
+ kde4-base_src_install
+
+ if use doc; then
+ # install the api documentation
+ insinto /usr/share/doc/${PF}/
+ doins -r ${CMAKE_BUILD_DIR}/api/html
+ fi
+}
+
+pkg_postinst() {
+ kde4-base_pkg_postinst
+
+ if use doc; then
+ einfo "The digikam api documentation has been installed at /usr/share/doc/${PF}/html"
+ fi
+}
diff --git a/media-gfx/digikam/digikam-4.7.0.ebuild b/media-gfx/digikam/digikam-4.7.0.ebuild
new file mode 100644
index 000000000000..0cea9aa9568e
--- /dev/null
+++ b/media-gfx/digikam/digikam-4.7.0.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="af ar az be bg bn br bs ca cs csb cy da de el en_GB eo es et eu fa fi fo fr fy ga gl ha he hi hr hsb
+hu id is it ja ka kk km ko ku lb lo lt lv mi mk mn ms mt nb nds ne nl nn nso oc pa pl pt pt_BR ro ru
+rw se sk sl sq sr sr@Latn ss sv ta te tg th tr tt uk uz uz@cyrillic ven vi wa xh zh_CN zh_HK zh_TW zu"
+
+KDE_HANDBOOK="optional"
+KDE_MINIMAL="4.10"
+
+KDE_DOC_DIRS="doc-digikam doc-showfoto"
+
+inherit kde4-base
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+DESCRIPTION="Digital photo management application for KDE"
+HOMEPAGE="http://www.digikam.org/"
+SRC_URI="mirror://kde/stable/${PN}/${MY_P}-1.tar.bz2"
+
+LICENSE="GPL-2
+ handbook? ( FDL-1.2 )"
+KEYWORDS="~amd64 ~x86"
+SLOT="4"
+IUSE="addressbook debug doc gphoto2 mysql semantic-desktop +thumbnails video"
+
+CDEPEND="
+ kde-apps/kdebase-kioslaves:4
+ kde-apps/libkdcraw:4=
+ kde-apps/libkexiv2:4=
+ kde-apps/libkipi:4
+ kde-apps/marble:4=[plasma]
+ dev-qt/qtgui:4
+ media-libs/jasper
+ media-libs/lcms:2
+ >=media-libs/lensfun-0.2.6
+ || ( >=kde-apps/libkface-14.12.0:4 >=media-libs/libkface-4.6.0 )
+ >=media-libs/libkgeomap-4.6.0:=
+ media-libs/liblqr
+ >=media-libs/libpgf-6.12.27
+ media-libs/libpng:0=
+ >=media-libs/opencv-2.4.9
+ media-libs/phonon[qt4]
+ >=media-libs/tiff-3.8.2
+ virtual/jpeg
+ x11-libs/libX11
+ || ( dev-qt/qtsql:4[mysql] dev-qt/qtsql:4[sqlite] )
+ addressbook? ( $(add_kdebase_dep kdepimlibs) )
+ gphoto2? ( media-libs/libgphoto2:= )
+ mysql? ( virtual/mysql )
+ semantic-desktop? (
+ $(add_kdebase_dep baloo "" 4.12.0)
+ )
+"
+RDEPEND="${CDEPEND}
+ kde-apps/kreadconfig:4
+ media-plugins/kipi-plugins
+ video? (
+ || (
+ kde-apps/ffmpegthumbs:4
+ kde-apps/mplayerthumbs:4
+ $(add_kdeapps_dep mplayerthumbs)
+ $(add_kdeapps_dep ffmpegthumbs)
+ )
+ )
+"
+DEPEND="${CDEPEND}
+ dev-cpp/eigen:3
+ dev-libs/boost
+ sys-devel/gettext
+ doc? ( app-doc/doxygen )
+"
+
+S="${WORKDIR}/${MY_P}/core"
+
+RESTRICT=test
+# bug 366505
+
+src_prepare() {
+ # just to make absolutely sure
+ rm -rf "${WORKDIR}/${MY_P}/extra" || die
+
+ # prepare the handbook
+ mkdir doc-digikam doc-showfoto || die
+ echo "add_subdirectory( en )" > doc-digikam/CMakeLists.txt || die
+ mv "${WORKDIR}/${MY_P}/doc/${PN}/digikam" doc-digikam/en || die
+ echo "add_subdirectory( en )" > doc-showfoto/CMakeLists.txt || die
+ mv "${WORKDIR}/${MY_P}/doc/${PN}/showfoto" doc-showfoto/en || die
+ sed -i -e 's:../digikam/:../../doc-digikam/en/:g' doc-showfoto/en/index.docbook || die
+
+ # prepare the translations
+ mv "${WORKDIR}/${MY_P}/po" po || die
+ find po -name "*.po" -and -not -name "digikam.po" -exec rm {} +
+
+ echo "find_package(Msgfmt REQUIRED)" >> CMakeLists.txt || die
+ echo "find_package(Gettext REQUIRED)" >> CMakeLists.txt || die
+ echo "add_subdirectory( po )" >> CMakeLists.txt || die
+
+ kde4-base_src_prepare
+
+ if use handbook; then
+ echo "add_subdirectory( doc-digikam )" >> CMakeLists.txt
+ echo "add_subdirectory( doc-showfoto )" >> CMakeLists.txt
+ fi
+}
+
+src_configure() {
+ # LQR = only allows to choose between bundled/external
+ local mycmakeargs=(
+ -DENABLE_LCMS2=ON
+ -DWITH_LQR=ON
+ -DWITH_LENSFUN=ON
+ $(cmake-utils_use_enable addressbook KDEPIMLIBSSUPPORT)
+ -DWITH_MarbleWidget=ON
+ $(cmake-utils_use_enable gphoto2 GPHOTO2)
+ $(cmake-utils_use_with gphoto2)
+ $(cmake-utils_use_enable thumbnails THUMBS_DB)
+ $(cmake-utils_use_enable mysql INTERNALMYSQL)
+ $(cmake-utils_use_enable mysql MYSQLSUPPORT)
+ $(cmake-utils_use_enable debug DEBUG_MESSAGES)
+ $(cmake-utils_use_enable semantic-desktop BALOOSUPPORT)
+ )
+
+ kde4-base_src_configure
+}
+
+src_compile() {
+ local mytargets="all"
+ use doc && mytargets+=" doc"
+
+ kde4-base_src_compile ${mytargets}
+}
+
+src_install() {
+ kde4-base_src_install
+
+ if use doc; then
+ # install the api documentation
+ insinto /usr/share/doc/${PF}/
+ doins -r ${CMAKE_BUILD_DIR}/api/html
+ fi
+}
+
+pkg_postinst() {
+ kde4-base_pkg_postinst
+
+ if use doc; then
+ einfo "The digikam api documentation has been installed at /usr/share/doc/${PF}/html"
+ fi
+}
diff --git a/media-gfx/digikam/files/digikam-4.4.0-hang.patch b/media-gfx/digikam/files/digikam-4.4.0-hang.patch
new file mode 100644
index 000000000000..2757a4a5947b
--- /dev/null
+++ b/media-gfx/digikam/files/digikam-4.4.0-hang.patch
@@ -0,0 +1,85 @@
+commit f0400ec7e518e753e0c4ccab4eb2b8b022f91767
+Author: Gilles Caulier <caulier.gilles@gmail.com>
+Date: Tue Oct 28 15:58:55 2014 +0100
+
+ apply patch #89156
+ BUGS: 337737
+ FIXED-IN: 4.5.0
+
+diff --git a/libs/widgets/common/databasewidget.cpp b/libs/widgets/common/databasewidget.cpp
+index b04355b..858cf40 100644
+--- a/core/libs/widgets/common/databasewidget.cpp
++++ b/core/libs/widgets/common/databasewidget.cpp
+@@ -172,30 +172,21 @@ void DatabaseWidget::setupMainArea()
+ "<p><b>MySQL</b> backend is a more robust solution especially for remote and shared database storage. "
+ "It is also more efficient to manage huge collection sizes. "
+ "Be careful: this one it is still in experimental stage.</p>"));
+- setDatabaseInputFields(DatabaseParameters::SQLiteDatabaseType());
+-
+- // --------------------------------------------------------
+
+- adjustSize();
++ setDatabaseInputFields(DatabaseParameters::SQLiteDatabaseType());
+
+ // --------------------------------------------------------
+
+- connect(databasePathEdit, SIGNAL(urlSelected(KUrl)),
+- this, SLOT(slotChangeDatabasePath(KUrl)));
+-
+- connect(databasePathEdit, SIGNAL(textChanged(QString)),
+- this, SLOT(slotDatabasePathEditedDelayed()));
+-
+ connect(databaseType, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(slotHandleDBTypeIndexChanged(int)));
+
++ connect(checkDatabaseConnectionButton, SIGNAL(clicked()),
++ this, SLOT(checkDatabaseConnection()));
++
+ #ifdef HAVE_INTERNALMYSQL
+ connect(internalServer, SIGNAL(stateChanged(int)),
+ this, SLOT(slotHandleInternalServerCheckbox(int)));
+ #endif // HAVE_INTERNALMYSQL
+-
+- connect(checkDatabaseConnectionButton, SIGNAL(clicked()),
+- this, SLOT(checkDatabaseConnection()));
+ }
+
+ QString DatabaseWidget::currentDatabaseType() const
+@@ -261,12 +252,24 @@ void DatabaseWidget::setDatabaseInputFields(const QString& currentIndexStr)
+ d->databasePathLabel->setVisible(true);
+ databasePathEdit->setVisible(true);
+ d->expertSettings->setVisible(false);
++
++ connect(databasePathEdit, SIGNAL(urlSelected(KUrl)),
++ this, SLOT(slotChangeDatabasePath(KUrl)));
++
++ connect(databasePathEdit, SIGNAL(textChanged(QString)),
++ this, SLOT(slotDatabasePathEditedDelayed()));
+ }
+ else
+ {
+ d->databasePathLabel->setVisible(false);
+ databasePathEdit->setVisible(false);
+ d->expertSettings->setVisible(true);
++
++ disconnect(databasePathEdit, SIGNAL(urlSelected(KUrl)),
++ this, SLOT(slotChangeDatabasePath(KUrl)));
++
++ disconnect(databasePathEdit, SIGNAL(textChanged(QString)),
++ this, SLOT(slotDatabasePathEditedDelayed()));
+ }
+
+ adjustSize();
+@@ -355,9 +358,9 @@ void DatabaseWidget::setParametersFromSettings(const ApplicationSettings* const
+
+ password->setText(settings->getDatabasePassword());
+
+- /* Now set the type according the database type from the settings.
+- * If no item is found, ignore the setting.
+- */
++ // Now set the type according the database type from the settings.
++ // If no item is found, ignore the setting.
++
+ for (int i=0; i<databaseType->count(); ++i)
+ {
+ //kDebug(50003) << "Comparing comboboxentry on index ["<< i <<"] [" << databaseType->itemData(i)
diff --git a/media-gfx/digikam/files/digikam-4.4.0-libkexiv2.patch b/media-gfx/digikam/files/digikam-4.4.0-libkexiv2.patch
new file mode 100644
index 000000000000..018ce67a57d2
--- /dev/null
+++ b/media-gfx/digikam/files/digikam-4.4.0-libkexiv2.patch
@@ -0,0 +1,53 @@
+commit f6945f23e0ed1e11f26e2c7e62b02baa8cfa640e
+Author: Pino Toscano <pino@kde.org>
+Date: Tue Oct 14 22:26:19 2014 +0200
+
+ fix libkexiv2 version for AltLangStrEdit::textEdit()
+
+ it is part of current libkexiv2/master only (i.e. post 4.14.x, which
+ is 2.3.x)
+
+diff --git a/libs/imageproperties/captionedit.cpp b/libs/imageproperties/captionedit.cpp
+index 88413fc..70bdb6d 100644
+--- a/libs/imageproperties/captionedit.cpp
++++ b/libs/imageproperties/captionedit.cpp
+@@ -202,7 +202,7 @@ void CaptionEdit::slotAuthorChanged(const QString& text)
+
+ MsgTextEdit* CaptionEdit::textEdit() const
+ {
+-#if KEXIV2_VERSION >= 0x020302
++#if KEXIV2_VERSION >= 0x020400
+ return d->altLangStrEdit->textEdit();
+ #else
+ return 0;
+diff --git a/libs/imageproperties/imagedescedittab.cpp b/libs/imageproperties/imagedescedittab.cpp
+index ebfbae1..3d12777 100644
+--- a/libs/imageproperties/imagedescedittab.cpp
++++ b/libs/imageproperties/imagedescedittab.cpp
+@@ -429,7 +429,7 @@ ImageDescEditTab::ImageDescEditTab(QWidget* const parent)
+
+ // Initialize ---------------------------------------------
+
+-#if KEXIV2_VERSION >= 0x020302
++#if KEXIV2_VERSION >= 0x020400
+ d->titleEdit->textEdit()->installEventFilter(this);
+ d->captionsEdit->textEdit()->installEventFilter(this);
+ #endif
+@@ -532,7 +532,7 @@ void ImageDescEditTab::setFocusToNewTagEdit()
+ void ImageDescEditTab::setFocusToTitlesEdit()
+ {
+ d->tabWidget->setCurrentIndex(Private::DESCRIPTIONS);
+-#if KEXIV2_VERSION >= 0x020302
++#if KEXIV2_VERSION >= 0x020400
+ d->titleEdit->textEdit()->setFocus();
+ #endif
+ }
+@@ -540,7 +540,7 @@ void ImageDescEditTab::setFocusToTitlesEdit()
+ void ImageDescEditTab::setFocusToCommentsEdit()
+ {
+ d->tabWidget->setCurrentIndex(Private::DESCRIPTIONS);
+-#if KEXIV2_VERSION >= 0x020302
++#if KEXIV2_VERSION >= 0x020400
+ d->captionsEdit->textEdit()->setFocus();
+ #endif
+ }
diff --git a/media-gfx/digikam/metadata.xml b/media-gfx/digikam/metadata.xml
new file mode 100644
index 000000000000..c26db9ba757a
--- /dev/null
+++ b/media-gfx/digikam/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>kde</herd>
+<maintainer><email>dilfridge@gentoo.org</email></maintainer>
+<use>
+ <flag name="addressbook">Add support for kdepim</flag>
+ <flag name="nepomuk">Enable Nepomuk based semantic desktop support (deprecated)</flag>
+ <flag name="themedesigner">Build the digikam theme designer</flag>
+ <flag name="thumbnails">Enable thumbnails database support</flag>
+ <flag name="video">Pull in mplayerthumbs to enable video thumbnails</flag>
+ <flag name="linguas_ha">Hausa translation</flag>
+ <flag name="linguas_mi">Maori translation</flag>
+ <flag name="linguas_ven">Venda translation</flag>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/dispcalgui/Manifest b/media-gfx/dispcalgui/Manifest
new file mode 100644
index 000000000000..7edb7563f484
--- /dev/null
+++ b/media-gfx/dispcalgui/Manifest
@@ -0,0 +1,4 @@
+DIST dispcalGUI-1.2.7.0.tar.gz 3302318 SHA256 8032b71ced4d7f718f8aa50a5dfc92595150334b572d6828c797426d8d63ba0b SHA512 7ae2c14c0fa50cb28284a24269c2d73bf5197326581cceb7436f1263f8097eb57c7cafbfaa811f1b387e4b7235fe8eda0a8f48ef939ec7710ca5555090ca53c3 WHIRLPOOL 106da953f564b2c4f6cdfefffc7952248b17793cd42e267c41f6bb3e56864b36d87f584df7b47f06ec131693c5de10e4f8630d77b12bdb82b318e61b4dec62d6
+DIST dispcalGUI-2.0.0.0.tar.gz 5914050 SHA256 fad516999bd663cf870fad2869fc63a23f93820dffff9dbd1029369417a6b650 SHA512 14e1a5d921ed4aaa07bd96d2c4256ce080bc6201d7a5b2a6fa69ae9ac25b8d34c9b0f3b3dac3d2e9a7d4c5faa97682e10a4b15205098a454623ecdb4e09eb8a5 WHIRLPOOL 1c88bb5da2dcddc1848249ba76057e1e33480e8fc344af6c3348d933c9752cc09f91a03a61f18f71cae27473956ae0e518b85864b5a2eb6ce9caf074d59f167c
+DIST dispcalGUI-2.5.0.0.tar.gz 6392054 SHA256 036a01a11551d990a6b84e241d131ca0b07d810d552b28332907aa6fb3cd4777 SHA512 d5cb2263739f9c46676222d20e570c161897af58bb359ed569a7690b6fc1ed83ce7e9862e7d69b1afb599b8035ca4f4abfccef83b877d98a34956535d2dd729b WHIRLPOOL 725de21d2d320ec74b6a7840cf5f251885b62946e20cfc7bed480f663c77116c9bac61b2df7e7ddfe7a0e7557269d864f0b88569e52463499eb310279fe66b7d
+DIST dispcalGUI-2.6.0.0.tar.gz 6722168 SHA256 3087facf1fd7941b04df327903eb9a49511987a9b7afaada9ee8ca4600d0109f SHA512 0f7b1952588ee8e5c49f3ce3be41e53c0dd746b6fd660107e78ec16b392ebda9f8bc45550a119371b2197fd370f0e28e05aee47c71e26cfb8f648a6d66277454 WHIRLPOOL 84f050ed73200054b7dad53730a86490e44e751ab96ef4ef3faea279ac692ef76685c8992135085c43c3e258e2fc44c5a276217443adc67560eb23b376d535d7
diff --git a/media-gfx/dispcalgui/dispcalgui-1.2.7.0.ebuild b/media-gfx/dispcalgui/dispcalgui-1.2.7.0.ebuild
new file mode 100644
index 000000000000..7754a5d178e4
--- /dev/null
+++ b/media-gfx/dispcalgui/dispcalgui-1.2.7.0.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="2.4 3.* *-jython 2.7-pypy-*"
+
+inherit distutils fdo-mime eutils
+
+MY_PN="dispcalGUI"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Display Calibration and Characterization powered by Argyll CMS"
+HOMEPAGE="http://dispcalgui.hoech.net/"
+SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=media-gfx/argyllcms-1.1.0
+ dev-python/wxpython:2.8
+ >=x11-libs/libX11-1.3.3
+ >=x11-apps/xrandr-1.3.2
+ >=x11-libs/libXxf86vm-1.1.0
+ >=x11-proto/xineramaproto-1.2
+ >=x11-libs/libXinerama-1.1"
+RDEPEND="${DEPEND}
+ >=dev-python/numpy-1.2.1"
+
+# Just in case someone renames the ebuild
+S=${WORKDIR}/${MY_P}
+
+DOCS=(
+ README.html
+)
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-wxversion-select.patch
+
+# Prohibit setup from running xdg-* programs, resulting to sandbox violation
+ cd "${S}/dispcalGUI" || die "Cannot cd to source directory."
+ sed -e 's/if which(\"xdg-icon-resource\"):/if which(\"xdg-icon-resource-non-existant\"):/' \
+ -e 's/if which(\"xdg-desktop-menu\"):/if which(\"xdg-desktop-menu-non-existant\"):/' \
+ -i postinstall.py || die "sed'ing out the xdg-* setup functions failed"
+
+# Remove deprecated Encoding key from .desktop file
+ cd "${S}" || die "Cannot cd to work directory."
+ for offendingFile in $(grep -r -l "Encoding=UTF-8" .); do
+ sed -e '/Encoding=UTF-8/d' -i "${offendingFile}" || \
+ die "removing deprecated Encoding key from .desktop files failed"
+ done
+
+ distutils_src_prepare
+}
+
+src_install() {
+ distutils_src_install
+ #remove udev files
+ rm -rf "${D}"/etc/udev/rules.d
+}
+
+pkg_postinst() {
+# Run xdg-* programs the Gentoo way since we removed this functionality from the original package
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+ distutils_pkg_postinst
+}
+
+pkg_postrm() {
+# Run xdg-* programs the Gentoo way since we removed this functionality from the original package
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+ distutils_pkg_postrm
+}
diff --git a/media-gfx/dispcalgui/dispcalgui-2.0.0.0.ebuild b/media-gfx/dispcalgui/dispcalgui-2.0.0.0.ebuild
new file mode 100644
index 000000000000..4cebac91f191
--- /dev/null
+++ b/media-gfx/dispcalgui/dispcalgui-2.0.0.0.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 fdo-mime eutils
+
+MY_PN="dispcalGUI"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Display Calibration and Characterization powered by Argyll CMS"
+HOMEPAGE="http://dispcalgui.hoech.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=media-gfx/argyllcms-1.1.0
+ dev-python/wxpython:2.8
+ >=x11-libs/libX11-1.3.3
+ >=x11-apps/xrandr-1.3.2
+ >=x11-libs/libXxf86vm-1.1.0
+ >=x11-proto/xineramaproto-1.2
+ >=x11-libs/libXinerama-1.1"
+RDEPEND="${DEPEND}
+ >=dev-python/numpy-1.2.1"
+
+# Just in case someone renames the ebuild
+S=${WORKDIR}/${MY_P}
+
+DOCS=(
+ README.html
+)
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-wxversion-select.patch"
+
+# Prohibit setup from running xdg-* programs, resulting to sandbox violation
+ cd "${S}/dispcalGUI" || die "Cannot cd to source directory."
+ sed -e 's/if which(\"xdg-icon-resource\"):/if which(\"xdg-icon-resource-non-existant\"):/' \
+ -e 's/if which(\"xdg-desktop-menu\"):/if which(\"xdg-desktop-menu-non-existant\"):/' \
+ -i postinstall.py || die "sed'ing out the xdg-* setup functions failed"
+
+# Remove deprecated Encoding key from .desktop file
+ cd "${S}" || die "Cannot cd to work directory."
+ for offendingFile in $(grep -r -l "Encoding=UTF-8" .); do
+ sed -e '/Encoding=UTF-8/d' -i "${offendingFile}" || \
+ die "removing deprecated Encoding key from .desktop files failed"
+ done
+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ distutils-r1_src_install
+ #remove udev files
+ rm -rf "${D}"/etc/udev/rules.d
+}
+
+pkg_postinst() {
+# Run xdg-* programs the Gentoo way since we removed this functionality from the original package
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+# Run xdg-* programs the Gentoo way since we removed this functionality from the original package
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/dispcalgui/dispcalgui-2.5.0.0.ebuild b/media-gfx/dispcalgui/dispcalgui-2.5.0.0.ebuild
new file mode 100644
index 000000000000..9f015e0c9764
--- /dev/null
+++ b/media-gfx/dispcalgui/dispcalgui-2.5.0.0.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 fdo-mime eutils
+
+MY_PN="dispcalGUI"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Display Calibration and Characterization powered by Argyll CMS"
+HOMEPAGE="http://dispcalgui.hoech.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=media-gfx/argyllcms-1.1.0
+ dev-python/wxpython:2.8
+ >=x11-libs/libX11-1.3.3
+ >=x11-apps/xrandr-1.3.2
+ >=x11-libs/libXxf86vm-1.1.0
+ >=x11-proto/xineramaproto-1.2
+ >=x11-libs/libXinerama-1.1"
+RDEPEND="${DEPEND}
+ >=dev-python/numpy-1.2.1"
+
+# Just in case someone renames the ebuild
+S=${WORKDIR}/${MY_P}
+
+DOCS=(
+ README.html
+)
+
+src_prepare() {
+# Prohibit setup from running xdg-* programs, resulting to sandbox violation
+ cd "${S}/dispcalGUI" || die "Cannot cd to source directory."
+ sed -e 's/if which(\"xdg-icon-resource\"):/if which(\"xdg-icon-resource-non-existant\"):/' \
+ -e 's/if which(\"xdg-desktop-menu\"):/if which(\"xdg-desktop-menu-non-existant\"):/' \
+ -i postinstall.py || die "sed'ing out the xdg-* setup functions failed"
+
+# Remove deprecated Encoding key from .desktop file
+ cd "${S}" || die "Cannot cd to work directory."
+ for offendingFile in $(grep -r -l "Encoding=UTF-8" .); do
+ sed -e '/Encoding=UTF-8/d' -i "${offendingFile}" || \
+ die "removing deprecated Encoding key from .desktop files failed"
+ done
+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ distutils-r1_src_install
+ #remove udev files
+ rm -rf "${D}"/etc/udev/rules.d
+}
+
+pkg_postinst() {
+# Run xdg-* programs the Gentoo way since we removed this functionality from the original package
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+# Run xdg-* programs the Gentoo way since we removed this functionality from the original package
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/dispcalgui/dispcalgui-2.6.0.0.ebuild b/media-gfx/dispcalgui/dispcalgui-2.6.0.0.ebuild
new file mode 100644
index 000000000000..44a916028b8b
--- /dev/null
+++ b/media-gfx/dispcalgui/dispcalgui-2.6.0.0.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 fdo-mime eutils
+
+MY_PN="dispcalGUI"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Display Calibration and Characterization powered by Argyll CMS"
+HOMEPAGE="http://dispcalgui.hoech.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=">=media-gfx/argyllcms-1.1.0
+ dev-python/wxpython:2.8
+ >=x11-libs/libX11-1.3.3
+ >=x11-apps/xrandr-1.3.2
+ >=x11-libs/libXxf86vm-1.1.0
+ >=x11-proto/xineramaproto-1.2
+ >=x11-libs/libXinerama-1.1"
+RDEPEND="${DEPEND}
+ >=dev-python/numpy-1.2.1"
+
+# Just in case someone renames the ebuild
+S=${WORKDIR}/${MY_P}
+
+DOCS=(
+ README.html
+)
+
+src_prepare() {
+# Prohibit setup from running xdg-* programs, resulting to sandbox violation
+ cd "${S}/dispcalGUI" || die "Cannot cd to source directory."
+ sed -e 's/if which(\"xdg-icon-resource\"):/if which(\"xdg-icon-resource-non-existant\"):/' \
+ -e 's/if which(\"xdg-desktop-menu\"):/if which(\"xdg-desktop-menu-non-existant\"):/' \
+ -i postinstall.py || die "sed'ing out the xdg-* setup functions failed"
+
+# Remove deprecated Encoding key from .desktop file
+ cd "${S}" || die "Cannot cd to work directory."
+ for offendingFile in $(grep -r -l "Encoding=UTF-8" .); do
+ sed -e '/Encoding=UTF-8/d' -i "${offendingFile}" || \
+ die "removing deprecated Encoding key from .desktop files failed"
+ done
+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ distutils-r1_src_install
+ #remove udev files
+ rm -rf "${D}"/etc/udev/rules.d
+}
+
+pkg_postinst() {
+# Run xdg-* programs the Gentoo way since we removed this functionality from the original package
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+# Run xdg-* programs the Gentoo way since we removed this functionality from the original package
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/dispcalgui/files/dispcalgui-1.2.7.0-wxversion-select.patch b/media-gfx/dispcalgui/files/dispcalgui-1.2.7.0-wxversion-select.patch
new file mode 100644
index 000000000000..8343b2be07c5
--- /dev/null
+++ b/media-gfx/dispcalgui/files/dispcalgui-1.2.7.0-wxversion-select.patch
@@ -0,0 +1,11 @@
+--- dispcalGUI/dispcalGUI.py.old 2013-04-19 01:04:23.663520256 +0300
++++ dispcalGUI/dispcalGUI.py 2013-04-19 01:06:49.561884072 +0300
+@@ -40,6 +40,9 @@
+
+ # Standard modules
+
++import wxversion
++wxversion.select("2.8")
++
+ import ConfigParser
+ ConfigParser.DEFAULTSECT = "Default"
diff --git a/media-gfx/dispcalgui/files/dispcalgui-2.0.0.0-wxversion-select.patch b/media-gfx/dispcalgui/files/dispcalgui-2.0.0.0-wxversion-select.patch
new file mode 100644
index 000000000000..dd3815df68cb
--- /dev/null
+++ b/media-gfx/dispcalgui/files/dispcalgui-2.0.0.0-wxversion-select.patch
@@ -0,0 +1,13 @@
+--- dispcalGUI/main.py.orig 2014-03-04 20:44:41.266561455 +0200
++++ dispcalGUI/main.py 2014-03-04 20:44:24.194511770 +0200
+@@ -19,6 +19,10 @@ if pyver < py_minversion or pyver > py_m
+ ".".join(str(n) for n in py_maxversion),
+ sys.version.split()[0]))
+
++# Gentoo compatibility module
++import wxversion
++wxversion.select("2.8")
++
+ from config import (autostart_home, datahome, enc, exe, exe_ext, exedir,
+ exename, fs_enc, isapp, isexe, pydir, pyname, pypath,
+ runtype)
diff --git a/media-gfx/dispcalgui/metadata.xml b/media-gfx/dispcalgui/metadata.xml
new file mode 100644
index 000000000000..3a8ed7223da0
--- /dev/null
+++ b/media-gfx/dispcalgui/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>opensource@andmarios.com</email>
+ <name>Marios Andreopoulos</name>
+ <description>Maintainer.</description>
+ </maintainer>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ <description>Proxy maintainer.</description>
+ </maintainer>
+ <longdescription lang="en">
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">dispcalgui</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/dpic/Manifest b/media-gfx/dpic/Manifest
new file mode 100644
index 000000000000..d37059ddb853
--- /dev/null
+++ b/media-gfx/dpic/Manifest
@@ -0,0 +1 @@
+DIST dpic-2013.03.10.tar.gz 583366 SHA256 3ba961675f23ee2b9c035b60e43ce672007ad29a8ab810404f64a4098edcdac1 SHA512 a1c29f32bddeabfcfba1e0253ab502ca2c32c9ad4d490c8b2a7569643972a65ebdc26215888aaba7b2954b217e1667b469d49affb0a771832e98aa5ad25dd9f5 WHIRLPOOL e01915a94a6cd587945e12dc15eed23607914e219f4ef8586d8c221201d6073fff749dfd0838c8adc23848db59b1015e01cffad0f802b386e20a671391a96780
diff --git a/media-gfx/dpic/dpic-20130310.ebuild b/media-gfx/dpic/dpic-20130310.ebuild
new file mode 100644
index 000000000000..bad3d67a841e
--- /dev/null
+++ b/media-gfx/dpic/dpic-20130310.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Converts PIC plots into pstricks, PGF/TikZ, PostScript, MetaPost and TeX"
+HOMEPAGE="http://ece.uwaterloo.ca/~aplevich/dpic"
+SRC_URI="https://ece.uwaterloo.ca/~aplevich/dpic/${PN}-2013.03.10.tar.gz"
+
+LICENSE="BSD-2 CC-BY-3.0 GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="examples"
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${PN}"
+
+src_compile () {
+ emake CC="$(tc-getCC)"
+}
+
+src_install () {
+ dobin dpic
+ doman doc/dpic.1
+ dodoc README CHANGES doc/dpicdoc.pdf doc/gpic.pdf
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/media-gfx/dpic/metadata.xml b/media-gfx/dpic/metadata.xml
new file mode 100644
index 000000000000..ba6a8a8800d5
--- /dev/null
+++ b/media-gfx/dpic/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>tex</herd>
+</pkgmetadata>
diff --git a/media-gfx/drqueue/Manifest b/media-gfx/drqueue/Manifest
new file mode 100644
index 000000000000..594c4753ac38
--- /dev/null
+++ b/media-gfx/drqueue/Manifest
@@ -0,0 +1 @@
+DIST drqueue.0.64.4.tgz 619577 SHA256 a8753a41558e2d5af48a10071cb4a201b5e12f674d25127593bcf8a4bd1f634d SHA512 3ba014fe8ceb8b35658126455cdab9ccbd3d9343124267d61d128d94fd48fe695da724936b2ce7153ee620cf27f3e9e8fd0eb819fa4916c930a3c06a05efc680 WHIRLPOOL ca90cc9d3c47f4d2e3694880cb666175a39344114a3095ddc72f53521e2c0a7be928bb3dd359060695ffc8e12b6995b2740ccbed659f89ad4c09d5b7ee7b34f4
diff --git a/media-gfx/drqueue/drqueue-0.64.4-r1.ebuild b/media-gfx/drqueue/drqueue-0.64.4-r1.ebuild
new file mode 100644
index 000000000000..74fa8ae064d3
--- /dev/null
+++ b/media-gfx/drqueue/drqueue-0.64.4-r1.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1 user
+
+DESCRIPTION="Render farm managing software"
+HOMEPAGE="http://www.drqueue.org/"
+SRC_URI="http://drqueue.org/files/${PN}.${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X python ruby"
+
+RDEPEND="X? ( x11-libs/gtk+:2 )
+ ruby? ( dev-lang/ruby )
+ app-shells/tcsh"
+
+DEPEND="${RDEPEND}
+ python? ( dev-lang/swig )
+ ruby? ( dev-lang/swig )
+ python? ( dev-python/setuptools[${PYTHON_USEDEP}] )
+ >=dev-util/scons-0.97"
+
+S=${WORKDIR}/DrQueue-${PV}
+
+PATCHES=( "${FILESDIR}"/${P}-fpic.patch
+ "${FILESDIR}"/${P}-git.patch )
+
+pkg_setup() {
+ enewgroup drqueue
+ enewuser drqueue -1 /bin/bash /dev/null daemon,drqueue
+
+ use python && python-single-r1_pkg_setup
+}
+
+python_prepare() {
+ distutils-r1_python_prepare
+ # Workaround broken SWIG path
+ ln -s ../libdrqueue python/libdrqueue || die
+}
+
+src_compile() {
+ if use X; then
+ scons ${MAKEOPTS} build_drman=yes || die "scons failed"
+ else
+ scons ${MAKEOPTS} build_drqman=no || die "scons failed"
+ fi
+
+ if use python; then
+ einfo "compiling python bindings"
+ pushd "${S}"/python/ > /dev/null
+ distutils-r1_src_compile
+ popd > /dev/null
+ fi
+
+ if use ruby; then
+ einfo "compiling ruby bindings"
+ cd "${S}"/ruby/
+ ruby extconf.rb
+ emake || die "emake failed"
+ fi
+}
+
+pkg_preinst() {
+ # stop daemons since script is being updated
+ [ -n "$(pidof drqsd)" -a -x /etc/init.d/drqsd ] && \
+ /etc/init.d/drqsd stop
+ [ -n "$(pidof drqmd)" -a -x /etc/init.d/drqmd ] && \
+ /etc/init.d/drqmd stop
+}
+
+src_install() {
+ dodir /var/lib
+ scons PREFIX="${D}"/var/lib install || die "install failed"
+
+ # not really needed
+ rm -R "${D}"/var/lib/drqueue/bin/viewcmd || die "rm failed"
+
+ # install {conf,init,env}.d files
+ for i in drqmd drqsd ; do
+ newinitd "${FILESDIR}"/${PN}-0.64.3-etc-initd-${i} ${i} || die "newinitd failed"
+ newconfd "${FILESDIR}"/${PN}-0.64.3-etc-confd-${i} ${i} || die "newconfd failed"
+ done
+ newenvd "${FILESDIR}"/${PN}-0.64.3-etc-envd-02drqueue 02drqueue || die "newenvd failed"
+
+ # create the drqueue pid directory
+ dodir /var/run/drqueue
+ keepdir /var/run/drqueue
+
+ # move logs dir to /var/log
+ dodir /var/log
+ mv "${D}"/var/lib/drqueue/logs "${D}"/var/log/drqueue
+
+ # fix bins and make links for /usr/bin
+ dodir /usr/bin
+ local commands=( blockhost cjob jobfinfo \
+ jobinfo master requeue sendjob slave )
+ if use X ; then
+ commands=( ${commands[@]} drqman )
+ else
+ # Remove drqman leftovers
+ for i in etc/drqman.rc etc/drqman.conf bin/drqman ; do
+ rm -v "${D}"/var/lib/drqueue/$i || die "rm failed"
+ done
+ fi
+ for cmd in ${commands[@]} ; do
+ sed -e 's|SHLIB=\$DRQUEUE_ROOT/bin/shlib|SHLIB=/var/lib/drqueue/bin/shlib|' \
+ -i "${D}"var/lib/drqueue/bin/${cmd} || die "sed failed"
+ dosym /var/lib/drqueue/bin/${cmd} /usr/bin/ \
+ || die "dosym failed"
+ done
+
+ # install documentation
+ dodoc AUTHORS ChangeLog INSTALL \
+ NEWS README README.mentalray \
+ README.python setenv || die "dodoc failed"
+
+ if use python; then
+ cd "${S}"/python/
+ distutils-r1_src_install
+ dodir /var/lib/${PN}/python
+
+ # Install DRKeewee web service and example python scripts
+ insinto /var/lib/${PN}/python
+ doins -r DrKeewee examples || die "doins failed"
+ python_fix_shebang "${ED}var/lib/${PN}/python"
+ fi
+
+ if use ruby; then
+ cd "${S}"/ruby/
+ emake DESTDIR="${D}" install || die "emake failed"
+ fi
+}
+
+pkg_postinst() {
+ einfo "Edit /etc/conf.d/drqsd /etc/env.d/02drqueue"
+ einfo "and /etc/conf.d/drqmd DRQUEUE_MASTER=\"hostname\""
+ einfo "to reflect your master's hostname."
+ if use python ; then
+ einfo
+ einfo "DrKeewee can be found in /var/lib/drqueue/python"
+ fi
+}
diff --git a/media-gfx/drqueue/drqueue-9999.ebuild b/media-gfx/drqueue/drqueue-9999.ebuild
new file mode 100644
index 000000000000..b9b529593166
--- /dev/null
+++ b/media-gfx/drqueue/drqueue-9999.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1 git-2 user
+
+DESCRIPTION="Render farm managing software"
+HOMEPAGE="http://www.drqueue.org/"
+EGIT_REPO_URI="https://ssl.drqueue.org/git/${PN}.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="X python ruby"
+
+RDEPEND="X? ( x11-libs/gtk+:2 )
+ ruby? ( dev-lang/ruby )
+ app-shells/tcsh"
+
+DEPEND="${RDEPEND}
+ python? ( dev-lang/swig )
+ ruby? ( dev-lang/swig )
+ python? ( dev-python/setuptools[${PYTHON_USEDEP}] )
+ >=dev-util/scons-0.97"
+
+pkg_setup() {
+ enewgroup drqueue
+ enewuser drqueue -1 /bin/bash /dev/null daemon,drqueue
+
+ use python && python_pkg_setup
+}
+
+src_compile() {
+ if use X; then
+ scons ${MAKEOPTS} build_drman=yes || die "scons failed"
+ else
+ scons ${MAKEOPTS} build_drqman=no || die "scons failed"
+ fi
+
+ if use python; then
+ einfo "compiling python bindings"
+ pushd "${S}"/python/ > /dev/null
+ distutils-r1_src_compile
+ popd > /dev/null
+ fi
+
+ if use ruby; then
+ einfo "compiling ruby bindings"
+ cd "${S}"/ruby/
+ ruby extconf.rb
+ emake || die "emake failed"
+ fi
+}
+
+pkg_preinst() {
+ # stop daemons since script is being updated
+ [ -n "$(pidof drqsd)" -a -x /etc/init.d/drqsd ] && \
+ /etc/init.d/drqsd stop
+ [ -n "$(pidof drqmd)" -a -x /etc/init.d/drqmd ] && \
+ /etc/init.d/drqmd stop
+}
+
+src_install() {
+ dodir /var/lib
+ scons PREFIX="${D}"/var/lib install || die "install failed"
+
+ # not really needed
+ rm -R "${D}"/var/lib/drqueue/bin/viewcmd || die "rm failed"
+
+ # install {conf,init,env}.d files
+ for i in drqmd drqsd ; do
+ newinitd "${FILESDIR}"/${PN}-0.64.3-etc-initd-${i} ${i} || die "newinitd failed"
+ newconfd "${FILESDIR}"/${PN}-0.64.3-etc-confd-${i} ${i} || die "newconfd failed"
+ done
+ newenvd "${FILESDIR}"/${PN}-0.64.3-etc-envd-02drqueue 02drqueue || die "newenvd failed"
+
+ # create the drqueue pid directory
+ dodir /var/run/drqueue
+ keepdir /var/run/drqueue
+
+ # move logs dir to /var/log
+ dodir /var/log
+ mv "${D}"/var/lib/drqueue/logs "${D}"/var/log/drqueue
+
+ # fix bins and make links for /usr/bin
+ dodir /usr/bin
+ local commands=( blockhost cjob jobfinfo \
+ jobinfo master requeue sendjob slave )
+ if use X ; then
+ commands=( ${commands[@]} drqman )
+ else
+ # Remove drqman leftovers
+ for i in etc/drqman.rc etc/drqman.conf bin/drqman ; do
+ rm -v "${D}"/var/lib/drqueue/$i || die "rm failed"
+ done
+ fi
+ for cmd in ${commands[@]} ; do
+ sed -e 's|SHLIB=\$DRQUEUE_ROOT/bin/shlib|SHLIB=/var/lib/drqueue/bin/shlib|' \
+ -i "${D}"var/lib/drqueue/bin/${cmd} || die "sed failed"
+ dosym /var/lib/drqueue/bin/${cmd} /usr/bin/ \
+ || die "dosym failed"
+ done
+
+ # install documentation
+ dodoc AUTHORS ChangeLog INSTALL \
+ NEWS README README.mentalray \
+ README.python README.shell_variables \
+ setenv || die "dodoc failed"
+
+ if use python; then
+ cd "${S}"/python/
+ distutils-r1_src_install
+ dodir /var/lib/${PN}/python
+
+ # Install DRKeewee web service and example python scripts
+ insinto /var/lib/${PN}/python
+ doins -r DrKeewee examples || die "doins failed"
+ python_fix_shebang "${ED}var/lib/${PN}/python"
+ fi
+
+ if use ruby; then
+ cd "${S}"/ruby/
+ emake DESTDIR="${D}" install || die "emake failed"
+ fi
+}
+
+pkg_postinst() {
+ einfo "Edit /etc/conf.d/drqsd /etc/env.d/02drqueue"
+ einfo "and /etc/conf.d/drqmd DRQUEUE_MASTER=\"hostname\""
+ einfo "to reflect your master's hostname."
+ if use python ; then
+ einfo
+ einfo "DrKeewee can be found in /var/lib/drqueue/python"
+ fi
+}
diff --git a/media-gfx/drqueue/files/drqueue-0.64.3-compile-flags.patch b/media-gfx/drqueue/files/drqueue-0.64.3-compile-flags.patch
new file mode 100644
index 000000000000..eeee2a67f752
--- /dev/null
+++ b/media-gfx/drqueue/files/drqueue-0.64.3-compile-flags.patch
@@ -0,0 +1,15 @@
+--- SConstruct_BACKUP 2009-12-31 22:53:23.000000000 +0100
++++ SConstruct 2009-12-31 22:57:48.000000000 +0100
+@@ -102,9 +102,10 @@
+ env_lib.Append (CPPPATH=['.','libdrqueue'])
+ env_lib.Append (CPPDEFINES = Split ('-DCOMM_REPORT -D_GNU_SOURCE ' \
+ + '-D_NO_COMPUTER_POOL_SEMAPHORES -D_NO_COMPUTER_SEMAPHORES'),
+- CPPFLAGS = Split ('-g -O0'),
++ CFLAGS = Split(os.environ.get('CFLAGS', '')),
+ CXXFLAGS = ['-D__CPLUSPLUS',Split(env_lib.subst('$CCFLAGS')),
+- Split(env_lib.subst('$CPPDEFINES'))])
++ Split(env_lib.subst('$CPPDEFINES')),
++ Split(os.environ.get('CXXFLAGS', ''))])
+
+ print "Platform is: ",sys.platform
+ if sys.platform == "linux2":
diff --git a/media-gfx/drqueue/files/drqueue-0.64.3-etc-confd-drqmd b/media-gfx/drqueue/files/drqueue-0.64.3-etc-confd-drqmd
new file mode 100644
index 000000000000..c6580b279b08
--- /dev/null
+++ b/media-gfx/drqueue/files/drqueue-0.64.3-etc-confd-drqmd
@@ -0,0 +1,20 @@
+# /etc/conf.d/drqmd config file for /etc/init.d/drqmd
+
+# enter your master hostname here
+DRQUEUE_MASTER="127.0.0.1"
+
+# this is the drqueue root dir, do not change below here unless you know what you're doing
+DRQUEUE_ROOT="/var/lib/drqueue"
+DRQUEUE_LOGS="/var/log/drqueue"
+
+# set the environmental variables for drqueue
+ENV="env DRQUEUE_ROOT=${DRQUEUE_ROOT} DRQUEUE_MASTER=${DRQUEUE_MASTER} DRQUEUE_LOGS=${DRQUEUE_LOGS}"
+
+# this is the drqueue master executable
+DRQUEUEMASTER_EXEC="/usr/bin/master"
+
+# this is where drqueue master will store its pid file
+DRQUEUEMASTER_PIDFILE="/var/run/drqueue/drqmd.pid"
+
+
+
diff --git a/media-gfx/drqueue/files/drqueue-0.64.3-etc-confd-drqsd b/media-gfx/drqueue/files/drqueue-0.64.3-etc-confd-drqsd
new file mode 100644
index 000000000000..d65b05555786
--- /dev/null
+++ b/media-gfx/drqueue/files/drqueue-0.64.3-etc-confd-drqsd
@@ -0,0 +1,20 @@
+# /etc/conf.d/drqsd config file for /etc/init.d/drqsd
+
+# enter your master hostname here
+DRQUEUE_MASTER="127.0.0.1"
+
+# this is the drqueue root dir, do not change below here unless you know what you're doing
+DRQUEUE_ROOT="/var/lib/drqueue"
+DRQUEUE_LOGS="/var/log/drqueue"
+
+# list of pools the slave is belonging to ("blender:mentalray:bla123")
+DRQUEUE_POOL=""
+
+# set the environmental variables for drqueue
+ENV="env DRQUEUE_ROOT=${DRQUEUE_ROOT} DRQUEUE_MASTER=${DRQUEUE_MASTER} DRQUEUE_LOGS=${DRQUEUE_LOGS} DRQUEUE_POOL=${DRQUEUE_POOL}"
+
+# this is the drqueue slave executable
+DRQUEUESLAVE_EXEC="/usr/bin/slave"
+
+# this is where drqueue slave will store its pid file
+DRQUEUESLAVE_PIDFILE="/var/run/drqueue/drqsd.pid"
diff --git a/media-gfx/drqueue/files/drqueue-0.64.3-etc-envd-02drqueue b/media-gfx/drqueue/files/drqueue-0.64.3-etc-envd-02drqueue
new file mode 100644
index 000000000000..cb368bf79cf3
--- /dev/null
+++ b/media-gfx/drqueue/files/drqueue-0.64.3-etc-envd-02drqueue
@@ -0,0 +1,5 @@
+# environment variable for DrQueue
+DRQUEUE_MASTER="127.0.0.1"
+DRQUEUE_ROOT="/var/lib/drqueue"
+DRQUEUE_LOGS="/var/log/drqueue"
+
diff --git a/media-gfx/drqueue/files/drqueue-0.64.3-etc-initd-drqmd b/media-gfx/drqueue/files/drqueue-0.64.3-etc-initd-drqmd
new file mode 100755
index 000000000000..ff4ae9250b54
--- /dev/null
+++ b/media-gfx/drqueue/files/drqueue-0.64.3-etc-initd-drqmd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ [ -e "${DRQUEUEMASTER_PIDFILE}" ] && rm -f ${DRQUEUEMASTER_PIDFILE} &>/dev/null
+ ebegin "Starting drqmd"
+
+ chown drqueue `dirname ${DRQUEUEMASTER_PIDFILE}` &>/dev/null
+ ${ENV} /sbin/start-stop-daemon -b --start --quiet --startas /usr/bin/master \
+ --pidfile ${DRQUEUEMASTER_PIDFILE} --make-pidfile
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping drqmd"
+ pkill -u root,drqueue master
+ start-stop-daemon --stop --quiet --pidfile "${DRQUEUEMASTER_PIDFILE}"
+ rm -f "${DRQUEUEMASTER_PIDFILE}"
+ eend $?
+}
+
+
diff --git a/media-gfx/drqueue/files/drqueue-0.64.3-etc-initd-drqsd b/media-gfx/drqueue/files/drqueue-0.64.3-etc-initd-drqsd
new file mode 100755
index 000000000000..65b3ced86374
--- /dev/null
+++ b/media-gfx/drqueue/files/drqueue-0.64.3-etc-initd-drqsd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ [ -e "${DRQUEUESLAVE_PIDFILE}" ] && rm -f ${DRQUEUESLAVE_PIDFILE} &>/dev/null
+
+ ebegin "Starting drqsd"
+ chown drqueue `dirname ${DRQUEUESLAVE_PIDFILE}` &>/dev/null
+ ${ENV} /sbin/start-stop-daemon -b --start --quiet --startas /usr/bin/slave \
+ --pidfile ${DRQUEUESLAVE_PIDFILE} --make-pidfile
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping drqsd"
+ pkill -u root,drqueue slave
+ start-stop-daemon --stop --quiet --pidfile "${DRQUEUESLAVE_PIDFILE}"
+ rm -f "${DRQUEUESLAVE_PIDFILE}"
+ eend $?
+}
+
diff --git a/media-gfx/drqueue/files/drqueue-0.64.3-sconstruct.patch b/media-gfx/drqueue/files/drqueue-0.64.3-sconstruct.patch
new file mode 100644
index 000000000000..87b4608300b1
--- /dev/null
+++ b/media-gfx/drqueue/files/drqueue-0.64.3-sconstruct.patch
@@ -0,0 +1,11 @@
+--- drqueue-0.64.3/SConstruct 2007-07-22 07:34:40.000000000 +0100
++++ drqueue-0.64.3/SConstruct.patched 2007-08-15 18:59:54.000000000 +0100
+@@ -108,7 +108,7 @@ env_lib.Append (CPPDEFINES = Split ('-DC
+
+ print "Platform is: ",sys.platform
+ if sys.platform == "linux2":
+- env_lib.Append (CPPDEFINES = Split ('-D__LINUX'))
++ env_lib.Append (CPPDEFINES = Split ('-D__LINUX'),CFLAGS = Split ('-fPIC'))
+ elif sys.platform == "darwin":
+ env_lib.Append (CPPDEFINES = Split ('-D__OSX'))
+ if env_lib.get('universal_binary'):
diff --git a/media-gfx/drqueue/files/drqueue-0.64.4-fpic.patch b/media-gfx/drqueue/files/drqueue-0.64.4-fpic.patch
new file mode 100644
index 000000000000..217728f181a2
--- /dev/null
+++ b/media-gfx/drqueue/files/drqueue-0.64.4-fpic.patch
@@ -0,0 +1,11 @@
+--- DrQueue-0.64.4/SConstruct 2012-10-29 17:11:02.462831439 +0100
++++ DrQueue-0.64.4/SConstruct 2012-10-29 17:11:08.746752880 +0100
+@@ -141,7 +141,7 @@
+
+ print "Platform is: ",sys.platform
+ if sys.platform == "linux2":
+- env_lib.Append (CPPDEFINES = Split ('-D__LINUX'))
++ env_lib.Append (CPPDEFINES = Split ('-D__LINUX'),CFLAGS = Split ('-fPIC'))
+ elif sys.platform == "darwin":
+ env_lib.Append (CPPDEFINES = Split ('-D__OSX'))
+ if env_lib.get('universal_binary'):
diff --git a/media-gfx/drqueue/files/drqueue-0.64.4-git.patch b/media-gfx/drqueue/files/drqueue-0.64.4-git.patch
new file mode 100644
index 000000000000..3d87ceef6345
--- /dev/null
+++ b/media-gfx/drqueue/files/drqueue-0.64.4-git.patch
@@ -0,0 +1,17 @@
+--- DrQueue-0.64.4/SConstruct 2012-10-29 16:40:29.396747920 +0100
++++ DrQueue-0.64.4/SConstruct 2012-10-29 16:49:00.676356045 +0100
+@@ -79,8 +79,12 @@
+ print("Not a Git repository. Can't fetch commit id.")
+ commit_string = ""
+ else:
+- commit_string = gitlog.communicate()[0].split("\n")[0].split(" ")[1]
+- print("Current Git commit id is: "+commit_string)
++ output = gitlog.communicate()[0]
++ if output:
++ commit_string = output.split("\n")[0].split(" ")[1]
++ print("Current Git commit id is: "+commit_string)
++ else:
++ commit_string = ""
+ return commit_string
+
+ def write_git_rev(commit_id):
diff --git a/media-gfx/drqueue/metadata.xml b/media-gfx/drqueue/metadata.xml
new file mode 100644
index 000000000000..16bcc9f800a2
--- /dev/null
+++ b/media-gfx/drqueue/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/duhdraw/Manifest b/media-gfx/duhdraw/Manifest
new file mode 100644
index 000000000000..2ca978b52fe7
--- /dev/null
+++ b/media-gfx/duhdraw/Manifest
@@ -0,0 +1 @@
+DIST duhdraw-2.8.13.tar.gz 51779 SHA256 12a432d2874a6f0579879e3242d832139b7f2a4879b2cfcfb6ced046236b4b2c SHA512 fa9102133dcd100b2cde58d4d92aabfcdf86bb16a8066191e92922d6cea470094ff226e569bf92d34e1f0f6a3e657eaf3326cecf091ed1bc37bd2faace340798 WHIRLPOOL d0adabe102251c2c6c7287a1466de1525e18f1c74d6df1b4a444c15fbdc5dc4ddbc822d11069d9c6f0cff18bbd60daa408dbcc74b058f647b31b9dc8cdc749d3
diff --git a/media-gfx/duhdraw/duhdraw-2.8.13-r1.ebuild b/media-gfx/duhdraw/duhdraw-2.8.13-r1.ebuild
new file mode 100644
index 000000000000..b7cd4238d1de
--- /dev/null
+++ b/media-gfx/duhdraw/duhdraw-2.8.13-r1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs eutils
+
+DESCRIPTION="ASCII art editor"
+HOMEPAGE="http://www.cs.helsinki.fi/u/penberg/duhdraw"
+SRC_URI="http://www.cs.helsinki.fi/u/penberg/duhdraw/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos"
+
+DEPEND="sys-libs/ncurses"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-macos.patch
+ epatch "${FILESDIR}"/${P}-prestrip.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC) ${CFLAGS} ${LDFLAGS}"
+}
+
+src_install() {
+ dobin ansi ansitoc duhdraw
+ dodoc CREDITS HISTORY TODO
+}
diff --git a/media-gfx/duhdraw/files/duhdraw-2.8.13-macos.patch b/media-gfx/duhdraw/files/duhdraw-2.8.13-macos.patch
new file mode 100644
index 000000000000..30be358e46d3
--- /dev/null
+++ b/media-gfx/duhdraw/files/duhdraw-2.8.13-macos.patch
@@ -0,0 +1,12 @@
+--- ./duhdraw-2.8.13/duhdraw.c.orig 2005-03-02 09:22:46.000000000 +0100
++++ ./duhdraw-2.8.13/duhdraw.c 2006-11-16 09:56:21.000000000 +0100
+@@ -12,7 +12,9 @@
+ #include <stdio.h>
+ #include <dirent.h>
+ #include <sys/stat.h>
++#ifndef __APPLE__
+ #include <malloc.h>
++#endif
+ #include <time.h>
+ #include <curses.h>
+ #include <ctype.h>
diff --git a/media-gfx/duhdraw/files/duhdraw-2.8.13-prestrip.patch b/media-gfx/duhdraw/files/duhdraw-2.8.13-prestrip.patch
new file mode 100644
index 000000000000..0162f39370aa
--- /dev/null
+++ b/media-gfx/duhdraw/files/duhdraw-2.8.13-prestrip.patch
@@ -0,0 +1,18 @@
+--- ./duhdraw-2.8.13/Makefile.orig 2005-03-02 09:22:46.000000000 +0100
++++ ./duhdraw-2.8.13/Makefile 2006-11-16 09:58:29.000000000 +0100
+@@ -12,15 +12,12 @@
+
+ ansi: cleanansi
+ $(CC) -o ansi ansi.c ansi-esc.c $(LIBS)
+- $(STRIP) ansi
+
+ duhdraw: cleandd
+ $(CC) -o duhdraw duhdraw.c ansi-esc.c $(LIBS)
+- $(STRIP) duhdraw
+
+ ansitoc: cleanansitoc
+ $(CC) -o ansitoc ansitoc.c
+- $(STRIP) ansitoc
+
+ cleanansi:
+ rm -f ansi
diff --git a/media-gfx/duhdraw/metadata.xml b/media-gfx/duhdraw/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/duhdraw/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/ebdftopcf/Manifest b/media-gfx/ebdftopcf/Manifest
new file mode 100644
index 000000000000..7ebecee27f41
--- /dev/null
+++ b/media-gfx/ebdftopcf/Manifest
@@ -0,0 +1 @@
+DIST ebdftopcf-2.tar.bz2 7774 SHA256 3e832710bb69955b2496da5f619066189b3c990e7087130c5faa2ed7741e9a10 SHA512 4631f1591290e0ddc778d5c557aff1e698d8dd7e5ac7e659fda7752642034fbabb091c840dcfad5695e9fc19909203a7fdc0b7a69d57a162ce6bb8fe710ef0f4 WHIRLPOOL bc66b03b8c86f2610330a4de0b637e0d43b0a30660a5e705e6aa7ed2e32b44880ce54be6ad54b28f72d465e5c86c095a627719f60971ebb934af29d750c16c1a
diff --git a/media-gfx/ebdftopcf/ebdftopcf-2.ebuild b/media-gfx/ebdftopcf/ebdftopcf-2.ebuild
new file mode 100644
index 000000000000..85ceacd0bb12
--- /dev/null
+++ b/media-gfx/ebdftopcf/ebdftopcf-2.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="ebdftopcf optimially generators PCF files from BDF files"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE=""
+
+DEPEND=""
+# these apps are used at runtime by ebdftopcf
+RDEPEND="x11-apps/bdftopcf
+ app-arch/gzip"
+
+src_install() {
+ insinto /usr/share/ebdftopcf
+ doins Makefile.ebdftopcf || die
+ dodoc README
+ doman *.5
+}
diff --git a/media-gfx/ebdftopcf/metadata.xml b/media-gfx/ebdftopcf/metadata.xml
new file mode 100644
index 000000000000..0274ccfd143d
--- /dev/null
+++ b/media-gfx/ebdftopcf/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>fonts</herd>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+ <description>Maintainer and upstream author.</description>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/enblend/Manifest b/media-gfx/enblend/Manifest
new file mode 100644
index 000000000000..8e9dbf3333a7
--- /dev/null
+++ b/media-gfx/enblend/Manifest
@@ -0,0 +1,3 @@
+DIST enblend-enfuse-4.1.1.tar.gz 850214 SHA256 9d0947633ebaa0dc1211331b31009408de6fe2108751ad4190760e3a9f181bc9 SHA512 dd4c8f205986beef1268210a8ccad10107125fc15a45b2e7266f250d36a294356f557d577b80e923e04b5f14ed5f6070201793c067cc3a2e7d6020cf5669a61f WHIRLPOOL c9938499116f26f3bfe6eae874414722a15380cbda959c82315bb124cb7b58456550174b0d43355d924cb6e107ef3ee4d1b83f8adc82d7144d974b66207ff965
+DIST enblend-enfuse-4.1.2.tar.gz 869265 SHA256 6dc2682d366776ff771fd6c9ae709bcfef0b7b00cac9e620b56d13bf81faaf6e SHA512 8d4fa80bb455276e79e7ee4e757c8774bb0380fa2ef56835e18a02fda12b710eaad0a90f2849dc2297eb7cd477dc7134a90a61708373928463595d726ded0259 WHIRLPOOL e0834b7e9461ae3d29e52cd21cd8c41384356026f3e62b7c60cbb60ba02edc23c844862afac001cb20b5da828a11ec7f9bd4d604ab77177ca318e400ccf70650
+DIST enblend-enfuse-4.1.3.tar.gz 862079 SHA256 1c00ae95cd05502759d7d47f99e6ba1150f8807f8f4f46c800cd46c5ad0df9ac SHA512 0a3487783afadee896b84411330898393cda4be4cbb79d36013daa98c17ab88f97a298c21a5c398b7cb2ce83e8dc4519a80e18be472c5fec10c3114037b6db73 WHIRLPOOL ab33a8ca5c38d9a5dca6aaeed7cbc806f7c34c5642f9e568a90d14789ecede896c0da888e5fe7e7d30e586778e0734495d06055fc189732e55bc0c013e699b48
diff --git a/media-gfx/enblend/enblend-4.1.1-r1.ebuild b/media-gfx/enblend/enblend-4.1.1-r1.ebuild
new file mode 100644
index 000000000000..20e28328a046
--- /dev/null
+++ b/media-gfx/enblend/enblend-4.1.1-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+MY_P="${PN}-enfuse-${PV/_rc/rc}"
+
+DESCRIPTION="Image Blending with Multiresolution Splines"
+HOMEPAGE="http://enblend.sourceforge.net/"
+SRC_URI="mirror://sourceforge/enblend/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 VIGRA"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc gpu image-cache openmp"
+
+REQUIRED_USE="openmp? ( !image-cache )"
+
+RDEPEND="
+ media-libs/glew
+ =media-libs/lcms-2*
+ >=media-libs/libpng-1.2.43:0=
+ >=media-libs/openexr-1.0:=
+ media-libs/plotutils[X]
+ media-libs/tiff
+ >=media-libs/vigra-1.8.0
+ sci-libs/gsl
+ virtual/jpeg:0=
+ debug? ( dev-libs/dmalloc )
+ gpu? ( media-libs/freeglut )"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.31.0:=
+ virtual/pkgconfig
+ doc? (
+ media-gfx/imagemagick
+ media-gfx/transfig
+ sci-visualization/gnuplot[gd]
+ virtual/latex-base
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i -e "/CXX_FLAGS/s:-O3::g" CMakeLists.txt || die
+ sed -i -e "s:doc/enblend:doc/${P}:" doc/CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_CXX_FLAGS_RELEASE=""
+ $(cmake-utils_use_enable debug DMALLOC)
+ $(cmake-utils_use doc DOC)
+ $(cmake-utils_use_enable image-cache IMAGECACHE)
+ $(cmake-utils_use_enable openmp)
+ $(cmake-utils_use_enable gpu)
+ )
+ CMAKE_BUILD_TYPE="Release"
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # forcing -j1 as every parallel compilation process needs about 1 GB RAM.
+ cmake-utils_src_compile -j1
+}
+
+src_install() {
+ local DOCS=( AUTHORS ChangeLog NEWS README )
+ cmake-utils_src_install
+}
diff --git a/media-gfx/enblend/enblend-4.1.1.ebuild b/media-gfx/enblend/enblend-4.1.1.ebuild
new file mode 100644
index 000000000000..20e6ba7447ab
--- /dev/null
+++ b/media-gfx/enblend/enblend-4.1.1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils
+
+MY_P="${PN}-enfuse-${PV/_rc/rc}"
+
+DESCRIPTION="Image Blending with Multiresolution Splines"
+HOMEPAGE="http://enblend.sourceforge.net/"
+SRC_URI="mirror://sourceforge/enblend/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 VIGRA"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug doc gpu +image-cache +openexr openmp"
+
+RDEPEND="
+ media-libs/glew
+ =media-libs/lcms-2*
+ >=media-libs/libpng-1.2.43
+ media-libs/plotutils[X]
+ media-libs/tiff
+ >=media-libs/vigra-1.8.0
+ sci-libs/gsl
+ virtual/jpeg
+ gpu? ( media-libs/freeglut )
+ openexr? ( >=media-libs/openexr-1.0 )"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.31.0
+ virtual/pkgconfig
+ doc? (
+ media-gfx/transfig
+ sci-visualization/gnuplot[gd]
+ virtual/latex-base
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if use image-cache && use openmp; then
+ ewarn "the openmp and image-cache USE-flags are mutually exclusive"
+ ewarn "image-cache will be disabled in favour of openmp"
+ fi
+}
+
+src_configure() {
+ local myconf="--with-boost-filesystem"
+ if use image-cache && use openmp; then
+ myconf="${myconf} --disable-image-cache --enable-openmp"
+ else
+ myconf="${myconf} $(use_enable image-cache) $(use_enable openmp)"
+ fi
+
+ use doc && myconf="${myconf} --with-gnuplot=$(type -p gnuplot)" \
+ || myconf="${myconf} --with-gnuplot=false"
+
+ econf \
+ --with-x \
+ $(use_enable debug) \
+ $(use_enable gpu gpu-support) \
+ $(use_with openexr) \
+ ${myconf}
+}
+
+src_compile() {
+ # forcing -j1 as every parallel compilation process needs about 1 GB RAM.
+ emake -j1 || die
+ if use doc; then
+ cd doc
+ make enblend.pdf enfuse.pdf || die
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README || die
+ use doc && dodoc doc/en{blend,fuse}.pdf
+}
diff --git a/media-gfx/enblend/enblend-4.1.2.ebuild b/media-gfx/enblend/enblend-4.1.2.ebuild
new file mode 100644
index 000000000000..5078db95f3ec
--- /dev/null
+++ b/media-gfx/enblend/enblend-4.1.2.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+MY_P="${PN}-enfuse-${PV/_rc/rc}"
+
+DESCRIPTION="Image Blending with Multiresolution Splines"
+HOMEPAGE="http://enblend.sourceforge.net/"
+SRC_URI="mirror://sourceforge/enblend/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 VIGRA"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc gpu image-cache openmp"
+
+REQUIRED_USE="openmp? ( !image-cache )"
+
+RDEPEND="
+ media-libs/glew
+ =media-libs/lcms-2*
+ >=media-libs/libpng-1.2.43:0=
+ >=media-libs/openexr-1.0:=
+ media-libs/plotutils[X]
+ media-libs/tiff
+ >=media-libs/vigra-1.8.0
+ sci-libs/gsl
+ virtual/jpeg:0=
+ debug? ( dev-libs/dmalloc )
+ gpu? ( media-libs/freeglut )"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.31.0:=
+ sys-apps/help2man
+ virtual/pkgconfig
+ doc? (
+ media-gfx/imagemagick
+ media-gfx/transfig
+ sci-visualization/gnuplot[gd]
+ virtual/latex-base
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ sed -i -e "/CXX_FLAGS/s:-O3::g" CMakeLists.txt || die
+ sed -i -e "s:doc/enblend:doc/${P}:" doc/CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_CXX_FLAGS_RELEASE=""
+ $(cmake-utils_use_enable debug DMALLOC)
+ $(cmake-utils_use doc DOC)
+ $(cmake-utils_use_enable image-cache IMAGECACHE)
+ $(cmake-utils_use_enable openmp)
+ $(cmake-utils_use_enable gpu)
+ )
+ CMAKE_BUILD_TYPE="Release"
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # forcing -j1 as every parallel compilation process needs about 1 GB RAM.
+ cmake-utils_src_compile -j1
+}
+
+src_install() {
+ local DOCS=( AUTHORS ChangeLog NEWS README )
+ cmake-utils_src_install
+}
diff --git a/media-gfx/enblend/enblend-4.1.3.ebuild b/media-gfx/enblend/enblend-4.1.3.ebuild
new file mode 100644
index 000000000000..132ec8d73852
--- /dev/null
+++ b/media-gfx/enblend/enblend-4.1.3.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+MY_P="${PN}-enfuse-${PV/_rc/rc}"
+
+DESCRIPTION="Image Blending with Multiresolution Splines"
+HOMEPAGE="http://enblend.sourceforge.net/"
+SRC_URI="mirror://sourceforge/enblend/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 VIGRA"
+SLOT="0"
+KEYWORDS="~amd64 ppc ~x86"
+IUSE="debug doc gpu image-cache openmp"
+
+REQUIRED_USE="openmp? ( !image-cache )"
+
+RDEPEND="
+ >=dev-libs/boost-1.31.0:=
+ media-libs/glew
+ >=media-libs/lcms-2.5:2
+ >=media-libs/libpng-1.2.43:0=
+ >=media-libs/openexr-1.0:=
+ media-libs/plotutils[X]
+ media-libs/tiff:=
+ >=media-libs/vigra-1.8.0[openexr]
+ sci-libs/gsl
+ virtual/jpeg:0=
+ debug? ( dev-libs/dmalloc )
+ gpu? ( media-libs/freeglut )"
+DEPEND="${RDEPEND}
+ media-gfx/imagemagick
+ sys-apps/help2man
+ virtual/pkgconfig
+ doc? (
+ media-gfx/transfig
+ sci-visualization/gnuplot[gd]
+ virtual/latex-base
+ )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}/${PN}-4.1.3-vigra_check.patch" )
+
+src_prepare() {
+ sed -i -e "/CXX_FLAGS/s:-O3::g" CMakeLists.txt || die
+ sed -i -e "s:doc/enblend:share/doc/${PF}:" doc/CMakeLists.txt || die
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_CXX_FLAGS_RELEASE=""
+ -DMAKEINFO_EXE="/bin/true"
+ $(cmake-utils_use_enable debug DMALLOC)
+ $(cmake-utils_use doc DOC)
+ $(cmake-utils_use_enable image-cache IMAGECACHE)
+ $(cmake-utils_use_enable openmp)
+ $(cmake-utils_use_enable gpu)
+ )
+ CMAKE_BUILD_TYPE="Release"
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # forcing -j1 as every parallel compilation process needs about 1 GB RAM.
+ cmake-utils_src_compile -j1
+}
+
+src_install() {
+ local DOCS=( AUTHORS ChangeLog NEWS README )
+ cmake-utils_src_install
+}
diff --git a/media-gfx/enblend/files/enblend-4.1.3-vigra_check.patch b/media-gfx/enblend/files/enblend-4.1.3-vigra_check.patch
new file mode 100644
index 000000000000..982293e47713
--- /dev/null
+++ b/media-gfx/enblend/files/enblend-4.1.3-vigra_check.patch
@@ -0,0 +1,11 @@
+--- ConfigureChecks.cmake.orig 2013-10-07 10:50:00.000000000 +0400
++++ ConfigureChecks.cmake 2015-03-31 13:42:40.179527224 +0300
+@@ -53,7 +53,7 @@
+ if(VIGRA_FOUND AND NOT VIGRA_VERSION_CHECK)
+ unset(VIGRA_SETIMAGEINDEX CACHE)
+ set(CMAKE_REQUIRED_INCLUDES ${VIGRA_INCLUDE_DIR})
+- set(CMAKE_REQUIRED_LIBRARIES ${VIGRA_LIBRARIES})
++ set(CMAKE_REQUIRED_LIBRARIES ${VIGRA_LIBRARIES} -lpthread)
+ check_cxx_source_compiles(
+ "
+ #include <vigra/imageinfo.hxx>
diff --git a/media-gfx/enblend/metadata.xml b/media-gfx/enblend/metadata.xml
new file mode 100644
index 000000000000..f4732882ad96
--- /dev/null
+++ b/media-gfx/enblend/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="gpu">GPU support for Enblend</flag>
+ <flag name="image-cache">allow for processing of large images</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">enblend</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/engauge/Manifest b/media-gfx/engauge/Manifest
new file mode 100644
index 000000000000..87349cdb384f
--- /dev/null
+++ b/media-gfx/engauge/Manifest
@@ -0,0 +1,2 @@
+DIST engauge-5.1.tar.gz 10612879 SHA256 64ec75af53a757622da786835f4cc70c09fc491e69aafc6e69dbfd54bfdc3a59 SHA512 595ac3c96c88d20e2405019efadaff802c0c85079314ec955475b16aec3763f3cb954f5e072678fc1b155bd339b2b758c8963087e4e09e390e29ffea0f7b9a5a WHIRLPOOL fa4dbea7617bae87d7b32b025a2182bfa9ce194850748b98464fe15a3fe3375d259a3af72df71ab859ce9294a25739d96a117254991d0b14ac5a2b4609eaa39c
+DIST engauge_5.2.tgz 5708224 SHA256 2defe5f06a78cbb9e3361e649de6b84b90fa85e3f587245e240b8efb8df78b36 SHA512 b1839a223c93866f880ca090b6dd5a9ab45a89b5f6f470fd6abba3e2aa4b108ed228c8b06c3888fa463316798c2d157e20b2e22975bd65a1124d007bb36d2d88 WHIRLPOOL 528cc08a6c6d2dcef39ca0bcbc221f29131ae47e1b28b5b727a1336d15ed9c5a6045fd62a853a423ca5edd3a4a369bd1dc76847396c0d51036a4c6bc33ff9004
diff --git a/media-gfx/engauge/engauge-5.1.ebuild b/media-gfx/engauge/engauge-5.1.ebuild
new file mode 100644
index 000000000000..722690fe41c8
--- /dev/null
+++ b/media-gfx/engauge/engauge-5.1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit versionator qt4-r2 eutils
+
+DESCRIPTION="Convert an image file showing a graph or map into numbers"
+HOMEPAGE="http://digitizer.sourceforge.net/"
+SRC_URI="mirror://sourceforge/digitizer/digit-src-$(replace_version_separator . _).tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples"
+
+RDEPEND="dev-qt/qt3support:4
+ dev-qt/qtgui:4[gif(+)]
+ sci-libs/fftw:3.0
+ x11-libs/libXft"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ # Some patching and using the DEBIAN_PACKAGE ifdef is necessary to make sure the
+ # documentation is looked for in the proper directory
+ sed -i -e "s:/usr/share/doc/engauge-digitizer-doc/html:${ROOT}/usr/share/doc/${PF}/usermanual:" \
+ src/digitmain.cpp || die "sed failed"
+ sed -i -e '/unix {/a DEFINES += DEBIAN_PACKAGE' \
+ digitizer.pro || die "sed failed"
+}
+
+src_configure() {
+ eqmake4 digitizer.pro
+}
+
+src_install() {
+ dobin bin/engauge
+ newicon src/img/lo32-app-digitizer.png "${PN}.png"
+ make_desktop_entry engauge "Engauge Digitizer" ${PN} Graphics
+ insinto /usr/share/doc/${PF}
+ if use doc; then
+ doins -r usermanual || die "install documentation failed"
+ fi
+ if use examples; then
+ doins -r samples || die "install examples failed"
+ fi
+}
diff --git a/media-gfx/engauge/engauge-5.2.ebuild b/media-gfx/engauge/engauge-5.2.ebuild
new file mode 100644
index 000000000000..45138748723e
--- /dev/null
+++ b/media-gfx/engauge/engauge-5.2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit versionator qt4-r2 eutils
+
+DESCRIPTION="Convert an image file showing a graph or map into numbers"
+HOMEPAGE="http://digitizer.sourceforge.net/"
+SRC_URI="mirror://sourceforge/digitizer/${PN}_${PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples"
+
+RDEPEND="dev-qt/qt3support:4
+ dev-qt/qtgui:4[gif(+)]
+ sci-libs/fftw:3.0
+ x11-libs/libXft"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # Some patching and using the DEBIAN_PACKAGE ifdef is necessary to make sure the
+ # documentation is looked for in the proper directory
+ sed -i -e "s:/usr/share/doc/engauge-digitizer-doc/html:${ROOT}/usr/share/doc/${PF}/usermanual:" \
+ src/digitmain.cpp || die "sed failed"
+ sed -i -e '/unix {/a DEFINES += DEBIAN_PACKAGE' \
+ digitizer.pro || die "sed failed"
+}
+
+src_configure() {
+ eqmake4 digitizer.pro
+}
+
+src_install() {
+ dobin bin/engauge
+ newicon src/img/lo32-app-digitizer.png "${PN}.png"
+ make_desktop_entry engauge "Engauge Digitizer" ${PN} Graphics
+ insinto /usr/share/doc/${PF}
+ if use doc; then
+ doins -r usermanual || die "install documentation failed"
+ fi
+ if use examples; then
+ doins -r samples || die "install examples failed"
+ fi
+}
diff --git a/media-gfx/engauge/metadata.xml b/media-gfx/engauge/metadata.xml
new file mode 100644
index 000000000000..d1d947c94631
--- /dev/null
+++ b/media-gfx/engauge/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>calchan@gentoo.org</email>
+ <name>Denis Dupeyron</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">digitizer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/entangle/Manifest b/media-gfx/entangle/Manifest
new file mode 100644
index 000000000000..093a49728145
--- /dev/null
+++ b/media-gfx/entangle/Manifest
@@ -0,0 +1 @@
+DIST entangle-0.6.0.tar.gz 906858 SHA256 d13eef54f8f501cac1e854de9d3841042777cabee7ffd1c804180e717bf485bd SHA512 f96718f01286eb0dbf1fafd4d51258bda876a5b22a6167173f0f60b4fe00683baff3d4c8f9866a5dc1eec493e2b25fd932794a63a8a8d102cb220b1d6ea8e960 WHIRLPOOL 539a7d1821beff0c3f8dfd439ed633348ba07380f3968d3c8a3261911235975ab04a7c858a2c017b12d6c7b355bca8c6395e2fe6549409573fbc7d68bed74f35
diff --git a/media-gfx/entangle/entangle-0.6.0.ebuild b/media-gfx/entangle/entangle-0.6.0.ebuild
new file mode 100644
index 000000000000..36ee1ada7a68
--- /dev/null
+++ b/media-gfx/entangle/entangle-0.6.0.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit gnome2 eutils
+
+DESCRIPTION="Tethered Camera Control & Capture"
+HOMEPAGE="http://entangle-photo.org/"
+SRC_URI="http://entangle-photo.org/download/sources/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=">=dev-libs/glib-2.26:2
+ >=x11-libs/gdk-pixbuf-2.12.0:2
+ >=x11-libs/gtk+-3.3.18:3[introspection]
+ virtual/libgudev:=
+ >=dev-libs/dbus-glib-0.60
+ >=dev-libs/gobject-introspection-0.9.3
+ >=media-libs/libgphoto2-2.4.11:=
+ media-libs/lcms:2
+ >=dev-libs/libpeas-1.2.0[gtk]
+ >=media-libs/gexiv2-0.4[introspection]
+ >=x11-libs/libXext-1.3.0
+ >=x11-themes/gnome-icon-theme-symbolic-3.0.0
+ >=media-libs/libraw-0.9.0"
+RDEPEND="${DEPEND}"
+DEPEND+="
+ virtual/pkgconfig"
+
+G2CONF+="
+ --disable-maintainer-mode
+ --docdir=/usr/share/doc/${PF}
+ --htmldir=/usr/share/doc/${PF}/html
+ --disable-werror
+ --disable-static"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
diff --git a/media-gfx/entangle/metadata.xml b/media-gfx/entangle/metadata.xml
new file mode 100644
index 000000000000..48621e50c16b
--- /dev/null
+++ b/media-gfx/entangle/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <maintainer>
+ <email>lu_zero@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/eog-plugins/Manifest b/media-gfx/eog-plugins/Manifest
new file mode 100644
index 000000000000..ef5926ab4f70
--- /dev/null
+++ b/media-gfx/eog-plugins/Manifest
@@ -0,0 +1,3 @@
+DIST eog-plugins-3.14.1.tar.xz 360472 SHA256 12070173d875d6e9f70d8b918bbf3dfcc5af8c1681e4fabf212dae96b85318f5 SHA512 c5f8d652742e8981385ba7d5742e4de3e49d51e2a7785d57fc15e3e23bff2460866173e8163f3870fc57c6f9ddfd16a0dce0a15ec1d2e7fea336d26c11d55f0a WHIRLPOOL 923f50b565c16c9597510a8c605fb1b300cf4859042e23b8329edfc1415945b21769d1850f3edc883d3e68f4a6c9ccccb3fe369d8fbebf5154a27b0be4ac6beb
+DIST eog-plugins-3.14.2.tar.xz 363836 SHA256 31a33b65cd6452ebeca3821f6eb45caefb83bd5d121dee7cf7e4c139ba065f89 SHA512 b29e0aa247ce7006a339ba4a4352e9dfe0150662f2a40fbdb10ac21daca95bb8c75b921cfad4a57ee783424befd98145a35f2a9b8a0083a9bff3928c157fa058 WHIRLPOOL ecc6d4e3a60b7e00f5bbb955040c2f43eb7e1d309970b2084bd50ac706fe149df50ae8e7ab7d595caca0b4853113bfb7073c5e785560b999c5b7db86bc277746
+DIST eog-plugins-3.16.0.tar.xz 367436 SHA256 6fab1c1e0705fc2b0e4a63caf3ba1c5b64b4eaa1301e4cbc04bb934428b68450 SHA512 f592aa08754a1f2d5f503239b5b68b4d9617aa0a1e5a0afd3b80d5bc11fcd312b219157607ff53d98927b9b63e088009c5bb5181dbbcc71466785780b3339fe9 WHIRLPOOL 564a3cf6f572a50fad2f9772138afb80d6ca5a3b3b5c178183d36a95f7fea23d7bd499751a27a40e449dd340e3fc626e8a0c64b3d7c056e3abec9ff62ae78727
diff --git a/media-gfx/eog-plugins/eog-plugins-3.14.1.ebuild b/media-gfx/eog-plugins/eog-plugins-3.14.1.ebuild
new file mode 100644
index 000000000000..3f7b5f897b00
--- /dev/null
+++ b/media-gfx/eog-plugins/eog-plugins-3.14.1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit gnome2 python-r1
+
+DESCRIPTION="Eye of GNOME plugins"
+HOMEPAGE="https://wiki.gnome.org/Apps/EyeOfGnome/Plugins"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="+exif +flickr map +picasa +python"
+REQUIRED_USE="
+ map? ( exif )
+ python? ( ^^ ( $(python_gen_useflags '*') ) )"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/libpeas-0.7.4:=
+ >=media-gfx/eog-3.11.4
+ >=x11-libs/gtk+-3.3.8:3
+ exif? ( >=media-libs/libexif-0.6.16 )
+ flickr? ( media-gfx/postr )
+ map? (
+ media-libs/libchamplain:0.12[gtk]
+ >=media-libs/clutter-1.9.4:1.0
+ >=media-libs/clutter-gtk-1.1.2:1.0 )
+ picasa? ( >=dev-libs/libgdata-0.9.1:= )
+ python? (
+ ${PYTHON_DEPS}
+ dev-libs/libpeas:=[gtk,python,${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ gnome-base/gsettings-desktop-schemas
+ media-gfx/eog[introspection]
+ x11-libs/gtk+:3[introspection]
+ x11-libs/pango[introspection] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.50.1
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+pkg_setup() {
+ use python && [[ ${MERGE_TYPE} == binary ]] && python_setup
+}
+
+src_configure() {
+ local plugins="fit-to-width,send-by-mail,hide-titlebar,light-theme"
+ use exif && plugins="${plugins},exif-display"
+ use flickr && plugins="${plugins},postr"
+ use map && plugins="${plugins},map"
+ use picasa && plugins="${plugins},postasa"
+ use python && plugins="${plugins},slideshowshuffle,pythonconsole,fullscreenbg,export-to-folder"
+ gnome2_src_configure \
+ $(use_enable python) \
+ --with-plugins=${plugins}
+}
diff --git a/media-gfx/eog-plugins/eog-plugins-3.14.2.ebuild b/media-gfx/eog-plugins/eog-plugins-3.14.2.ebuild
new file mode 100644
index 000000000000..04dcd0eea3ec
--- /dev/null
+++ b/media-gfx/eog-plugins/eog-plugins-3.14.2.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit gnome2 python-r1
+
+DESCRIPTION="Eye of GNOME plugins"
+HOMEPAGE="https://wiki.gnome.org/Apps/EyeOfGnome/Plugins"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE="+exif +flickr map +picasa +python"
+REQUIRED_USE="
+ map? ( exif )
+ python? ( ^^ ( $(python_gen_useflags '*') ) )"
+
+RDEPEND="
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/libpeas-0.7.4:=
+ >=media-gfx/eog-3.11.4
+ >=x11-libs/gtk+-3.3.8:3
+ exif? ( >=media-libs/libexif-0.6.16 )
+ flickr? ( media-gfx/postr )
+ map? (
+ media-libs/libchamplain:0.12[gtk]
+ >=media-libs/clutter-1.9.4:1.0
+ >=media-libs/clutter-gtk-1.1.2:1.0 )
+ picasa? ( >=dev-libs/libgdata-0.9.1:= )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-libs/glib-2.32:2[dbus]
+ dev-libs/libpeas:=[gtk,python,${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ gnome-base/gsettings-desktop-schemas
+ media-gfx/eog[introspection]
+ x11-libs/gtk+:3[introspection]
+ x11-libs/pango[introspection] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.50.1
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+pkg_setup() {
+ use python && [[ ${MERGE_TYPE} == binary ]] && python_setup
+}
+
+src_configure() {
+ local plugins="fit-to-width,send-by-mail,hide-titlebar,light-theme"
+ use exif && plugins="${plugins},exif-display"
+ use flickr && plugins="${plugins},postr"
+ use map && plugins="${plugins},map"
+ use picasa && plugins="${plugins},postasa"
+ use python && plugins="${plugins},slideshowshuffle,pythonconsole,fullscreenbg,export-to-folder"
+ gnome2_src_configure \
+ $(use_enable python) \
+ --with-plugins=${plugins}
+}
diff --git a/media-gfx/eog-plugins/eog-plugins-3.16.0.ebuild b/media-gfx/eog-plugins/eog-plugins-3.16.0.ebuild
new file mode 100644
index 000000000000..714d7fdc9dd7
--- /dev/null
+++ b/media-gfx/eog-plugins/eog-plugins-3.16.0.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+PYTHON_COMPAT=( python{3_3,3_4} )
+
+inherit gnome2 python-r1
+
+DESCRIPTION="Eye of GNOME plugins"
+HOMEPAGE="https://wiki.gnome.org/Apps/EyeOfGnome/Plugins"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="+exif +flickr map +picasa +python"
+REQUIRED_USE="
+ map? ( exif )
+ python? ( ^^ ( $(python_gen_useflags '*') ) )"
+
+RDEPEND="
+ >=dev-libs/glib-2.38:2
+ >=dev-libs/libpeas-0.7.4:=
+ >=media-gfx/eog-3.15.90
+ >=x11-libs/gtk+-3.14:3
+ exif? ( >=media-libs/libexif-0.6.16 )
+ flickr? ( media-gfx/postr )
+ map? (
+ media-libs/libchamplain:0.12[gtk]
+ >=media-libs/clutter-1.9.4:1.0
+ >=media-libs/clutter-gtk-1.1.2:1.0 )
+ picasa? ( >=dev-libs/libgdata-0.9.1:= )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-libs/glib-2.32:2[dbus]
+ dev-libs/libpeas:=[gtk,python,${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ gnome-base/gsettings-desktop-schemas
+ media-gfx/eog[introspection]
+ x11-libs/gtk+:3[introspection]
+ x11-libs/pango[introspection] )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.50.1
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+pkg_setup() {
+ use python && [[ ${MERGE_TYPE} == binary ]] && python_setup
+}
+
+src_configure() {
+ local plugins="fit-to-width,send-by-mail,hide-titlebar,light-theme"
+ use exif && plugins="${plugins},exif-display"
+ use flickr && plugins="${plugins},postr"
+ use map && plugins="${plugins},map"
+ use picasa && plugins="${plugins},postasa"
+ use python && plugins="${plugins},slideshowshuffle,pythonconsole,fullscreenbg,export-to-folder,maximize-windows"
+ gnome2_src_configure \
+ $(use_enable python) \
+ --with-plugins=${plugins}
+}
diff --git a/media-gfx/eog-plugins/metadata.xml b/media-gfx/eog-plugins/metadata.xml
new file mode 100644
index 000000000000..041a5ae2a66d
--- /dev/null
+++ b/media-gfx/eog-plugins/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+<use>
+ <flag name="flickr">Enable uploading to Flickr</flag>
+ <flag name="map">Enable world map display using <pkg>media-libs/libchamplain</pkg></flag>
+ <flag name="picasa">Enable uploading to Google's Picasa Web Albums</flag>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/eog/Manifest b/media-gfx/eog/Manifest
new file mode 100644
index 000000000000..6c647e387b40
--- /dev/null
+++ b/media-gfx/eog/Manifest
@@ -0,0 +1,3 @@
+DIST eog-3.14.3.tar.xz 4325576 SHA256 c05a3c0a75c3c5d42f41eadca9e23753d1fa59bc37fb5826909b468b9be1cf59 SHA512 e1a9c8f30b46b82baeaa71be3ea7bce27ccab6cbdad4d98ddc249be75d80dd013fe89f5d65a3db57c61a746f155a3a876f3702b76e197c4f49641444678a1f78 WHIRLPOOL b4a20537a486e0b7c68bd11c8702cf7cbe20791e5dee51b2612f489265a702720a151c17bdd9a2bdb73e2c2fcaceb208a3d05c551786edb98b4346aab3731023
+DIST eog-3.14.4.tar.xz 4326444 SHA256 eccb40199e9d22f6abb820faf977a5fa840c2e718d8081687cdfeb66f04de982 SHA512 d26b4ea17462d8ef54ae34e69bfe83a84fb3fcc785bb39ab862f1ad6f8549648379cdcf29289260e8f46735b7666c8c1a3c5ad4de400ab006fbfa580a21d0189 WHIRLPOOL d9e275d4025233cf97a7166ff86ed65c5028dc677be2fd9702af7c04709afafa082ebcdca3505d398ccd79cb063972792155578398cdb6b59c5e19c3ffc98783
+DIST eog-3.16.2.tar.xz 4307228 SHA256 802f68572d86bbb1e5969a385a76462aa42ea53aba6c65bf7337f528cb0a3c3b SHA512 9c3b20d57dd9edd7691ebb6735fd74ed0857d69efec845b462640a45e3179f91490ba3560ce8890455ee71445c6d789a8783af3503cf16680abd34849ea8eef1 WHIRLPOOL 91b892ae20164209cb0945c8d0f1716afc57902d426660c97d447cb6e0710f3b8732f6184df89b0cea26b21ed891e654eeb774f38c47702a39cb69f57d00e043
diff --git a/media-gfx/eog/eog-3.14.3.ebuild b/media-gfx/eog/eog-3.14.3.ebuild
new file mode 100644
index 000000000000..a4b220ba81d2
--- /dev/null
+++ b/media-gfx/eog/eog-3.14.3.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2
+
+DESCRIPTION="The Eye of GNOME image viewer"
+HOMEPAGE="https://wiki.gnome.org/Apps/EyeOfGnome"
+
+LICENSE="GPL-2+"
+SLOT="1"
+IUSE="+exif +introspection +jpeg lcms +svg tiff xmp"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd"
+
+REQUIRED_USE="exif? ( jpeg )"
+
+RDEPEND="
+ >=x11-libs/gtk+-3.14:3[introspection,X]
+ >=dev-libs/glib-2.38:2
+ >=dev-libs/libxml2-2:2
+ >=dev-libs/libpeas-0.7.4:=[gtk]
+ >=gnome-base/gnome-desktop-2.91.2:3=
+ >=gnome-base/gsettings-desktop-schemas-2.91.92
+ >=x11-misc/shared-mime-info-0.20
+
+ x11-libs/gdk-pixbuf:2[jpeg?,tiff?]
+ x11-libs/libX11
+
+ exif? ( >=media-libs/libexif-0.6.14 )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.3 )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( media-libs/lcms:2 )
+ svg? ( >=gnome-base/librsvg-2.36.2:2 )
+ xmp? ( media-libs/exempi:2 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.16
+ >=dev-util/intltool-0.50.1
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog HACKING MAINTAINERS NEWS README THANKS TODO"
+ gnome2_src_configure \
+ $(use_enable introspection) \
+ $(use_with jpeg libjpeg) \
+ $(use_with exif libexif) \
+ $(use_with lcms cms) \
+ $(use_with xmp) \
+ $(use_with svg librsvg) \
+ ITSTOOL=$(type -P true)
+}
diff --git a/media-gfx/eog/eog-3.14.4.ebuild b/media-gfx/eog/eog-3.14.4.ebuild
new file mode 100644
index 000000000000..a4b220ba81d2
--- /dev/null
+++ b/media-gfx/eog/eog-3.14.4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2
+
+DESCRIPTION="The Eye of GNOME image viewer"
+HOMEPAGE="https://wiki.gnome.org/Apps/EyeOfGnome"
+
+LICENSE="GPL-2+"
+SLOT="1"
+IUSE="+exif +introspection +jpeg lcms +svg tiff xmp"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd"
+
+REQUIRED_USE="exif? ( jpeg )"
+
+RDEPEND="
+ >=x11-libs/gtk+-3.14:3[introspection,X]
+ >=dev-libs/glib-2.38:2
+ >=dev-libs/libxml2-2:2
+ >=dev-libs/libpeas-0.7.4:=[gtk]
+ >=gnome-base/gnome-desktop-2.91.2:3=
+ >=gnome-base/gsettings-desktop-schemas-2.91.92
+ >=x11-misc/shared-mime-info-0.20
+
+ x11-libs/gdk-pixbuf:2[jpeg?,tiff?]
+ x11-libs/libX11
+
+ exif? ( >=media-libs/libexif-0.6.14 )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.3 )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( media-libs/lcms:2 )
+ svg? ( >=gnome-base/librsvg-2.36.2:2 )
+ xmp? ( media-libs/exempi:2 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.16
+ >=dev-util/intltool-0.50.1
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog HACKING MAINTAINERS NEWS README THANKS TODO"
+ gnome2_src_configure \
+ $(use_enable introspection) \
+ $(use_with jpeg libjpeg) \
+ $(use_with exif libexif) \
+ $(use_with lcms cms) \
+ $(use_with xmp) \
+ $(use_with svg librsvg) \
+ ITSTOOL=$(type -P true)
+}
diff --git a/media-gfx/eog/eog-3.16.2.ebuild b/media-gfx/eog/eog-3.16.2.ebuild
new file mode 100644
index 000000000000..3da4ecd5c6fe
--- /dev/null
+++ b/media-gfx/eog/eog-3.16.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes"
+
+inherit eutils gnome2
+
+DESCRIPTION="The Eye of GNOME image viewer"
+HOMEPAGE="https://wiki.gnome.org/Apps/EyeOfGnome"
+
+LICENSE="GPL-2+"
+SLOT="1"
+IUSE="+exif +introspection +jpeg lcms +svg tiff xmp"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+
+REQUIRED_USE="exif? ( jpeg )"
+
+RDEPEND="
+ >=dev-libs/glib-2.38:2
+ >=dev-libs/libpeas-0.7.4:=[gtk]
+ >=gnome-base/gnome-desktop-2.91.2:3=
+ >=gnome-base/gsettings-desktop-schemas-2.91.92
+ >=x11-libs/gtk+-3.14:3[introspection,X]
+ >=x11-misc/shared-mime-info-0.20
+
+ x11-libs/gdk-pixbuf:2[jpeg?,tiff?]
+ x11-libs/libX11
+
+ exif? ( >=media-libs/libexif-0.6.14 )
+ introspection? ( >=dev-libs/gobject-introspection-0.9.3 )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( media-libs/lcms:2 )
+ svg? ( >=gnome-base/librsvg-2.36.2:2 )
+ xmp? ( media-libs/exempi:2 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/gtk-doc-am-1.16
+ >=dev-util/intltool-0.50.1
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # https://bugzilla.gnome.org/show_bug.cgi?id=751007
+ epatch "${FILESDIR}"/${PN}-3.16.2-without-libexif.patch
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ DOCS="AUTHORS ChangeLog HACKING MAINTAINERS NEWS README THANKS TODO"
+ gnome2_src_configure \
+ $(use_enable introspection) \
+ $(use_with jpeg libjpeg) \
+ $(use_with exif libexif) \
+ $(use_with lcms cms) \
+ $(use_with xmp) \
+ $(use_with svg librsvg) \
+ ITSTOOL=$(type -P true)
+}
diff --git a/media-gfx/eog/files/eog-3.16.2-without-libexif.patch b/media-gfx/eog/files/eog-3.16.2-without-libexif.patch
new file mode 100644
index 000000000000..28ae948ee853
--- /dev/null
+++ b/media-gfx/eog/files/eog-3.16.2-without-libexif.patch
@@ -0,0 +1,33 @@
+From 29796d1f24a0a1ab2a463a9b1c33e05014d68132 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Tue, 16 Jun 2015 23:04:32 -0400
+Subject: [PATCH] EogMetadataSidebar: fix --without-libexif build
+
+https://bugzilla.gnome.org/show_bug.cgi?id=751007
+---
+ src/eog-metadata-sidebar.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/eog-metadata-sidebar.c b/src/eog-metadata-sidebar.c
+index bf07830..a08c617 100644
+--- a/src/eog-metadata-sidebar.c
++++ b/src/eog-metadata-sidebar.c
+@@ -408,6 +408,7 @@ eog_metadata_sidebar_class_init (EogMetadataSidebarClass *klass)
+ gtk_widget_class_bind_template_child_private (widget_class,
+ EogMetadataSidebar,
+ folder_label);
++#if HAVE_EXIF
+ gtk_widget_class_bind_template_child_private (widget_class,
+ EogMetadataSidebar,
+ aperture_label);
+@@ -432,6 +433,7 @@ eog_metadata_sidebar_class_init (EogMetadataSidebarClass *klass)
+ gtk_widget_class_bind_template_child_private (widget_class,
+ EogMetadataSidebar,
+ time_label);
++#endif /* HAVE_EXIF */
+ }
+
+
+--
+2.4.3
+
diff --git a/media-gfx/eog/metadata.xml b/media-gfx/eog/metadata.xml
new file mode 100644
index 000000000000..c303968e7ba8
--- /dev/null
+++ b/media-gfx/eog/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>gnome</herd>
+ <longdescription lang="en">
+ The Eye of GNOME image viewer is the official image viewer for the GNOME
+ Desktop environment. With it, you can view single image files, as well
+ as large image collections.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/eom/Manifest b/media-gfx/eom/Manifest
new file mode 100644
index 000000000000..143b9e0204b3
--- /dev/null
+++ b/media-gfx/eom/Manifest
@@ -0,0 +1,2 @@
+DIST eom-1.8.0.tar.xz 2190980 SHA256 ec8450bf2ebef13c2e376b1674f0f7402f87669a71eb9e2e4d1161a2784aaf9e SHA512 cc9d82ec164043653eae2f73a0b7896c0d09b2eb466a5c919b0e1df732dd18fff58fa978d01a9bbb2bb7b8427c11328affb3f4e6aeb18a77a18585f39a1f3f5a WHIRLPOOL 26c091d74a8a052a4ce1e0295e41d75bb14ed1d93024367f63214139624d61b74fdd74fc66ee02a472f7d7494cbcfa9aac4e1762f1057432f7afd5db1cf0e515
+DIST eom-1.8.1.tar.xz 2192220 SHA256 d8c97de2aab548dce910cdfd98a11b671c943e9b195d38b043e482e2323ac6d8 SHA512 e054286eebdc88390dd8855d6b43704d4bc5d0b7d69f0dc73108d26e75882ee13bfaec01a30dbc42cee14e10ca42eeb9a6f576fe8435055ba289fe2292f97837 WHIRLPOOL 10856132756b1ea7ab9be23547d94968fcce3183528cb0d656c9cd307108fe8623a70a7ee53c85db6ef74a333691ffcf1210f8c9885db4a31b63713d8924c0d9
diff --git a/media-gfx/eom/eom-1.8.0.ebuild b/media-gfx/eom/eom-1.8.0.ebuild
new file mode 100644
index 000000000000..b0258316ec83
--- /dev/null
+++ b/media-gfx/eom/eom-1.8.0.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GCONF_DEBUG="yes"
+PYTHON_COMPAT=( python2_7 )
+
+inherit gnome2 python-single-r1 versionator
+
+MATE_BRANCH="$(get_version_component_range 1-2)"
+
+SRC_URI="http://pub.mate-desktop.org/releases/${MATE_BRANCH}/${P}.tar.xz"
+DESCRIPTION="The MATE image viewer"
+HOMEPAGE="http://mate-desktop.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+
+IUSE="X dbus exif jpeg lcms python svg tiff xmp"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/atk:0
+ >=dev-libs/glib-2.25.9:2
+ >=dev-libs/libxml2-2:2
+ gnome-base/dconf:0
+ >=mate-base/mate-desktop-1.8:0
+ sys-libs/zlib:0
+ x11-libs/cairo:0
+ >=x11-libs/gdk-pixbuf-2.4:2[jpeg?,tiff?]
+ >=x11-libs/gtk+-2.18:2
+ x11-libs/libX11:0
+ >=x11-misc/shared-mime-info-0.20:0
+ >=x11-themes/mate-icon-theme-1.8:0
+ virtual/libintl:0
+ dbus? ( >=dev-libs/dbus-glib-0.71:0 )
+ exif? (
+ >=media-libs/libexif-0.6.14:0
+ virtual/jpeg:0 )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( media-libs/lcms:2 )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-python/pygobject-2.15.1:2[${PYTHON_USEDEP}]
+ >=dev-python/pygtk-2.13:2[${PYTHON_USEDEP}] )
+ svg? ( >=gnome-base/librsvg-2.26:2 )
+ xmp? ( >=media-libs/exempi-1.99.5:2 )
+ !!media-gfx/mate-image-viewer"
+
+DEPEND="${RDEPEND}
+ app-text/yelp-tools:0
+ >=dev-util/intltool-0.40:*
+ sys-devel/gettext:*
+ virtual/pkgconfig:*"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable python) \
+ $(use_with jpeg libjpeg) \
+ $(use_with exif libexif) \
+ $(use_with dbus) \
+ $(use_with lcms cms) \
+ $(use_with xmp) \
+ $(use_with svg librsvg) \
+ $(use_with X x) \
+ --without-cms
+}
+
+DOCS="AUTHORS ChangeLog HACKING NEWS README THANKS TODO"
diff --git a/media-gfx/eom/eom-1.8.1.ebuild b/media-gfx/eom/eom-1.8.1.ebuild
new file mode 100644
index 000000000000..9ca917f5542f
--- /dev/null
+++ b/media-gfx/eom/eom-1.8.1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+GCONF_DEBUG="yes"
+PYTHON_COMPAT=( python2_7 )
+
+inherit gnome2 python-single-r1 versionator
+
+MATE_BRANCH="$(get_version_component_range 1-2)"
+
+SRC_URI="http://pub.mate-desktop.org/releases/${MATE_BRANCH}/${P}.tar.xz"
+DESCRIPTION="The MATE image viewer"
+HOMEPAGE="http://mate-desktop.org"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+IUSE="X dbus exif jpeg lcms python svg tiff xmp"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/atk:0
+ >=dev-libs/glib-2.25.9:2
+ >=dev-libs/libxml2-2:2
+ gnome-base/dconf:0
+ >=mate-base/mate-desktop-1.8:0
+ sys-libs/zlib:0
+ x11-libs/cairo:0
+ >=x11-libs/gdk-pixbuf-2.4:2[jpeg?,tiff?]
+ >=x11-libs/gtk+-2.18:2
+ x11-libs/libX11:0
+ >=x11-misc/shared-mime-info-0.20:0
+ >=x11-themes/mate-icon-theme-1.8:0
+ virtual/libintl:0
+ dbus? ( >=dev-libs/dbus-glib-0.71:0 )
+ exif? (
+ >=media-libs/libexif-0.6.14:0
+ virtual/jpeg:0 )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( media-libs/lcms:2 )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-python/pygobject-2.15.1:2[${PYTHON_USEDEP}]
+ >=dev-python/pygtk-2.13:2[${PYTHON_USEDEP}] )
+ svg? ( >=gnome-base/librsvg-2.26:2 )
+ xmp? ( >=media-libs/exempi-1.99.5:2 )
+ !!media-gfx/mate-image-viewer"
+
+DEPEND="${RDEPEND}
+ app-text/yelp-tools:0
+ >=dev-util/intltool-0.40:*
+ sys-devel/gettext:*
+ virtual/pkgconfig:*"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable python) \
+ $(use_with jpeg libjpeg) \
+ $(use_with exif libexif) \
+ $(use_with dbus) \
+ $(use_with lcms cms) \
+ $(use_with xmp) \
+ $(use_with svg librsvg) \
+ $(use_with X x) \
+ --without-cms
+}
+
+DOCS="AUTHORS ChangeLog HACKING NEWS README THANKS TODO"
diff --git a/media-gfx/eom/metadata.xml b/media-gfx/eom/metadata.xml
new file mode 100644
index 000000000000..b8d1003d2c27
--- /dev/null
+++ b/media-gfx/eom/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>mate</herd>
+ <upstream>
+ <remote-id type="github">mate-desktop/eom</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/esci-interpreter-gt-s80/Manifest b/media-gfx/esci-interpreter-gt-s80/Manifest
new file mode 100644
index 000000000000..d4fb0ba26ab5
--- /dev/null
+++ b/media-gfx/esci-interpreter-gt-s80/Manifest
@@ -0,0 +1,2 @@
+DIST esci-interpreter-gt-s80-0.2.1-1.i386.rpm 191157 SHA256 7f2b85fd0d7adaa1a9c604a5447b36ed895f1d1bfd765651556e5f69a8846ea6 SHA512 abcf9228e1265d309f07b3b77081e9c8b21a4f186ef49b857df2e53b1d9e11f11e0975673c02760bd00f96d916fe5108f9218b0bea67bc59ff78ff4c9a09eb69 WHIRLPOOL 0d642bd6747d76b19259a9579c4b4e5dff3c8fb45c68576e3f08119163d84bef2f4db6ef7b555091e1b396987e8d73a07d79ae38018772a465f67355ebb1e636
+DIST esci-interpreter-gt-s80-0.2.1-1.x86_64.rpm 71423 SHA256 6380c4ec2edd70bea1b3387b40ed669dd376823db33727e25a8b84205609693c SHA512 3977255a939630391e35775651094f6c873288c5e2c70ee70c4e19064b78e721372cdd40c7f70ae937e74b572b9a15d9b558fdd6a1dc9905bbd78abce8bd57e5 WHIRLPOOL c46dd664e947a479a47c7b9d5a2e7fb40c474146940b96afa1befeeaa50eaea929f55b909d9f3dcc412dab3ea5e14d42409cfc3558e20269f6dc78238a8c26c5
diff --git a/media-gfx/esci-interpreter-gt-s80/esci-interpreter-gt-s80-0.2.1.1.ebuild b/media-gfx/esci-interpreter-gt-s80/esci-interpreter-gt-s80-0.2.1.1.ebuild
new file mode 100644
index 000000000000..c087cc5f0181
--- /dev/null
+++ b/media-gfx/esci-interpreter-gt-s80/esci-interpreter-gt-s80-0.2.1.1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit rpm versionator multilib
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_PVR="$(replace_version_separator 3 -)"
+
+DESCRIPTION="Epson GT-S50 and GT-S80 scanner plugins for SANE 'epkowa' backend"
+HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+SRC_URI="amd64? ( http://dev.gentoo.org/~flameeyes/avasys/${PN}-${MY_PVR}.x86_64.rpm )
+ x86? ( http://dev.gentoo.org/~flameeyes/avasys/${PN}-${MY_PVR}.i386.rpm )"
+
+LICENSE="AVASYS"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+
+IUSE=""
+
+DEPEND=">=media-gfx/iscan-2.28.0"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/opt/iscan/*"
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ dodoc usr/share/doc/*/*
+
+ # install scanner plugins
+ exeinto /opt/iscan/esci
+ doexe "${WORKDIR}/usr/$(get_libdir)/esci/"*
+}
+
+pkg_setup() {
+ basecmds=(
+ "iscan-registry --COMMAND interpreter usb 0x04b8 0x0136 /opt/iscan/esci/libesci-interpreter-gt-s80"
+ "iscan-registry --COMMAND interpreter usb 0x04b8 0x0137 /opt/iscan/esci/libesci-interpreter-gt-s50"
+ "iscan-registry --COMMAND interpreter usb 0x04b8 0x0144 /opt/iscan/esci/libesci-interpreter-gt-s80"
+ "iscan-registry --COMMAND interpreter usb 0x04b8 0x0143 /opt/iscan/esci/libesci-interpreter-gt-s50"
+ )
+}
+
+pkg_postinst() {
+ [[ -n ${REPLACING_VERSIONS} ]] && return
+
+ if [[ ${ROOT} == "/" ]]; then
+ for basecmd in "${basecmds[@]}"; do
+ eval ${basecmd/COMMAND/add}
+ done
+ else
+ ewarn "Unable to register the plugin and firmware when installing outside of /."
+ ewarn "execute the following command yourself:"
+ for basecmd in "${basecmds[@]}"; do
+ ewarn "${basecmd/COMMAND/add}"
+ done
+ fi
+}
+
+pkg_prerm() {
+ [[ -n ${REPLACED_BY_VERSION} ]] && return
+
+ if [[ ${ROOT} == "/" ]]; then
+ for basecmd in "${basecmds[@]}"; do
+ eval ${basecmd/COMMAND/remove}
+ done
+ else
+ ewarn "Unable to register the plugin and firmware when installing outside of /."
+ ewarn "execute the following command yourself:"
+ for basecmd in "${basecmds[@]}"; do
+ ewarn "${basecmd/COMMAND/remove}"
+ done
+ fi
+}
diff --git a/media-gfx/esci-interpreter-gt-s80/metadata.xml b/media-gfx/esci-interpreter-gt-s80/metadata.xml
new file mode 100644
index 000000000000..d65e47d14674
--- /dev/null
+++ b/media-gfx/esci-interpreter-gt-s80/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Proprietary plugin for several EPSON scanner models, to be used
+ with the epkowa SANE backend (provided by
+ <pkg>media-gfx/iscan</pkg>). 32-bit and 64-bit.
+
+ Supports the following models:
+
+ EPSON GT-S80 / ES-D400
+ EPSON GT-S85
+ EPSON GT-S50 / ES-D200
+ EPSON GT-S55
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/evoluspencil/Manifest b/media-gfx/evoluspencil/Manifest
new file mode 100644
index 000000000000..3453d2aebaa5
--- /dev/null
+++ b/media-gfx/evoluspencil/Manifest
@@ -0,0 +1 @@
+DIST pencil-2.0.5.tar.gz 4810418 SHA256 a07e855de89f99b35f93f6916b50cdef1be00d8d53aa57748197a38bc0b2c566 SHA512 cb9ab75f69ca886c7b0579dd293e4c4b4279eac21f4301ad0299e55b27d998d59f7b9444916d306939e6c7f4603a8267aecd3dc0ab3efc41175659886e399b0d WHIRLPOOL 171d2f6aac8862ca3482824680e720562dbb667e1d7186a0b144116a1a9a7b6540a4885db8a28df3237f21221f3728624f77206b0cac70fec511872d48859732
diff --git a/media-gfx/evoluspencil/evoluspencil-2.0.5.ebuild b/media-gfx/evoluspencil/evoluspencil-2.0.5.ebuild
new file mode 100644
index 000000000000..2142d4aeedd0
--- /dev/null
+++ b/media-gfx/evoluspencil/evoluspencil-2.0.5.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+MY_P="pencil-${PV}"
+
+inherit fdo-mime
+
+DESCRIPTION="A simple GUI prototyping tool to create mockups"
+HOMEPAGE="http://pencil.evolus.vn/"
+SRC_URI="http://${PN}.googlecode.com/files/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="|| ( www-client/firefox www-client/firefox-bin )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ # avoid file collisions with media-gfx/pencil
+ mv usr/bin/{pencil,${PN}} || die
+ mv usr/share/{pencil,${PN}} || die
+ mv usr/share/applications/{pencil,${PN}}.desktop || die
+
+ sed -e "s/pencil/${PN}/" -i usr/bin/${PN} \
+ -i usr/share/applications/${PN}.desktop || die
+}
+
+src_install() {
+ doins -r usr
+ newbin "${FILESDIR}"/launcher ${PN}
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/evoluspencil/files/launcher b/media-gfx/evoluspencil/files/launcher
new file mode 100644
index 000000000000..4ac04e8c8c82
--- /dev/null
+++ b/media-gfx/evoluspencil/files/launcher
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ -x /usr/bin/firefox ] ; then
+ /usr/bin/firefox --app "/usr/share/evoluspencil/application.ini"
+elif [ -x /usr/bin/firefox-bin ] ; then
+ /usr/bin/firefox-bin --app "/usr/share/evoluspencil/application.ini"
+else
+ echo Could not execute required /usr/bin/firefox or /usr/bin/firefox-bin
+fi
diff --git a/media-gfx/evoluspencil/metadata.xml b/media-gfx/evoluspencil/metadata.xml
new file mode 100644
index 000000000000..d9ed6a30d4c1
--- /dev/null
+++ b/media-gfx/evoluspencil/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>kensington@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">evoluspencil</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/exact-image/Manifest b/media-gfx/exact-image/Manifest
new file mode 100644
index 000000000000..2009c65dfcde
--- /dev/null
+++ b/media-gfx/exact-image/Manifest
@@ -0,0 +1 @@
+DIST exact-image-0.8.1.tar.bz2 283660 SHA256 926a09c897489705ba42daeb01fc4a3c327a8194dc65431f630d50684390e28b SHA512 0adc51c5a29415e236a963cfdaf8f5527e628e9a645e87d00c69a7185e60639cfcd9b1c2b4c3abe1826c5364f0c5d45a0ebb8923cfed53d041d1d36b2604b565 WHIRLPOOL 58b7d66f52d5b6c2202806cad6ca2ebc8e21035a32698861a575c8246f63f4edacc930defd3fa4f6b8496368d2d9d002f06f6463e4f45abc1c235a0bc68a0352
diff --git a/media-gfx/exact-image/exact-image-0.8.1-r1.ebuild b/media-gfx/exact-image/exact-image-0.8.1-r1.ebuild
new file mode 100644
index 000000000000..c12812e5a8c0
--- /dev/null
+++ b/media-gfx/exact-image/exact-image-0.8.1-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+PYTHON_DEPEND="python? 2:2.5"
+
+inherit eutils multilib python toolchain-funcs
+
+DESCRIPTION="A fast, modern and generic image processing library"
+HOMEPAGE="http://www.exactcode.de/site/open_source/exactimage/"
+SRC_URI="http://dl.exactcode.de/oss/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="expat jpeg jpeg2k lua openexr php perl png python ruby swig tiff truetype X"
+
+RDEPEND="x11-libs/agg[truetype]
+ sys-libs/zlib
+ expat? ( dev-libs/expat )
+ jpeg2k? ( media-libs/jasper )
+ jpeg? ( virtual/jpeg )
+ lua? ( dev-lang/lua )
+ openexr? ( media-libs/openexr )
+ php? ( dev-lang/php )
+ perl? ( dev-lang/perl )
+ png? ( >=media-libs/libpng-1.2.43 )
+ ruby? ( dev-lang/ruby )
+ tiff? ( media-libs/tiff )
+ truetype? ( >=media-libs/freetype-2 )
+ X? (
+ x11-libs/libXext
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ swig? ( dev-lang/swig )"
+
+pkg_setup() {
+ if use python; then
+ python_set_active_version 2
+ fi
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-0.7.5-libpng14.patch \
+ "${FILESDIR}"/${P}-libpng15.patch
+
+ # fix python hardcoded path wrt bug #327171
+ sed -i -e "s:python2.5:python$(python_get_version):" \
+ -e "s:\$(libdir):usr/$(get_libdir):" \
+ "${S}"/api/python/Makefile
+
+ # Respect user CFLAGS/CXXFLAGS.
+ sed -i \
+ -e '/C\(XX\)\?FLAGS =/s/-O2//' \
+ -e "\$aCFLAGS += ${CFLAGS}\nCXXFLAGS += ${CXXFLAGS}" \
+ Makefile || die
+
+ # Show commands. Use qualified CC/CXX.
+ sed -i \
+ -e '/^Q =/d' \
+ -e '/^\t@echo /d' \
+ -e "\$aCC:=$(tc-getCC)\nCXX:=$(tc-getCXX)" \
+ build/bottom.make || die
+
+ # The copied string fits exactly. Use memcpy to reflect that a null
+ # terminator is not needed.
+ sed -i \
+ -e 's/strcpy(\([^,]*\)\(,["a-zA-Z -]*\))/memcpy(\1\2, sizeof(\1))/' \
+ codecs/tga.cc || die
+}
+
+src_configure() {
+ # evas -> enlightenment overlay
+ # bardecode -> protected by custom license
+ # libungif -> not supported anymore
+
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/$(get_libdir) \
+ $(use_with X x11) \
+ $(use_with truetype freetype) \
+ --without-evas \
+ $(use_with jpeg libjpeg) \
+ $(use_with tiff libtiff) \
+ $(use_with png libpng) \
+ --without-libungif \
+ $(use_with jpeg2k jasper) \
+ $(use_with openexr) \
+ $(use_with expat) \
+ --without-lcms \
+ --without-bardecode \
+ $(use_with lua) \
+ $(use_with swig) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with php) \
+ $(use_with ruby) || die
+}
diff --git a/media-gfx/exact-image/files/exact-image-0.7.5-libpng14.patch b/media-gfx/exact-image/files/exact-image-0.7.5-libpng14.patch
new file mode 100644
index 000000000000..f25b9af02da9
--- /dev/null
+++ b/media-gfx/exact-image/files/exact-image-0.7.5-libpng14.patch
@@ -0,0 +1,69 @@
+--- codecs/png.cc
++++ codecs/png.cc
+@@ -71,7 +71,7 @@
+ /* Allocate/initialize the memory for image information. REQUIRED. */
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL) {
+- png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return 0;
+ }
+
+@@ -82,7 +82,7 @@
+
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ /* If we get here, we had a problem reading the file */
+ return 0;
+ }
+@@ -99,7 +99,7 @@
+ png_read_info (png_ptr, info_ptr);
+
+ png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+- &interlace_type, int_p_NULL, int_p_NULL);
++ &interlace_type, NULL, NULL);
+
+ image.w = width;
+ image.h = height;
+@@ -132,7 +132,7 @@
+ #if 0 // no longer needed
+ /* Expand grayscale images to the full 8 bits from 2, or 4 bits/pixel */
+ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth > 1 && bit_depth < 8) {
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ image.bps = 8;
+ }
+ #endif
+@@ -196,11 +196,11 @@
+ for (int pass = 0; pass < number_passes; ++pass)
+ for (unsigned int y = 0; y < height; ++y) {
+ row_pointers[0] = image.getRawData() + y * stride;
+- png_read_rows(png_ptr, row_pointers, png_bytepp_NULL, 1);
++ png_read_rows(png_ptr, row_pointers, NULL, 1);
+ }
+
+ /* clean up after the read, and free any memory allocated - REQUIRED */
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+
+ /* that's it */
+ return true;
+@@ -224,7 +224,7 @@
+ /* Allocate/initialize the memory for image information. REQUIRED. */
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL) {
+- png_destroy_write_struct(&png_ptr, png_infopp_NULL);
++ png_destroy_write_struct(&png_ptr, NULL);
+ return false;
+ }
+
+@@ -244,7 +244,6 @@
+ else if (quality > Z_BEST_COMPRESSION) quality = Z_BEST_COMPRESSION;
+ png_set_compression_level(png_ptr, quality);
+
+- png_info_init (info_ptr);
+
+ /* Set up our STL stream output control */
+ png_set_write_fn (png_ptr, stream, &stdstream_write_data, &stdstream_flush_data);
diff --git a/media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch b/media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch
new file mode 100644
index 000000000000..44c94726e35c
--- /dev/null
+++ b/media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch
@@ -0,0 +1,34 @@
+--- codecs/png.cc
++++ codecs/png.cc
+@@ -16,6 +16,7 @@
+ */
+
+ #include <stdlib.h>
++#include <zlib.h>
+ #include <png.h>
+
+ #include <iostream>
+@@ -104,7 +105,7 @@
+ image.w = width;
+ image.h = height;
+ image.bps = bit_depth;
+- image.spp = info_ptr->channels;
++ image.spp = png_get_channels(png_ptr, info_ptr);
+
+ png_uint_32 res_x, res_y;
+ res_x = png_get_x_pixels_per_meter(png_ptr, info_ptr);
+@@ -120,10 +121,13 @@
+ // png_set_packswap(png_ptr);
+
+ /* Expand paletted colors into true RGB triplets */
++
++ int num_trans;
++
+ if (color_type == PNG_COLOR_TYPE_PALETTE) {
+ png_set_palette_to_rgb(png_ptr);
+ image.bps = 8;
+- if (info_ptr->num_trans)
++ if (num_trans)
+ image.spp = 4;
+ else
+ image.spp = 3;
diff --git a/media-gfx/exact-image/metadata.xml b/media-gfx/exact-image/metadata.xml
new file mode 100644
index 000000000000..39ad2abec1d8
--- /dev/null
+++ b/media-gfx/exact-image/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+<use>
+ <flag name='swig'>Adds Swig support <pkg>dev-lang/swig</pkg></flag>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/exif/Manifest b/media-gfx/exif/Manifest
new file mode 100644
index 000000000000..987d38869900
--- /dev/null
+++ b/media-gfx/exif/Manifest
@@ -0,0 +1 @@
+DIST exif-0.6.21.tar.bz2 387531 SHA256 59e78229ac32dd8ae3cad45c5781350da20705313c0b2dda266da0431b8769fd SHA512 73b5b7df08462a6a084a8fb973c39197f5d64ed753a97cb2f94a4acf815fdf0313214c2c8e44a46a24a1f6304fdaa68a579b4a2e246cc095f6e9588e93368cdc WHIRLPOOL f669655a76e2fe137bff9a55d04221f6f7599e2c1e1fd9d917c1759d498060163d63020eed26b53f0f6d853dcb940540535877e3eaf160c244d120e570a308cc
diff --git a/media-gfx/exif/exif-0.6.21.ebuild b/media-gfx/exif/exif-0.6.21.ebuild
new file mode 100644
index 000000000000..b42e0dbe7e47
--- /dev/null
+++ b/media-gfx/exif/exif-0.6.21.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Small CLI util to show EXIF infos hidden in JPEG files"
+HOMEPAGE="http://libexif.sourceforge.net/"
+SRC_URI="mirror://sourceforge/libexif/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="nls"
+
+RDEPEND="dev-libs/popt
+ >=media-libs/libexif-${PV}"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+src_configure() {
+ econf $(use_enable nls)
+}
diff --git a/media-gfx/exif/metadata.xml b/media-gfx/exif/metadata.xml
new file mode 100644
index 000000000000..5c7a0372083d
--- /dev/null
+++ b/media-gfx/exif/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">libexif</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/exiftags/Manifest b/media-gfx/exiftags/Manifest
new file mode 100644
index 000000000000..7a8e8044bc03
--- /dev/null
+++ b/media-gfx/exiftags/Manifest
@@ -0,0 +1 @@
+DIST exiftags-1.01.tar.gz 70921 RMD160 59549c222469cdc55bb74452e4cd458d5b545684 SHA1 06636feb7d5c5835da01d5da8cd0f4a291d23fd8 SHA256 d95744de5f609f1562045f1c2aae610e8f694a4c9042897a51a22f0f0d7591a4
diff --git a/media-gfx/exiftags/exiftags-1.01.ebuild b/media-gfx/exiftags/exiftags-1.01.ebuild
new file mode 100644
index 000000000000..eedf8a8cd2ea
--- /dev/null
+++ b/media-gfx/exiftags/exiftags-1.01.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs
+
+DESCRIPTION="Extracts JPEG EXIF headers from digital camera photos"
+HOMEPAGE="http://johnst.org/sw/exiftags/"
+SRC_URI="http://johnst.org/sw/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+DEPEND=""
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" || die "emake failed."
+}
+
+src_install() {
+ dobin exiftags exifcom exiftime || die "dobin failed."
+ doman exiftags.1 exifcom.1 exiftime.1
+ dodoc README CHANGES
+}
diff --git a/media-gfx/exiftags/metadata.xml b/media-gfx/exiftags/metadata.xml
new file mode 100644
index 000000000000..a083c07fab9e
--- /dev/null
+++ b/media-gfx/exiftags/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/exiv2/Manifest b/media-gfx/exiv2/Manifest
new file mode 100644
index 000000000000..f3ef64868d1c
--- /dev/null
+++ b/media-gfx/exiv2/Manifest
@@ -0,0 +1 @@
+DIST exiv2-0.24.tar.gz 4635028 SHA256 f4a443e6c7fb9d9f5e787732f76969a64c72c4c04af69b10ed57f949c2dfef8e SHA512 e2d5d076c09a36d88472485c9d9d99b5a50aea1ab59b1e5c9301b1ce9fe2b2af02acae2662c9ff56b4c749a224688387ba58334d31b74f04f3d2d3d3c0e387e9 WHIRLPOOL b5b7eb544975d8e14739b39fc294279b58369944172684c0f881348ebf47ef0f9ccd18e8bc41113d9da3a72f8d6c048641f547a7071a7ca6d93d1d30ea2d7aed
diff --git a/media-gfx/exiv2/exiv2-0.24-r1.ebuild b/media-gfx/exiv2/exiv2-0.24-r1.ebuild
new file mode 100644
index 000000000000..723e7dc0e69b
--- /dev/null
+++ b/media-gfx/exiv2/exiv2-0.24-r1.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+AUTOTOOLS_IN_SOURCE_BUILD=1
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit eutils multilib toolchain-funcs python-any-r1 autotools-multilib
+
+DESCRIPTION="EXIF and IPTC metadata C++ library and command line utility"
+HOMEPAGE="http://www.exiv2.org/"
+SRC_URI="http://www.exiv2.org/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0/13"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
+IUSE_LINGUAS="de es fi fr pl ru sk"
+IUSE="contrib doc examples nls xmp zlib static-libs $(printf 'linguas_%s ' ${IUSE_LINGUAS})"
+
+RDEPEND="
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )
+ xmp? ( >=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}] )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ contrib? ( >=dev-libs/boost-1.44 )
+ doc? (
+ app-doc/doxygen
+ dev-libs/libxslt
+ virtual/pkgconfig
+ media-gfx/graphviz
+ ${PYTHON_DEPS}
+ )
+ nls? ( sys-devel/gettext )
+"
+
+DOCS=( README doc/ChangeLog doc/cmd.txt )
+
+PATCHES=( "${FILESDIR}/${P}-CVE-2014-9449.patch" )
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # convert docs to UTF-8
+ local i
+ for i in doc/cmd.txt; do
+ einfo "Converting "${i}" to UTF-8"
+ iconv -f LATIN1 -t UTF-8 "${i}" > "${i}~" && mv -f "${i}~" "${i}" || rm -f "${i}~"
+ done
+
+ if use doc; then
+ einfo "Updating doxygen config"
+ doxygen 2>&1 >/dev/null -u config/Doxyfile
+ fi
+
+ if use contrib; then
+ # create build environment for contrib
+ ln -snf ../../src contrib/organize/exiv2
+ sed -i -e 's:/usr/local/include/.*:'"${EPREFIX}"'/usr/include:g' \
+ -e 's:/usr/local/lib/lib:-l:g' -e 's:-gcc..-mt-._..\.a::g' \
+ contrib/organize/boost.mk || die
+ fi
+
+ epatch "${FILESDIR}/${PN}-0.24-python3.patch"
+
+ # set locale to safe value for the sed commands (bug #382731)
+ sed -i -r "s,(\s+)sed\s,\1LC_ALL="C" sed ,g" src/Makefile || die
+
+ autotools-multilib_src_prepare
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(use_enable nls)
+ $(use_enable xmp)
+ $(use_enable static-libs static)
+ )
+
+ # plain 'use_with' fails
+ use zlib || myeconfargs+=( --without-zlib )
+
+ # Bug #78720. amd64/gcc-3.4/-fvisibility* fail.
+ if [[ ${ABI} == amd64 && $(gcc-major-version) -lt 4 ]]; then
+ myeconfargs+=( --disable-visibility )
+ fi
+
+ autotools-utils_src_configure
+}
+
+multilib_src_compile() {
+ # Needed for Solaris because /bin/sh is not a bash, bug #245647
+ sed -i -e "s:/bin/sh:${EPREFIX}/bin/sh:" src/Makefile || die "sed failed"
+ emake
+
+ if multilib_is_native_abi; then
+ if use contrib; then
+ emake -C contrib/organize \
+ LDFLAGS="\$(BOOST_LIBS) -L../../src -lexiv2 ${LDFLAGS}" \
+ CPPFLAGS="${CPPFLAGS} -I\$(BOOST_INC_DIR) -I. -DEXV_HAVE_STDINT_H"
+ fi
+
+ if use doc; then
+ emake samples
+ emake doc
+ fi
+ fi
+}
+
+multilib_src_install() {
+ autotools-utils_src_install
+
+ if multilib_is_native_abi; then
+ if use contrib; then
+ emake DESTDIR="${D}" -C contrib/organize install
+ fi
+
+ use doc && dohtml -r doc/html/.
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ prune_libtool_files --all
+
+ use xmp && dodoc doc/{COPYING-XMPSDK,README-XMP,cmdxmp.txt}
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ docompress -x /usr/share/doc/${PF}/examples
+ doins samples/*.cpp
+ fi
+}
diff --git a/media-gfx/exiv2/files/exiv2-0.23-boost-fs-contrib.patch b/media-gfx/exiv2/files/exiv2-0.23-boost-fs-contrib.patch
new file mode 100644
index 000000000000..f5ffc473e40a
--- /dev/null
+++ b/media-gfx/exiv2/files/exiv2-0.23-boost-fs-contrib.patch
@@ -0,0 +1,182 @@
+--- work/exiv2-0.23/contrib/organize/organize.cpp 2009-03-08 09:26:30.000000000 +0100
++++ work/exiv2-0.23/contrib/organize/organize.cpp 2009-03-08 09:26:30.000000000 +0100
+@@ -294,7 +294,7 @@
+ bool md5sum(const fs::path &path, md5digest &digest)
+ {
+ try {
+- Exiv2::FileIo io(path.file_string());
++ Exiv2::FileIo io(path.string());
+ if (io.open() != 0)
+ return false;
+ Exiv2::IoCloser closer(io);
+@@ -568,8 +568,8 @@
+
+ fs::path uniquify(const fs::path &dest)
+ {
+- std::string ext = dest.extension();
+- std::string fname = dest.stem();
++ std::string ext = dest.extension().string();
++ std::string fname = dest.stem().string();
+ fs::path parent = dest.parent_path();
+
+ unsigned number = 1;
+@@ -600,13 +600,13 @@
+ std::vector<std::string>::const_iterator x_iter = params.excludes.begin();
+ std::vector<std::string>::const_iterator x_end = params.excludes.end();
+ for( ; x_iter != x_end; ++x_iter ) {
+- if(boost::contains(directory.file_string(), *x_iter)) {
++ if(boost::contains(directory.string(), *x_iter)) {
+ exclude = true;
+ break;
+ }
+ }
+ if(exclude) {
+- info(std::string("excluding directory: ") + directory.file_string() +
++ info(std::string("excluding directory: ") + directory.string() +
+ " matched: " + *x_iter);
+ ++params.dir_ex_count;
+ return;
+@@ -621,7 +621,7 @@
+ process_directory(p_iter->path(), depth + 1, params);
+ else {
+ info(std::string("depth reached, skipping: ") +
+- p_iter->path().file_string());
++ p_iter->path().string());
+ }
+ }
+ else if( is_regular_file(*p_iter) ) {
+@@ -630,13 +630,13 @@
+ exclude = false;
+ x_iter = params.excludes.begin();
+ for( ; x_iter != x_end; ++x_iter ) {
+- if(boost::contains(p_iter->path().file_string(), *x_iter)) {
++ if(boost::contains(p_iter->path().string(), *x_iter)) {
+ exclude = true;
+ break;
+ }
+ }
+ if(exclude) {
+- info(std::string("excluding file: ") + p_iter->path().file_string() +
++ info(std::string("excluding file: ") + p_iter->path().string() +
+ " matched: " + *x_iter);
+ ++params.file_ex_count;
+ continue;
+@@ -648,45 +648,45 @@
+ if(!dest_subdir.empty())
+ dest_file = params.dest_dir / dest_subdir;
+ else if(params.ignore_unsorted) {
+- info(std::string("ignoring unsorted: ") + p_iter->path().file_string());
++ info(std::string("ignoring unsorted: ") + p_iter->path().string());
+ ++params.unsorted_ignored_count;
+ continue;
+ }
+ else {
+- info(std::string("unsorted file (missing metadata): ") + p_iter->path().file_string());
++ info(std::string("unsorted file (missing metadata): ") + p_iter->path().string());
+ dest_file = params.unsorted_dir;
+ ++params.unsorted_count;
+ }
+
+- dest_file /= p_iter->filename();
++ dest_file /= p_iter->path().filename();
+
+ if(fs::exists(dest_file)) {
+ if(params.ignore_dups) {
+- info(std::string("ignoring: ") + p_iter->path().file_string() +
+- " duplicates: " + dest_file.file_string());
++ info(std::string("ignoring: ") + p_iter->path().string() +
++ " duplicates: " + dest_file.string());
+ ++params.dups_ignored_count;
+ continue;
+ }
+ else {
+ if(params.force) {
+- info(std::string("force removing: ") + dest_file.file_string() + " for: "
+- + p_iter->path().file_string());
++ info(std::string("force removing: ") + dest_file.string() + " for: "
++ + p_iter->path().string());
+ if(!params.dry_run)
+ fs::remove(dest_file);
+ }
+ else if(params.rename) {
+- info(std::string("renaming: ") + p_iter->path().file_string() +
+- " duplicates: " + dest_file.file_string());
++ info(std::string("renaming: ") + p_iter->path().string() +
++ " duplicates: " + dest_file.string());
+ dest_file = uniquify(dest_file);
+ }
+ else {
+- info(std::string("duplicate file: ") + p_iter->path().file_string() +
+- " of: " + dest_file.file_string());
+- dest_file = params.dups_dir / dest_subdir / p_iter->filename();
++ info(std::string("duplicate file: ") + p_iter->path().string() +
++ " of: " + dest_file.string());
++ dest_file = params.dups_dir / dest_subdir / p_iter->path().filename();
+ // Ugh, more dup possibilities
+ if(fs::exists(dest_file)) {
+- info(std::string("renaming: ") + p_iter->path().file_string() +
+- " duplicates: " + dest_file.file_string());
++ info(std::string("renaming: ") + p_iter->path().string() +
++ " duplicates: " + dest_file.string());
+ dest_file = uniquify(dest_file);
+ }
+ }
+@@ -698,8 +698,8 @@
+ fs::create_directories(dest_file.parent_path());
+
+ if(params.symlink) {
+- info(std::string("linking from: ") + p_iter->path().file_string() +
+- " to: " + dest_file.file_string());
++ info(std::string("linking from: ") + p_iter->path().string() +
++ " to: " + dest_file.string());
+ if(!params.dry_run) {
+ // The target of a symlink must be either absolute (aka complete) or
+ // relative to the location of the link. Easiest solution is to make
+@@ -713,8 +713,8 @@
+ }
+ }
+ else {
+- info(std::string("copying from: ") + p_iter->path().file_string() +
+- " to: " + dest_file.file_string());
++ info(std::string("copying from: ") + p_iter->path().string() +
++ " to: " + dest_file.string());
+ if(!params.dry_run) {
+ // Copy the file and restore its write time (needed for posix)
+ std::time_t time = fs::last_write_time(*p_iter);
+@@ -730,8 +730,8 @@
+ if(!ok) {
+ // Should probably find a more appropriate exception for this
+ throw std::runtime_error(std::string("File verification failed: '")
+- + p_iter->path().file_string() + "' differs from '" +
+- dest_file.file_string() + "'");
++ + p_iter->path().string() + "' differs from '" +
++ dest_file.string() + "'");
+ }
+ else {
+ info(std::string("verification passed"));
+@@ -740,7 +740,7 @@
+ }
+ }
+ if(params.move) {
+- info(std::string("removing: ") + p_iter->path().file_string());
++ info(std::string("removing: ") + p_iter->path().string());
+ if(!params.dry_run)
+ fs::remove(*p_iter);
+ }
+@@ -752,14 +752,14 @@
+ ++params.ok_count;
+ }
+ catch(fs::filesystem_error& e) {
+- error(e, std::string("skipping file: " + p_iter->path().file_string()));
++ error(e, std::string("skipping file: " + p_iter->path().string()));
+ ++params.file_err_count;
+ }
+ }
+ }
+ }
+ catch(fs::filesystem_error& e) {
+- error(e, std::string("skipping directory: " + directory.file_string()));
++ error(e, std::string("skipping directory: " + directory.string()));
+ ++params.dir_err_count;
+ }
+ }
diff --git a/media-gfx/exiv2/files/exiv2-0.24-CVE-2014-9449.patch b/media-gfx/exiv2/files/exiv2-0.24-CVE-2014-9449.patch
new file mode 100644
index 000000000000..cf1b46fbf69c
--- /dev/null
+++ b/media-gfx/exiv2/files/exiv2-0.24-CVE-2014-9449.patch
@@ -0,0 +1,27 @@
+diff -up exiv2-0.24/src/riffvideo.cpp.CVE-2014-9449 exiv2-0.24/src/riffvideo.cpp
+--- exiv2-0.24/src/riffvideo.cpp.CVE-2014-9449 2013-12-01 06:13:42.000000000 -0600
++++ exiv2-0.24/src/riffvideo.cpp 2015-01-05 11:21:42.306728309 -0600
+@@ -856,7 +856,7 @@ namespace Exiv2 {
+
+ void RiffVideo::infoTagsHandler()
+ {
+- const long bufMinSize = 100;
++ const long bufMinSize = 10000;
+ DataBuf buf(bufMinSize);
+ buf.pData_[4] = '\0';
+ io_->seek(-12, BasicIo::cur);
+@@ -879,10 +879,14 @@ namespace Exiv2 {
+ if(infoSize >= 0) {
+ size -= infoSize;
+ io_->read(buf.pData_, infoSize);
++ if(infoSize < 4)
++ buf.pData_[infoSize] = '\0';
+ }
+
+ if(tv)
+ xmpData_[exvGettext(tv->label_)] = buf.pData_;
++ else
++ continue;
+ }
+ io_->seek(cur_pos + size_external, BasicIo::beg);
+ } // RiffVideo::infoTagsHandler
diff --git a/media-gfx/exiv2/files/exiv2-0.24-python3.patch b/media-gfx/exiv2/files/exiv2-0.24-python3.patch
new file mode 100644
index 000000000000..405a7d303e93
--- /dev/null
+++ b/media-gfx/exiv2/files/exiv2-0.24-python3.patch
@@ -0,0 +1,27 @@
+diff -ub -r exiv2-0.23.org/doc/templates/gen.py exiv2-0.23/doc/templates/gen.py
+--- exiv2-0.23.org/doc/templates/gen.py 2005-05-28 19:35:08.000000000 +0400
++++ exiv2-0.23/doc/templates/gen.py 2013-12-21 03:03:54.000000000 +0400
+@@ -7,9 +7,9 @@
+ # ----------------------------------------------------------------------
+ # functions
+ def usage():
+- print """Usage: gen.py file.in [...]
++ print("""Usage: gen.py file.in [...]
+ Substitute placeholders in input files with content
+- """
++ """)
+
+ def gen_html(file):
+ """Replace variables in the file with their content"""
+@@ -49,9 +49,9 @@
+ vars.sort()
+
+ # Substitute variables in all input files
+-print "Substituting variables", vars
++print("Substituting variables {0}".format(vars))
+ for file in input:
+- print "Processing", file, "..."
++ print("Processing {0}...".format(file))
+ text = gen_html(file)
+ file = file.replace(".in", "")
+ open(file, 'w').write(text)
diff --git a/media-gfx/exiv2/metadata.xml b/media-gfx/exiv2/metadata.xml
new file mode 100644
index 000000000000..0bb7de61697d
--- /dev/null
+++ b/media-gfx/exiv2/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <herd>kde</herd>
+ <longdescription lang="en">
+ Exiv2 is a C++ library and a command line utility to read and
+ write EXIF and IPTC image metadata.
+ </longdescription>
+ <use>
+ <flag name='contrib'>
+ Build additional contrib components
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/fbgrab/Manifest b/media-gfx/fbgrab/Manifest
new file mode 100644
index 000000000000..ce0695e7f925
--- /dev/null
+++ b/media-gfx/fbgrab/Manifest
@@ -0,0 +1,2 @@
+DIST fbgrab-1.0.tar.gz 11928 SHA256 9158241a20978dcc4caf0692684da9dd3640fd6f5c8b72581bd099198d670510 SHA512 83346be21b3dc393165cfbb210284679e9fc746380fde9939d96d8174cd320d71cc6bfbf23a9495a107c8f0a6ded43342f843b530996f695ebba0388669a35f0 WHIRLPOOL 9b697c073dfb38bd50c426b20217eb979429fea70728002aa90c1466094dc384b10cbe9879ea0fde85053c56f88b8a4099ac5dcdbaa8e1fd2bc9b8a3782fe6ab
+DIST fbgrab-1.3.tar.gz 13027 SHA256 5fab478cbf8731fbacefaa76236a8f8b38ccff920c53b3a8253bc35509fba8ed SHA512 2d1166890f41d7de813a6c9b722db148980fcc802da38dea1a42d1f150cbdc16d0dd6757bc334586402f109b382e5039d44b03f9f19024f546958bdf21ca5d52 WHIRLPOOL 55bd2d203592312a661fd0699b375b1e4c2699e61d41acaa56426146ba42f34744b8a6748af6e54f9d7b548ef0308c7874d8337ad250b3dc2fd0559cb9f9b162
diff --git a/media-gfx/fbgrab/fbgrab-1.0-r2.ebuild b/media-gfx/fbgrab/fbgrab-1.0-r2.ebuild
new file mode 100644
index 000000000000..f37580031aff
--- /dev/null
+++ b/media-gfx/fbgrab/fbgrab-1.0-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Framebuffer screenshot utility"
+HOMEPAGE="http://hem.bredband.net/gmogmo/fbgrab/"
+SRC_URI="http://hem.bredband.net/gmogmo/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ~ppc64 ~sparc x86"
+IUSE=""
+
+RDEPEND="media-libs/libpng
+ sys-libs/zlib"
+
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-zlib_h.patch" \
+ "${FILESDIR}/${P}-Makefile.patch"
+
+ epatch_user
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin ${PN}
+ newman ${PN}.1.man ${PN}.1
+}
diff --git a/media-gfx/fbgrab/fbgrab-1.3.ebuild b/media-gfx/fbgrab/fbgrab-1.3.ebuild
new file mode 100644
index 000000000000..2dfccdb2477b
--- /dev/null
+++ b/media-gfx/fbgrab/fbgrab-1.3.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Framebuffer screenshot utility"
+HOMEPAGE="http://fbgrab.monells.se/"
+SRC_URI="http://fbgrab.monells.se/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="media-libs/libpng:=
+ sys-libs/zlib"
+
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i -e "s:-g::" Makefile || die "sed failed"
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin ${PN}
+ newman ${PN}.1.man ${PN}.1
+}
diff --git a/media-gfx/fbgrab/files/fbgrab-1.0-Makefile.patch b/media-gfx/fbgrab/files/fbgrab-1.0-Makefile.patch
new file mode 100644
index 000000000000..28fa840aa33a
--- /dev/null
+++ b/media-gfx/fbgrab/files/fbgrab-1.0-Makefile.patch
@@ -0,0 +1,14 @@
+diff -ru fbgrab-1.0.origin/Makefile fbgrab-1.0/Makefile
+--- fbgrab-1.0.origin/Makefile 2002-03-20 22:49:06.000000000 +0300
++++ fbgrab-1.0/Makefile 2013-06-25 21:03:11.000000000 +0400
+@@ -4,8 +4,8 @@
+ ###
+
+ fbgrab: fbgrab.c
+- splint +posixlib fbgrab.c
+- gcc -g -Wall fbgrab.c -lpng -lz -o fbgrab
++ #splint +posixlib fbgrab.c
++ $(CC) -Wall ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} fbgrab.c -lpng -lz -o fbgrab
+
+ install:
+ strip fbgrab
diff --git a/media-gfx/fbgrab/files/fbgrab-1.0-zlib_h.patch b/media-gfx/fbgrab/files/fbgrab-1.0-zlib_h.patch
new file mode 100644
index 000000000000..8318ab468994
--- /dev/null
+++ b/media-gfx/fbgrab/files/fbgrab-1.0-zlib_h.patch
@@ -0,0 +1,10 @@
+--- fbgrab.c
++++ fbgrab.c
+@@ -22,6 +22,7 @@
+
+ #include <getopt.h>
+ #include <sys/vt.h> /* to handle vt changing */
++#include <zlib.h> /* Z_BEST_COMPRESSION */
+ #include <png.h> /* PNG lib */
+ #include <linux/fb.h> /* to handle framebuffer ioctls */
+
diff --git a/media-gfx/fbgrab/files/fbgrab-1.1-Makefile.patch b/media-gfx/fbgrab/files/fbgrab-1.1-Makefile.patch
new file mode 100644
index 000000000000..5280a0a1e516
--- /dev/null
+++ b/media-gfx/fbgrab/files/fbgrab-1.1-Makefile.patch
@@ -0,0 +1,12 @@
+diff -ru fbgrab.orig/Makefile fbgrab/Makefile
+--- fbgrab.orig/Makefile 2013-05-24 00:14:45.000000000 +0400
++++ fbgrab/Makefile 2013-08-22 14:39:18.000000000 +0400
+@@ -4,7 +4,7 @@
+ ###
+
+ fbgrab: fbgrab.c
+- gcc -g -Wall fbgrab.c -lpng -lz -o fbgrab
++ $(CC) -Wall ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} fbgrab.c -lpng -lz -o fbgrab
+
+ install:
+ install fbgrab /usr/bin/fbgrab
diff --git a/media-gfx/fbgrab/metadata.xml b/media-gfx/fbgrab/metadata.xml
new file mode 100644
index 000000000000..1b9fb5b7d4b0
--- /dev/null
+++ b/media-gfx/fbgrab/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>zlogene@gentoo.org</email>
+ <name>Mikle Kolyada</name>
+ </maintainer>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/fbida/Manifest b/media-gfx/fbida/Manifest
new file mode 100644
index 000000000000..605eb7c9937d
--- /dev/null
+++ b/media-gfx/fbida/Manifest
@@ -0,0 +1,4 @@
+DIST fbida-2.09-jpeg-9a.patch.bz2 29392 SHA256 d0979bb7b33b34c2b01f0fe14825812319b0ec08f00f0de6cf9a0533a5f6dba8 SHA512 f644f464231967589a2f1ad0fdc9025d60348a9de20d468fc6abdf3dc0cbf07522e3f71a94930df3c54055fc445df035b4b007efa7e6a3f7acbec90e28dc86c8 WHIRLPOOL 372aa56e698f82ff9dd8adacb5de9347e40849653553d810e4f5c0fca731ca8e863f8a20658db071ca11ed8d6bc8794c36ec5fd8c0a2426d8e500389703f2e95
+DIST fbida-2.09.tar.gz 248086 SHA256 dd40b3572f79c6524480ac652c9b32e3867cb53e6c53db51415ddbb20f5231e6 SHA512 b939ca656fc28e3df652610821b9c11f7ab20ad1bd393c40de74f631fad0af463bfaf4f0520484edc12922b1fc288d08fae7c92789c711ce96b0caf50dde25ba WHIRLPOOL 222538f80fc7e878d142cd4dc44089d12b717ee8ae921e514bb3b85322b972cc96300594ae89d7cc1cb006868a0c75abacaa7ddff15041bc672c27d565a00a4b
+DIST fbida-2.10.tar.gz 283490 SHA256 7a5a3aac61b40a6a2bbf716d270a46e2f8e8d5c97e314e927d41398a4d0b6cb6 SHA512 b7371c19d68cc7219faca4bbfa464c85df2eb22c7bd737d4f0a6fb3de481497862ca22832801d29bab57285d5a8d7d0b0009e14426efdce2759d47340f5eca6d WHIRLPOOL 78c5dc34a9f050e560ada960718a9f43e6d8c95fe4c91c052a70c93350de80eebd3e8e9b6c26361ecd8361efe96824e78b2af7a2b2e27430a11e712bb9a02ee0
+DIST ida.png.bz2 11928 SHA256 ce90c13f8da8d2ced4cf0e55d2f960bc236355f6e5dd60ea6c56fbe51e6cabae SHA512 cf3c1bc8d25fe75f10c0a0414b5c082348df2fa94864ec4537c36e0b357cf35b68e2eca205bbf48578a41c27317701aee621c6dd176e0bf3857c52f895d6bfd3 WHIRLPOOL 1b5e7835aa8a555a231ca58da8e249974639b29b1e15586c2d2d5a33e96908df1a3782fbe61d0c51dc888b7304c9f7541a96af4ca2b956b393909feb534ab5be
diff --git a/media-gfx/fbida/fbida-2.09-r4.ebuild b/media-gfx/fbida/fbida-2.09-r4.ebuild
new file mode 100644
index 000000000000..796849c1f24a
--- /dev/null
+++ b/media-gfx/fbida/fbida-2.09-r4.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Image viewers for the framebuffer console (fbi) and X11 (ida)"
+HOMEPAGE="http://www.kraxel.org/blog/linux/fbida/"
+SRC_URI="
+ http://www.kraxel.org/releases/${PN}/${P}.tar.gz
+ http://dev.gentoo.org/~jer/${P}-jpeg-9a.patch.bz2
+ mirror://gentoo/ida.png.bz2
+"
+LICENSE="GPL-2 IJG"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ppc ppc64 ~sh sparc x86"
+IUSE="curl fbcon +gif lirc pdf +png scanner +tiff X +webp"
+REQUIRED_USE="
+ pdf? ( tiff )
+"
+
+RDEPEND="
+ !media-gfx/fbi
+ >=media-libs/fontconfig-2.2
+ >=media-libs/freetype-2.0
+ media-libs/libexif
+ curl? ( net-misc/curl )
+ gif? ( media-libs/giflib:= )
+ lirc? ( app-misc/lirc )
+ png? ( media-libs/libpng )
+ scanner? ( media-gfx/sane-backends )
+ tiff? ( media-libs/tiff )
+ virtual/jpeg
+ virtual/ttf-fonts
+ webp? ( media-libs/libwebp )
+ X? (
+ >=x11-libs/motif-2.3:0
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXt
+ )
+"
+
+DEPEND="
+ ${RDEPEND}
+ X? ( x11-proto/xextproto x11-proto/xproto )
+ pdf? ( app-text/ghostscript-gpl )
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/ida-desktop.patch
+ epatch "${FILESDIR}"/${P}-make.patch
+ epatch "${FILESDIR}"/${P}-giflib.patch
+
+ pushd jpeg/ >/dev/null
+ epatch -p2 "${WORKDIR}"/${P}-jpeg-9a.patch
+ popd >/dev/null
+
+ sed -i \
+ -e 's:DGifOpenFileName,ungif:DGifOpenFileName,gif:' \
+ -e 's:-lungif:-lgif:' \
+ "${S}"/GNUmakefile || die
+
+ if [[ $(gcc-major-version) -lt 4 ]]; then
+ sed -i-e 's:-Wno-pointer-sign::' "${S}"/GNUmakefile || die
+ fi
+
+ tc-export CC CPP
+}
+
+src_configure() {
+ # Let autoconf do its job and then fix things to build fbida
+ # according to our specifications
+ emake Make.config
+
+ gentoo_fbida() {
+ local useflag=${1}
+ local config=${2}
+
+ local option="no"
+ use ${useflag} && option="yes"
+
+ sed -i \
+ -e "s|HAVE_${config}.*|HAVE_${config} := ${option}|" \
+ "${S}/Make.config" || die
+ }
+
+ gentoo_fbida X MOTIF
+ gentoo_fbida curl LIBCURL
+ gentoo_fbida fbcon LINUX_FB_H
+ gentoo_fbida gif LIBUNGIF
+ gentoo_fbida lirc LIBLIRC
+ gentoo_fbida pdf LIBTIFF
+ gentoo_fbida png LIBPNG
+ gentoo_fbida scanner LIBSANE
+ gentoo_fbida tiff LIBTIFF
+ gentoo_fbida webp LIBWEBP
+}
+
+src_compile() {
+ emake verbose=yes
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ STRIP="" \
+ prefix=/usr \
+ install
+
+ dodoc README
+
+ if use fbcon && ! use pdf; then
+ rm "${D}"/usr/bin/fbgs "${D}"/usr/share/man/man1/fbgs.1 || die
+ fi
+
+ if use X ; then
+ doicon "${WORKDIR}"/ida.png
+ domenu desktop/ida.desktop
+ fi
+}
diff --git a/media-gfx/fbida/fbida-2.10.ebuild b/media-gfx/fbida/fbida-2.10.ebuild
new file mode 100644
index 000000000000..9450035d19aa
--- /dev/null
+++ b/media-gfx/fbida/fbida-2.10.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Image viewers for the framebuffer console (fbi) and X11 (ida)"
+HOMEPAGE="http://www.kraxel.org/blog/linux/fbida/"
+SRC_URI="
+ http://www.kraxel.org/releases/${PN}/${P}.tar.gz
+ mirror://gentoo/ida.png.bz2
+"
+LICENSE="GPL-2 IJG"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sh ~sparc ~x86"
+IUSE="curl fbcon +gif lirc pdf +png scanner +tiff X +webp"
+REQUIRED_USE="
+ pdf? ( tiff )
+"
+
+RDEPEND="
+ !media-gfx/fbi
+ >=media-libs/fontconfig-2.2
+ >=media-libs/freetype-2.0
+ media-libs/libexif
+ curl? ( net-misc/curl )
+ gif? ( media-libs/giflib:= )
+ lirc? ( app-misc/lirc )
+ png? ( media-libs/libpng:* )
+ scanner? ( media-gfx/sane-backends )
+ tiff? ( media-libs/tiff:* )
+ virtual/jpeg:*
+ virtual/ttf-fonts
+ webp? ( media-libs/libwebp )
+ X? (
+ >=x11-libs/motif-2.3:0
+ x11-libs/libX11
+ x11-libs/libXpm
+ x11-libs/libXt
+ )
+"
+
+DEPEND="
+ ${RDEPEND}
+ X? ( x11-proto/xextproto x11-proto/xproto )
+ pdf? ( app-text/ghostscript-gpl )
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/ida-desktop.patch \
+ "${FILESDIR}"/${PN}-2.10-giflib-4.2.patch
+
+ tc-export CC CPP
+}
+
+src_configure() {
+ # Let autoconf do its job and then fix things to build fbida
+ # according to our specifications
+ emake Make.config
+
+ gentoo_fbida() {
+ local useflag=${1}
+ local config=${2}
+
+ local option="no"
+ use ${useflag} && option="yes"
+
+ sed -i \
+ -e "s|HAVE_${config}.*|HAVE_${config} := ${option}|" \
+ "${S}/Make.config" || die
+ }
+
+ gentoo_fbida X MOTIF
+ gentoo_fbida curl LIBCURL
+ gentoo_fbida fbcon LINUX_FB_H
+ gentoo_fbida gif LIBUNGIF
+ gentoo_fbida lirc LIBLIRC
+ gentoo_fbida pdf LIBTIFF
+ gentoo_fbida png LIBPNG
+ gentoo_fbida scanner LIBSANE
+ gentoo_fbida tiff LIBTIFF
+ gentoo_fbida webp LIBWEBP
+}
+
+src_compile() {
+ emake verbose=yes
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ STRIP="" \
+ prefix=/usr \
+ install
+
+ dodoc README
+
+ if use fbcon && ! use pdf; then
+ rm "${D}"/usr/bin/fbgs "${D}"/usr/share/man/man1/fbgs.1 || die
+ fi
+
+ if use X ; then
+ doicon "${WORKDIR}"/ida.png
+ domenu desktop/ida.desktop
+ fi
+}
diff --git a/media-gfx/fbida/files/fbida-2.09-giflib.patch b/media-gfx/fbida/files/fbida-2.09-giflib.patch
new file mode 100644
index 000000000000..50c005589974
--- /dev/null
+++ b/media-gfx/fbida/files/fbida-2.09-giflib.patch
@@ -0,0 +1,97 @@
+--- a/rd/read-gif.c
++++ b/rd/read-gif.c
+@@ -25,7 +25,13 @@
+ if (GIF_ERROR == DGifGetRecordType(h->gif,&RecordType)) {
+ if (debug)
+ fprintf(stderr,"gif: DGifGetRecordType failed\n");
+- PrintGifError();
++#if GIFLIB_MAJOR >= 5
++ GifErrorString(D_GIF_ERR_NOT_GIF_FILE);
++#elif (GIFLIB_MAJOR >= 4 && GIFLIB_MINOR >=2)
++ GifErrorString();
++#else
++ PrintGifError();
++#endif
+ return -1;
+ }
+ switch (RecordType) {
+@@ -42,7 +48,13 @@
+ if (rc == GIF_ERROR) {
+ if (debug)
+ fprintf(stderr,"gif: DGifGetExtension failed\n");
++#if GIFLIB_MAJOR >= 5
++ GifErrorString(D_GIF_ERR_NOT_GIF_FILE);
++#elif (GIFLIB_MAJOR >= 4 && GIFLIB_MINOR >=2)
++ GifErrorString();
++#else
+ PrintGifError();
++#endif
+ return -1;
+ }
+ if (debug) {
+@@ -93,12 +105,19 @@
+ struct gif_state *h;
+ GifRecordType RecordType;
+ int i, image = 0;
++#if (GIFLIB_MAJOR >=5 && GIFLIB_MINOR >= 1)
++ int ErrorCode;
++#endif
+
+ h = malloc(sizeof(*h));
+ memset(h,0,sizeof(*h));
+
+ h->infile = fp;
++#if GIFLIB_MAJOR >= 5
++ h->gif = DGifOpenFileHandle(fileno(fp), NULL);
++#else
+ h->gif = DGifOpenFileHandle(fileno(fp));
++#endif
+ h->row = malloc(h->gif->SWidth * sizeof(GifPixelType));
+
+ while (0 == image) {
+@@ -108,7 +127,15 @@
+ if (GIF_ERROR == DGifGetImageDesc(h->gif)) {
+ if (debug)
+ fprintf(stderr,"gif: DGifGetImageDesc failed\n");
++#if (GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1)
++ GifErrorString(D_GIF_ERR_NO_IMAG_DSCR);
++#elif GIFLIB_MAJOR >= 5
++ GifErrorString(NULL);
++#elif (GIFLIB_MAJOR >= 4 && GIFLIB_MINOR >=2)
++ GifErrorString();
++#else
+ PrintGifError();
++#endif
+ }
+ if (NULL == h->gif->SColorMap &&
+ NULL == h->gif->Image.ColorMap) {
+@@ -156,7 +183,11 @@
+ oops:
+ if (debug)
+ fprintf(stderr,"gif: fatal error, aborting\n");
++#if (GIFLIB_MAJOR >=5 && GIFLIB_MINOR >= 1)
++ DGifCloseFile(h->gif, &ErrorCode);
++#else
+ DGifCloseFile(h->gif);
++#endif
+ fclose(h->infile);
+ free(h->row);
+ free(h);
+@@ -193,10 +224,17 @@
+ gif_done(void *data)
+ {
+ struct gif_state *h = data;
++#if (GIFLIB_MAJOR >=5 && GIFLIB_MINOR >= 1)
++ int ErrorCode;
++#endif
+
+ if (debug)
+ fprintf(stderr,"gif: done, cleaning up\n");
++#if (GIFLIB_MAJOR >=5 && GIFLIB_MINOR >= 1)
++ DGifCloseFile(h->gif, &ErrorCode);
++#else
+ DGifCloseFile(h->gif);
++#endif
+ fclose(h->infile);
+ if (h->il)
+ free(h->il);
diff --git a/media-gfx/fbida/files/fbida-2.09-make.patch b/media-gfx/fbida/files/fbida-2.09-make.patch
new file mode 100644
index 000000000000..61c19a3cfc72
--- /dev/null
+++ b/media-gfx/fbida/files/fbida-2.09-make.patch
@@ -0,0 +1,36 @@
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -30,8 +30,8 @@
+
+ ac_jpeg_ver = $(shell \
+ $(call ac_init,for libjpeg version);\
+- $(call ac_s_cmd,echo -e '\#include <jpeglib.h>\nJPEG_LIB_VERSION' \
+- | cpp | tail -n 1);\
++ $(call ac_s_cmd,printf '\#include <jpeglib.h>\nJPEG_LIB_VERSION' \
++ | $(CPP) | tail -n 1);\
+ $(call ac_fini))
+
+ define make-config
+--- a/mk/Autoconf.mk
++++ b/mk/Autoconf.mk
+@@ -24,7 +24,7 @@ ifneq ($(verbose),no)
+ ac_fini = echo "... result is $${rc}" >&2; echo >&2; echo "$${rc}"
+ else
+ # normal
+- ac_init = echo -n "checking $(1) ... " >&2; rc=no
++ ac_init = printf '%s' "checking $(1) ... " >&2; rc=no
+ ac_b_cmd = $(1) >/dev/null 2>&1 && rc=yes
+ ac_s_cmd = rc=`$(1) 2>/dev/null`
+ ac_fini = echo "$${rc}" >&2; echo "$${rc}"
+@@ -162,7 +162,7 @@ config: Make.config
+ @true
+
+ Make.config: $(srcdir)/GNUmakefile
+- @echo -e "$(make-config-q)" > $@
++ @printf '%b' "$(make-config-q)" > $@
+ @echo
+ @echo "Make.config written, edit if needed"
+ @echo
+--
+1.7.5.3
+
diff --git a/media-gfx/fbida/files/fbida-2.10-giflib-4.2.patch b/media-gfx/fbida/files/fbida-2.10-giflib-4.2.patch
new file mode 100644
index 000000000000..1e21b8af2bd7
--- /dev/null
+++ b/media-gfx/fbida/files/fbida-2.10-giflib-4.2.patch
@@ -0,0 +1,17 @@
+--- a/rd/read-gif.c
++++ b/rd/read-gif.c
+@@ -14,6 +14,14 @@
+ }
+ #else
+ #define GIF5DATA(x)
++// v4.2 removed PrintGifError in favor of GifErrorString, but with a different
++// prototype than v5
++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && (GIFLIB_MAJOR == 4) && (GIFLIB_MINOR == 2)
++static void PrintGifError()
++{
++ fprintf(stderr, "GIF library error: %s\n", GifErrorString());
++}
++#endif
+ #define PrintGifError(e) PrintGifError()
+ #define DGifOpenFileHandle(x,e) DGifOpenFileHandle(x)
+ #define DGifCloseFile(x,e) DGifCloseFile(x)
diff --git a/media-gfx/fbida/files/ida-desktop.patch b/media-gfx/fbida/files/ida-desktop.patch
new file mode 100644
index 000000000000..eaac0ed69558
--- /dev/null
+++ b/media-gfx/fbida/files/ida-desktop.patch
@@ -0,0 +1,17 @@
+--- a/desktop/ida.desktop
++++ b/desktop/ida.desktop
+@@ -1,9 +1,10 @@
+ [Desktop Entry]
+ Type=Application
+-Encoding=UTF-8
+ Name=ida
+ GenericName=Image Viewer
++Comment=Image Viewer
+ Exec=ida %F
+-Terminal=no
+-Categories=Motif;Graphics;Viewer
+-MimeType=image/jpeg;image/tiff;image/png
++Terminal=false
++Categories=Motif;Graphics;Viewer;
++MimeType=image/jpeg;image/tiff;image/png;
++Icon=ida
diff --git a/media-gfx/fbida/metadata.xml b/media-gfx/fbida/metadata.xml
new file mode 100644
index 000000000000..99f7a4d11ad7
--- /dev/null
+++ b/media-gfx/fbida/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>jer@gentoo.org</email>
+</maintainer>
+<use>
+<flag name='fbcon'>Install the framebuffer image viewer "fbi"</flag>
+<flag name='X'>Install the Motif based image viewer "ida"</flag>
+<flag name='webp'>Enable support for the WebP image format</flag>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/fblogo/Manifest b/media-gfx/fblogo/Manifest
new file mode 100644
index 000000000000..58348ebc7762
--- /dev/null
+++ b/media-gfx/fblogo/Manifest
@@ -0,0 +1 @@
+DIST fblogo-0.5.2.tar.gz 21874 SHA256 409d3aaaaddd6a8d22a661c68cad3283c969ed33fabe357df60fb37ab8bfae1e
diff --git a/media-gfx/fblogo/fblogo-0.5.2.ebuild b/media-gfx/fblogo/fblogo-0.5.2.ebuild
new file mode 100644
index 000000000000..619c5ecf461f
--- /dev/null
+++ b/media-gfx/fblogo/fblogo-0.5.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Creates images to substitute Linux boot logo"
+#HOMEPAGE="http://freakzone.net/gordon/#fblogo"
+HOMEPAGE="http://www.gentoo.org/"
+#SRC_URI="http://freakzone.net/gordon/src/${P}.tar.gz"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 arm ppc ~sparc x86"
+IUSE=""
+
+RDEPEND="media-libs/libpng
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/fblogo-0.5.2-cross.patch
+
+ sed -i -e '/-o fblogo/d' \
+ -e 's:LIBS:LDLIBS:' \
+ Makefile || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc README CHANGES
+}
diff --git a/media-gfx/fblogo/files/fblogo-0.5.2-cross.patch b/media-gfx/fblogo/files/fblogo-0.5.2-cross.patch
new file mode 100644
index 000000000000..dfcb2871a347
--- /dev/null
+++ b/media-gfx/fblogo/files/fblogo-0.5.2-cross.patch
@@ -0,0 +1,36 @@
+--- Makefile 2003-09-28 10:33:24.000000000 +0000
++++ Makefile 2008-05-18 19:05:12.000000000 +0000
+@@ -1,24 +1,28 @@
+-CC = gcc
++CC ?= gcc
+ LIBS = -lpng -lz -lm
+-CFLAGS = -g -O2 -W -Wall -DPNG_SETJMP_NOT_SUPPORTED
+-
++CFLAGS ?= -g -O2 -W -Wall
++CFLAGS += -DPNG_SETJMP_NOT_SUPPORTED
++LDFLAGS =
+ INSTALL = /usr/bin/install
+ INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
+ INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
+ INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
+
+ DESTDIR =
+-PREFIX = /usr/local
++PREFIX = /usr
+ BINDIR = ${PREFIX}/bin
+ MANDIR = ${PREFIX}/share/man
+
+ fblogo: fblogo.c
+- $(CC) -o fblogo $(CFLAGS) $(INCLUDES) $(LIBS) fblogo.c
++ $(CC) -o fblogo $(CFLAGS) $(INCLUDES) $(LDFLAGS) $(LIBS) fblogo.c
+
+ clean::
+ -rm -f *.o fblogo
+
+ install:
++ mkdir -p ${DESTDIR}${PREFIX}
++ mkdir -p ${DESTDIR}${BINDIR}
++ mkdir -p ${DESTDIR}${MANDIR}/man1
+ ${INSTALL_PROGRAM} fblogo ${DESTDIR}${BINDIR}
+ ${INSTALL_SCRIPT} fblogo_patch ${DESTDIR}${BINDIR}
+ ${INSTALL_FILE} fblogo.1 ${DESTDIR}${MANDIR}/man1
diff --git a/media-gfx/fblogo/metadata.xml b/media-gfx/fblogo/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/media-gfx/fblogo/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/fbv/Manifest b/media-gfx/fbv/Manifest
new file mode 100644
index 000000000000..3abed6ec90d2
--- /dev/null
+++ b/media-gfx/fbv/Manifest
@@ -0,0 +1 @@
+DIST fbv-1.0b.tar.gz 18989 SHA256 9b55b9dafd5eb01562060d860e267e309a1876e8ba5ce4d3303484b94129ab3c
diff --git a/media-gfx/fbv/fbv-1.0b.ebuild b/media-gfx/fbv/fbv-1.0b.ebuild
new file mode 100644
index 000000000000..1a8170510d30
--- /dev/null
+++ b/media-gfx/fbv/fbv-1.0b.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="simple program to view pictures on a linux framebuffer device"
+HOMEPAGE="http://freshmeat.net/projects/fbv/"
+SRC_URI="http://s-tech.elsat.net.pl/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 arm ~ppc ppc64 sh x86"
+IUSE="gif jpeg png"
+
+RDEPEND="gif? ( media-libs/giflib )
+ jpeg? ( virtual/jpeg )
+ png? ( media-libs/libpng )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/oob-segfault-fbv-${PV}.diff \
+ "${FILESDIR}"/${P}-libpng15.patch \
+ "${FILESDIR}"/${P}-cc.patch
+
+ sed -i -e 's:-lungif:-lgif:g' configure Makefile || die
+}
+
+src_configure() {
+ local myconf="--without-bmp"
+
+ use png || myconf="${myconf} --without-libpng"
+ use gif || myconf="${myconf} --without-libungif"
+ use jpeg || myconf="${myconf} --without-libjpeg"
+
+ ./configure \
+ --cc="$(tc-getCC)" \
+ --libs="${LDFLAGS}" \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ ${myconf} || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin fbv
+ doman fbv.1
+ dodoc ChangeLog README TODO VERSION
+}
diff --git a/media-gfx/fbv/files/fbv-1.0b-cc.patch b/media-gfx/fbv/files/fbv-1.0b-cc.patch
new file mode 100644
index 000000000000..531148f10816
--- /dev/null
+++ b/media-gfx/fbv/files/fbv-1.0b-cc.patch
@@ -0,0 +1,97 @@
+# --- T2-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+#
+# T2 SDE: package/.../fbv/cc.patch
+# Copyright (C) 2007 The T2 SDE Project
+#
+# More information can be found in the files COPYING and README.
+#
+# This patch file is dual-licensed. It is available under the license the
+# patched project is licensed under, as long as it is an OpenSource license
+# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
+# of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+# --- T2-COPYRIGHT-NOTE-END ---
+
+Imported from Atmel.
+
+ - Rene Rebe <rene@exactcode.de>
+
+diff -ur fbv-1.0b/configure fbv-1.0b-avr32/configure
+--- fbv-1.0b/configure 2004-09-07 13:29:27.000000000 +0200
++++ fbv-1.0b-avr32/configure 2006-05-04 11:10:06.000000000 +0200
+@@ -21,6 +21,7 @@
+ unset png
+ unset bmp
+ unset dfb
++unset CC
+
+ help(){
+ cat << EOF >&2
+@@ -33,6 +34,7 @@
+ General:
+ --help print this message
+ --libs=LIBS additional libraries required (try -lX11 for ungif, -lz for PNG)
++ --cc=CC specify compiler to use
+
+ Directory and file names:
+ --prefix=PREFIX install files in PREFIX [/usr/local]
+@@ -53,7 +55,7 @@
+ --long help,\
+ prefix:,srcdir:,bindir:,\
+ infodir:,mandir:,\
+-without-libungif,without-libjpeg,without-libpng,without-bmp,libs: \
++without-libungif,without-libjpeg,without-libpng,without-bmp,libs:,cc: \
+ -n "$BASENAME" -- "$@")
+
+ if [ $? != 0 ] ; then help ; exit 1 ; fi
+@@ -65,6 +67,7 @@
+ case "$1" in
+ -h|--help) help ; exit 0 ;;
+ --libs) libs="$2"; shift 2 ;;
++ --cc) CC="$2"; shift 2 ;;
+ --prefix) prefix="$2" ; shift 2 ;;
+ --srcdir) srcdir="$2" ; shift 2 ;;
+ --bindir) bindir="$2" ; shift 2 ;;
+@@ -80,6 +83,7 @@
+ esac
+ done
+
++[ -z "$CC" ] && CC=cc
+ [ -z "$prefix" ] && prefix="/usr/local"
+ [ -z "$bindir" ] && bindir="${prefix}/bin"
+ [ -z "$mandir" ] && mandir="${prefix}/man"
+@@ -106,12 +110,12 @@
+ ungif="no"
+ echo "libungif check" >>./config.log
+ echo " 1st:" >>./config.log
+-cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif $libs
++$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif $libs
+ if [ -e \$\$~test ]; then
+ libs="-lungif $libs" ; ungif="yes"
+ else
+ echo " 2nd: -lX11 -L$xdir/lib" >>./config.log
+- cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif -lX11 -L$xdir/lib $libs
++ $CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif -lX11 -L$xdir/lib $libs
+ if [ -e \$\$~test ]; then
+ libs="-lungif -lX11 -L$xdir/lib $libs" ; ungif="yes"
+ fi
+@@ -124,7 +128,7 @@
+ echo -n "checking for libjpeg presence... "
+ if [ "$jpeg" != "disabled" ]; then
+ jpeg="no"
+-cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -ljpeg $libs
++$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -ljpeg $libs
+ if [ -e \$\$~test ]; then
+ libs="-ljpeg $libs" ; jpeg="yes"
+ fi
+@@ -135,7 +139,7 @@
+ echo -n "checking for libpng presence... "
+ if [ "$png" != "disabled" ]; then
+ png="no"
+-cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lpng $libs
++$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lpng $libs
+ if [ -e \$\$~test ]; then
+ libs="-lpng $libs" ; png="yes"
+ fi
diff --git a/media-gfx/fbv/files/fbv-1.0b-libpng15.patch b/media-gfx/fbv/files/fbv-1.0b-libpng15.patch
new file mode 100644
index 000000000000..dffbe48c3734
--- /dev/null
+++ b/media-gfx/fbv/files/fbv-1.0b-libpng15.patch
@@ -0,0 +1,20 @@
+--- png.c
++++ png.c
+@@ -69,7 +69,7 @@
+ fclose(fh); return(FH_ERROR_FORMAT);
+ }
+ rp=0;
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ if(rp) free(rp);
+@@ -161,7 +161,7 @@
+ fclose(fh); return(FH_ERROR_FORMAT);
+ }
+ rp=0;
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ if(rp) free(rp);
diff --git a/media-gfx/fbv/files/oob-segfault-fbv-1.0b.diff b/media-gfx/fbv/files/oob-segfault-fbv-1.0b.diff
new file mode 100644
index 000000000000..8713cb6635a8
--- /dev/null
+++ b/media-gfx/fbv/files/oob-segfault-fbv-1.0b.diff
@@ -0,0 +1,13 @@
+Index: fb_display.c
+===================================================================
+--- fb_display.c (revision 4)
++++ fb_display.c (working copy)
+@@ -92,7 +92,7 @@
+ #if 0
+ blit2FB(fh, fbbuff, alpha, x_size, y_size, x_stride, var.yres, x_pan, y_pan, x_offs, y_offs, bp);
+ #else
+- blit2FB(fh, fbbuff, alpha, x_size, y_size, x_stride, var.yres_virtual, x_pan, y_pan, x_offs, y_offs + var.yoffset, bp);
++ blit2FB(fh, fbbuff, alpha, x_size, y_size, x_stride, var.yres, x_pan, y_pan, x_offs, y_offs + var.yoffset, bp);
+ #endif
+ free(fbbuff);
+
diff --git a/media-gfx/fbv/metadata.xml b/media-gfx/fbv/metadata.xml
new file mode 100644
index 000000000000..c3e2245a9d41
--- /dev/null
+++ b/media-gfx/fbv/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription/>
+ <upstream>
+ <remote-id type="freshmeat">fbv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/feh/Manifest b/media-gfx/feh/Manifest
new file mode 100644
index 000000000000..d9d7747ce34b
--- /dev/null
+++ b/media-gfx/feh/Manifest
@@ -0,0 +1,6 @@
+DIST feh-2.10.tar.bz2 2082905 SHA256 bc782a884eedd7a73284804d8145238f140fa59fed8d483102d1d25e8144ca83 SHA512 e9d3449f01622add6c07fe6baff65245c45ff05b001b4a12a08e0c1c0610bed2acb5f95d340e3c09bdb399ad088aa0e580cba92ef8557cc96b7ccd49d5d916b6 WHIRLPOOL aaf3703974bc347369d7d083c5d38b1fd536696ef591382d25a8a1e5561097ebfc43a56832c72054d10338172f0b7f9ac9810d8fbb36897052c40c6921bf3436
+DIST feh-2.11.tar.bz2 2083324 SHA256 9dcc3612d33196cdfa9b3a0513e7048c22f1c243d0470893581bda72758f81f8 SHA512 dd7f25810e2a611f711e992a87ccc3bd79e1a58e9bb31be26ef1f5031fc00840bd9ade7dde41a963a3a5ae619e23c6f1daf9c01437d7058450697a9b75e19f13 WHIRLPOOL 7caed3a503d3d28732eb91669a2e9bb9cf147cb9d6038b77ac717063d05a31645138935a697e232b9e273e70aa07e5c16eff5a9080b7742635c5649cdbbfe939
+DIST feh-2.12.1.tar.bz2 2116784 SHA256 9026ece01d79560e1eff9715fa1765eef82e22c766da5994ee787984a6f466a1 SHA512 4afde8ed5e5bc3e44f1989aeafd26d10042e2064f1bf6edd9a01f075a42cfcdd83d6fa5f5698a2e43138b9a3c553a5604748b6b807eba25f83971f645269d993 WHIRLPOOL 1b380bff5f92c843337cde85c567df45c913f9e84dfbdcfb34f46e2e667fb4fef2705b2d3ebbcd80effe44a337bfa9df0426cbfb7d7d32ce13112f9ec45b6c1c
+DIST feh-2.12.tar.bz2 2090538 SHA256 60e07a0f545f6fb7af7b6c0d2ce1ba6bacfa65380e83cbbc2c54e8aa6b8b7032 SHA512 4d24c293ef062eb91dfd009b45f5362bccae26ebb93519f6e324b9c34b3fba4ec1ffda6c01ee71dca4f55e08d6f5101f0f9c3cbf577814eedca956790e745872 WHIRLPOOL b0b647e6785124fdaf4a36615bae081ffcc1b349739da750c6c8c1be2442050344e1bc5b65d3edfd2c6f220ae356321c9a346f5c8e9e4ecb0083fe65de24f359
+DIST feh-2.13.1.tar.bz2 2117354 SHA256 865088d0481f6862d79d7c08d7b6cf1d25058a74a5784e511a1422fea8aba980 SHA512 60f2d691c24495fc126f868d3a4b3e43c7a41d0a3ff9ecfcec66a26b62012ef68bbbab897398c1d054d8eaa747baa180c8a41ed77e750071fde4e57a058b179b WHIRLPOOL 2259b2a2b704dcc27ddb0dd8d879be1445151fc5d0b6d0155df7dd0d1376f54f7a8766f08c68fcffabb10826d8f359a092376e51b316713ff9ff31c9d055afcd
+DIST feh-2.9.3.tar.bz2 2082188 SHA256 b4e8d603033af12afa77ae8020bcf4ff51c6950b9a6880a0fe32b04fdf7290f2 SHA512 9a0194d43037b1f1b1bd19dc4a9a1c6073504622283c466de1d1952798f37db21b5f2f61c14eeb732c49cc22707a5b47c7009fdaec6141eb3e1b936e2b7b038d WHIRLPOOL e77bd586e26b6ad1e2fb4189fdd33a19e7b45347417223ed65669955903b4ee5efbfa9fd52763b0724efc3bd9f490fa62c77323b5ee3f89445a0338e5fb2eed5
diff --git a/media-gfx/feh/feh-2.10.ebuild b/media-gfx/feh/feh-2.10.ebuild
new file mode 100644
index 000000000000..76314fccdafb
--- /dev/null
+++ b/media-gfx/feh/feh-2.10.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A fast, lightweight imageviewer using imlib2"
+HOMEPAGE="http://feh.finalrewind.org/"
+SRC_URI="http://feh.finalrewind.org/${P}.tar.bz2"
+
+LICENSE="feh"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+IUSE="debug curl exif test xinerama"
+
+COMMON_DEPEND=">=media-libs/giblib-1.2.4
+ media-libs/imlib2[X]
+ >=media-libs/libpng-1.2:0=
+ x11-libs/libX11
+ curl? ( net-misc/curl )
+ exif? ( media-libs/libexif )
+ xinerama? ( x11-libs/libXinerama )"
+RDEPEND="${COMMON_DEPEND}
+ virtual/jpeg:0"
+DEPEND="${COMMON_DEPEND}
+ x11-libs/libXt
+ x11-proto/xproto
+ test? (
+ >=dev-lang/perl-5.10
+ dev-perl/Test-Command
+ )"
+
+pkg_setup() {
+ use_feh() { usex $1 1 0; }
+
+ fehopts=(
+ DESTDIR="${D}"
+ PREFIX=/usr
+ doc_dir='${main_dir}'/share/doc/${PF}
+ example_dir='${main_dir}'/share/doc/${PF}/examples
+ curl=$(use_feh curl)
+ debug=$(use_feh debug)
+ xinerama=$(use_feh xinerama)
+ exif=$(use_feh exif)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.6.2-debug-cflags.patch
+ # fix desktop file
+ sed -i -e "s:^Icon=.*:Icon=/usr/share/feh/images/logo.svg:" \
+ share/applications/${PN}.pre || die
+}
+
+src_compile() {
+ tc-export CC
+ emake "${fehopts[@]}"
+}
+
+src_install() {
+ emake "${fehopts[@]}" install
+}
diff --git a/media-gfx/feh/feh-2.11.ebuild b/media-gfx/feh/feh-2.11.ebuild
new file mode 100644
index 000000000000..76314fccdafb
--- /dev/null
+++ b/media-gfx/feh/feh-2.11.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A fast, lightweight imageviewer using imlib2"
+HOMEPAGE="http://feh.finalrewind.org/"
+SRC_URI="http://feh.finalrewind.org/${P}.tar.bz2"
+
+LICENSE="feh"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+IUSE="debug curl exif test xinerama"
+
+COMMON_DEPEND=">=media-libs/giblib-1.2.4
+ media-libs/imlib2[X]
+ >=media-libs/libpng-1.2:0=
+ x11-libs/libX11
+ curl? ( net-misc/curl )
+ exif? ( media-libs/libexif )
+ xinerama? ( x11-libs/libXinerama )"
+RDEPEND="${COMMON_DEPEND}
+ virtual/jpeg:0"
+DEPEND="${COMMON_DEPEND}
+ x11-libs/libXt
+ x11-proto/xproto
+ test? (
+ >=dev-lang/perl-5.10
+ dev-perl/Test-Command
+ )"
+
+pkg_setup() {
+ use_feh() { usex $1 1 0; }
+
+ fehopts=(
+ DESTDIR="${D}"
+ PREFIX=/usr
+ doc_dir='${main_dir}'/share/doc/${PF}
+ example_dir='${main_dir}'/share/doc/${PF}/examples
+ curl=$(use_feh curl)
+ debug=$(use_feh debug)
+ xinerama=$(use_feh xinerama)
+ exif=$(use_feh exif)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.6.2-debug-cflags.patch
+ # fix desktop file
+ sed -i -e "s:^Icon=.*:Icon=/usr/share/feh/images/logo.svg:" \
+ share/applications/${PN}.pre || die
+}
+
+src_compile() {
+ tc-export CC
+ emake "${fehopts[@]}"
+}
+
+src_install() {
+ emake "${fehopts[@]}" install
+}
diff --git a/media-gfx/feh/feh-2.12.1.ebuild b/media-gfx/feh/feh-2.12.1.ebuild
new file mode 100644
index 000000000000..e5b2f3fb5085
--- /dev/null
+++ b/media-gfx/feh/feh-2.12.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A fast, lightweight imageviewer using imlib2"
+HOMEPAGE="http://feh.finalrewind.org/"
+SRC_URI="http://feh.finalrewind.org/${P}.tar.bz2"
+
+LICENSE="feh"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+IUSE="debug curl exif test xinerama"
+
+COMMON_DEPEND="media-libs/imlib2[X]
+ >=media-libs/libpng-1.2:0=
+ x11-libs/libX11
+ curl? ( net-misc/curl )
+ exif? ( media-libs/libexif )
+ xinerama? ( x11-libs/libXinerama )"
+RDEPEND="${COMMON_DEPEND}
+ virtual/jpeg:0"
+DEPEND="${COMMON_DEPEND}
+ x11-libs/libXt
+ x11-proto/xproto
+ test? (
+ >=dev-lang/perl-5.10
+ dev-perl/Test-Command
+ )"
+
+pkg_setup() {
+ use_feh() { usex $1 1 0; }
+
+ fehopts=(
+ DESTDIR="${D}"
+ PREFIX=/usr
+ doc_dir='${main_dir}'/share/doc/${PF}
+ example_dir='${main_dir}'/share/doc/${PF}/examples
+ curl=$(use_feh curl)
+ debug=$(use_feh debug)
+ xinerama=$(use_feh xinerama)
+ exif=$(use_feh exif)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.6.2-debug-cflags.patch
+ # fix desktop file
+ sed -i -e "s:^Icon=.*:Icon=/usr/share/feh/images/logo.svg:" \
+ share/applications/${PN}.pre || die
+}
+
+src_compile() {
+ tc-export CC
+ emake "${fehopts[@]}"
+}
+
+src_install() {
+ emake "${fehopts[@]}" install
+}
diff --git a/media-gfx/feh/feh-2.12.ebuild b/media-gfx/feh/feh-2.12.ebuild
new file mode 100644
index 000000000000..2a29c920deb4
--- /dev/null
+++ b/media-gfx/feh/feh-2.12.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A fast, lightweight imageviewer using imlib2"
+HOMEPAGE="http://feh.finalrewind.org/"
+SRC_URI="http://feh.finalrewind.org/${P}.tar.bz2"
+
+LICENSE="feh"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+IUSE="debug curl exif test xinerama"
+
+COMMON_DEPEND="media-libs/imlib2[X]
+ >=media-libs/libpng-1.2:0=
+ x11-libs/libX11
+ curl? ( net-misc/curl )
+ exif? ( media-libs/libexif )
+ xinerama? ( x11-libs/libXinerama )"
+RDEPEND="${COMMON_DEPEND}
+ virtual/jpeg:0"
+DEPEND="${COMMON_DEPEND}
+ x11-libs/libXt
+ x11-proto/xproto
+ test? (
+ >=dev-lang/perl-5.10
+ dev-perl/Test-Command
+ )"
+
+pkg_setup() {
+ use_feh() { usex $1 1 0; }
+
+ fehopts=(
+ DESTDIR="${D}"
+ PREFIX=/usr
+ doc_dir='${main_dir}'/share/doc/${PF}
+ example_dir='${main_dir}'/share/doc/${PF}/examples
+ curl=$(use_feh curl)
+ debug=$(use_feh debug)
+ xinerama=$(use_feh xinerama)
+ exif=$(use_feh exif)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.6.2-debug-cflags.patch
+ # fix desktop file
+ sed -i -e "s:^Icon=.*:Icon=/usr/share/feh/images/logo.svg:" \
+ share/applications/${PN}.pre || die
+}
+
+src_compile() {
+ tc-export CC
+ emake "${fehopts[@]}"
+}
+
+src_install() {
+ emake "${fehopts[@]}" install
+}
diff --git a/media-gfx/feh/feh-2.13.1.ebuild b/media-gfx/feh/feh-2.13.1.ebuild
new file mode 100644
index 000000000000..e5b2f3fb5085
--- /dev/null
+++ b/media-gfx/feh/feh-2.13.1.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A fast, lightweight imageviewer using imlib2"
+HOMEPAGE="http://feh.finalrewind.org/"
+SRC_URI="http://feh.finalrewind.org/${P}.tar.bz2"
+
+LICENSE="feh"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
+IUSE="debug curl exif test xinerama"
+
+COMMON_DEPEND="media-libs/imlib2[X]
+ >=media-libs/libpng-1.2:0=
+ x11-libs/libX11
+ curl? ( net-misc/curl )
+ exif? ( media-libs/libexif )
+ xinerama? ( x11-libs/libXinerama )"
+RDEPEND="${COMMON_DEPEND}
+ virtual/jpeg:0"
+DEPEND="${COMMON_DEPEND}
+ x11-libs/libXt
+ x11-proto/xproto
+ test? (
+ >=dev-lang/perl-5.10
+ dev-perl/Test-Command
+ )"
+
+pkg_setup() {
+ use_feh() { usex $1 1 0; }
+
+ fehopts=(
+ DESTDIR="${D}"
+ PREFIX=/usr
+ doc_dir='${main_dir}'/share/doc/${PF}
+ example_dir='${main_dir}'/share/doc/${PF}/examples
+ curl=$(use_feh curl)
+ debug=$(use_feh debug)
+ xinerama=$(use_feh xinerama)
+ exif=$(use_feh exif)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.6.2-debug-cflags.patch
+ # fix desktop file
+ sed -i -e "s:^Icon=.*:Icon=/usr/share/feh/images/logo.svg:" \
+ share/applications/${PN}.pre || die
+}
+
+src_compile() {
+ tc-export CC
+ emake "${fehopts[@]}"
+}
+
+src_install() {
+ emake "${fehopts[@]}" install
+}
diff --git a/media-gfx/feh/feh-2.9.3.ebuild b/media-gfx/feh/feh-2.9.3.ebuild
new file mode 100644
index 000000000000..dbdc636aabdc
--- /dev/null
+++ b/media-gfx/feh/feh-2.9.3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A fast, lightweight imageviewer using imlib2"
+HOMEPAGE="http://feh.finalrewind.org/"
+SRC_URI="http://feh.finalrewind.org/${P}.tar.bz2"
+
+LICENSE="feh"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc ppc64 x86"
+IUSE="debug curl exif test xinerama"
+
+COMMON_DEPEND=">=media-libs/giblib-1.2.4
+ media-libs/imlib2[X]
+ >=media-libs/libpng-1.2:0
+ x11-libs/libX11
+ curl? ( net-misc/curl )
+ exif? ( media-libs/libexif )
+ xinerama? ( x11-libs/libXinerama )"
+RDEPEND="${COMMON_DEPEND}
+ virtual/jpeg:0"
+DEPEND="${COMMON_DEPEND}
+ x11-libs/libXt
+ x11-proto/xproto
+ test? (
+ >=dev-lang/perl-5.10
+ dev-perl/Test-Command
+ )"
+
+pkg_setup() {
+ use_feh() { usex $1 1 0; }
+
+ fehopts=(
+ DESTDIR="${D}"
+ PREFIX=/usr
+ doc_dir='${main_dir}'/share/doc/${PF}
+ example_dir='${main_dir}'/share/doc/${PF}/examples
+ curl=$(use_feh curl)
+ debug=$(use_feh debug)
+ xinerama=$(use_feh xinerama)
+ exif=$(use_feh exif)
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.6.2-debug-cflags.patch
+ # fix desktop file
+ sed -i -e "s:^Icon=.*:Icon=/usr/share/feh/images/logo.svg:" \
+ share/applications/${PN}.pre || die
+}
+
+src_compile() {
+ tc-export CC
+ emake "${fehopts[@]}"
+}
+
+src_install() {
+ emake "${fehopts[@]}" install
+}
diff --git a/media-gfx/feh/files/feh-2.6.2-debug-cflags.patch b/media-gfx/feh/files/feh-2.6.2-debug-cflags.patch
new file mode 100644
index 000000000000..a4a71acef30c
--- /dev/null
+++ b/media-gfx/feh/files/feh-2.6.2-debug-cflags.patch
@@ -0,0 +1,11 @@
+--- feh-2.6.2/config.mk
++++ feh-2.6.2/config.mk
+@@ -32,7 +32,7 @@
+ endif
+
+ ifeq (${debug},1)
+- CFLAGS += -DDEBUG -O0
++ CFLAGS += -DDEBUG
+ MAN_DEBUG = . This is a debug build.
+ else
+ MAN_DEBUG =
diff --git a/media-gfx/feh/metadata.xml b/media-gfx/feh/metadata.xml
new file mode 100644
index 000000000000..72ace7364311
--- /dev/null
+++ b/media-gfx/feh/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+<maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+</maintainer>
+<longdescription>
+feh is an image viewer at heart, though it does other cool stuff.
+</longdescription>
+</pkgmetadata>
diff --git a/media-gfx/figurine/Manifest b/media-gfx/figurine/Manifest
new file mode 100644
index 000000000000..354952cd7842
--- /dev/null
+++ b/media-gfx/figurine/Manifest
@@ -0,0 +1 @@
+DIST figurine-1.0.5.tar.gz 293105 SHA256 9844d135790dea8c6df35065343c82f233688752bcb5008db310a4a814242705 SHA512 e3b6a2d0d4b8a4837f27eb40ff158444ff59ac7d826cc780c6c13760e0d6e72844a7b6de69e482dfee12c020600e40c58fb5b4b9efa935342ada6fe62b57eff6 WHIRLPOOL 9ce832a6b800598e6ba9335c22698f31bf9e23c484cc70e601c73030948798e7d6604783f9818b454c8a3a0e57c8f01a3bb7bd4829cf2eaa73fb8ab82c781c96
diff --git a/media-gfx/figurine/figurine-1.0.5.ebuild b/media-gfx/figurine/figurine-1.0.5.ebuild
new file mode 100644
index 000000000000..8e9d1530839e
--- /dev/null
+++ b/media-gfx/figurine/figurine-1.0.5.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A vector based graphics editor similar to xfig, but simpler"
+HOMEPAGE="http://figurine.sourceforge.net/"
+SRC_URI="mirror://sourceforge/figurine/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+DEPEND=">=media-gfx/transfig-3.2"
+
+src_compile() {
+ econf || die "econf failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README
+}
diff --git a/media-gfx/figurine/metadata.xml b/media-gfx/figurine/metadata.xml
new file mode 100644
index 000000000000..970db4d46c4e
--- /dev/null
+++ b/media-gfx/figurine/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">figurine</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/fim/Manifest b/media-gfx/fim/Manifest
new file mode 100644
index 000000000000..dbc46c2258bf
--- /dev/null
+++ b/media-gfx/fim/Manifest
@@ -0,0 +1 @@
+DIST fim-0.4-rc3.tar.bz2 504681 SHA256 d0bf902f9fcc728f4a2acfad5474e8dd60f84922fea5119265f46e66032ed92a SHA512 82a2b191c0cd26fb77b442df9ed104e51ae15f485390f07cf15a043725e6ee9b860ce903bf8355ad556adbbe076516a8807c0a6d937e89177e46c0068d5acabf WHIRLPOOL bf977a0333ec7d7d087811c88290cddc68f7a2d50f27180aa9000200e32432abf5767a40e4cef2affc3c3b8218da07b23346d06f5af5cace4f11ff1901a6311b
diff --git a/media-gfx/fim/files/fim-0.4_pre-automake-1.12.patch b/media-gfx/fim/files/fim-0.4_pre-automake-1.12.patch
new file mode 100644
index 000000000000..7629fd1ad566
--- /dev/null
+++ b/media-gfx/fim/files/fim-0.4_pre-automake-1.12.patch
@@ -0,0 +1,13 @@
+--- fim-0.3/configure.ac
++++ fim-0.3/configure.ac
+@@ -86,10 +86,6 @@
+ AC_MSG_RESULT($fim_cv_prefix)
+
+ AC_ISC_POSIX
+-AM_C_PROTOTYPES
+-if test "x$U" != "x"; then
+- AC_MSG_ERROR(Compiler not ANSI compliant)
+-fi
+ #AC_PROG_CPP
+ AC_PROG_MAKE_SET
+
diff --git a/media-gfx/fim/files/fim-0.4_pre-graphicsmagick.patch b/media-gfx/fim/files/fim-0.4_pre-graphicsmagick.patch
new file mode 100644
index 000000000000..952e800f149b
--- /dev/null
+++ b/media-gfx/fim/files/fim-0.4_pre-graphicsmagick.patch
@@ -0,0 +1,10 @@
+--- fim-0.4-trunk/configure.ac
++++ fim-0.4-trunk/configure.ac
+@@ -123,6 +123,7 @@
+ FIM_LIB_OBJECTS="$FIM_LIB_OBJECTS FbiStuffMagick.o";
+ LIBS="$LIBS `GraphicsMagick-config --cppflags --ldflags --libs|tr '\n' ' '` ";
+ CXXFLAGS="$CXXFLAGS `GraphicsMagick-config --cppflags |tr '\n' ' '` ";
++ CXXFLAGS="$CXXFLAGS -I`GraphicsMagick-config --prefix |tr -d '\n'`/include/GraphicsMagick ";
+ AC_DEFINE([HAVE_LIBGRAPHICSMAGICK],[1],[We have libGraphicsMagick])
+ fi
+ ], [])
diff --git a/media-gfx/fim/files/fim-0.4_pre-nosvn.patch b/media-gfx/fim/files/fim-0.4_pre-nosvn.patch
new file mode 100644
index 000000000000..ba414aab7d00
--- /dev/null
+++ b/media-gfx/fim/files/fim-0.4_pre-nosvn.patch
@@ -0,0 +1,11 @@
+--- fim-0.4-trunk/configure.ac
++++ fim-0.4-trunk/configure.ac
+@@ -10,7 +10,7 @@
+ #AC_PROG_CC(cc gcc)
+ #AC_PROG_CXX(CC g++ gcc c++ cxx)
+
+-define([svnversion],esyscmd([sh -c "svnversion | tr -c '[0-9]' ' ' | sed 's/ *//g;s/^$/-1/g' "]))dnl
++define([svnversion],esyscmd([sh -c "echo -n '-1'"]))dnl
+ # WARNING : here 0.0 denotes the package version, which will be corrected some lines after this.
+ AC_INIT([fim],[0.4],[dezperado_FOobAr_autistici_Baz_org, by replacing _FOobAr_ with a @ and _Baz_ with a .])
+
diff --git a/media-gfx/fim/files/fim-0.4_rc1-giflib-4.2.patch b/media-gfx/fim/files/fim-0.4_rc1-giflib-4.2.patch
new file mode 100644
index 000000000000..2e5da2aabaa7
--- /dev/null
+++ b/media-gfx/fim/files/fim-0.4_rc1-giflib-4.2.patch
@@ -0,0 +1,19 @@
+--- fim-0.4-rc1/src/FbiStuffGif.cpp.orig 2014-05-27 13:06:10.521394320 +0200
++++ fim-0.4-rc1/src/FbiStuffGif.cpp 2014-05-27 13:13:48.754866607 +0200
+@@ -58,14 +58,14 @@
+ #if FIM_GIFLIB_RETIRED_PrintGifError
+ void
+ FimPrintGifError(struct gif_state * gs) {
+- int ErrorCode = gs->gif->Error;
++ int ErrorCode = GifError();
+ /* On the basis of giflib-5.0.5/util/qprintf.c suggestion, after retirement of PrintGifError */
+ char *Err = NULL;
+
+ if(ErrorCode == 0)
+ return;
+
+- Err = GifErrorString(ErrorCode);
++ Err = GifErrorString();
+
+ if (Err != NULL)
+ fprintf(stderr, "GIF-LIB error: %s.\n", Err);
diff --git a/media-gfx/fim/files/fim-0.4_rc1-nosvn.patch b/media-gfx/fim/files/fim-0.4_rc1-nosvn.patch
new file mode 100644
index 000000000000..ec7a7e69a83d
--- /dev/null
+++ b/media-gfx/fim/files/fim-0.4_rc1-nosvn.patch
@@ -0,0 +1,11 @@
+--- fim-0.4-rc1/configure.ac
++++ fim-0.4-rc1/configure.ac
+@@ -10,7 +10,7 @@
+ #AC_PROG_CC(cc gcc)
+ #AC_PROG_CXX(CC g++ gcc c++ cxx)
+
+-define([svnversion],esyscmd([sh -c "svnversion | tr -c '[0-9]' ' ' | sed 's/ *//g;s/^$/-1/g' "]))dnl
++define([svnversion],esyscmd([sh -c "echo -n -1"]))dnl
+ AC_INIT([fim],[0.4-rc1],[dezperado_FOobAr_autistici_Baz_org, by replacing _FOobAr_ with a @ and _Baz_ with a .])
+ AC_CONFIG_SRCDIR([src/fim.cpp])
+
diff --git a/media-gfx/fim/files/fim-0.4_rc3-poppler031.patch b/media-gfx/fim/files/fim-0.4_rc3-poppler031.patch
new file mode 100644
index 000000000000..74ba50aa5155
--- /dev/null
+++ b/media-gfx/fim/files/fim-0.4_rc3-poppler031.patch
@@ -0,0 +1,12 @@
+diff -ruN fim-0.4-rc3.orig/src/FbiStuffPdf.cpp fim-0.4-rc3/src/FbiStuffPdf.cpp
+--- fim-0.4-rc3.orig/src/FbiStuffPdf.cpp 2014-12-22 23:54:29.000000000 +0100
++++ fim-0.4-rc3/src/FbiStuffPdf.cpp 2015-05-18 21:13:07.058115455 +0200
+@@ -199,7 +199,7 @@
+ if (!ds->od)
+ {
+ GBool bitmapTopDown = gTrue;
+- ds->od = new SplashOutputDev(gSplashColorMode, /*4*/3, gFalse, gBgColor, bitmapTopDown,gFalse/*antialias*/);
++ ds->od = new SplashOutputDev(gSplashColorMode, /*4*/3, gFalse, gBgColor, bitmapTopDown);
+ if (ds->od)
+ #ifdef POPPLER_VERSION /* as of 0.20.2, from poppler/poppler-config.h */
+ /* FIXME: this is an incomplete fix (triggered on 20120719's email on fim-devel);
diff --git a/media-gfx/fim/fim-0.4_rc3-r1.ebuild b/media-gfx/fim/fim-0.4_rc3-r1.ebuild
new file mode 100644
index 000000000000..e97e2905e48f
--- /dev/null
+++ b/media-gfx/fim/fim-0.4_rc3-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="Fbi-IMproved is a framebuffer image viewer based on Fbi and inspired from Vim"
+HOMEPAGE="http://savannah.nongnu.org/projects/fbi-improved"
+SRC_URI="http://download.savannah.gnu.org/releases/fbi-improved/${P/_rc/-rc}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="aalib dia djvu exif fbcon gif graphicsmagick imagemagick jpeg pdf png postscript readline sdl static svg tiff xfig"
+
+RDEPEND="media-fonts/terminus-font
+ aalib? ( media-libs/aalib[slang] )
+ dia? ( app-office/dia )
+ djvu? ( app-text/djvu )
+ exif? ( media-libs/libexif )
+ gif? ( media-libs/giflib )
+ graphicsmagick? ( media-gfx/graphicsmagick )
+ imagemagick? ( || ( media-gfx/graphicsmagick[imagemagick] media-gfx/imagemagick ) )
+ jpeg? ( virtual/jpeg:0 )
+ pdf? ( >=app-text/poppler-0.31 )
+ png? ( media-libs/libpng:0 )
+ postscript? ( app-text/libspectre )
+ readline? ( sys-libs/readline:0 )
+ sdl? ( media-libs/libsdl )
+ svg? ( media-gfx/inkscape )
+ tiff? ( media-libs/tiff:0 )
+ xfig? ( media-gfx/xfig )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex"
+
+S=${WORKDIR}/${P/_rc/-rc}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-poppler031.patch"
+}
+
+src_configure() {
+ econf \
+ $(use_enable aalib aa) \
+ $(use_enable dia) \
+ $(use_enable djvu) \
+ $(use_enable exif) \
+ $(use_enable fbcon framebuffer) \
+ $(use_enable gif) \
+ $(use_enable graphicsmagick) \
+ $(use_enable imagemagick convert) \
+ $(use_enable pdf poppler) \
+ $(use_enable png) \
+ $(use_enable postscript ps) \
+ $(use_enable readline) \
+ $(use_enable sdl) \
+ $(use_enable static) \
+ $(use_enable svg inkscape) \
+ $(use_enable tiff) \
+ $(use_enable xfig) \
+ --disable-hardcoded-font \
+ --disable-imlib2 \
+ --disable-matrices-rendering \
+ --disable-xcftopnm \
+ --enable-fimrc \
+ --enable-history \
+ --enable-loader-string-specification \
+ --enable-mark-and-dump \
+ --enable-output-console \
+ --enable-raw-bits-rendering \
+ --enable-read-dirs \
+ --enable-recursive-dirs \
+ --enable-resize-optimizations \
+ --enable-scan-consolefonts \
+ --enable-screen \
+ --enable-scripting \
+ --enable-seek-magic \
+ --enable-stdin-image-reading \
+ --enable-unicode \
+ --enable-warnings \
+ --enable-windows \
+ --with-default-consolefont=/usr/share/consolefonts/ter-114n.psf.gz
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ emake DESTDIR="${D}" docdir=/usr/share/doc/${PF} install
+}
diff --git a/media-gfx/fim/metadata.xml b/media-gfx/fim/metadata.xml
new file mode 100644
index 000000000000..e6a6ee384c2b
--- /dev/null
+++ b/media-gfx/fim/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+<use>
+ <flag name="dia">Enable DIA file support via app-office/dia</flag>
+ <flag name="graphicsmagick">Enable GraphicsMagick library support</flag>
+ <flag name="imagemagick">Use convert from media-gfx/imagemagick as fallback file opener</flag>
+ <flag name="xfig">Enable FIG file support via media-gfx/xfig</flag>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/flam3/Manifest b/media-gfx/flam3/Manifest
new file mode 100644
index 000000000000..ad130050c39d
--- /dev/null
+++ b/media-gfx/flam3/Manifest
@@ -0,0 +1 @@
+DIST flam3-3.0.1.tar.gz 1238703 SHA256 70810049604527a689ba172670c152b463273255e46f0f04091c867399859aa7 SHA512 c91a21a0e1ca9f4d2ba929bf91c2ef95275dec6d892dafb0da3cc169cd1777326a2dff98b58d55352dfae6347574cceec234f99d06f117f832f39b089bac2f9d WHIRLPOOL cce3739017c44ee4d22d41b464807055f8ed31ab9e3b79e66bae86f4f16dd4d605dde6212bdfeb82852b07c3b5ef252930e59815d2d15a307873bf3a810306d4
diff --git a/media-gfx/flam3/files/flam3-3.0.1-libpng15.patch b/media-gfx/flam3/files/flam3-3.0.1-libpng15.patch
new file mode 100644
index 000000000000..61f905589872
--- /dev/null
+++ b/media-gfx/flam3/files/flam3-3.0.1-libpng15.patch
@@ -0,0 +1,76 @@
+http://code.google.com/p/flam3/issues/detail?id=8
+
+--- src/png.c
++++ src/png.c
+@@ -142,7 +142,7 @@
+ }
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ if (png_image) {
+- for (y = 0 ; y < info_ptr->height ; y++)
++ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++)
+ free (png_image[y]);
+ free (png_image);
+ }
+@@ -161,19 +161,19 @@
+ png_set_sig_bytes (png_ptr, SIG_CHECK_SIZE);
+ png_read_info (png_ptr, info_ptr);
+
+- if (8 != info_ptr->bit_depth) {
++ if (8 != png_get_bit_depth(png_ptr, info_ptr)) {
+ fprintf(stderr, "bit depth type must be 8, not %d.\n",
+- info_ptr->bit_depth);
++ png_get_bit_depth(png_ptr, info_ptr));
+ return 0;
+ }
+
+- *width = info_ptr->width;
+- *height = info_ptr->height;
++ *width = png_get_image_width(png_ptr, info_ptr);
++ *height = png_get_image_height(png_ptr, info_ptr);
+ p = q = malloc(4 * *width * *height);
+- png_image = (png_byte **)malloc (info_ptr->height * sizeof (png_byte*));
++ png_image = (png_byte **)malloc (png_get_image_height(png_ptr, info_ptr) * sizeof (png_byte*));
+
+- linesize = info_ptr->width;
+- switch (info_ptr->color_type) {
++ linesize = png_get_image_width(png_ptr, info_ptr);
++ switch (png_get_color_type(png_ptr, info_ptr)) {
+ case PNG_COLOR_TYPE_RGB:
+ linesize *= 3;
+ break;
+@@ -182,21 +182,21 @@
+ break;
+ default:
+ fprintf(stderr, "color type must be RGB or RGBA not %d.\n",
+- info_ptr->color_type);
++ png_get_color_type(png_ptr, info_ptr));
+ return 0;
+ }
+
+- for (y = 0 ; y < info_ptr->height ; y++) {
++ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++) {
+ png_image[y] = malloc (linesize);
+ }
+ png_read_image (png_ptr, png_image);
+ png_read_end (png_ptr, info_ptr);
+
+- for (y = 0 ; y < info_ptr->height ; y++) {
++ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++) {
+ unsigned char *s = png_image[y];
+- for (x = 0 ; x < info_ptr->width ; x++) {
++ for (x = 0 ; x < png_get_image_width(png_ptr, info_ptr) ; x++) {
+
+- switch (info_ptr->color_type) {
++ switch (png_get_color_type(png_ptr, info_ptr)) {
+ case PNG_COLOR_TYPE_RGB:
+ p[0] = s[0];
+ p[1] = s[1];
+@@ -217,7 +217,7 @@
+ }
+ }
+
+- for (y = 0 ; y < info_ptr->height ; y++)
++ for (y = 0 ; y < png_get_image_height(png_ptr, info_ptr) ; y++)
+ free (png_image[y]);
+ free (png_image);
+ png_destroy_read_struct (&png_ptr, &info_ptr, (png_infopp)NULL);
diff --git a/media-gfx/flam3/flam3-3.0.1.ebuild b/media-gfx/flam3/flam3-3.0.1.ebuild
new file mode 100644
index 000000000000..699f15178938
--- /dev/null
+++ b/media-gfx/flam3/flam3-3.0.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="Tools and a library for creating flame fractal images"
+HOMEPAGE="http://flam3.com/"
+SRC_URI="http://flam3.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="static-libs"
+
+RDEPEND="dev-libs/libxml2
+ media-libs/libpng
+ virtual/jpeg
+ !<=x11-misc/electricsheep-2.6.8-r2"
+DEPEND="${RDEPEND}"
+
+S=${S}/src
+
+DOCS=( README.txt )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+ sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.in || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-shared \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+
+ rm -f "${D}"usr/lib*/libflam3.la
+
+ docinto examples
+ dodoc *.flam3
+}
diff --git a/media-gfx/flam3/flam3-9999.ebuild b/media-gfx/flam3/flam3-9999.ebuild
new file mode 100644
index 000000000000..35ba24e199ae
--- /dev/null
+++ b/media-gfx/flam3/flam3-9999.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit autotools subversion
+
+DESCRIPTION="Tools and a library for creating fractal flames"
+HOMEPAGE="http://flam3.com/"
+SRC_URI=""
+ESVN_REPO_URI="http://flam3.googlecode.com/svn/trunk/src/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="dev-libs/libxml2
+ virtual/jpeg
+ media-libs/libpng
+ !<=x11-misc/electricsheep-2.6.8-r2"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ mkdir m4
+ sed -e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" -i configure.in || die
+ eautoreconf
+}
+
+src_configure() {
+ econf --enable-shared
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+ dodoc README.txt *.flam3 || die "dodoc failed"
+}
diff --git a/media-gfx/flam3/metadata.xml b/media-gfx/flam3/metadata.xml
new file mode 100644
index 000000000000..5d63b0c0f002
--- /dev/null
+++ b/media-gfx/flam3/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">flam3</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/fondu/Manifest b/media-gfx/fondu/Manifest
new file mode 100644
index 000000000000..7662b960d6e4
--- /dev/null
+++ b/media-gfx/fondu/Manifest
@@ -0,0 +1 @@
+DIST fondu_src-060102.tgz 131516 SHA256 22bb535d670ebc1766b602d804bebe7e84f907c219734e6a955fcbd414ce5794 SHA512 01d31901ab50eee70a74a3e211d78c55173748ad6e0cdadcda471a1f543856795a3bd8b421206cde044d240a1b425f32f6e40239ade0e87517e00b6ed9277bce WHIRLPOOL 26a39158cc4bda39f62c6dee9f6ab62fa9f5e0143924550e1bc806285e16755d6dd212b8c5b56c46bf7beb9a35019ab9171beb7d31d9887480a984b032d02d66
diff --git a/media-gfx/fondu/files/fondu-20060102-build-fix.patch b/media-gfx/fondu/files/fondu-20060102-build-fix.patch
new file mode 100644
index 000000000000..d84d0b7bde4e
--- /dev/null
+++ b/media-gfx/fondu/files/fondu-20060102-build-fix.patch
@@ -0,0 +1,70 @@
+Fixes:
+x86_64-pc-linux-gnu-gcc -O2 -c -o fondu.o fondu.c
+fondu.c: In function 'BuildFondList':
+fondu.c:515: error: called object 'strlen' is not a function
+
+x86_64-pc-linux-gnu-gcc -O2 -c -o frommacbinary.o frommacbinary.c
+frommacbinary.c: In function 'Usage':
+frommacbinary.c:58: warning: too few arguments for format
+
+Upstream: https://sourceforge.net/tracker/?func=detail&aid=2875547&group_id=39411&atid=425133
+Author: Peter Volkov <pva@gentoo.org>
+
+=== modified file 'fondu.c'
+--- fondu.c 2009-10-09 07:24:15 +0000
++++ fondu.c 2009-10-09 07:25:49 +0000
+@@ -473,7 +473,7 @@
+ }
+ if ( styleoff!=0 ) {
+ unsigned char stringoffsets[48];
+- int strcnt, strlen, format;
++ int strcnt, strlength, format;
+ char **strings, *pt;
+ fseek(f,styleoff,SEEK_SET);
+ /* class = */ getushort(f);
+@@ -484,11 +484,11 @@
+ strcnt = getushort(f);
+ strings = malloc(strcnt*sizeof(char *));
+ for ( j=0; j<strcnt; ++j ) {
+- strlen = getc(f);
+- strings[j] = malloc(strlen+2);
+- strings[j][0] = strlen;
+- strings[j][strlen+1] = '\0';
+- for ( k=0; k<strlen; ++k )
++ strlength = getc(f);
++ strings[j] = malloc(strlength+2);
++ strings[j][0] = strlength;
++ strings[j][strlength+1] = '\0';
++ for ( k=0; k<strlength; ++k )
+ strings[j][k+1] = getc(f);
+ }
+ for ( j=0; j<48; ++j ) {
+@@ -498,11 +498,11 @@
+ if ( k!=-1 || stringoffsets[j]==0 )
+ continue; /* this style doesn't exist */
+ format = stringoffsets[j]-1;
+- strlen = strings[0][0];
++ strlength = strings[0][0];
+ if ( format!=0 && format!=-1 )
+ for ( k=0; k<strings[format][0]; ++k )
+- strlen += strings[ strings[format][k+1]-1 ][0];
+- pt = cur->psnames[j] = malloc(strlen+1);
++ strlength += strings[ strings[format][k+1]-1 ][0];
++ pt = cur->psnames[j] = malloc(strlength+1);
+ strcpy(pt,strings[ 0 ]+1);
+ pt += strings[ 0 ][0];
+ if ( format!=0 && format!=-1 )
+
+=== modified file 'frommacbinary.c'
+--- frommacbinary.c 2009-10-09 07:24:15 +0000
++++ frommacbinary.c 2009-10-09 07:27:54 +0000
+@@ -55,7 +55,7 @@
+ /* frombin filenames */
+
+ static void Usage(char *prog) {
+- fprintf( stderr, "Usage: %s [-usage] [-help] [-version] filenames\n" );
++ fprintf( stderr, "Usage: frombin [-usage] [-help] [-version] filenames\n" );
+ fprintf( stderr, " -usage\t\tPrints this message\n" );
+ fprintf( stderr, " -help\t\tPrints this message\n" );
+ fprintf( stderr, " -version\t\tPrints the version of the program\n" );
+
diff --git a/media-gfx/fondu/fondu-20060102-r1.ebuild b/media-gfx/fondu/fondu-20060102-r1.ebuild
new file mode 100644
index 000000000000..27d34db99f11
--- /dev/null
+++ b/media-gfx/fondu/fondu-20060102-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+MY_PV=${PV:2:6}
+
+DESCRIPTION="Utilities for converting between and manipulating mac fonts and unix fonts"
+HOMEPAGE="http://fondu.sourceforge.net/"
+SRC_URI="http://fondu.sourceforge.net/${PN}_src-${MY_PV}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE=""
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+src_prepare() {
+ sed -e 's:^CFLAGS =:CFLAGS +=:' \
+ -e 's:$(CFLAGS) -o:$(CFLAGS) $(LDFLAGS) -o:' \
+ -e 's:wilprefix:prefix:' \
+ -i Makefile.in || die "failed to sed"
+ epatch "${FILESDIR}/${P}-build-fix.patch"
+}
+
+src_install() {
+ default
+ doman *.1
+}
diff --git a/media-gfx/fondu/metadata.xml b/media-gfx/fondu/metadata.xml
new file mode 100644
index 000000000000..696065edd338
--- /dev/null
+++ b/media-gfx/fondu/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>fonts</herd>
+</pkgmetadata>
diff --git a/media-gfx/fontforge/Manifest b/media-gfx/fontforge/Manifest
new file mode 100644
index 000000000000..faa8253b5865
--- /dev/null
+++ b/media-gfx/fontforge/Manifest
@@ -0,0 +1,8 @@
+DIST cidmaps-20090121.tgz 314314 SHA256 1bf9c7eb8835e6ed94e62cb49f1141bc046c562849e52e6c3c7f1d7cfc95c7b3 SHA512 a85daeb16b6650179f54ff9e35915c4c7bb5e2efca0455262a271063849484dbba08c4b493c4ca08552365205995cad5c3770ba7b3cadb2e5c386626dc46636c WHIRLPOOL 0c840cf7f4d7f432597f68620231da34cff2dac5af1ba3200b57b63566f3b81b151ddf7cbaa84665f4b7c629bb8f100c72b8bade8634687e5c11110ed91ed821
+DIST fontforge-20150430.tar.gz 24531572 SHA256 430c6d02611c7ca948df743e9241994efe37eda25f81a94aeadd9b6dd286ff37 SHA512 e530a7e7cec569f9e9419ccf2805ac5bd41e05565b4c24fa6f6a8c6c3684d1d76868a9a19abba3ba92aa66bcca333949d37c8890f72a29c0072c8a3e912269e4 WHIRLPOOL b02912ed66149818da7e406300116465dae6f1c40032549ca820a9cfc7b33e862eeeb9cb1f366628423701e8e39e0a8ced3000a02ff2562f2c27eb5b70c805da
+DIST fontforge-20150612.tar.gz 125037727 SHA256 0f4ec68a648f7f845d54d1e87cf5fb246a16d528b74e9e1a9b815418510022d7 SHA512 01a38bdbb55ba3b2638b55caa2f768ba691fdfa730afd843df0cf62417db5465731ed968c5ab7c026622264e20c20fdfd8ec0ceb50da71039588797fe18393b8 WHIRLPOOL 6662bc52669153ba46e562fbcb287f5bff59eeeec7fe9afcd65918f892282650ab4be4f279fe6fab95f02f36caa753900693532ece439bee114e774e0da3f855
+DIST fontforge_full-20110222.tar.bz2 5126031 SHA256 8fa2818026f84bb7b8a77451d21cab7e9dea8aa904e5218afa158be6a320433e SHA512 af74ca482d8892c30e650bd377df16d44a11738c930625bcf9878d97ba8faaf67f2965dcf3c32b722120273d99dcdd042405bb6afeee1286f0cf18f916e4f12a WHIRLPOOL f6446b8b6d5d49d9bb421bf39a4a192f4622916eb68013a3317c78585d1ae05837478c5d2fa1bb2ebad9caa3455cf0db6e132f6e7ad07d3ae9f58b1b4ab7fd52
+DIST fontforge_full-20120731.tar.bz2 5725667 SHA256 e5cb9e9e64a99d1dfc549950741eb9b44c3162a4c62f71053905c1f2d024295f SHA512 34dca27983d64c9ae570e2c8f438b1ea373d22f5aeb23808d4b77e458950b568b460a2b011edfc3154f9e8dd06595d6f64296f8f63f46c404c3ff7ed6d9816d1 WHIRLPOOL e502dc79b1d46e5cce9372b593bef06083a853eeb2af47a909d093956cc867432e7b4600c799f73c7d08474d7e76fb18bed1b080440f3a21d27b703ac831bc15
+DIST fontforge_htdocs-20110221.tar.bz2 3129839 SHA256 7a81b9a30fa8f287e63abcfee568d7fcfd1a21c75c5c69effe95fe677d963fec SHA512 b91808cd5deb6472785f3353fe9856279ddb0887ae249eccd37cff8dbdf53065a8d6008dbf160dd6c5ba6cfecf37b9c4e63c5baa6332f4b4128d5e471d243236 WHIRLPOOL 7664b853e7dd0c9a36c50e84dbd332ff4c10232fa200e9ac42c97982993c7d23e06e235a0f88183a7e6a78f342789c0141fb396879b5e5fa0ccb9d4bd3b30d43
+DIST gnulib-b287b621969d5a3f56058ff01e554839814da4e1.tar.gz 5974028 SHA256 09e111c8388a7cdcea6c0f08bf8bf5e871f04ac5fa7496494a278b2d009b4dcd SHA512 80e235c1c3b5c9c5fa6d1f0e88f51be458b8396760928b535dbe3ea80ad779e7ba315d03f33a6debb8ec375d0c4d1a17bdf03d82b1fa0450fa1d064c9d9317e4 WHIRLPOOL 71e2fdb311d4183f4b177ea2670be25d069801a3289dcf168e7f4cb258c35d709cb380669ea343dc20ae35fc71492b14ea6594ef238cb43b7dd8c0c34b5de58c
+DIST uthash-ac47d4928e61c5abc6e977d91310d31ed74690e4.tar.gz 233813 SHA256 6331989d413069a4027b6292646b41d99cad70cefd9e9852f6f6e1bf531ccef4 SHA512 b0831be7be7d1ff11d9ca9248b121590e4b8ac3c808fcf461c5b192bdf3ae45c42b962d5cc02abc2491de6379d53855d487d798b9e0539007832bfd220ff76f2 WHIRLPOOL 7c0e55ba753210f396d736655e5043badaa222eb7e00fcb71b083c59da22f0a54f944c1231622a1378341e22a8583bd624bd5e99a1ca82099f610b373bbc166f
diff --git a/media-gfx/fontforge/files/fontforge-20110222-libz.so-linkage.patch b/media-gfx/fontforge/files/fontforge-20110222-libz.so-linkage.patch
new file mode 100644
index 000000000000..7e01e8a3a76f
--- /dev/null
+++ b/media-gfx/fontforge/files/fontforge-20110222-libz.so-linkage.patch
@@ -0,0 +1,66 @@
+https://bugs.gentoo.org/show_bug.cgi?id=367425
+
+diff -ruN fontforge-20110222~/fontforge/parsepdf.c fontforge-20110222/fontforge/parsepdf.c
+--- fontforge-20110222~/fontforge/parsepdf.c 2011-02-15 05:37:39.000000000 +0200
++++ fontforge-20110222/fontforge/parsepdf.c 2011-05-17 22:19:56.000000000 +0300
+@@ -759,7 +759,11 @@
+ if ( zlib!=NULL )
+ return( true );
+
+- if ( (zlib = dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY))==NULL ) {
++ if ( (zlib = dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY))==NULL
++#ifdef SO_1_EXT
++ && (zlib = dlopen("libz" SO_1_EXT,RTLD_LAZY))==NULL
++#endif
++ ) {
+ LogError( "%s", dlerror());
+ return( false );
+ }
+diff -ruN fontforge-20110222~/fontforge/svg.c fontforge-20110222/fontforge/svg.c
+--- fontforge-20110222~/fontforge/svg.c 2011-02-18 23:33:27.000000000 +0200
++++ fontforge-20110222/fontforge/svg.c 2011-05-17 22:19:56.000000000 +0300
+@@ -1153,7 +1153,11 @@
+ if ( xmltested )
+ return( libxml!=NULL );
+
+- dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY);
++ dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY)
++#ifdef SO_1_EXT
++ || dlopen("libz" SO_1_EXT,RTLD_LAZY)
++#endif
++ ;
+
+ libxml = dlopen( "libxml2" SO_EXT,RTLD_LAZY);
+ # ifdef SO_2_EXT
+diff -ruN fontforge-20110222~/fontforge/ufo.c fontforge-20110222/fontforge/ufo.c
+--- fontforge-20110222~/fontforge/ufo.c 2011-02-17 02:20:37.000000000 +0200
++++ fontforge-20110222/fontforge/ufo.c 2011-05-17 22:19:56.000000000 +0300
+@@ -929,7 +929,11 @@
+ if ( xmltested )
+ return( libxml!=NULL );
+
+- dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY);
++ dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY)
++#ifdef SO_1_EXT
++ || dlopen("libz" SO_1_EXT,RTLD_LAZY)
++#endif
++ ;
+
+ libxml = dlopen( "libxml2" SO_EXT,RTLD_LAZY);
+ # ifdef SO_2_EXT
+diff -ruN fontforge-20110222~/fontforge/woff.c fontforge-20110222/fontforge/woff.c
+--- fontforge-20110222~/fontforge/woff.c 2011-02-15 05:37:40.000000000 +0200
++++ fontforge-20110222/fontforge/woff.c 2011-05-17 22:19:56.000000000 +0300
+@@ -76,7 +76,11 @@
+ if ( zlib!=NULL )
+ return( true );
+
+- if ( (zlib = dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY))==NULL ) {
++ if ( (zlib = dlopen("libz" SO_EXT,RTLD_GLOBAL|RTLD_LAZY))==NULL
++#ifdef SO_1_EXT
++ && (zlib = dlopen("libz" SO_1_EXT,RTLD_LAZY))==NULL
++#endif
++ ) {
+ LogError( "%s", dlerror());
+ return( false );
+ }
diff --git a/media-gfx/fontforge/files/fontforge-20110222-lxkbui.patch b/media-gfx/fontforge/files/fontforge-20110222-lxkbui.patch
new file mode 100644
index 000000000000..b344bc9dc838
--- /dev/null
+++ b/media-gfx/fontforge/files/fontforge-20110222-lxkbui.patch
@@ -0,0 +1,13 @@
+=== modified file 'configure.in'
+--- a/configure.in
++++ b/configure.in
+@@ -36,7 +36,7 @@
+ dnl /usr/share/doc/XFree86-doc-4.2.0/Xi/lib.PS
+
+ AC_CHECK_LIB(Xi, XOpenDevice, X_11LIB="-lXi -lX11" ,AC_DEFINE(_NO_XINPUT), $X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS -lX11 )
+- AC_CHECK_LIB(xkbui, XkbQueryExtension, X_11LIB="$X_11LIB -lxkbui" ,AC_DEFINE(_NO_XKB), $X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS -lX11 -lm )
++ AC_CHECK_LIB(X11, XkbQueryExtension, ,AC_DEFINE(_NO_XKB), $X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS -lX11 -lm )
+ fi
+
+ gww_define_caps_for_alt="dontknow"
+
diff --git a/media-gfx/fontforge/files/fontforge-20110222-remove-useless-extern.patch b/media-gfx/fontforge/files/fontforge-20110222-remove-useless-extern.patch
new file mode 100644
index 000000000000..f7e7152f2eaf
--- /dev/null
+++ b/media-gfx/fontforge/files/fontforge-20110222-remove-useless-extern.patch
@@ -0,0 +1,11 @@
+diff -Naur fontforge-20110222.orig/gutils/gimagereadrgb.c fontforge-20110222/gutils/gimagereadrgb.c
+--- fontforge-20110222.orig/gutils/gimagereadrgb.c 2013-05-05 18:03:18.884623199 +0000
++++ fontforge-20110222/gutils/gimagereadrgb.c 2013-05-05 18:03:35.452624126 +0000
+@@ -86,7 +86,6 @@
+
+ static void find_scanline(FILE *fp,struct sgiheader *header,int cur,
+ unsigned long *starttab,unsigned char **ptrtab) {
+- extern int fgetc(FILE *);
+ int (*getthingamy)(FILE *) = header->bpc==1?fgetc:getshort;
+ int ch,i,cnt,val;
+ unsigned char *pt;
diff --git a/media-gfx/fontforge/files/fontforge-desktop.patch b/media-gfx/fontforge/files/fontforge-desktop.patch
new file mode 100644
index 000000000000..ba8ac1078152
--- /dev/null
+++ b/media-gfx/fontforge/files/fontforge-desktop.patch
@@ -0,0 +1,16 @@
+diff --git a/Packaging/fontforge.desktop b/Packaging/fontforge.desktop
+index a66b28b..18e049c 100644
+--- a/Packaging/fontforge.desktop
++++ b/Packaging/fontforge.desktop
+@@ -8,9 +8,8 @@ Comment[ru]=Редактор шрифтов
+ Comment[fr]=Un constructeur des polices
+ Comment[zh_TW]=FontForge 描邊字型編輯器
+ Exec=fontforge
+-Icon=fontforge.png
++Icon=fontforge
+ Terminal=false
+ Type=Application
+-Categories=Application;Graphics;
+-Encoding=UTF-8
++Categories=Graphics;
+ MimeType=application/vnd.font-fontforge-sfd;application/x-font-ttf;application/x-font-otf;application/x-font-type1;application/x-font-bdf;application/x-font-pcf;application/x-font-tex;
diff --git a/media-gfx/fontforge/files/fontforge-py27.diff b/media-gfx/fontforge/files/fontforge-py27.diff
new file mode 100644
index 000000000000..24f98e13cb30
--- /dev/null
+++ b/media-gfx/fontforge/files/fontforge-py27.diff
@@ -0,0 +1,11 @@
+--- fontforge/ffpython.h 2010/02/04 17:42:36 1.8
++++ fontforge/ffpython.h 2010/09/12 08:30:00 1.9
+@@ -62,7 +62,7 @@
+ #define PyMODINIT_FUNC void
+ #endif
+
+-#if PY_MAJOR_VERSION < 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 5)
++#if PY_MAJOR_VERSION < 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 7)
+ #define PyBytesObject PyStringObject
+ #define PyBytes_Type PyString_Type
+
diff --git a/media-gfx/fontforge/fontforge-20110222-r1.ebuild b/media-gfx/fontforge/fontforge-20110222-r1.ebuild
new file mode 100644
index 000000000000..3c4dbfdb3e2e
--- /dev/null
+++ b/media-gfx/fontforge/fontforge-20110222-r1.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Some notes for maintainers this package:
+# 1. README-unix: freetype headers are required to make use of truetype debugger
+# in fontforge.
+# 2. --enable-{double,longdouble} these just make ff use more storage space. In
+# normal fonts neither is useful. Leave off.
+# 3. FontForge autodetects libraries but does not link with them. They are
+# dynamically loaded at run time if fontforge found them at build time.
+# --with-regular-link disables this behaviour. No reason to make it optional for
+# users. http://fontforge.sourceforge.net/faq.html#libraries. To see what
+# libraries fontforge thinks with use $ fontforge --library-status
+
+EAPI=3
+
+PYTHON_DEPEND="python? 2"
+inherit eutils fdo-mime python autotools
+
+HTDOCSV="20110221"
+CIDMAPV="20090121"
+DESCRIPTION="postscript font editor and converter"
+HOMEPAGE="http://fontforge.sourceforge.net/"
+SRC_URI="mirror://sourceforge/fontforge/${PN}_full-${PV}.tar.bz2
+ doc? ( mirror://sourceforge/fontforge/fontforge_htdocs-${HTDOCSV}.tar.bz2 )
+ cjk? ( mirror://gentoo/cidmaps-${CIDMAPV}.tgz )" # http://fontforge.sf.net/cidmaps.tgz
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="cjk cairo doc gif debug jpeg nls pasteafter png +python tiff tilepath truetype truetype-debugger pango type3 svg unicode +X"
+
+RDEPEND="gif? ( >=media-libs/giflib-4.1.0-r1 )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( >=media-libs/libpng-1.2.4 )
+ tiff? ( >=media-libs/tiff-3.5.7-r1 )
+ truetype? ( >=media-libs/freetype-2.1.4 )
+ truetype-debugger? ( >=media-libs/freetype-2.3.8[fontforge,-bindist] )
+ svg? ( >=dev-libs/libxml2-2.6.7 )
+ unicode? ( >=media-libs/libuninameslist-030713 )
+ cairo? ( >=x11-libs/cairo-1.6.4[X] )
+ pango? ( >=x11-libs/pango-1.20.3 )
+ x11-libs/libXi
+ x11-proto/inputproto
+ !media-gfx/pfaedit"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+pkg_setup() {
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+}
+
+src_unpack() {
+ unpack ${PN}_full-${PV}.tar.bz2
+ use cjk && unpack cidmaps-${CIDMAPV}.tgz
+ if use doc; then
+ mkdir html
+ cd html
+ unpack fontforge_htdocs-${HTDOCSV}.tar.bz2
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-lxkbui.patch"
+ epatch "${FILESDIR}/${P}-libz.so-linkage.patch"
+ epatch "${FILESDIR}/${P}-remove-useless-extern.patch"
+ if use doc; then
+ chmod -x "${WORKDIR}"/html/*.html || die
+ fi
+ eautoconf
+}
+
+src_configure() {
+ # no real way of disabling gettext/nls ...
+ use nls || export ac_cv_header_libintl_h=no
+ econf \
+ --disable-static \
+ $(use_with truetype-debugger freetype-src "/usr/include/freetype2/internal4fontforge/") \
+ $(use_enable type3) \
+ $(use_with python) \
+ $(use_enable python pyextension) \
+ $(use_enable pasteafter) \
+ $(use_with X x) \
+ $(use_enable cjk gb12345) \
+ $(use_enable tilepath) \
+ $(use_enable debug debug-raw-points) \
+ $(use_with pango) \
+ $(use_with cairo)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc AUTHORS README* || die
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+
+ if use cjk; then #129518
+ insinto /usr/share/fontforge
+ doins "${WORKDIR}"/*.cidmap || die
+ fi
+
+ doicon Packaging/fontforge.png || die
+ domenu Packaging/fontforge.desktop || die
+ insinto /usr/share/mime/application
+ doins Packaging/fontforge.xml || die
+
+ if use doc; then
+ insinto /usr/share/doc/${PN}
+ cd "${WORKDIR}/html/"
+ doins -r * || die
+ fi
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/fontforge/fontforge-20120731-r1.ebuild b/media-gfx/fontforge/fontforge-20120731-r1.ebuild
new file mode 100644
index 000000000000..1d66f4acbcfe
--- /dev/null
+++ b/media-gfx/fontforge/fontforge-20120731-r1.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Some notes for maintainers this package:
+# 1. README-unix: freetype headers are required to make use of truetype debugger
+# in fontforge.
+# 2. --enable-{double,longdouble} these just make ff use more storage space. In
+# normal fonts neither is useful. Leave off.
+# 3. FontForge autodetects libraries but does not link with them. They are
+# dynamically loaded at run time if fontforge found them at build time.
+# --with-regular-link disables this behaviour. No reason to make it optional for
+# users. http://fontforge.sourceforge.net/faq.html#libraries. To see what
+# libraries fontforge thinks with use $ fontforge --library-status
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit eutils fdo-mime python-single-r1 autotools
+
+HTDOCSV="20110221"
+CIDMAPV="20090121"
+DESCRIPTION="postscript font editor and converter"
+HOMEPAGE="http://fontforge.sourceforge.net/"
+SRC_URI="mirror://sourceforge/fontforge/${PN}_full-${PV}.tar.bz2
+ doc? ( mirror://sourceforge/fontforge/fontforge_htdocs-${HTDOCSV}.tar.bz2 )
+ cjk? ( mirror://gentoo/cidmaps-${CIDMAPV}.tgz )" # http://fontforge.org/cidmaps.tgz
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="cjk cairo doc gif debug jpeg nls pasteafter png +python tiff tilepath truetype truetype-debugger pango type3 svg unicode +X"
+
+RDEPEND="gif? ( >=media-libs/giflib-4.1.0-r1 )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( >=media-libs/libpng-1.2.4 )
+ tiff? ( >=media-libs/tiff-3.5.7-r1 )
+ truetype? ( >=media-libs/freetype-2.1.4 )
+ truetype-debugger? ( >=media-libs/freetype-2.3.8[fontforge,-bindist] )
+ svg? ( >=dev-libs/libxml2-2.6.7 )
+ unicode? ( >=media-libs/libuninameslist-030713 )
+ cairo? ( >=x11-libs/cairo-1.6.4[X] )
+ pango? ( >=x11-libs/pango-1.20.3 )
+ python? ( ${PYTHON_DEPS} )
+ x11-libs/libXi
+ x11-libs/libX11
+ x11-proto/inputproto
+ !media-gfx/pfaedit"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ unpack ${PN}_full-${PV}.tar.bz2
+ use cjk && unpack cidmaps-${CIDMAPV}.tgz
+ if use doc; then
+ mkdir html
+ cd html
+ unpack fontforge_htdocs-${HTDOCSV}.tar.bz2
+ fi
+}
+
+src_prepare() {
+ # Version is #define-d as a string, even though the field is an int
+ sed -i -e '/LibFF_VersionDate/s/"//g' fontforge/libffstamp.h || die
+
+ epatch "${FILESDIR}/${PN}-20110222-lxkbui.patch"
+ epatch "${FILESDIR}/${PN}-20110222-libz.so-linkage.patch"
+ epatch "${FILESDIR}/${PN}-20110222-remove-useless-extern.patch"
+ if use doc; then
+ chmod -x "${WORKDIR}"/html/*.html || die
+ fi
+ eautoconf
+}
+
+src_configure() {
+ # no real way of disabling gettext/nls ...
+ use nls || export ac_cv_header_libintl_h=no
+ econf \
+ --disable-static \
+ $(use_with truetype-debugger freetype-src "/usr/include/freetype2/internal4fontforge/") \
+ $(use_enable type3) \
+ $(use_with python) \
+ $(use_enable python pyextension) \
+ $(use_enable pasteafter) \
+ $(use_with X x) \
+ $(use_enable cjk gb12345) \
+ $(use_enable tilepath) \
+ $(use_enable debug debug-raw-points) \
+ $(use_with pango) \
+ $(use_with cairo)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc AUTHORS README* || die
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+
+ if use cjk; then #129518
+ insinto /usr/share/fontforge
+ doins "${WORKDIR}"/*.cidmap || die
+ fi
+
+ for i in 16x16 22x22 24x24 32x32 48x48 scalable; do
+ doicon -s "$i" "Packaging/icons/${i}/apps/"* || die
+ done
+
+ domenu Packaging/fontforge.desktop || die
+ insinto /usr/share/mime/application
+ doins Packaging/fontforge.xml || die
+
+ if use doc; then
+ insinto /usr/share/doc/${PN}
+ cd "${WORKDIR}/html/"
+ doins -r * || die
+ fi
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/fontforge/fontforge-20120731.ebuild b/media-gfx/fontforge/fontforge-20120731.ebuild
new file mode 100644
index 000000000000..74833b1b5e2c
--- /dev/null
+++ b/media-gfx/fontforge/fontforge-20120731.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Some notes for maintainers this package:
+# 1. README-unix: freetype headers are required to make use of truetype debugger
+# in fontforge.
+# 2. --enable-{double,longdouble} these just make ff use more storage space. In
+# normal fonts neither is useful. Leave off.
+# 3. FontForge autodetects libraries but does not link with them. They are
+# dynamically loaded at run time if fontforge found them at build time.
+# --with-regular-link disables this behaviour. No reason to make it optional for
+# users. http://fontforge.sourceforge.net/faq.html#libraries. To see what
+# libraries fontforge thinks with use $ fontforge --library-status
+
+EAPI="4"
+
+PYTHON_DEPEND="python? 2"
+inherit eutils fdo-mime python autotools
+
+HTDOCSV="20110221"
+CIDMAPV="20090121"
+DESCRIPTION="postscript font editor and converter"
+HOMEPAGE="http://fontforge.sourceforge.net/"
+SRC_URI="mirror://sourceforge/fontforge/${PN}_full-${PV}.tar.bz2
+ doc? ( mirror://sourceforge/fontforge/fontforge_htdocs-${HTDOCSV}.tar.bz2 )
+ cjk? ( mirror://gentoo/cidmaps-${CIDMAPV}.tgz )" # http://fontforge.org/cidmaps.tgz
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="cjk cairo doc gif debug jpeg nls pasteafter png +python tiff tilepath truetype truetype-debugger pango type3 svg unicode +X"
+
+RDEPEND="gif? ( >=media-libs/giflib-4.1.0-r1 )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( >=media-libs/libpng-1.2.4 )
+ tiff? ( >=media-libs/tiff-3.5.7-r1 )
+ truetype? ( >=media-libs/freetype-2.1.4 )
+ truetype-debugger? ( >=media-libs/freetype-2.3.8[fontforge,-bindist] )
+ svg? ( >=dev-libs/libxml2-2.6.7 )
+ unicode? ( >=media-libs/libuninameslist-030713 )
+ cairo? ( >=x11-libs/cairo-1.6.4[X] )
+ pango? ( >=x11-libs/pango-1.20.3 )
+ x11-libs/libXi
+ x11-libs/libX11
+ x11-proto/inputproto
+ !media-gfx/pfaedit"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+pkg_setup() {
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+}
+
+src_unpack() {
+ unpack ${PN}_full-${PV}.tar.bz2
+ use cjk && unpack cidmaps-${CIDMAPV}.tgz
+ if use doc; then
+ mkdir html
+ cd html
+ unpack fontforge_htdocs-${HTDOCSV}.tar.bz2
+ fi
+}
+
+src_prepare() {
+ # Version is #define-d as a string, even though the field is an int
+ sed -i -e '/LibFF_VersionDate/s/"//g' fontforge/libffstamp.h || die
+
+ epatch "${FILESDIR}/${PN}-20110222-lxkbui.patch"
+ epatch "${FILESDIR}/${PN}-20110222-libz.so-linkage.patch"
+ epatch "${FILESDIR}/${PN}-20110222-remove-useless-extern.patch"
+ if use doc; then
+ chmod -x "${WORKDIR}"/html/*.html || die
+ fi
+ eautoconf
+}
+
+src_configure() {
+ # no real way of disabling gettext/nls ...
+ use nls || export ac_cv_header_libintl_h=no
+ econf \
+ --disable-static \
+ $(use_with truetype-debugger freetype-src "/usr/include/freetype2/internal4fontforge/") \
+ $(use_enable type3) \
+ $(use_with python) \
+ $(use_enable python pyextension) \
+ $(use_enable pasteafter) \
+ $(use_with X x) \
+ $(use_enable cjk gb12345) \
+ $(use_enable tilepath) \
+ $(use_enable debug debug-raw-points) \
+ $(use_with pango) \
+ $(use_with cairo)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ dodoc AUTHORS README* || die
+
+ find "${ED}" -name '*.la' -exec rm -f {} +
+
+ if use cjk; then #129518
+ insinto /usr/share/fontforge
+ doins "${WORKDIR}"/*.cidmap || die
+ fi
+
+ for i in 16x16 22x22 24x24 32x32 48x48 scalable; do
+ doicon -s "$i" "Packaging/icons/${i}/apps/"* || die
+ done
+
+ domenu Packaging/fontforge.desktop || die
+ insinto /usr/share/mime/application
+ doins Packaging/fontforge.xml || die
+
+ if use doc; then
+ insinto /usr/share/doc/${PN}
+ cd "${WORKDIR}/html/"
+ doins -r * || die
+ fi
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/fontforge/fontforge-20150430.ebuild b/media-gfx/fontforge/fontforge-20150430.ebuild
new file mode 100644
index 000000000000..766b56944c83
--- /dev/null
+++ b/media-gfx/fontforge/fontforge-20150430.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools eutils fdo-mime python-single-r1
+
+GNULIB="b287b621969d5a3f56058ff01e554839814da4e1"
+UTHASH="ac47d4928e61c5abc6e977d91310d31ed74690e4"
+
+DESCRIPTION="postscript font editor and converter"
+HOMEPAGE="http://fontforge.github.io/"
+SRC_URI="https://github.com/fontforge/fontforge/archive/${PV}.tar.gz -> ${P}.tar.gz
+ http://dev.gentoo.org/~floppym/dist/gnulib-${GNULIB}.tar.gz
+ https://github.com/troydhanson/uthash/archive/${UTHASH}.tar.gz -> uthash-${UTHASH}.tar.gz"
+
+LICENSE="BSD GPL-3+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="cairo truetype-debugger gif gtk jpeg png +python readline tiff svg unicode X"
+
+REQUIRED_USE="
+ cairo? ( png )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ dev-libs/libltdl:0
+ dev-libs/libxml2:2=
+ >=media-libs/freetype-2.3.7:2=
+ cairo? (
+ >=x11-libs/cairo-1.6:0=
+ x11-libs/pango:0=
+ )
+ gif? ( media-libs/giflib:0= )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff:0= )
+ truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
+ gtk? ( x11-libs/gtk+:2= )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ unicode? ( media-libs/libuninameslist:0= )
+ X? (
+ x11-libs/libX11:0=
+ x11-libs/libXi:0=
+ x11-libs/libxkbui:0=
+ >=x11-libs/pango-1.10:0=[X]
+ )
+ !media-gfx/pfaedit
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ X? ( x11-proto/inputproto )
+"
+
+# Needs keywording on many arches.
+# zeromq? (
+# >=net-libs/czmq-2.2.0:0=
+# >=net-libs/zeromq-4.0.4:0=
+# )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+gnulib_import() {
+ (
+ func_add_hook() { :; }
+ source bootstrap.conf
+ set -- "${WORKDIR}/gnulib/gnulib-tool" --libtool --import ${gnulib_modules}
+ echo "$@"
+ "$@"
+ )
+}
+
+src_prepare() {
+ mv "${WORKDIR}/uthash-${UTHASH}" "${S}/uthash" || die
+ gnulib_import || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-static
+ $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
+ $(use_enable gtk gtk2-use)
+ $(use_enable python python-extension)
+ $(use_enable python python-scripting)
+ --enable-tile-path
+ --enable-gb12345
+ $(use_with cairo)
+ $(use_with gif giflib)
+ $(use_with jpeg libjpeg)
+ $(use_with png libpng)
+ $(use_with readline libreadline)
+ --without-libspiro
+ $(use_with tiff libtiff)
+ $(use_with unicode libuninameslist)
+ #$(use_with zeromq libzmq)
+ --without-libzmq
+ $(use_with X x)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ # Build system deps are broken
+ emake -C plugins
+ emake
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/fontforge/fontforge-20150612-r1.ebuild b/media-gfx/fontforge/fontforge-20150612-r1.ebuild
new file mode 100644
index 000000000000..baad001cd48e
--- /dev/null
+++ b/media-gfx/fontforge/fontforge-20150612-r1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools eutils fdo-mime python-single-r1
+
+DESCRIPTION="postscript font editor and converter"
+HOMEPAGE="http://fontforge.github.io/"
+SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="cairo truetype-debugger gif gtk jpeg png +python readline tiff svg unicode X"
+
+REQUIRED_USE="
+ cairo? ( png )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ dev-libs/libltdl:0
+ dev-libs/libxml2:2=
+ >=media-libs/freetype-2.3.7:2=
+ cairo? (
+ >=x11-libs/cairo-1.6:0=
+ x11-libs/pango:0=
+ )
+ gif? ( media-libs/giflib:0= )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff:0= )
+ truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
+ gtk? ( x11-libs/gtk+:2= )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ unicode? ( media-libs/libuninameslist:0= )
+ X? (
+ x11-libs/libX11:0=
+ x11-libs/libXi:0=
+ x11-libs/libxkbui:0=
+ >=x11-libs/pango-1.10:0=[X]
+ )
+ !media-gfx/pfaedit
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ X? ( x11-proto/inputproto )
+"
+
+# Needs keywording on many arches.
+# zeromq? (
+# >=net-libs/czmq-2.2.0:0=
+# >=net-libs/zeromq-4.0.4:0=
+# )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+gnulib_import() {
+ (
+ func_add_hook() { :; }
+ source bootstrap.conf
+ set -- "${S}/gnulib/gnulib-tool" --libtool --import ${gnulib_modules}
+ echo "$@"
+ "$@"
+ )
+}
+
+src_prepare() {
+ # Tarball comes with broken absolute symlinks
+ # https://github.com/fontforge/fontforge/issues/2439
+ find . -lname "/*" -delete || die
+ gnulib_import || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-static
+ $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
+ $(use_enable gtk gtk2-use)
+ $(use_enable python python-extension)
+ $(use_enable python python-scripting)
+ --enable-tile-path
+ --enable-gb12345
+ $(use_with cairo)
+ $(use_with gif giflib)
+ $(use_with jpeg libjpeg)
+ $(use_with png libpng)
+ $(use_with readline libreadline)
+ --without-libspiro
+ $(use_with tiff libtiff)
+ $(use_with unicode libuninameslist)
+ #$(use_with zeromq libzmq)
+ --without-libzmq
+ $(use_with X x)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ # Build system deps are broken
+ emake -C plugins
+ emake
+}
+
+src_install() {
+ default
+ prune_libtool_files --modules
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/fontforge/fontforge-20150612.ebuild b/media-gfx/fontforge/fontforge-20150612.ebuild
new file mode 100644
index 000000000000..9e81c813b371
--- /dev/null
+++ b/media-gfx/fontforge/fontforge-20150612.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit autotools eutils fdo-mime python-single-r1
+
+DESCRIPTION="postscript font editor and converter"
+HOMEPAGE="http://fontforge.github.io/"
+SRC_URI="https://github.com/fontforge/fontforge/releases/download/${PV}/${P}.tar.gz"
+
+LICENSE="BSD GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="cairo truetype-debugger gif gtk jpeg png +python readline tiff svg unicode X"
+
+REQUIRED_USE="
+ cairo? ( png )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+RDEPEND="
+ dev-libs/libltdl:0
+ dev-libs/libxml2:2=
+ >=media-libs/freetype-2.3.7:2=
+ cairo? (
+ >=x11-libs/cairo-1.6:0=
+ x11-libs/pango:0=
+ )
+ gif? ( media-libs/giflib:0= )
+ jpeg? ( virtual/jpeg:0 )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff:0= )
+ truetype-debugger? ( >=media-libs/freetype-2.3.8:2[fontforge,-bindist(-)] )
+ gtk? ( x11-libs/gtk+:2= )
+ python? ( ${PYTHON_DEPS} )
+ readline? ( sys-libs/readline:0= )
+ unicode? ( media-libs/libuninameslist:0= )
+ X? (
+ x11-libs/libX11:0=
+ x11-libs/libXi:0=
+ x11-libs/libxkbui:0=
+ >=x11-libs/pango-1.10:0=[X]
+ )
+ !media-gfx/pfaedit
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ X? ( x11-proto/inputproto )
+"
+
+# Needs keywording on many arches.
+# zeromq? (
+# >=net-libs/czmq-2.2.0:0=
+# >=net-libs/zeromq-4.0.4:0=
+# )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+gnulib_import() {
+ (
+ func_add_hook() { :; }
+ source bootstrap.conf
+ set -- "${S}/gnulib/gnulib-tool" --libtool --import ${gnulib_modules}
+ echo "$@"
+ "$@"
+ )
+}
+
+src_prepare() {
+ # Tarball comes with broken absolute symlinks
+ # https://github.com/fontforge/fontforge/issues/2439
+ find . -lname "/*" -delete || die
+ gnulib_import || die
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-static
+ $(use_enable truetype-debugger freetype-debugger "${EPREFIX}/usr/include/freetype2/internal4fontforge")
+ $(use_enable gtk gtk2-use)
+ $(use_enable python python-extension)
+ $(use_enable python python-scripting)
+ --enable-tile-path
+ --enable-gb12345
+ $(use_with cairo)
+ $(use_with gif giflib)
+ $(use_with jpeg libjpeg)
+ $(use_with png libpng)
+ $(use_with readline libreadline)
+ --without-libspiro
+ $(use_with tiff libtiff)
+ $(use_with unicode libuninameslist)
+ #$(use_with zeromq libzmq)
+ --without-libzmq
+ $(use_with X x)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_compile() {
+ # Build system deps are broken
+ emake -C plugins
+ emake
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/fontforge/metadata.xml b/media-gfx/fontforge/metadata.xml
new file mode 100644
index 000000000000..ce7955827b64
--- /dev/null
+++ b/media-gfx/fontforge/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>fonts</herd>
+ <maintainer>
+ <email>floppym@gentoo.org</email>
+ <name>Mike Gilbert</name>
+ </maintainer>
+ <longdescription>
+ FontForge -- An outline font editor that lets you create your own
+ postscript, truetype, opentype, cid-keyed, multi-master, cff, svg and bitmap
+ (bdf, FON, NFNT) fonts, or edit existing ones. Also lets you convert one
+ format to another. FontForge has support for many macintosh font formats.
+</longdescription>
+ <use>
+ <flag name="truetype-debugger">Enable truetype debugger in
+ fontforge</flag>
+ <flag name="type3">Build in support for type3/svg fonts containing
+ multilayered drawing with strokes, fills, images, etc. Type3 fonts are only
+ supported by postscript printers (not by most windowing displays). They are
+ capable of more exotic images than normal fonts but require much more effort
+ to support.</flag>
+ <flag name="pango">Enable pango font rendering</flag>
+ <flag name="pasteafter">Controls whether fontforge has a paste after command
+ (Useful for making words?). This is kind of fun, but it isn't useful for
+ normal fonts.</flag>
+ <flag name="cjk">Controls whether fontforge understands the gb12345 encoding
+ and installs cidmap package to edit CID-keyed fonts</flag>
+ <flag name="tilepath">Controls whether fontforge has a tile path command (a
+ variant of expand stroke) This is useful for very decorative fonts, most
+ people won't want it.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">troydhanson/uthash</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/fontypython/Manifest b/media-gfx/fontypython/Manifest
new file mode 100644
index 000000000000..8de31b57589e
--- /dev/null
+++ b/media-gfx/fontypython/Manifest
@@ -0,0 +1 @@
+DIST fontypython-0.4.4.tar.gz 361335 SHA256 cb7ecba75f35b1db2ae0b171c06433cd119be98b589a5af2f7642a343ff97a4b SHA512 a89c654c9dcd8fc89d3ad91772f856d2d2570a96b3b60f52eed9db217f45e91a55f3044f0e4d1736c5402cde3a6598a353ae59285c892e80034f7baba15f9825 WHIRLPOOL c4a5364108bba2595cecf13f4532115bdaa24503ea9f1d949d618927b51e4d11df710e050fc93442cb42c012bb315e4e53ff8e2adf9f9c32b4b5cd6e1905e11b
diff --git a/media-gfx/fontypython/files/fontypython-pillow.patch b/media-gfx/fontypython/files/fontypython-pillow.patch
new file mode 100644
index 000000000000..9b7966f55061
--- /dev/null
+++ b/media-gfx/fontypython/files/fontypython-pillow.patch
@@ -0,0 +1,41 @@
+https://bugs.gentoo.org/show_bug.cgi?id=471524
+
+diff --git a/fontypythonmodules/fontcontrol.py b/fontypythonmodules/fontcontrol.py
+index e156758..cff34f5 100644
+--- a/fontypythonmodules/fontcontrol.py
++++ b/fontypythonmodules/fontcontrol.py
+@@ -16,7 +16,7 @@
+ ## along with Fonty Python. If not, see <http://www.gnu.org/licenses/>.
+
+ import os, sys, locale, glob, errno
+-import Image, ImageFont, ImageDraw
++from PIL import Image, ImageFont, ImageDraw
+ import fontybugs, fpsys
+ from pathcontrol import *
+
+diff --git a/fontypythonmodules/fpsys.py b/fontypythonmodules/fpsys.py
+index f9572ae..fa1a98f 100644
+--- a/fontypythonmodules/fpsys.py
++++ b/fontypythonmodules/fpsys.py
+@@ -159,7 +159,7 @@ def checkFonts( dirtocheck, printer ):
+ global segfonts
+
+ code = """
+-import ImageFont
++from PIL import ImageFont
+ try:
+ font=ImageFont.truetype("%s", 24, 0)
+ dud=font.getname()
+diff --git a/fontypythonmodules/sanitycheck.py b/fontypythonmodules/sanitycheck.py
+index cf4fcc1..7e46e9a 100644
+--- a/fontypythonmodules/sanitycheck.py
++++ b/fontypythonmodules/sanitycheck.py
+@@ -24,7 +24,7 @@ import imp
+
+ ## PIL : Is it there?
+ try:
+- import Image, ImageFont, ImageDraw
++ from PIL import Image, ImageFont, ImageDraw
+ except:
+ print strings.PILError
+ raise SystemExit
diff --git a/media-gfx/fontypython/fontypython-0.4.4-r1.ebuild b/media-gfx/fontypython/fontypython-0.4.4-r1.ebuild
new file mode 100644
index 000000000000..3e257dabe2b0
--- /dev/null
+++ b/media-gfx/fontypython/fontypython-0.4.4-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_DEPEND="2:2.6"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="2.4 2.5 3.* *-jython 2.7-pypy-*"
+
+inherit distutils eutils multilib python
+
+DESCRIPTION="Font preview application"
+HOMEPAGE="http://savannah.nongnu.org/projects/fontypython"
+SRC_URI="http://download.savannah.nongnu.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+# Crashes w/ debug build of wxGTK (#201315)
+DEPEND="dev-python/pillow
+ dev-python/wxpython:2.8
+ x11-libs/wxGTK:2.8[-debug]"
+RDEPEND="${DEPEND}"
+
+PYTHON_MODNAME="fontypythonmodules"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-pillow.patch"
+}
+
+src_install() {
+ distutils_src_install
+ doman "${S}"/fontypython.1
+}
diff --git a/media-gfx/fontypython/fontypython-0.4.4-r2.ebuild b/media-gfx/fontypython/fontypython-0.4.4-r2.ebuild
new file mode 100644
index 000000000000..9306fc68e31b
--- /dev/null
+++ b/media-gfx/fontypython/fontypython-0.4.4-r2.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 multilib
+
+DESCRIPTION="Font preview application"
+HOMEPAGE="http://savannah.nongnu.org/projects/fontypython"
+SRC_URI="http://download.savannah.nongnu.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+# Crashes w/ debug build of wxGTK (#201315)
+DEPEND="dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/wxpython:2.8[${PYTHON_USEDEP}]
+ x11-libs/wxGTK:2.8[-debug]"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${PN}-pillow.patch" )
+
+src_install() {
+ distutils-r1_src_install
+ doman "${S}"/fontypython.1
+}
diff --git a/media-gfx/fontypython/metadata.xml b/media-gfx/fontypython/metadata.xml
new file mode 100644
index 000000000000..f7359919c39a
--- /dev/null
+++ b/media-gfx/fontypython/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <herd>fonts</herd>
+</pkgmetadata>
diff --git a/media-gfx/fotowall/Manifest b/media-gfx/fotowall/Manifest
new file mode 100644
index 000000000000..a63c3bc9c4d4
--- /dev/null
+++ b/media-gfx/fotowall/Manifest
@@ -0,0 +1 @@
+DIST Fotowall-0.9.tar.bz2 640175 SHA256 e4d0c005d2cb1d7c09438bfc3098eadebc08946e4fbc0655b7fc8b046de3810d
diff --git a/media-gfx/fotowall/fotowall-0.9-r1.ebuild b/media-gfx/fotowall/fotowall-0.9-r1.ebuild
new file mode 100644
index 000000000000..235f4c1834db
--- /dev/null
+++ b/media-gfx/fotowall/fotowall-0.9-r1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit qt4-r2
+
+MY_P="${P/f/F}"
+
+DESCRIPTION="Qt4 tool for creating wallpapers"
+HOMEPAGE="http://www.enricoros.com/opensource/fotowall/"
+SRC_URI="http://fotowall.googlecode.com/files/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug opengl webcam"
+
+DEPEND="dev-qt/qtgui:4
+ dev-qt/qtsvg:4
+ opengl? ( dev-qt/qtopengl:4 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS="README.markdown"
+
+src_prepare() {
+ qt4-r2_src_prepare
+
+ if ! use opengl; then
+ sed -i "/QT += opengl/d" "${PN}.pro" || die "sed failed"
+ fi
+}
+
+src_configure() {
+ if ! use webcam; then
+ eqmake4 ${PN}.pro "CONFIG+=no-webcam"
+ else
+ eqmake4
+ fi
+}
diff --git a/media-gfx/fotowall/metadata.xml b/media-gfx/fotowall/metadata.xml
new file mode 100644
index 000000000000..c706105926c2
--- /dev/null
+++ b/media-gfx/fotowall/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="webcam">Enable webcam support</flag>
+ </use>
+ <longdescription lang="en">
+ </longdescription>
+ <upstream>
+ <remote-id type="google-code">fotowall</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/fotoxx/Manifest b/media-gfx/fotoxx/Manifest
new file mode 100644
index 000000000000..c1e7d10fc172
--- /dev/null
+++ b/media-gfx/fotoxx/Manifest
@@ -0,0 +1,3 @@
+DIST fotoxx-13.11.1.tar.gz 2473330 SHA256 494577fe849d636c2addd46f317b9226fd00a2b5f61a87672be068a2b7bcb5fe SHA512 c880f5f1a67f12ab081820d4a897912e20985dbad0096d2f4ef1f37d0b2b626dd66c69a593e57b31432a67f79eadd4ea8022dcde01bec865f71ecbfec456caa2 WHIRLPOOL 76017d414a8524c4e0208e5b10f5fd86e9761b0ebe998e8b923735d764e0ca75a584c6fc7aac8940ca3e1bb7065bdedfcb3fa7f3736f3457e4ce8345b224685d
+DIST fotoxx-15.04.1.tar.gz 3491468 SHA256 1058bccd8a90c81f3d7a2b57dcf641c6355456a24f1f3d63ca3fbfe55209bc17 SHA512 d70fb437a4aacc18754a7df90fe3b23287ed3d31cbc545ed75ab3eb20cba6c83b4394251553b795c87ab2ecffe551905f9a39d19fead82fabafd646a9691313f WHIRLPOOL 468210add843262d7f2e67bd27e8a33ce91c7c2c252ba32ed9de03ddc8dcc6880b5710ccef3633fc14d1c7647d5a412609dd8d6c0b267a771b4c795a34a51e90
+DIST fotoxx-15.05.tar.gz 3573278 SHA256 65567adc86087a3a8acdebcb0f15ec299cf690a869129825e3d32da7e50c4604 SHA512 07155e5f32c0ada33dd95de333a4a124c9fc56b3807bb2edc2b078f0eab37968f374f84701bb8ce9b200f00ed4587c83f772899ba39527378d3527050960ac0e WHIRLPOOL 1ecb67051b17a9e1dd3e86bd17d88fdfdece0e9808de092f7e6fa3494d64aa8f5e19eac9f506e2938a4797deaf8f617d33095fd0bc482bf436ba4bc3263504d8
diff --git a/media-gfx/fotoxx/files/fotoxx-13.11.1.patch b/media-gfx/fotoxx/files/fotoxx-13.11.1.patch
new file mode 100644
index 000000000000..c37df02558b5
--- /dev/null
+++ b/media-gfx/fotoxx/files/fotoxx-13.11.1.patch
@@ -0,0 +1,44 @@
+diff -r -U1 fotoxx-13.08.1.orig/Makefile fotoxx-13.08.1/Makefile
+--- fotoxx-13.08.1.orig/Makefile 2013-08-13 15:53:00.000000000 +0700
++++ fotoxx-13.08.1/Makefile 2013-08-16 04:37:03.009099149 +0700
+@@ -5,4 +5,4 @@
+ # defaults for parameters that may be pre-defined
+-CXXFLAGS ?= -O2 -Wall -ggdb
+-LDFLAGS ?= -rdynamic
++CXXFLAGS += -Wall -Wno-deprecated-declarations
++LDFLAGS += -rdynamic
+ PREFIX ?= /usr
+@@ -15,3 +15,3 @@
+ LOCALESDIR = $(SHAREDIR)/locales
+-DOCDIR = $(PREFIX)/share/doc/fotoxx
++DOCDIR = $(PREFIX)/share/doc/$(PF)
+ MANDIR = $(PREFIX)/share/man/man1
+@@ -19,4 +19,4 @@
+
+-CFLAGS = $(CXXFLAGS) -c `pkg-config --cflags gtk+-3.0`
+-LIBS = `pkg-config --libs gtk+-3.0`
++CFLAGS = $(CXXFLAGS) -c -DPF=\"$(PF)\" `pkg-config --cflags gtk+-3.0`
++LIBS = `pkg-config --libs gtk+-3.0` -lpthread
+
+@@ -78,3 +78,2 @@
+ rm -f $(DESTDIR)$(MANDIR)/fotoxx.1.gz
+- xdg-desktop-menu uninstall $(DESTDIR)$(MENUFILE)
+ rm -f $(DESTDIR)$(MENUFILE)
+@@ -97,5 +96,2 @@
+ rm -f fotoxx.1.gz
+- # menu (desktop) file
+- cp -f desktop $(DESTDIR)$(MENUFILE)
+- xdg-desktop-menu install --novendor $(DESTDIR)$(MENUFILE)
+
+@@ -106,3 +102,2 @@
+ rm -f $(DESTDIR)$(MANDIR)/fotoxx.1.gz
+- xdg-desktop-menu uninstall $(DESTDIR)$(MENUFILE)
+ rm -f $(DESTDIR)$(MENUFILE)
+diff -r -U1 fotoxx-13.08.1.orig/zfuncs.cc fotoxx-13.08.1/zfuncs.cc
+--- fotoxx-13.08.1.orig/zfuncs.cc 2013-08-13 15:53:00.000000000 +0700
++++ fotoxx-13.08.1/zfuncs.cc 2013-08-16 04:31:58.882119673 +0700
+@@ -3947,3 +3947,3 @@
+ strncatv(zlocalesdir,199,work,"/share/",zappname,"/locales",null); // /prefix/share/appname/locales
+- strncatv(zdocdir,199,work,"/share/doc/",zappname,null); // /prefix/share/doc/appname
++ strncatv(zdocdir,199,work,"/share/doc/",PF,null); // /prefix/share/doc/$(PF)
+
diff --git a/media-gfx/fotoxx/files/fotoxx-15.04.1.patch b/media-gfx/fotoxx/files/fotoxx-15.04.1.patch
new file mode 100644
index 000000000000..15fdaa9abacf
--- /dev/null
+++ b/media-gfx/fotoxx/files/fotoxx-15.04.1.patch
@@ -0,0 +1,13 @@
+diff -r -U1 fotoxx-14.10.2.orig/Makefile fotoxx-14.10.2/Makefile
+--- fotoxx-14.10.2.orig/Makefile 2014-10-09 15:17:09.000000000 +0700
++++ fotoxx-14.10.2/Makefile 2014-10-13 20:44:55.061728475 +0700
+@@ -16,3 +16,3 @@
+ LOCALESDIR = $(SHAREDIR)/locales
+-DOCDIR = $(PREFIX)/share/doc/fotoxx
++DOCDIR = $(PREFIX)/share/doc/$(PF)
+ MANDIR = $(PREFIX)/share/man/man1
+@@ -90,4 +90,2 @@
+ rm -f fotoxx.1.gz
+- # menu (desktop) file
+- cp -f desktop $(DESTDIR)$(MENUFILE)
+
diff --git a/media-gfx/fotoxx/files/fotoxx-15.05.patch b/media-gfx/fotoxx/files/fotoxx-15.05.patch
new file mode 100644
index 000000000000..15fdaa9abacf
--- /dev/null
+++ b/media-gfx/fotoxx/files/fotoxx-15.05.patch
@@ -0,0 +1,13 @@
+diff -r -U1 fotoxx-14.10.2.orig/Makefile fotoxx-14.10.2/Makefile
+--- fotoxx-14.10.2.orig/Makefile 2014-10-09 15:17:09.000000000 +0700
++++ fotoxx-14.10.2/Makefile 2014-10-13 20:44:55.061728475 +0700
+@@ -16,3 +16,3 @@
+ LOCALESDIR = $(SHAREDIR)/locales
+-DOCDIR = $(PREFIX)/share/doc/fotoxx
++DOCDIR = $(PREFIX)/share/doc/$(PF)
+ MANDIR = $(PREFIX)/share/man/man1
+@@ -90,4 +90,2 @@
+ rm -f fotoxx.1.gz
+- # menu (desktop) file
+- cp -f desktop $(DESTDIR)$(MENUFILE)
+
diff --git a/media-gfx/fotoxx/fotoxx-13.11.1.ebuild b/media-gfx/fotoxx/fotoxx-13.11.1.ebuild
new file mode 100644
index 000000000000..c69ae397b140
--- /dev/null
+++ b/media-gfx/fotoxx/fotoxx-13.11.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs fdo-mime
+
+DESCRIPTION="Program for improving image files made with a digital camera"
+HOMEPAGE="http://www.kornelix.com/fotoxx.html"
+SRC_URI="http://www.kornelix.com/uploads/1/3/0/3/13035936/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="
+ x11-libs/gtk+:3
+ media-libs/libpng
+ media-libs/tiff
+ media-libs/lcms:2"
+RDEPEND="${DEPEND}
+ media-libs/exiftool
+ media-gfx/ufraw[gtk]
+ media-gfx/dcraw
+ x11-misc/xdg-utils"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PF}.patch
+}
+
+src_compile() {
+ tc-export CXX
+ emake
+}
+
+src_install() {
+ # For the Help menu items to work, *.html must be in /usr/share/doc/${PF},
+ # and README, changelog, translations, edit-menus, KB-shortcuts must not be compressed
+ emake DESTDIR="${D}" install
+ newmenu desktop ${PN}.desktop
+ rm -f "${D}"/usr/share/doc/${PF}/*.man
+ docompress -x /usr/share/doc
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/fotoxx/fotoxx-15.04.1.ebuild b/media-gfx/fotoxx/fotoxx-15.04.1.ebuild
new file mode 100644
index 000000000000..fc3ab9dce825
--- /dev/null
+++ b/media-gfx/fotoxx/fotoxx-15.04.1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs fdo-mime
+
+DESCRIPTION="Program for improving image files made with a digital camera"
+HOMEPAGE="http://www.kornelix.com/fotoxx.html"
+SRC_URI="http://www.kornelix.com/uploads/1/3/0/3/13035936/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ x11-libs/gtk+:3
+ media-libs/libpng
+ media-libs/tiff
+ media-libs/lcms:2"
+RDEPEND="${DEPEND}
+ media-libs/exiftool
+ media-gfx/ufraw[gtk]
+ media-gfx/dcraw
+ x11-misc/xdg-utils"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PF}.patch
+}
+
+src_compile() {
+ tc-export CXX
+ emake
+}
+
+src_install() {
+ # For the Help menu items to work, *.html must be in /usr/share/doc/${PF},
+ # and README, changelog, translations, edit-menus, KB-shortcuts must not be compressed
+ emake DESTDIR="${D}" install
+ newmenu desktop ${PN}.desktop
+ rm -f "${D}"/usr/share/doc/${PF}/*.man
+ docompress -x /usr/share/doc
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/fotoxx/fotoxx-15.05.ebuild b/media-gfx/fotoxx/fotoxx-15.05.ebuild
new file mode 100644
index 000000000000..fc3ab9dce825
--- /dev/null
+++ b/media-gfx/fotoxx/fotoxx-15.05.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs fdo-mime
+
+DESCRIPTION="Program for improving image files made with a digital camera"
+HOMEPAGE="http://www.kornelix.com/fotoxx.html"
+SRC_URI="http://www.kornelix.com/uploads/1/3/0/3/13035936/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ x11-libs/gtk+:3
+ media-libs/libpng
+ media-libs/tiff
+ media-libs/lcms:2"
+RDEPEND="${DEPEND}
+ media-libs/exiftool
+ media-gfx/ufraw[gtk]
+ media-gfx/dcraw
+ x11-misc/xdg-utils"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PF}.patch
+}
+
+src_compile() {
+ tc-export CXX
+ emake
+}
+
+src_install() {
+ # For the Help menu items to work, *.html must be in /usr/share/doc/${PF},
+ # and README, changelog, translations, edit-menus, KB-shortcuts must not be compressed
+ emake DESTDIR="${D}" install
+ newmenu desktop ${PN}.desktop
+ rm -f "${D}"/usr/share/doc/${PF}/*.man
+ docompress -x /usr/share/doc
+}
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/fotoxx/metadata.xml b/media-gfx/fotoxx/metadata.xml
new file mode 100644
index 000000000000..850e025d7525
--- /dev/null
+++ b/media-gfx/fotoxx/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>grozin@gentoo.org</email>
+ <name>Andrey Grozin</name>
+ </maintainer>
+ <longdescription lang="en">
+ Navigate a large image collection using a thumbnail browser.
+ Import camera RAW files and edit with 16-bit color.
+ Save edited images as TIFF-8/16, PNG or JPEG with adjustable compression.
+ Edit the whole image or a selected area, with adjustable edge-blending.
+ Edit functions have live feedback using the full window.
+ Undo/redo up to 99 edits. Add tags, dates, and star-ratings to images
+ and search using these criteria and (wildcard) file names.
+ Fotoxx does not use filters, layers, and masks - the edit functions work directly on the image.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/fr0st/Manifest b/media-gfx/fr0st/Manifest
new file mode 100644
index 000000000000..ab6bd8469ab8
--- /dev/null
+++ b/media-gfx/fr0st/Manifest
@@ -0,0 +1 @@
+DIST fr0st-1.4-src.tgz 1535978 SHA256 88b545245c1cea6506c4c59a32f3c302703365c1fb477d951fcb465281589989
diff --git a/media-gfx/fr0st/fr0st-1.4-r1.ebuild b/media-gfx/fr0st/fr0st-1.4-r1.ebuild
new file mode 100644
index 000000000000..3459bd20643b
--- /dev/null
+++ b/media-gfx/fr0st/fr0st-1.4-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+WX_GTK_VER="2.8"
+PYTHON_DEPEND="2:2.7"
+
+inherit eutils multilib python wxwidgets
+
+DESCRIPTION="A fractal flame editor"
+HOMEPAGE="http://fr0st.wordpress.com/"
+SRC_URI="http://launchpad.net/${PN}/trunk/${PV}.0/+download/${P}-src.tgz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-python/wxpython:2.8
+ >=media-gfx/flam3-3.0.1"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${P}-src
+
+pkg_setup() {
+ fr0st_libdir="/usr/$(get_libdir)/fr0st"
+ fr0st_sharedir="/usr/share/fr0st"
+
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ python_convert_shebangs 2 fr0st.py
+}
+
+src_install() {
+ insinto "${fr0st_sharedir}"
+ doins -r icons samples || die
+
+ insinto "${fr0st_libdir}"
+ doins -r fr0stlib || die
+
+ exeinto "${fr0st_libdir}"
+ doexe fr0st.py || die
+
+ dosym "${fr0st_libdir}"/fr0st.py /usr/bin/fr0st || die
+ dosym "${fr0st_sharedir}"/icons/fr0st.png /usr/share/pixmaps/fr0st.png || die
+
+ make_desktop_entry fr0st fr0st
+
+ dodoc changelog.txt
+}
+
+pkg_postinst() {
+ python_mod_optimize "${fr0st_libdir}"
+}
+
+pkg_postrm() {
+ python_mod_cleanup "${fr0st_libdir}"
+}
diff --git a/media-gfx/fr0st/metadata.xml b/media-gfx/fr0st/metadata.xml
new file mode 100644
index 000000000000..7c84dffebda5
--- /dev/null
+++ b/media-gfx/fr0st/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="launchpad">fr0st</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/freecad/Manifest b/media-gfx/freecad/Manifest
new file mode 100644
index 000000000000..1ce41bca15b2
--- /dev/null
+++ b/media-gfx/freecad/Manifest
@@ -0,0 +1,4 @@
+DIST freecad-0.12.5284.tar.gz 48399004 SHA256 45486c6cc3ae212fd3eba994c603fd97962c7f505bf2a807d1533f9ee6d6026d SHA512 f1fee73ae7b43e7b3a136847f0dbb0b3f3e8f62ad3a9063f759efd8b9ed5a0dfff54961870465f37c0563161c4c5e2821f1f3379ead72dbdeddae36702e2ec0a WHIRLPOOL 7a46119d86a5d43ae8eaec6b5532e4739d54b0443769381630e644aa16c3f4185b63b513e4350c7562beacd86d56a7edbb3b506d10cb54190cbeaab48a504d5f
+DIST freecad-0.13.1830.tar.gz 70168706 SHA256 550ed16225e4cd67a463ae9b826f3a64edf7d2819cc8d235b15a89e10be72f13 SHA512 3e8d4eed8cace38da9615965f79a2b0da21d31a6df793ceaf3f732e0abd5666e9715ec9eb162e6ff998718e8d609a7dff2d0993b28f493200b734318a2322160 WHIRLPOOL 6d41565423edf8a0c67901a8559600ff1088f645c3ecb4aad8d7597490522f80d6475af3e7f5a623fc30b4d1571187bf6e6a132e6c480825798b957bea90bb83
+DIST freecad-0.14.3702.tar.gz 66927339 SHA256 ee24cf3542bfb1a887a12d2df52458bcc0e3e82679370c449b9d8b5b473b9dc9 SHA512 6333bc8256728084b492687c5c6a5b3356212cbcab4bf0beb95fcdb0f9ac7c49df8eee0275e83feadc7b2460cf2396e88b0b309cbc1e1c9d46375bcadb334c13 WHIRLPOOL eb7d22f255536d4fde5a182e5b59c63eb38a6d70ecf0b6a7abdf1d76c00c51492c517053d09eb56d5657d8cc3a49bad56e67e8965ce03d27982d36dcd1944982
+DIST freecad-0.15.4671.tar.gz 93680347 SHA256 8dda8f355cb59866a55c9c6096f39a3ebc5347892284db4c305352cc9be03bbc SHA512 695081117b5511bbc0b7335b63a8760e164987a6dff2c5b0dc86b6b0a93bb7d7b83aa9f4fab1d66d7d2c917a42b0135af78553b463579873a1d1e52e3dd9aecb WHIRLPOOL 0c351ad9ee360dfd9af54af9cc348a6ba3d8c15b6743667f6943e41aa252cec9bd2149baa32fceeceac65660a9b629aefba3c80a5c3a84c45a8d502323547287
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-boost148.patch b/media-gfx/freecad/files/freecad-0.12.5284-boost148.patch
new file mode 100644
index 000000000000..4c9c735598d8
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-boost148.patch
@@ -0,0 +1,25 @@
+From d6061d30a053617b8127c96e8c6a65e47589a182 Mon Sep 17 00:00:00 2001
+From: Werner Mayer <werner@werner-VirtualBox.(none)>
+Date: Sat, 31 Mar 2012 19:22:11 +0200
+Subject: [PATCH] #0000585: bug with boost 1.48
+
+---
+ CMakeLists.txt | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 920aca7..9e3bbf5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -284,6 +284,8 @@ MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK_CHECKFILE6X FREECAD_LIBPACK_CHECKFILE7X)
+ # get include dirs
+ QT4_GET_MOC_FLAGS(moc_flags)
+ QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
++ # fixes bug 0000585: bug with boost 1.48
++ SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
+
+ foreach(it ${moc_files})
+ get_filename_component(it ${it} ABSOLUTE)
+--
+1.7.9.2
+
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-cmake-2.8.12.patch b/media-gfx/freecad/files/freecad-0.12.5284-cmake-2.8.12.patch
new file mode 100644
index 000000000000..b38a440a04d9
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-cmake-2.8.12.patch
@@ -0,0 +1,294 @@
+commit f061b6f7ea667e1d6944590d67b9b5b6659e4ba0
+Author: wmayer <wmayer@users.sourceforge.net>
+Date: Tue Oct 22 10:33:18 2013 +0200
+
+ 0001278: No build possible with current CMake version 2.8.12
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 862cd7b..11c9b43 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -270,14 +270,14 @@ MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK_CHECKFILE6X FREECAD_LIBPACK_CHECKFILE7X)
+ macro(fc_wrap_cpp outfiles )
+ # get include dirs
+ QT4_GET_MOC_FLAGS(moc_includes)
+- QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
++ QT4_EXTRACT_OPTIONS(moc_files moc_options moc_target ${ARGN})
+ # fixes bug 0000585: bug with boost 1.48
+ SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
+
+ foreach(it ${moc_files})
+ get_filename_component(it ${it} ABSOLUTE)
+ QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
+- QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_includes}" "${moc_options}")
++ QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_includes}" "${moc_options}" "${moc_target}")
+ set(${outfiles} ${${outfiles}} ${outfile})
+ add_file_dependencies(${it} ${outfile})
+ endforeach(it)
+diff --git a/cMake/FreeCadMacros.cmake b/cMake/FreeCadMacros.cmake
+index 5fa7680..78bc0b8 100644
+--- a/cMake/FreeCadMacros.cmake
++++ b/cMake/FreeCadMacros.cmake
+@@ -168,69 +168,6 @@ endmacro(generate_from_py)
+ #endmacro(qt4_wrap_ui)
+
+
+-# This is a special version of the built in macro qt4_add_resources that generates .cpp files
+-#
+-#macro(fc_add_resources outfiles )
+-# #QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
+-# set(ARGN )
+-# foreach (it ${rcc_files})
+-# get_filename_component(outfilename ${it} NAME_WE)
+-# get_filename_component(infile ${it} ABSOLUTE)
+-# get_filename_component(rc_path ${infile} PATH)
+-# set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp)
+-# # parse file for dependencies
+-# # all files are absolute paths or relative to the location of the qrc file
+-# file(READ "${infile}" _RC_FILE_CONTENTS)
+-# string(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+-# set(_RC_DEPENDS)
+-# foreach(_RC_FILE ${_RC_FILES})
+-# string(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
+-# string(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
+-# if(NOT _ABS_PATH_INDICATOR)
+-# set(_RC_FILE "${rc_path}/${_RC_FILE}")
+-# endif(NOT _ABS_PATH_INDICATOR)
+-# set(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
+-# endforeach(_RC_FILE)
+-# add_custom_command(OUTPUT ${outfile}
+-# COMMAND ${QT_RCC_EXECUTABLE}
+-# ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
+-# MAIN_DEPENDENCY ${infile}
+-# DEPENDS ${_RC_DEPENDS})
+-# set(${outfiles} ${${outfiles}} ${outfile})
+-# endforeach (it)
+-#endmacro(fc_add_resources)
+-
+-MACRO (fc_add_resources outfiles )
+- QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
+-
+- FOREACH (it ${rcc_files})
+- GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
+- GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+- GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
+- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp)
+- # parse file for dependencies
+- # all files are absolute paths or relative to the location of the qrc file
+- FILE(READ "${infile}" _RC_FILE_CONTENTS)
+- STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+- SET(_RC_DEPENDS)
+- FOREACH(_RC_FILE ${_RC_FILES})
+- STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
+- STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
+- IF(NOT _ABS_PATH_INDICATOR)
+- SET(_RC_FILE "${rc_path}/${_RC_FILE}")
+- ENDIF(NOT _ABS_PATH_INDICATOR)
+- SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
+- ENDFOREACH(_RC_FILE)
+- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+- COMMAND ${QT_RCC_EXECUTABLE}
+- ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
+- MAIN_DEPENDENCY ${infile}
+- DEPENDS ${_RC_DEPENDS})
+- SET(${outfiles} ${${outfiles}} ${outfile})
+- ENDFOREACH (it)
+-
+-ENDMACRO (fc_add_resources)
+-
+ MACRO(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar)
+ IF(MSVC)
+ GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
+diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt
+index b9f1939..124c4f8 100644
+--- a/src/Gui/CMakeLists.txt
++++ b/src/Gui/CMakeLists.txt
+@@ -608,7 +608,7 @@ SOURCE_GROUP("Widget\\iisTaskPanel\\Mocs" FILES ${iis_MOC_SRCS})
+ #SET(Resource_RCS
+ # Icons/resource.qrc
+ # Language/translation.qrc)
+-#fc_add_resources(Resource_SRCS ${Resource_RCS})
++#qt4_add_resources(Resource_SRCS ${Resource_RCS})
+ #SET(Resource_SRCS
+ # ${Resource_SRCS}
+ # Icons/resource.qrc
+diff --git a/src/Mod/Image/Gui/AppImageGui.cpp b/src/Mod/Image/Gui/AppImageGui.cpp
+index c26129e..c817860 100644
+--- a/src/Mod/Image/Gui/AppImageGui.cpp
++++ b/src/Mod/Image/Gui/AppImageGui.cpp
+@@ -20,7 +20,6 @@
+ #include <Gui/Language/Translator.h>
+ #include "Workbench.h"
+ #include "ViewProviderImagePlane.h"
+-#include "qrc_Image.cpp"
+
+ // use a different name to CreateCommand()
+ void CreateImageCommands(void);
+diff --git a/src/Mod/Image/Gui/CMakeLists.txt b/src/Mod/Image/Gui/CMakeLists.txt
+index cc967ee..4edb462 100644
+--- a/src/Mod/Image/Gui/CMakeLists.txt
++++ b/src/Mod/Image/Gui/CMakeLists.txt
+@@ -30,8 +30,7 @@ SET(ImageGui_RES_SRCS
+ Resources/Image.qrc
+ )
+
+-fc_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
+-#QT4_ADD_RESOURCES(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
++qt4_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
+
+ set(ImageGui_UIC_SRCS
+ ImageOrientationDialog.ui
+@@ -40,7 +39,7 @@ qt4_wrap_ui(ImageGui_UIC_HDRS ${ImageGui_UIC_SRCS})
+
+ SET(ImageGui_SRCS
+ # ${ImageGui_MOC_SRCS}
+-# ${ImageGui_QRC_SRCS}
++ ${ImageGui_QRC_SRCS}
+ AppImageGui.cpp
+ AppImageGuiPy.cpp
+ Command.cpp
+diff --git a/src/Mod/Mesh/Gui/AppMeshGui.cpp b/src/Mod/Mesh/Gui/AppMeshGui.cpp
+index 624d569..8fb68cf 100644
+--- a/src/Mod/Mesh/Gui/AppMeshGui.cpp
++++ b/src/Mod/Mesh/Gui/AppMeshGui.cpp
+@@ -50,7 +50,6 @@
+ #include "ViewProviderDefects.h"
+ #include "ViewProviderPython.h"
+ #include "Workbench.h"
+-#include "qrc_Mesh.cpp"
+
+
+ // use a different name to CreateCommand()
+diff --git a/src/Mod/Mesh/Gui/CMakeLists.txt b/src/Mod/Mesh/Gui/CMakeLists.txt
+index cafca6c..9ef1dae 100644
+--- a/src/Mod/Mesh/Gui/CMakeLists.txt
++++ b/src/Mod/Mesh/Gui/CMakeLists.txt
+@@ -75,9 +75,9 @@ SET(Inventor_SRCS
+ )
+ SOURCE_GROUP("Inventor" FILES ${Inventor_SRCS})
+
+-fc_add_resources(resource_SRCS Resources/Mesh.qrc)
++qt4_add_resources(resource_SRCS Resources/Mesh.qrc)
+ SET(resource_SRCS
+-# ${resource_SRCS}
++ ${resource_SRCS}
+ Resources/Mesh.qrc
+ )
+ SOURCE_GROUP("resource" FILES ${resource_SRCS})
+diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp
+index 9c3ebb3..ae84470 100644
+--- a/src/Mod/Part/Gui/AppPartGui.cpp
++++ b/src/Mod/Part/Gui/AppPartGui.cpp
+@@ -57,7 +57,6 @@
+ #include "Workbench.h"
+
+ #include <Gui/Language/Translator.h>
+-#include "qrc_Part.cpp"
+
+ #include "Resources/icons/PartFeature.xpm"
+ #include "Resources/icons/PartFeatureImport.xpm"
+diff --git a/src/Mod/Part/Gui/CMakeLists.txt b/src/Mod/Part/Gui/CMakeLists.txt
+index 375f6e4..87c4c28 100644
+--- a/src/Mod/Part/Gui/CMakeLists.txt
++++ b/src/Mod/Part/Gui/CMakeLists.txt
+@@ -50,7 +50,7 @@ set(PartGui_MOC_HDRS
+ fc_wrap_cpp(PartGui_MOC_SRCS ${PartGui_MOC_HDRS})
+ SOURCE_GROUP("Moc" FILES ${PartGui_MOC_SRCS})
+
+-fc_add_resources(PartGui_QRC_SRCS Resources/Part.qrc)
++qt4_add_resources(PartGui_QRC_SRCS Resources/Part.qrc)
+
+ set(PartGui_UIC_SRCS
+ CrossSections.ui
+@@ -77,7 +77,7 @@ set(PartGui_UIC_SRCS
+ qt4_wrap_ui(PartGui_UIC_HDRS ${PartGui_UIC_SRCS})
+
+ SET(PartGui_SRCS
+-# ${PartGui_QRC_SRCS}
++ ${PartGui_QRC_SRCS}
+ ${PartGui_UIC_HDRS}
+ AppPartGui.cpp
+ Command.cpp
+diff --git a/src/Mod/Points/Gui/AppPointsGui.cpp b/src/Mod/Points/Gui/AppPointsGui.cpp
+index 9acd98e..953d3e2 100644
+--- a/src/Mod/Points/Gui/AppPointsGui.cpp
++++ b/src/Mod/Points/Gui/AppPointsGui.cpp
+@@ -33,7 +33,6 @@
+
+ #include "ViewProvider.h"
+ #include "Workbench.h"
+-#include "qrc_Points.cpp"
+
+ // use a different name to CreateCommand()
+ void CreatePointsCommands(void);
+diff --git a/src/Mod/Points/Gui/CMakeLists.txt b/src/Mod/Points/Gui/CMakeLists.txt
+index fab12ff..7e30f0d 100644
+--- a/src/Mod/Points/Gui/CMakeLists.txt
++++ b/src/Mod/Points/Gui/CMakeLists.txt
+@@ -32,9 +32,9 @@ SET(Dialogs_SRCS
+ )
+ SOURCE_GROUP("Dialogs" FILES ${Dialogs_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Points.qrc)
++qt4_add_resources(Resource_SRCS Resources/Points.qrc)
+ SET(Resource_SRCS
+-# ${Resource_SRCS}
++ ${Resource_SRCS}
+ Resources/Points.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
+diff --git a/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp b/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
+index 156bd90..c59369a 100644
+--- a/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
++++ b/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
+@@ -32,7 +32,6 @@
+ #include "DlgSettingsRayImp.h"
+ #include "ViewProvider.h"
+ #include "Workbench.h"
+-#include "qrc_Raytracing.cpp"
+
+
+ using namespace RaytracingGui;
+diff --git a/src/Mod/Raytracing/Gui/CMakeLists.txt b/src/Mod/Raytracing/Gui/CMakeLists.txt
+index 38aa739..1da30c9 100644
+--- a/src/Mod/Raytracing/Gui/CMakeLists.txt
++++ b/src/Mod/Raytracing/Gui/CMakeLists.txt
+@@ -43,8 +43,9 @@ set(RaytracingGui_MOC_HDRS
+ fc_wrap_cpp(RaytracingGui_MOC_SRCS ${RaytracingGui_MOC_HDRS})
+ SOURCE_GROUP("Moc" FILES ${RaytracingGui_MOC_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Raytracing.qrc)
++qt4_add_resources(Resource_SRCS Resources/Raytracing.qrc)
+ SET(Resource_SRCS
++ ${Resource_SRCS}
+ Resources/Raytracing.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
+diff --git a/src/Mod/Test/Gui/AppTestGui.cpp b/src/Mod/Test/Gui/AppTestGui.cpp
+index a027d9d..7c2ef21 100644
+--- a/src/Mod/Test/Gui/AppTestGui.cpp
++++ b/src/Mod/Test/Gui/AppTestGui.cpp
+@@ -28,7 +28,6 @@
+
+ #include "UnitTestPy.h"
+ #include "UnitTestImp.h"
+-#include "qrc_Test.cpp"
+
+ #include <Gui/Language/Translator.h>
+ #include <Base/Console.h>
+diff --git a/src/Mod/Test/Gui/CMakeLists.txt b/src/Mod/Test/Gui/CMakeLists.txt
+index 9b8b672..eaa0dcd 100644
+--- a/src/Mod/Test/Gui/CMakeLists.txt
++++ b/src/Mod/Test/Gui/CMakeLists.txt
+@@ -30,9 +30,9 @@ SET(Dialogs_SRCS
+ )
+ SOURCE_GROUP("Dialogs" FILES ${Dialogs_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Test.qrc)
++qt4_add_resources(Resource_SRCS Resources/Test.qrc)
+ SET(Resource_SRCS
+-# ${Resource_SRCS}
++ ${Resource_SRCS}
+ Resources/Test.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch b/media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch
new file mode 100644
index 000000000000..df2fb191a353
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-gcc46.patch
@@ -0,0 +1,11 @@
+diff -ruN FreeCAD-0.11.4422.orig/src/zipios++/directory.h FreeCAD-0.11.4422/src/zipios++/directory.h
+--- FreeCAD-0.11.4422.orig/src/zipios++/directory.h 2011-02-11 01:48:21.000000000 +0100
++++ FreeCAD-0.11.4422/src/zipios++/directory.h 2011-11-13 22:11:27.000000000 +0100
+@@ -31,6 +31,7 @@
+ #include <string>
+ #include <ctime>
+ #include <stdexcept>
++#include <cstddef>
+
+ // #include <boost.h> Contents of boost.h
+
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-glu.patch b/media-gfx/freecad/files/freecad-0.12.5284-glu.patch
new file mode 100644
index 000000000000..95672153022f
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-glu.patch
@@ -0,0 +1,12 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Image/Gui/GLImageBox.cpp FreeCAD-0.12.5284/src/Mod/Image/Gui/GLImageBox.cpp
+--- FreeCAD-0.12.5284.orig/src/Mod/Image/Gui/GLImageBox.cpp 2012-01-03 13:24:30.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Image/Gui/GLImageBox.cpp 2012-01-06 10:26:38.000000000 +0100
+@@ -27,6 +27,8 @@
+ # include <GL/glext.h>
+ #endif
+
++#include <GL/glu.h>
++
+ #include "GLImageBox.h"
+
+ using namespace ImageGui;
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch b/media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch
new file mode 100644
index 000000000000..d5797567b2c5
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-no-3rdParty.patch
@@ -0,0 +1,9 @@
+--- FreeCAD-0.12.5284/src/CMakeLists.txt
++++ FreeCAD-0.12.5284/src/CMakeLists.txt
+@@ -1,6 +1,5 @@
+
+ add_subdirectory(Build)
+-add_subdirectory(3rdParty)
+ add_subdirectory(Base)
+ add_subdirectory(App)
+ add_subdirectory(Main)
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch b/media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch
new file mode 100644
index 000000000000..d19a92f4d7bc
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-no-permissive.patch
@@ -0,0 +1,40 @@
+--- FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query2Filtered.inl
++++ FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query2Filtered.inl
+@@ -55,7 +55,7 @@
+ Real fLen1 = Math<Real>::Sqrt(fX1*fX1 + fY1*fY1);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1;
+
+- Real fDet2 = Det2(fX0,fY0,fX1,fY1);
++ Real fDet2 = this->Det2(fX0,fY0,fX1,fY1);
+ if (Math<Real>::FAbs(fDet2) >= fScaledUncertainty)
+ {
+ return (fDet2 > (Real)0.0 ? +1 : (fDet2 < (Real)0.0 ? -1 : 0));
+@@ -93,7 +93,7 @@
+ Real fLen2 = Math<Real>::Sqrt(fD2x*fD2x + fD2y*fD2y + fZ2*fZ2);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2;
+
+- Real fDet3 = Det3(fD0x,fD0y,fZ0,fD1x,fD1y,fZ1,fD2x,fD2y,fZ2);
++ Real fDet3 = this->Det3(fD0x,fD0y,fZ0,fD1x,fD1y,fZ1,fD2x,fD2y,fZ2);
+ if (Math<Real>::FAbs(fDet3) >= fScaledUncertainty)
+ {
+ return (fDet3 < (Real)0.0 ? 1 : (fDet3 > (Real)0.0 ? -1 : 0));
+--- FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query3Filtered.in
++++ FreeCAD-0.12.5284/src/Mod/Mesh/App/WildMagic4/Wm4Query3Filtered.inl
+@@ -62,7 +62,7 @@
+ Real fLen2 = Math<Real>::Sqrt(fX2*fX2 + fY2*fY2 + fZ2*fZ2);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2;
+
+- Real fDet3 = Det3(fX0,fY0,fZ0,fX1,fY1,fZ1,fX2,fY2,fZ2);
++ Real fDet3 = this->Det3(fX0,fY0,fZ0,fX1,fY1,fZ1,fX2,fY2,fZ2);
+ if (Math<Real>::FAbs(fDet3) >= fScaledUncertainty)
+ {
+ return (fDet3 > (Real)0.0 ? +1 : (fDet3 < (Real)0.0 ? -1 : 0));
+@@ -115,7 +115,7 @@
+ Real fLen3 = Math<Real>::Sqrt(fD3x*fD3x+fD3y*fD3y+fD3z*fD3z+fW3*fW3);
+ Real fScaledUncertainty = m_fUncertainty*fLen0*fLen1*fLen2*fLen3;
+
+- Real fDet4 = Det4(fD0x,fD0y,fD0z,fW0,fD1x,fD1y,fD1z,fW1,fD2x,
++ Real fDet4 = this->Det4(fD0x,fD0y,fD0z,fW0,fD1x,fD1y,fD1z,fW1,fD2x,
+ fD2y,fD2z,fW2,fD3x,fD3y,fD3z,fW3);
+
+ if (Math<Real>::FAbs(fDet4) >= fScaledUncertainty)
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-nodir.patch b/media-gfx/freecad/files/freecad-0.12.5284-nodir.patch
new file mode 100644
index 000000000000..3e9bbedb47ad
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-nodir.patch
@@ -0,0 +1,21 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/CMakeLists.txt FreeCAD-0.12.5284/src/Mod/CMakeLists.txt
+--- FreeCAD-0.12.5284.orig/src/Mod/CMakeLists.txt 2012-01-03 13:26:12.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/CMakeLists.txt 2012-01-06 12:19:06.000000000 +0100
+@@ -18,7 +18,7 @@
+ MESSAGE("Due to the missing Eigen3 library the Sketcher module won't be built")
+ MESSAGE("Due to the missing Eigen3 library the Robot module won't be built")
+ ENDIF(EIGEN3_FOUND)
+-add_subdirectory(Machining_Distortion)
++# add_subdirectory(Machining_Distortion)
+
+ add_subdirectory(ReverseEngineering)
+ add_subdirectory(MeshPart)
+@@ -32,7 +32,7 @@
+
+ add_subdirectory(Arch)
+
+-add_subdirectory(Assembly)
++# add_subdirectory(Assembly)
+
+ if(FREECAD_BUILD_CAM)
+ add_subdirectory(Cam)
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch b/media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch
new file mode 100644
index 000000000000..337348aa554c
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-nopivy.patch
@@ -0,0 +1,17 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/3rdParty/CMakeLists.txt FreeCAD-0.12.5284/src/3rdParty/CMakeLists.txt
+--- FreeCAD-0.12.5284.orig/src/3rdParty/CMakeLists.txt 2012-01-03 13:30:19.000000000 +0100
++++ FreeCAD-0.12.5284/src/3rdParty/CMakeLists.txt 2012-01-07 15:57:52.000000000 +0100
+@@ -19,13 +19,6 @@
+ # add_subdirectory(Pivy)
+ #endif(MINGW)
+ # applies for Unix, MinGW and Windows with custom LibPack
+-elseif(FREECAD_BUILD_GUI)
+- find_path(COIN_VERSION3 Inventor/scxml/ScXML.h ${COIN3D_INCLUDE_DIR})
+- if (COIN_VERSION3)
+- add_subdirectory(Pivy-0.5)
+- else (COIN_VERSION3)
+- add_subdirectory(Pivy)
+- endif(COIN_VERSION3)
+ endif(FREECAD_BUILD_GUI AND FREECAD_LIBPACK_CHECKFILE6X)
+
+ # For Windows we have all stuff in the LibPack
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch b/media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch
new file mode 100644
index 000000000000..1886f8eca952
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-occ-6.5.5.patch
@@ -0,0 +1,224 @@
+--- FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
+@@ -1370,7 +1370,7 @@
+
+ //circular profile
+ Handle(Geom_Circle) aCirc = new Geom_Circle (gp::XOY(), 1.0);
+- aCirc->Rotate (gp::OZ(), Standard_PI/2.);
++ aCirc->Rotate (gp::OZ(), M_PI/2.);
+
+ //perpendicular section
+ Handle(BRepAdaptor_HCurve) myPath = new BRepAdaptor_HCurve(path_adapt);
+@@ -1469,12 +1469,12 @@
+ }
+
+ gp_Pnt2d aPnt(0, 0);
+- gp_Dir2d aDir(2. * PI, pitch);
++ gp_Dir2d aDir(2. * M_PI, pitch);
+ gp_Ax2d aAx2d(aPnt, aDir);
+
+ Handle(Geom2d_Line) line = new Geom2d_Line(aAx2d);
+ gp_Pnt2d beg = line->Value(0);
+- gp_Pnt2d end = line->Value(sqrt(4.0*PI*PI+pitch*pitch)*(height/pitch));
++ gp_Pnt2d end = line->Value(sqrt(4.0*M_PI*M_PI+pitch*pitch)*(height/pitch));
+ Handle(Geom2d_TrimmedCurve) segm = GCE2d_MakeSegment(beg , end);
+
+ TopoDS_Edge edgeOnSurf = BRepBuilderAPI_MakeEdge(segm , surf);
+@@ -1772,7 +1772,7 @@
+ Standard_Real x3, y3, z3;
+
+ Handle_StlMesh_Mesh aMesh = new StlMesh_Mesh();
+- StlTransfer::BuildIncrementalMesh(this->_Shape, accuracy, aMesh);
++ StlTransfer::BuildIncrementalMesh(this->_Shape, accuracy, false, aMesh);
+ StlMesh_MeshExplorer xp(aMesh);
+ for (Standard_Integer nbd=1;nbd<=aMesh->NbDomains();nbd++) {
+ for (xp.InitTriangle (nbd); xp.MoreTriangle (); xp.NextTriangle ()) {
+--- FreeCAD-0.12.5284/src/Mod/Part/App/FeatureRevolution.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/FeatureRevolution.cpp
+@@ -71,7 +71,7 @@
+ try {
+ // Now, let's get the TopoDS_Shape
+ TopoDS_Shape revolve = base->Shape.getShape().revolve(gp_Ax1(pnt, dir),
+- Angle.getValue()/180.0f*Standard_PI);
++ Angle.getValue()/180.0f*M_PI);
+ if (revolve.IsNull())
+ return new App::DocumentObjectExecReturn("Resulting shape is null");
+ this->Shape.setValue(revolve);
+--- FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
+@@ -263,9 +263,9 @@
+ return new App::DocumentObjectExecReturn("Radius of sphere too small");
+ try {
+ BRepPrimAPI_MakeSphere mkSphere(Radius.getValue(),
+- Angle1.getValue()/180.0f*Standard_PI,
+- Angle2.getValue()/180.0f*Standard_PI,
+- Angle3.getValue()/180.0f*Standard_PI);
++ Angle1.getValue()/180.0f*M_PI,
++ Angle2.getValue()/180.0f*M_PI,
++ Angle3.getValue()/180.0f*M_PI);
+ TopoDS_Shape ResultShape = mkSphere.Shape();
+ this->Shape.setValue(ResultShape);
+ }
+@@ -321,9 +321,9 @@
+ gp_Ax2 ax2(pnt,dir);
+ BRepPrimAPI_MakeSphere mkSphere(ax2,
+ Radius2.getValue(),
+- Angle1.getValue()/180.0f*Standard_PI,
+- Angle2.getValue()/180.0f*Standard_PI,
+- Angle3.getValue()/180.0f*Standard_PI);
++ Angle1.getValue()/180.0f*M_PI,
++ Angle2.getValue()/180.0f*M_PI,
++ Angle3.getValue()/180.0f*M_PI);
+ Standard_Real scale = Radius1.getValue()/Radius2.getValue();
+ gp_Dir xDir = ax2.XDirection();
+ gp_Dir yDir = ax2.YDirection();
+@@ -380,7 +380,7 @@
+ try {
+ BRepPrimAPI_MakeCylinder mkCylr(Radius.getValue(),
+ Height.getValue(),
+- Angle.getValue()/180.0f*Standard_PI);
++ Angle.getValue()/180.0f*M_PI);
+ TopoDS_Shape ResultShape = mkCylr.Shape();
+ this->Shape.setValue(ResultShape);
+ }
+@@ -429,7 +429,7 @@
+ BRepPrimAPI_MakeCone mkCone(Radius1.getValue(),
+ Radius2.getValue(),
+ Height.getValue(),
+- Angle.getValue()/180.0f*Standard_PI);
++ Angle.getValue()/180.0f*M_PI);
+ TopoDS_Shape ResultShape = mkCone.Shape();
+ this->Shape.setValue(ResultShape);
+ }
+@@ -498,9 +498,9 @@
+ #else
+ BRepPrimAPI_MakeTorus mkTorus(Radius1.getValue(),
+ Radius2.getValue(),
+- Angle1.getValue()/180.0f*Standard_PI,
+- Angle2.getValue()/180.0f*Standard_PI,
+- Angle3.getValue()/180.0f*Standard_PI);
++ Angle1.getValue()/180.0f*M_PI,
++ Angle2.getValue()/180.0f*M_PI,
++ Angle3.getValue()/180.0f*M_PI);
+ const TopoDS_Solid& ResultShape = mkTorus.Solid();
+ #endif
+ this->Shape.setValue(ResultShape);
+--- FreeCAD-0.12.5284/src/Mod/Part/App/AppPartPy.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/AppPartPy.cpp
+@@ -492,7 +492,7 @@
+ d.SetCoord(vec.x, vec.y, vec.z);
+ }
+ Handle_Geom_Plane aPlane = new Geom_Plane(p, d);
+- BRepBuilderAPI_MakeFace Face(aPlane, 0.0, length, 0.0, width);
++ BRepBuilderAPI_MakeFace Face(aPlane, 0.0, length, 0.0, width, Precision::Confusion());
+ return new TopoShapeFacePy(new TopoShape((Face.Face())));
+ }
+ catch (Standard_DomainError) {
+--- FreeCAD-0.12.5284/src/Mod/Part/App/GeometrySurfacePyImp.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/GeometrySurfacePyImp.cpp
+@@ -79,7 +79,7 @@
+ s->Bounds(u1,u2,v1,v2);
+ if (!PyArg_ParseTuple(args, "|dddd", &u1,&u2,&v1,&v2))
+ return 0;
+- BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2, Precision::Confusion());
+ TopoDS_Shape sh = mkBuilder.Shape();
+ return new TopoShapeFacePy(new TopoShape(sh));
+ }
+--- FreeCAD-0.12.5284/src/Mod/Part/App/Geometry.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/Geometry.cpp
+@@ -1252,7 +1252,7 @@
+ Handle_Geom_Surface s = Handle_Geom_Surface::DownCast(handle());
+ Standard_Real u1,u2,v1,v2;
+ s->Bounds(u1,u2,v1,v2);
+- BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(s, u1, u2, v1, v2, Precision::Confusion());
+ return mkBuilder.Shape();
+ }
+
+--- FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/PrimitiveFeature.cpp
+@@ -191,7 +191,7 @@
+ gp_Pnt pnt(0.0,0.0,0.0);
+ gp_Dir dir(0.0,0.0,1.0);
+ Handle_Geom_Plane aPlane = new Geom_Plane(pnt, dir);
+- BRepBuilderAPI_MakeFace mkFace(aPlane, 0.0, L, 0.0, W);
++ BRepBuilderAPI_MakeFace mkFace(aPlane, 0.0, L, 0.0, W, Precision::Confusion());
+
+ const char *error=0;
+ switch (mkFace.Error())
+--- FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/TopoShape.cpp
+@@ -1338,7 +1338,7 @@
+ double u1,u2,v1,v2;
+ surf->Bounds(u1,u2,v1,v2);
+
+- BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, v1, v2, Precision::Confusion());
+ return mkBuilder.Face();
+ }
+
+@@ -1391,7 +1391,7 @@
+
+ Standard_Real u1,u2,v1,v2;
+ mySurface->Bounds(u1,u2,v1,v2);
+- BRepBuilderAPI_MakeFace mkBuilder(mySurface, u1, u2, v1, v2);
++ BRepBuilderAPI_MakeFace mkBuilder(mySurface, u1, u2, v1, v2, Precision::Confusion());
+ return mkBuilder.Shape();
+ }
+
+@@ -1443,7 +1443,7 @@
+ mkSweep.Perform(tol, Standard_False, GeomAbs_C1, BSplCLib::MaxDegree(), 1000);
+
+ const Handle_Geom_Surface& surf = mkSweep.Surface();
+- BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, vmin, vmax);
++ BRepBuilderAPI_MakeFace mkBuilder(surf, umin, umax, vmin, vmax, Precision::Confusion());
+ return mkBuilder.Face();
+ }
+
+--- FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeFacePyImp.cpp
++++ FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeFacePyImp.cpp
+@@ -135,7 +135,7 @@
+ return -1;
+ }
+
+- BRepBuilderAPI_MakeFace mkFace(S);
++ BRepBuilderAPI_MakeFace mkFace(S, Precision::Confusion());
+ if (bound) {
+ Py::List list(bound);
+ for (Py::List::iterator it = list.begin(); it != list.end(); ++it) {
+--- FreeCAD-0.12.5284/src/Mod/Fem/App/AppFemPy.cpp
++++ FreeCAD-0.12.5284/src/Mod/Fem/App/AppFemPy.cpp
+@@ -498,12 +498,12 @@
+
+ //Do a Monte Carlo approach and start from the Principal Axis System
+ //and rotate +/- 60 around each axis in a first iteration
+- double angle_range_min_x=-PI/3.0,angle_range_max_x=PI/3.0,
+- angle_range_min_y=-PI/3.0,angle_range_max_y=PI/3.0,
+- angle_range_min_z=-PI/3.0,angle_range_max_z=PI/3.0;
++ double angle_range_min_x=-M_PI/3.0,angle_range_max_x=M_PI/3.0,
++ angle_range_min_y=-M_PI/3.0,angle_range_max_y=M_PI/3.0,
++ angle_range_min_z=-M_PI/3.0,angle_range_max_z=M_PI/3.0;
+
+ //We rotate until we are 0.1 sure to be in the right position
+- for (step_size = (2.0*PI/it_steps);step_size>(2.0*PI/3600.0);step_size=(2.0*PI/it_steps))
++ for (step_size = (2.0*M_PI/it_steps);step_size>(2.0*M_PI/3600.0);step_size=(2.0*M_PI/it_steps))
+ {
+ for(alpha_x=angle_range_min_x;alpha_x<angle_range_max_x;alpha_x=alpha_x+step_size)
+ {
+@@ -744,11 +744,11 @@
+
+ //Do a Monte Carlo approach and start from the Principal Axis System
+ //and rotate +/- 60 around each axis in a first iteration
+- double angle_range_min_x=-PI/3.0,angle_range_max_x=PI/3.0,
+- angle_range_min_y=-PI/3.0,angle_range_max_y=PI/3.0,
+- angle_range_min_z=-PI/3.0,angle_range_max_z=PI/3.0;
++ double angle_range_min_x=-M_PI/3.0,angle_range_max_x=M_PI/3.0,
++ angle_range_min_y=-M_PI/3.0,angle_range_max_y=M_PI/3.0,
++ angle_range_min_z=-M_PI/3.0,angle_range_max_z=M_PI/3.0;
+
+- for (step_size = (2.0*PI/it_steps);step_size>(2.0*PI/360.0);step_size=(2.0*PI/it_steps))
++ for (step_size = (2.0*M_PI/it_steps);step_size>(2.0*M_PI/360.0);step_size=(2.0*M_PI/it_steps))
+ {
+ for(alpha_x=angle_range_min_x;alpha_x<angle_range_max_x;alpha_x=alpha_x+step_size)
+ {
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-occ-6.6.patch b/media-gfx/freecad/files/freecad-0.12.5284-occ-6.6.patch
new file mode 100644
index 000000000000..e3722e8d6c75
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-occ-6.6.patch
@@ -0,0 +1,69 @@
+diff -Naur freecad-0.12.5284-r3-orig/work/FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialPrism_3D.cpp freecad-0.12.5284-r3/work/FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialPrism_3D.cpp
+--- freecad-0.12.5284-r3-orig/work/FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialPrism_3D.cpp 2013-09-15 22:53:34.135326244 -0700
++++ freecad-0.12.5284-r3/work/FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialPrism_3D.cpp 2013-09-15 22:54:04.493854451 -0700
+@@ -42,9 +42,13 @@
+
+ #include "utilities.h"
+
++#include <Standard_Version.hxx>
+ #include <BRepAdaptor_Curve.hxx>
+ #include <BRepBuilderAPI_MakeEdge.hxx>
+ #include <BRepTools.hxx>
++#if OCC_VERSION_HEX >= 0x060600
++#include <BRepClass3d.hxx>
++#endif
+ #include <BRep_Tool.hxx>
+ #include <TopExp_Explorer.hxx>
+ #include <TopoDS.hxx>
+@@ -161,7 +165,11 @@
+
+ // get 2 shells
+ TopoDS_Solid solid = TopoDS::Solid( aShape );
++#if OCC_VERSION_HEX >= 0x060600
++ TopoDS_Shell outerShell = BRepClass3d::OuterShell( solid );
++#else
+ TopoDS_Shell outerShell = BRepTools::OuterShell( solid );
++#endif
+ TopoDS_Shape innerShell;
+ int nbShells = 0;
+ for ( TopoDS_Iterator It (solid); It.More(); It.Next(), ++nbShells )
+@@ -401,7 +409,11 @@
+ {
+ // get 2 shells
+ TopoDS_Solid solid = TopoDS::Solid( aShape );
++#if OCC_VERSION_HEX >= 0x060600
++ TopoDS_Shell outerShell = BRepClass3d::OuterShell( solid );
++#else
+ TopoDS_Shell outerShell = BRepTools::OuterShell( solid );
++#endif
+ TopoDS_Shape innerShell;
+ int nbShells = 0;
+ for ( TopoDS_Iterator It (solid); It.More(); It.Next(), ++nbShells )
+diff -Naur freecad-0.12.5284-r3-orig/work/FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeSolidPyImp.cpp freecad-0.12.5284-r3/work/FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeSolidPyImp.cpp
+--- freecad-0.12.5284-r3-orig/work/FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeSolidPyImp.cpp 2013-09-15 22:53:34.094324180 -0700
++++ freecad-0.12.5284-r3/work/FreeCAD-0.12.5284/src/Mod/Part/App/TopoShapeSolidPyImp.cpp 2013-09-15 22:54:24.414857241 -0700
+@@ -23,8 +23,12 @@
+
+ #include "PreCompiled.h"
+
++#include <Standard_Version.hxx>
+ #include <BRepGProp.hxx>
+ #include <BRepTools.hxx>
++#if OCC_VERSION_HEX >= 0x060600
++#include <BRepClass3d.hxx>
++#endif
+ #include <GProp_GProps.hxx>
+ #include <BRepBuilderAPI_MakeSolid.hxx>
+ #include <TopExp_Explorer.hxx>
+@@ -104,7 +108,11 @@
+ TopoDS_Shell shell;
+ const TopoDS_Shape& shape = getTopoShapePtr()->_Shape;
+ if (!shape.IsNull() && shape.ShapeType() == TopAbs_SOLID)
++#if OCC_VERSION_HEX >= 0x060600
++ shell = BRepClass3d::OuterShell(TopoDS::Solid(shape));
++#else
+ shell = BRepTools::OuterShell(TopoDS::Solid(shape));
++#endif
+ return Py::Object(new TopoShapeShellPy(new TopoShape(shell)),true);
+ }
+
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch b/media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch
new file mode 100644
index 000000000000..1548c2f1f89d
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-qt3support.patch
@@ -0,0 +1,36 @@
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Arch/Resources/ui/archprefs-base.ui FreeCAD-0.12.5284/src/Mod/Arch/Resources/ui/archprefs-base.ui
+--- FreeCAD-0.12.5284.orig/src/Mod/Arch/Resources/ui/archprefs-base.ui 2012-01-03 13:26:11.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Arch/Resources/ui/archprefs-base.ui 2012-01-07 17:15:29.000000000 +0100
+@@ -133,7 +133,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::ColorButton</class>
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-base.ui FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-base.ui
+--- FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-base.ui 2012-01-03 13:25:30.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-base.ui 2012-01-07 17:15:11.000000000 +0100
+@@ -957,7 +957,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
+diff -ruN FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-import.ui FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-import.ui
+--- FreeCAD-0.12.5284.orig/src/Mod/Draft/Resources/ui/userprefs-import.ui 2012-01-03 13:25:30.000000000 +0100
++++ FreeCAD-0.12.5284/src/Mod/Draft/Resources/ui/userprefs-import.ui 2012-01-07 17:14:50.000000000 +0100
+@@ -411,7 +411,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch b/media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch
new file mode 100644
index 000000000000..b768178ed78a
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-removeoldswig.patch
@@ -0,0 +1,111 @@
+--- src/Base/Interpreter.cpp.old 2010-08-27 16:24:16.000000000 +0200
++++ src/Base/Interpreter.cpp 2011-12-24 00:13:52.356641021 +0100
+@@ -503,11 +503,6 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ namespace Swig_python { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+ #endif
+-namespace Swig_1_3_25 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_33 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_36 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_38 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+-namespace Swig_1_3_40 { extern int createSWIGPointerObj_T(const char* TypeName, void* obj, PyObject** ptr, int own); }
+
+ PyObject* InterpreterSingleton::createSWIGPointerObj(const char* Module, const char* TypeName, void* Pointer, int own)
+ {
+@@ -517,21 +512,6 @@
+ int version = getSWIGVersionFromModule(Module);
+ switch (version&0xff)
+ {
+- case 25:
+- result = Swig_1_3_25::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 33:
+- result = Swig_1_3_33::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 36:
+- result = Swig_1_3_36::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 38:
+- result = Swig_1_3_38::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+- case 40:
+- result = Swig_1_3_40::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+- break;
+ default:
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ result = Swig_python::createSWIGPointerObj_T(TypeName, Pointer, &proxy, own);
+@@ -550,11 +530,6 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ namespace Swig_python { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+ #endif
+-namespace Swig_1_3_25 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_33 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_36 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_38 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+-namespace Swig_1_3_40 { extern int convertSWIGPointerObj_T(const char* TypeName, PyObject* obj, void** ptr, int flags); }
+
+ bool InterpreterSingleton::convertSWIGPointerObj(const char* Module, const char* TypeName, PyObject* obj, void** ptr, int flags)
+ {
+@@ -563,21 +538,6 @@
+ int version = getSWIGVersionFromModule(Module);
+ switch (version&0xff)
+ {
+- case 25:
+- result = Swig_1_3_25::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 33:
+- result = Swig_1_3_33::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 36:
+- result = Swig_1_3_36::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 38:
+- result = Swig_1_3_38::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+- case 40:
+- result = Swig_1_3_40::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+- break;
+ default:
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ result = Swig_python::convertSWIGPointerObj_T(TypeName, obj, ptr, flags);
+@@ -596,11 +556,6 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ namespace Swig_python { extern void cleanupSWIG_T(const char* TypeName); }
+ #endif
+-namespace Swig_1_3_25 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_33 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_36 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_38 { extern void cleanupSWIG_T(const char* TypeName); }
+-namespace Swig_1_3_40 { extern void cleanupSWIG_T(const char* TypeName); }
+
+ void InterpreterSingleton::cleanupSWIG(const char* TypeName)
+ {
+@@ -608,9 +563,4 @@
+ #if (defined(HAVE_SWIG) && (HAVE_SWIG == 1))
+ Swig_python::cleanupSWIG_T(TypeName);
+ #endif
+- Swig_1_3_25::cleanupSWIG_T(TypeName);
+- Swig_1_3_33::cleanupSWIG_T(TypeName);
+- Swig_1_3_36::cleanupSWIG_T(TypeName);
+- Swig_1_3_38::cleanupSWIG_T(TypeName);
+- Swig_1_3_40::cleanupSWIG_T(TypeName);
+ }
+--- src/Base/Makefile.am.old 2011-12-24 00:14:25.625540687 +0100
++++ src/Base/Makefile.am 2010-10-27 12:29:37.000000000 +0200
+@@ -65,16 +65,6 @@
+ Swap.cpp \
+ swigpyrun.inl \
+ swigpyrun.cpp \
+- swigpyrun_1.3.25.cpp \
+- swigpyrun_1.3.25.h \
+- swigpyrun_1.3.33.cpp \
+- swigpyrun_1.3.33.h \
+- swigpyrun_1.3.36.cpp \
+- swigpyrun_1.3.36.h \
+- swigpyrun_1.3.38.cpp \
+- swigpyrun_1.3.38.h \
+- swigpyrun_1.3.40.cpp \
+- swigpyrun_1.3.40.h \
+ TimeInfo.cpp \
+ Type.cpp \
+ Tools.cpp \
diff --git a/media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch b/media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch
new file mode 100644
index 000000000000..50e30e6cfc09
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.12.5284-salomesmesh-occ-6.5.5.patch
@@ -0,0 +1,228 @@
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshEditor.cpp
+@@ -1374,7 +1374,7 @@
+ const SMDS_MeshNode * n1,
+ const SMDS_MeshNode * n2)
+ {
+- double angle = 2*PI; // bad angle
++ double angle = 2*M_PI; // bad angle
+
+ // get normals
+ SMESH::Controls::TSequenceOfXYZ P1, P2;
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_Pattern.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/SMESH/SMESH_Pattern.cpp
+@@ -1234,7 +1234,7 @@
+ maxLen2 = Max( maxLen2, ( n[1]->myUV - n[2]->myUV ).SquareModulus() );
+ }
+ maxLen2 = Max( maxLen2, ( n[2]->myUV - node->myUV ).SquareModulus() );
+- minDiag = sqrt( maxLen2 ) * PI / 60.; // ~ maxLen * Sin( 3 deg )
++ minDiag = sqrt( maxLen2 ) * M_PI / 60.; // ~ maxLen * Sin( 3 deg )
+ }
+
+ // check if newUV is behind 3 dirs: n[0]-n[1], n[1]-n[2] and n[0]-n[2]
+@@ -1721,9 +1721,9 @@
+ if ( iDir == 1 )
+ aNorm[ iDir ].Reverse(); // along iDir isoline
+
+- double angle = tgt1.Angle( tgt2 ); // [-PI, PI]
++ double angle = tgt1.Angle( tgt2 ); // [-M_PI, M_PI]
+ // maybe angle is more than |PI|
+- if ( Abs( angle ) > PI / 2. ) {
++ if ( Abs( angle ) > M_PI / 2. ) {
+ // check direction of the last but one perpendicular isoline
+ TIsoNode* prevNode = bndNode2->GetNext( iDir, 0 );
+ bndNode1 = prevNode->GetBoundaryNode( 1 - iDir, 0 );
+@@ -1734,7 +1734,7 @@
+ double angle2 = tgt1.Angle( isoDir );
+ //cout << " isoDir: "<< isoDir.X() <<" "<<isoDir.Y() << " ANGLE: "<< angle << " "<<angle2<<endl;
+ if (angle2 * angle < 0 && // check the sign of an angle close to PI
+- Abs ( Abs ( angle ) - PI ) <= PI / 180. ) {
++ Abs ( Abs ( angle ) - M_PI ) <= M_PI / 180. ) {
+ //MESSAGE("REVERSE ANGLE");
+ angle = -angle;
+ }
+@@ -1746,7 +1746,7 @@
+ // cout << "bndNode1: " << bndNode1->myUV.X()<<" "<<bndNode1->myUV.Y()<< endl;
+ // cout << "bndNode2: " << bndNode2->myUV.X()<<" "<<bndNode2->myUV.Y()<<endl;
+ // cout <<" tgt: " << tgt1.X()<<" "<<tgt1.Y()<<" "<< tgt2.X()<<" "<<tgt2.Y()<<endl;
+- angle += ( angle < 0 ) ? 2. * PI : -2. * PI;
++ angle += ( angle < 0 ) ? 2. * M_PI : -2. * M_PI;
+ }
+ }
+ aTgt[ iDir ] = tgt1.Rotated( angle * ratio[ iDir ] ).XY();
+@@ -1785,7 +1785,7 @@
+ double initAngle = initTgt1.Angle( initTgt2 );
+ double angle = node->myDir[0].Angle( node->myDir[1] );
+ if ( reversed ) angle = -angle;
+- if ( initAngle > angle && initAngle - angle > PI / 2.1 ) {
++ if ( initAngle > angle && initAngle - angle > M_PI / 2.1 ) {
+ // find a close internal node
+ TIsoNode* nClose = 0;
+ list< TIsoNode* > testNodes;
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/Controls/SMESH_Controls.cpp
+@@ -332,12 +332,12 @@
+ aMin = Min(aMin,A0);
+ }
+
+- return aMin * 180.0 / PI;
++ return aMin * 180.0 / M_PI;
+ }
+
+ double MinimumAngle::GetBadRate( double Value, int nbNodes ) const
+ {
+- //const double aBestAngle = PI / nbNodes;
++ //const double aBestAngle = M_PI / nbNodes;
+ const double aBestAngle = 180.0 - ( 360.0 / double(nbNodes) );
+ return ( fabs( aBestAngle - Value ));
+ }
+@@ -831,19 +831,19 @@
+ gp_XYZ N = GI.Crossed( GJ );
+
+ if ( N.Modulus() < gp::Resolution() )
+- return PI / 2;
++ return M_PI / 2;
+
+ N.Normalize();
+
+ double H = ( thePnt2 - theG ).Dot( N );
+- return asin( fabs( H / L ) ) * 180. / PI;
++ return asin( fabs( H / L ) ) * 180. / M_PI;
+ }
+
+ double Warping::GetBadRate( double Value, int /*nbNodes*/ ) const
+ {
+ // the warp is in the range [0.0,PI/2]
+ // 0.0 = good (no warp)
+- // PI/2 = bad (face pliee)
++ // M_PI/2 = bad (face pliee)
+ return Value;
+ }
+
+@@ -915,14 +915,14 @@
+ return 0.;
+
+ // Compute skew
+- static double PI2 = PI / 2.;
++ static double PI2 = M_PI / 2.;
+ if ( P.size() == 3 )
+ {
+ double A0 = fabs( PI2 - skewAngle( P( 3 ), P( 1 ), P( 2 ) ) );
+ double A1 = fabs( PI2 - skewAngle( P( 1 ), P( 2 ), P( 3 ) ) );
+ double A2 = fabs( PI2 - skewAngle( P( 2 ), P( 3 ), P( 1 ) ) );
+
+- return Max( A0, Max( A1, A2 ) ) * 180. / PI;
++ return Max( A0, Max( A1, A2 ) ) * 180. / M_PI;
+ }
+ else
+ {
+@@ -939,7 +939,7 @@
+ if ( A < Precision::Angular() )
+ return 0.;
+
+- return A * 180. / PI;
++ return A * 180. / M_PI;
+ }
+ }
+
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_CompositeHexa_3D.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_CompositeHexa_3D.cpp
+@@ -812,7 +812,7 @@
+ int iMyCommon;
+ if ( mySides.Contain( otherSide, &iMyCommon ) ) {
+ // check if normals of two faces are collinear at all vertices of a otherSide
+- const double angleTol = PI / 180 / 2;
++ const double angleTol = M_PI / 180 / 2;
+ int iV, nbV = otherSide.NbVertices(), nbCollinear = 0;
+ for ( iV = 0; iV < nbV; ++iV )
+ {
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cpp
+@@ -355,8 +355,8 @@
+ for(; itn != theNodes.end(); itn++ ) {
+ CNodes.push_back( (*itn).second );
+ double ang = (*itn).first - fang;
+- if( ang>PI ) ang = ang - 2*PI;
+- if( ang<-PI ) ang = ang + 2*PI;
++ if( ang>M_PI ) ang = ang - 2*M_PI;
++ if( ang<-M_PI ) ang = ang + 2*M_PI;
+ Angles.Append( ang );
+ }
+ }
+@@ -404,7 +404,7 @@
+ // a segment of line
+ double fp, lp;
+ Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast( getCurve( CircEdge, &fp, &lp ));
+- if( fabs(fabs(lp-fp)-PI) > Precision::Confusion() ) {
++ if( fabs(fabs(lp-fp)-M_PI) > Precision::Confusion() ) {
+ // not half of circle
+ return error(COMPERR_BAD_SHAPE);
+ }
+@@ -434,8 +434,8 @@
+ for(; itn != theNodes.end(); itn++ ) {
+ CNodes.push_back( (*itn).second );
+ double ang = (*itn).first - fang;
+- if( ang>PI ) ang = ang - 2*PI;
+- if( ang<-PI ) ang = ang + 2*PI;
++ if( ang>M_PI ) ang = ang - 2*M_PI;
++ if( ang<-M_PI ) ang = ang + 2*M_PI;
+ Angles.Append( ang );
+ }
+ const SMDS_MeshNode* NF = theNodes.begin()->second;
+@@ -587,8 +587,8 @@
+ for(; itn != theNodes.end(); itn++ ) {
+ CNodes.push_back( (*itn).second );
+ double ang = (*itn).first - fang;
+- if( ang>PI ) ang = ang - 2*PI;
+- if( ang<-PI ) ang = ang + 2*PI;
++ if( ang>M_PI ) ang = ang - 2*M_PI;
++ if( ang<-M_PI ) ang = ang + 2*M_PI;
+ Angles.Append( ang );
+ }
+ P1 = gp_Pnt( NF->X(), NF->Y(), NF->Z() );
+@@ -1055,7 +1055,7 @@
+ aLine = Handle(Geom_Line)::DownCast(C3);
+ }
+ bool ok = !aCirc.IsNull() && !aLine.IsNull();
+- if( fabs(fabs(lp-fp)-PI) > Precision::Confusion() ) {
++ if( fabs(fabs(lp-fp)-M_PI) > Precision::Confusion() ) {
+ // not half of circle
+ ok = false;
+ }
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cpp
+@@ -1037,19 +1037,19 @@
+ double ang1 = fabs(VN1.Angle(VI1));
+ double ang2 = fabs(VN2.Angle(VI2));
+ double h1,h2;
+- if(ang1>PI/3.)
++ if(ang1>M_PI/3.)
+ h1 = VI1.Magnitude()/2;
+ else
+ h1 = VI1.Magnitude()*cos(ang1);
+- if(ang2>PI/3.)
++ if(ang2>M_PI/3.)
+ h2 = VI2.Magnitude()/2;
+ else
+ h2 = VI2.Magnitude()*cos(ang2);
+ double coef1 = 0.5;
+- if(ang1<PI/3)
++ if(ang1<M_PI/3)
+ coef1 -= cos(ang1)*0.25;
+ double coef2 = 0.5;
+- if(ang2<PI/3)
++ if(ang2<M_PI/3)
+ coef2 -= cos(ang1)*0.25;
+
+ SMDS_MeshNode* aNode1 = const_cast<SMDS_MeshNode*>(Ns1[4]);
+--- FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_AutomaticLength.cpp
++++ FreeCAD-0.12.5284/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_AutomaticLength.cpp
+@@ -116,7 +116,7 @@
+ */
+ //================================================================================
+
+- const double a14divPI = 14. / PI;
++ const double a14divPI = 14. / M_PI;
+
+ inline double segLength(double S0, double edgeLen, double minLen )
+ {
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-CMakefile.patch b/media-gfx/freecad/files/freecad-0.13.1830-CMakefile.patch
new file mode 100644
index 000000000000..58e99587f992
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-CMakefile.patch
@@ -0,0 +1,21 @@
+--- CMakeLists.txt 2014-01-06 13:46:44.516313646 +0100
++++ CMakeLists.txt.new 2014-01-06 13:58:16.035280554 +0100
+@@ -69,9 +69,15 @@
+ SET(INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+ endif(WIN32)
+
+-SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
+-SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
+-SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
++if(NOT CMAKE_INSTALL_DATADIR)
++ SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
++endif(NOT CMAKE_INSTALL_DATADIR)
++if(NOT CMAKE_INSTALL_INCLUDEDIR)
++ SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
++endif(NOT CMAKE_INSTALL_INCLUDEDIR)
++if(NOT CMAKE_INSTALL_DOCDIR)
++ SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
++endif(NOT CMAKE_INSTALL_DOCDIR)
+
+ # used as compiler defines
+ SET(RESOURCEDIR "${CMAKE_INSTALL_DATADIR}")
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-avoid-include-salome.patch b/media-gfx/freecad/files/freecad-0.13.1830-avoid-include-salome.patch
new file mode 100644
index 000000000000..0db660948579
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-avoid-include-salome.patch
@@ -0,0 +1,11 @@
+--- src/3rdParty/salomesmesh/CMakeLists.txt 2014-01-06 14:06:05.495258088 +0100
++++ src/3rdParty/salomesmesh/CMakeLists.txt.new 2014-01-06 15:05:53.316086394 +0100
+@@ -206,8 +206,4 @@
+ DESTINATION lib
+ )
+ # Headers are installed by default in /usr/local/include/SMESH-5.1.2.7
+- INSTALL(DIRECTORY inc/
+- DESTINATION include
+- FILES_MATCHING PATTERN "*.h*"
+- )
+ ENDIF(UNIX)
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-cmake-2.8.12.patch b/media-gfx/freecad/files/freecad-0.13.1830-cmake-2.8.12.patch
new file mode 100644
index 000000000000..e0e0e9fc02a7
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-cmake-2.8.12.patch
@@ -0,0 +1,294 @@
+commit f061b6f7ea667e1d6944590d67b9b5b6659e4ba0
+Author: wmayer <wmayer@users.sourceforge.net>
+Date: Tue Oct 22 10:33:18 2013 +0200
+
+ 0001278: No build possible with current CMake version 2.8.12
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 862cd7b..11c9b43 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -270,14 +270,14 @@ MARK_AS_ADVANCED(FORCE FREECAD_LIBPACK_CHECKFILE6X FREECAD_LIBPACK_CHECKFILE7X)
+ macro(fc_wrap_cpp outfiles )
+ # get include dirs
+ QT4_GET_MOC_FLAGS(moc_flags)
+- QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
++ QT4_EXTRACT_OPTIONS(moc_files moc_options moc_target ${ARGN})
+ # fixes bug 0000585: bug with boost 1.48
+ SET(moc_options ${moc_options} -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
+
+ foreach(it ${moc_files})
+ get_filename_component(it ${it} ABSOLUTE)
+ QT4_MAKE_OUTPUT_FILE(${it} moc_ cpp outfile)
+- QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}")
++ QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}" "${moc_target}")
+ set(${outfiles} ${${outfiles}} ${outfile})
+ add_file_dependencies(${it} ${outfile})
+ endforeach(it)
+diff --git a/cMake/FreeCadMacros.cmake b/cMake/FreeCadMacros.cmake
+index 5fa7680..78bc0b8 100644
+--- a/cMake/FreeCadMacros.cmake
++++ b/cMake/FreeCadMacros.cmake
+@@ -168,69 +168,6 @@ endmacro(generate_from_py)
+ #endmacro(qt4_wrap_ui)
+
+
+-# This is a special version of the built in macro qt4_add_resources that generates .cpp files
+-#
+-#macro(fc_add_resources outfiles )
+-# #QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
+-# set(ARGN )
+-# foreach (it ${rcc_files})
+-# get_filename_component(outfilename ${it} NAME_WE)
+-# get_filename_component(infile ${it} ABSOLUTE)
+-# get_filename_component(rc_path ${infile} PATH)
+-# set(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp)
+-# # parse file for dependencies
+-# # all files are absolute paths or relative to the location of the qrc file
+-# file(READ "${infile}" _RC_FILE_CONTENTS)
+-# string(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+-# set(_RC_DEPENDS)
+-# foreach(_RC_FILE ${_RC_FILES})
+-# string(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
+-# string(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
+-# if(NOT _ABS_PATH_INDICATOR)
+-# set(_RC_FILE "${rc_path}/${_RC_FILE}")
+-# endif(NOT _ABS_PATH_INDICATOR)
+-# set(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
+-# endforeach(_RC_FILE)
+-# add_custom_command(OUTPUT ${outfile}
+-# COMMAND ${QT_RCC_EXECUTABLE}
+-# ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
+-# MAIN_DEPENDENCY ${infile}
+-# DEPENDS ${_RC_DEPENDS})
+-# set(${outfiles} ${${outfiles}} ${outfile})
+-# endforeach (it)
+-#endmacro(fc_add_resources)
+-
+-MACRO (fc_add_resources outfiles )
+- QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
+-
+- FOREACH (it ${rcc_files})
+- GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
+- GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+- GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
+- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cpp)
+- # parse file for dependencies
+- # all files are absolute paths or relative to the location of the qrc file
+- FILE(READ "${infile}" _RC_FILE_CONTENTS)
+- STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+- SET(_RC_DEPENDS)
+- FOREACH(_RC_FILE ${_RC_FILES})
+- STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
+- STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
+- IF(NOT _ABS_PATH_INDICATOR)
+- SET(_RC_FILE "${rc_path}/${_RC_FILE}")
+- ENDIF(NOT _ABS_PATH_INDICATOR)
+- SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
+- ENDFOREACH(_RC_FILE)
+- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+- COMMAND ${QT_RCC_EXECUTABLE}
+- ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
+- MAIN_DEPENDENCY ${infile}
+- DEPENDS ${_RC_DEPENDS})
+- SET(${outfiles} ${${outfiles}} ${outfile})
+- ENDFOREACH (it)
+-
+-ENDMACRO (fc_add_resources)
+-
+ MACRO(ADD_MSVC_PRECOMPILED_HEADER PrecompiledHeader PrecompiledSource SourcesVar)
+ IF(MSVC)
+ GET_FILENAME_COMPONENT(PrecompiledBasename ${PrecompiledHeader} NAME_WE)
+diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt
+index b9f1939..124c4f8 100644
+--- a/src/Gui/CMakeLists.txt
++++ b/src/Gui/CMakeLists.txt
+@@ -608,7 +608,7 @@ SOURCE_GROUP("Widget\\iisTaskPanel\\Mocs" FILES ${iis_MOC_SRCS})
+ #SET(Resource_RCS
+ # Icons/resource.qrc
+ # Language/translation.qrc)
+-#fc_add_resources(Resource_SRCS ${Resource_RCS})
++#qt4_add_resources(Resource_SRCS ${Resource_RCS})
+ #SET(Resource_SRCS
+ # ${Resource_SRCS}
+ # Icons/resource.qrc
+diff --git a/src/Mod/Image/Gui/AppImageGui.cpp b/src/Mod/Image/Gui/AppImageGui.cpp
+index c26129e..c817860 100644
+--- a/src/Mod/Image/Gui/AppImageGui.cpp
++++ b/src/Mod/Image/Gui/AppImageGui.cpp
+@@ -20,7 +20,6 @@
+ #include <Gui/Language/Translator.h>
+ #include "Workbench.h"
+ #include "ViewProviderImagePlane.h"
+-#include "qrc_Image.cpp"
+
+ // use a different name to CreateCommand()
+ void CreateImageCommands(void);
+diff --git a/src/Mod/Image/Gui/CMakeLists.txt b/src/Mod/Image/Gui/CMakeLists.txt
+index cc967ee..4edb462 100644
+--- a/src/Mod/Image/Gui/CMakeLists.txt
++++ b/src/Mod/Image/Gui/CMakeLists.txt
+@@ -30,8 +30,7 @@ SET(ImageGui_RES_SRCS
+ Resources/Image.qrc
+ )
+
+-fc_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
+-#QT4_ADD_RESOURCES(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
++qt4_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
+
+ set(ImageGui_UIC_SRCS
+ ImageOrientationDialog.ui
+@@ -40,7 +39,7 @@ qt4_wrap_ui(ImageGui_UIC_HDRS ${ImageGui_UIC_SRCS})
+
+ SET(ImageGui_SRCS
+ # ${ImageGui_MOC_SRCS}
+-# ${ImageGui_QRC_SRCS}
++ ${ImageGui_QRC_SRCS}
+ AppImageGui.cpp
+ AppImageGuiPy.cpp
+ Command.cpp
+diff --git a/src/Mod/Mesh/Gui/AppMeshGui.cpp b/src/Mod/Mesh/Gui/AppMeshGui.cpp
+index 624d569..8fb68cf 100644
+--- a/src/Mod/Mesh/Gui/AppMeshGui.cpp
++++ b/src/Mod/Mesh/Gui/AppMeshGui.cpp
+@@ -50,7 +50,6 @@
+ #include "ViewProviderDefects.h"
+ #include "ViewProviderPython.h"
+ #include "Workbench.h"
+-#include "qrc_Mesh.cpp"
+
+
+ // use a different name to CreateCommand()
+diff --git a/src/Mod/Mesh/Gui/CMakeLists.txt b/src/Mod/Mesh/Gui/CMakeLists.txt
+index cafca6c..9ef1dae 100644
+--- a/src/Mod/Mesh/Gui/CMakeLists.txt
++++ b/src/Mod/Mesh/Gui/CMakeLists.txt
+@@ -75,9 +75,9 @@ SET(Inventor_SRCS
+ )
+ SOURCE_GROUP("Inventor" FILES ${Inventor_SRCS})
+
+-fc_add_resources(resource_SRCS Resources/Mesh.qrc)
++qt4_add_resources(resource_SRCS Resources/Mesh.qrc)
+ SET(resource_SRCS
+-# ${resource_SRCS}
++ ${resource_SRCS}
+ Resources/Mesh.qrc
+ )
+ SOURCE_GROUP("resource" FILES ${resource_SRCS})
+diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp
+index 9c3ebb3..ae84470 100644
+--- a/src/Mod/Part/Gui/AppPartGui.cpp
++++ b/src/Mod/Part/Gui/AppPartGui.cpp
+@@ -57,7 +57,6 @@
+ #include "Workbench.h"
+
+ #include <Gui/Language/Translator.h>
+-#include "qrc_Part.cpp"
+
+ #include "Resources/icons/PartFeature.xpm"
+ #include "Resources/icons/PartFeatureImport.xpm"
+diff --git a/src/Mod/Part/Gui/CMakeLists.txt b/src/Mod/Part/Gui/CMakeLists.txt
+index 375f6e4..87c4c28 100644
+--- a/src/Mod/Part/Gui/CMakeLists.txt
++++ b/src/Mod/Part/Gui/CMakeLists.txt
+@@ -50,7 +50,7 @@ set(PartGui_MOC_HDRS
+ fc_wrap_cpp(PartGui_MOC_SRCS ${PartGui_MOC_HDRS})
+ SOURCE_GROUP("Moc" FILES ${PartGui_MOC_SRCS})
+
+-fc_add_resources(PartGui_QRC_SRCS Resources/Part.qrc)
++qt4_add_resources(PartGui_QRC_SRCS Resources/Part.qrc)
+
+ set(PartGui_UIC_SRCS
+ CrossSections.ui
+@@ -77,7 +77,7 @@ set(PartGui_UIC_SRCS
+ qt4_wrap_ui(PartGui_UIC_HDRS ${PartGui_UIC_SRCS})
+
+ SET(PartGui_SRCS
+-# ${PartGui_QRC_SRCS}
++ ${PartGui_QRC_SRCS}
+ ${PartGui_UIC_HDRS}
+ AppPartGui.cpp
+ Command.cpp
+diff --git a/src/Mod/Points/Gui/AppPointsGui.cpp b/src/Mod/Points/Gui/AppPointsGui.cpp
+index 9acd98e..953d3e2 100644
+--- a/src/Mod/Points/Gui/AppPointsGui.cpp
++++ b/src/Mod/Points/Gui/AppPointsGui.cpp
+@@ -33,7 +33,6 @@
+
+ #include "ViewProvider.h"
+ #include "Workbench.h"
+-#include "qrc_Points.cpp"
+
+ // use a different name to CreateCommand()
+ void CreatePointsCommands(void);
+diff --git a/src/Mod/Points/Gui/CMakeLists.txt b/src/Mod/Points/Gui/CMakeLists.txt
+index fab12ff..7e30f0d 100644
+--- a/src/Mod/Points/Gui/CMakeLists.txt
++++ b/src/Mod/Points/Gui/CMakeLists.txt
+@@ -32,9 +32,9 @@ SET(Dialogs_SRCS
+ )
+ SOURCE_GROUP("Dialogs" FILES ${Dialogs_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Points.qrc)
++qt4_add_resources(Resource_SRCS Resources/Points.qrc)
+ SET(Resource_SRCS
+-# ${Resource_SRCS}
++ ${Resource_SRCS}
+ Resources/Points.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
+diff --git a/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp b/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
+index 156bd90..c59369a 100644
+--- a/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
++++ b/src/Mod/Raytracing/Gui/AppRaytracingGui.cpp
+@@ -32,7 +32,6 @@
+ #include "DlgSettingsRayImp.h"
+ #include "ViewProvider.h"
+ #include "Workbench.h"
+-#include "qrc_Raytracing.cpp"
+
+
+ using namespace RaytracingGui;
+diff --git a/src/Mod/Raytracing/Gui/CMakeLists.txt b/src/Mod/Raytracing/Gui/CMakeLists.txt
+index 38aa739..1da30c9 100644
+--- a/src/Mod/Raytracing/Gui/CMakeLists.txt
++++ b/src/Mod/Raytracing/Gui/CMakeLists.txt
+@@ -43,8 +43,9 @@ set(RaytracingGui_MOC_HDRS
+ fc_wrap_cpp(RaytracingGui_MOC_SRCS ${RaytracingGui_MOC_HDRS})
+ SOURCE_GROUP("Moc" FILES ${RaytracingGui_MOC_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Raytracing.qrc)
++qt4_add_resources(Resource_SRCS Resources/Raytracing.qrc)
+ SET(Resource_SRCS
++ ${Resource_SRCS}
+ Resources/Raytracing.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
+diff --git a/src/Mod/Test/Gui/AppTestGui.cpp b/src/Mod/Test/Gui/AppTestGui.cpp
+index a027d9d..7c2ef21 100644
+--- a/src/Mod/Test/Gui/AppTestGui.cpp
++++ b/src/Mod/Test/Gui/AppTestGui.cpp
+@@ -28,7 +28,6 @@
+
+ #include "UnitTestPy.h"
+ #include "UnitTestImp.h"
+-#include "qrc_Test.cpp"
+
+ #include <Gui/Language/Translator.h>
+ #include <Base/Console.h>
+diff --git a/src/Mod/Test/Gui/CMakeLists.txt b/src/Mod/Test/Gui/CMakeLists.txt
+index 9b8b672..eaa0dcd 100644
+--- a/src/Mod/Test/Gui/CMakeLists.txt
++++ b/src/Mod/Test/Gui/CMakeLists.txt
+@@ -30,9 +30,9 @@ SET(Dialogs_SRCS
+ )
+ SOURCE_GROUP("Dialogs" FILES ${Dialogs_SRCS})
+
+-fc_add_resources(Resource_SRCS Resources/Test.qrc)
++qt4_add_resources(Resource_SRCS Resources/Test.qrc)
+ SET(Resource_SRCS
+-# ${Resource_SRCS}
++ ${Resource_SRCS}
+ Resources/Test.qrc
+ )
+ SOURCE_GROUP("Resource" FILES ${Resource_SRCS})
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-no-machdist.patch b/media-gfx/freecad/files/freecad-0.13.1830-no-machdist.patch
new file mode 100644
index 000000000000..9e02f1b8b37d
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-no-machdist.patch
@@ -0,0 +1,11 @@
+--- src/Mod/CMakeLists.txt 2013-02-02 18:09:17.000000000 +0100
++++ src/Mod/CMakeLists.txt.new 2014-01-19 18:00:27.215825143 +0100
+@@ -18,7 +18,7 @@
+ MESSAGE("Due to the missing Eigen3 library the Sketcher module won't be built")
+ MESSAGE("Due to the missing Eigen3 library the Robot module won't be built")
+ ENDIF(EIGEN3_FOUND)
+-add_subdirectory(Machining_Distortion)
++#add_subdirectory(Machining_Distortion)
+
+ add_subdirectory(ReverseEngineering)
+ add_subdirectory(MeshPart)
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-occ-6.7.patch b/media-gfx/freecad/files/freecad-0.13.1830-occ-6.7.patch
new file mode 100644
index 000000000000..410929bec851
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-occ-6.7.patch
@@ -0,0 +1,63 @@
+commit c1d14eab3c3f9f1141dc0b7fca7cc4441431b50b
+Author: wmayer <wmayer@users.sourceforge.net>
+Date: Sat Dec 28 12:22:31 2013 +0100
+
+ + Fix OCC 6.7 build failure
+
+diff --git a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp
+index 578f5be..bdc91c3 100644
+--- a/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp
++++ b/src/Mod/Part/App/BRepOffsetAPI_MakePipeShellPyImp.cpp
+@@ -29,6 +29,7 @@
+ # include <TopoDS.hxx>
+ # include <TopoDS_Wire.hxx>
+ # include <BRepOffsetAPI_MakePipeShell.hxx>
++# include <Standard_Version.hxx>
+ # include <TopTools_ListIteratorOfListOfShape.hxx>
+ #endif
+
+@@ -111,6 +112,36 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setSpineSupport(PyObject *args)
+
+ PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args)
+ {
++#if OCC_VERSION_HEX >= 0x060700
++ PyObject *spine, *curv, *keep;
++ if (!PyArg_ParseTuple(args, "O!O!O!",&Part::TopoShapePy::Type,&spine
++ ,&PyBool_Type,&curv
++ ,&PyInt_Type,&keep))
++ return 0;
++ const TopoDS_Shape& s = static_cast<Part::TopoShapePy*>(spine)->getTopoShapePtr()->_Shape;
++ if (s.IsNull() || s.ShapeType() != TopAbs_WIRE) {
++ PyErr_SetString(PyExc_TypeError, "spine is not a wire");
++ return 0;
++ }
++
++ BRepFill_TypeOfContact typeOfCantact;
++ switch (PyLong_AsLong(keep)) {
++ case 1:
++ typeOfCantact = BRepFill_Contact;
++ break;
++ case 2:
++ typeOfCantact = BRepFill_ContactOnBorder;
++ break;
++ default:
++ typeOfCantact = BRepFill_NoContact;
++ break;
++ }
++ this->getBRepOffsetAPI_MakePipeShellPtr()->SetMode(
++ TopoDS::Wire(s),
++ PyObject_IsTrue(curv) ? Standard_True : Standard_False,
++ typeOfCantact);
++ Py_Return;
++#else
+ PyObject *spine, *curv, *keep;
+ if (!PyArg_ParseTuple(args, "O!O!O!",&Part::TopoShapePy::Type,&spine
+ ,&PyBool_Type,&curv
+@@ -127,6 +158,7 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::setAuxiliarySpine(PyObject *args)
+ PyObject_IsTrue(curv) ? Standard_True : Standard_False,
+ PyObject_IsTrue(keep) ? Standard_True : Standard_False);
+ Py_Return;
++#endif
+ }
+
+ PyObject* BRepOffsetAPI_MakePipeShellPy::add(PyObject *args)
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch b/media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch
new file mode 100644
index 000000000000..8f761d8796d6
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-remove-qt3-support.patch
@@ -0,0 +1,33 @@
+--- freecad-0.13.1830/src/Mod/Arch/Resources/ui/archprefs-base.ui
++++ freecad-0.13.1830/src/Mod/Arch/Resources/ui/archprefs-base.ui
+@@ -309,7 +309,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::ColorButton</class>
+--- freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-base.ui
++++ freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-base.ui
+@@ -1185,7 +1185,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
+--- freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-import.ui
++++ freecad-0.13.1830/src/Mod/Draft/Resources/ui/userprefs-import.ui
+@@ -536,7 +536,7 @@
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+- <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
++ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>Gui::FileChooser</class>
diff --git a/media-gfx/freecad/files/freecad-0.13.1830-startpage-links.patch b/media-gfx/freecad/files/freecad-0.13.1830-startpage-links.patch
new file mode 100644
index 000000000000..f8af21c2b3e3
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.13.1830-startpage-links.patch
@@ -0,0 +1,97 @@
+commit dbdff257966c65feed6dd9360bc3d50549d9c4c9
+Author: Yorik van Havre <yorik@uncreated.net>
+Date: Thu Sep 12 00:30:59 2013 -0300
+
+ Startpage: Fixed links
+
+diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py
+index 478bf40..43985f3 100644
+--- a/src/Mod/Start/StartPage/StartPage.py
++++ b/src/Mod/Start/StartPage/StartPage.py
+@@ -84,7 +84,7 @@ text34 = translate("StartPage","creation time:")
+ text35 = translate("StartPage","last modified:")
+ text36 = translate("StartPage","location:")
+ text37 = translate("StartPage","User manual")
+-text38 = translate("StartPage","http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Online_Help_Toc")
++text38 = translate("StartPage","http://www.freecadweb.org/wiki/index.php?title=Online_Help_Toc")
+ text39 = translate("StartPage","Tutorials")
+ text40 = translate("StartPage","Python resources")
+ text41 = translate("StartPage","File not found")
+@@ -97,7 +97,7 @@ text47 = translate("StartPage","The section of the FreeCAd website dedicate dto
+ text48 = translate("StartPage","A blog dedicated to teaching FreeCAD, maintained by members of the FreeCAD community")
+ text49 = translate("StartPage","Getting started")
+ text50 = translate("StartPage","The FreeCAD interface is divided in workbenches, which are sets of tools suited for a specific task. You can start with one of the workbenches in this list, or with the complete workbench, which presents you with some of the most used tools gathered from other workbenches. Click to read more about workbenches on the FreeCAD website.")
+-text51 = translate("StartPage","http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Workbench_Concept")
++text51 = translate("StartPage","http://www.freecadweb.org/wiki/index.php?title=Workbench_Concept")
+ text52 = translate("StartPage","Ship Design")
+ text53 = translate("StartPage","Designing and calculating ships")
+ text54 = translate("StartPage","The <b>Ship Design</b> module offers several tools to help ship designers to view, model and calculate profiles and other specific properties of ship hulls.")
+@@ -159,7 +159,7 @@ page = """
+ ddiv.innerHTML = "Done fetching";
+ ddiv = document.getElementById("news");
+ ddiv.innerHTML = "Fetching data from the web...";
+- var tobj=new JSONscriptRequest('http://twitter.com/status/user_timeline/FreeCADNews.json?count=10&callback=showTweets');
++ var tobj=new JSONscriptRequest('http://pipes.yahoo.com/pipes/pipe.run?_id=da8b612e97a6bb4588b1ce27db30efd9&_render=json&_callback=showTweets');
+ tobj.buildScriptTag(); // Build the script tag
+ tobj.addScriptTag(); // Execute (add) the script tag
+ ddiv.innerHTML = "Done fetching";
+@@ -182,19 +182,13 @@ page = """
+ ddiv = document.getElementById('news');
+ ddiv.innerHTML = "Received";
+ var html = ['<ul>'];
+- for (var i = 0; i < Math.min(5,data.length); i++) {
+- tf = placeLinks(data[i].text);
+- html.push('<li>',tf,'</li>');
++ for (var i = 0; i < 8; i++) {
++ html.push('<li><a href="', data.value.items[i].link, '">', data.value.items[i].title, '</a></li>');
+ }
+ html.push('</ul>');
+ ddiv.innerHTML = html.join('');
+ }
+
+- function placeLinks(text) {
+- result=text.replace(/(https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?)/g,'<a href="$1">$1</a>');
+- return result;
+- }
+-
+ </script>
+
+ <style type="text/css">
+@@ -286,12 +280,12 @@ page = """
+ </div>
+
+ <div class="block">
+- <h2>""" + text04 + """ <span class="from">""" + text44 + """</span></h2>
++ <h2>""" + text04 + """</h2>
+ <div id="youtube">youtube videos</div>
+ </div>
+
+ <div class="block">
+- <h2>""" + text05 + """ <span class="from">""" + text42 + """</span></h2>
++ <h2>""" + text05 + """</h2>
+ <div id="news">news feed</div>
+ </div>
+
+@@ -354,7 +348,7 @@ def getLinks():
+ <li><img src="web.png">&nbsp;
+ <a onMouseover="show('<p>""" + text07 + """</p>')"
+ onMouseout="show('')"
+- href="http://free-cad.sf.net/">""" + text08 + """</a></li>
++ href="http://www.freecadweb.org/">""" + text08 + """</a></li>
+ <li><img src="web.png">&nbsp;
+ <a onMouseover="show('<p>""" + text45 + """</p>')"
+ onMouseout="show('')"
+@@ -362,11 +356,11 @@ def getLinks():
+ <li><img src="web.png">&nbsp;
+ <a onMouseover="show('<p>""" + text46 + """</p>')"
+ onMouseout="show('')"
+- href="http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Tutorials">""" + text39 + """</a></li>
++ href="http://www.freecadweb.org/wiki/index.php?title=Tutorials">""" + text39 + """</a></li>
+ <li><img src="web.png">&nbsp;
+ <a onMouseover="show('<p>""" + text47 + """</p>')"
+ onMouseout="show('')"
+- href="http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Power_users_hub">""" + text40 + """</a></li>
++ href="http://www.freecadweb.org/wiki/index.php?title=Power_users_hub">""" + text40 + """</a></li>
+ <li><img src="web.png">&nbsp;
+ <a onMouseover="show('<p>""" + text48 + """</p>')"
+ onMouseout="show('')"
diff --git a/media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch b/media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch
new file mode 100644
index 000000000000..d042695e88c6
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.14.3702-install-paths.patch
@@ -0,0 +1,21 @@
+--- freecad-0.14.3702/CMakeLists.txt
++++ freecad-0.14.3702/CMakeLists.txt
+@@ -69,9 +69,15 @@
+ SET(CMAKE_INSTALL_PREFIX "/usr/lib${LIB_SUFFIX}/freecad" CACHE PATH "Installation root directory")
+ endif(WIN32)
+
+-SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
+-SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
+-SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
++if(NOT CMAKE_INSTALL_DATADIR)
++ SET(CMAKE_INSTALL_DATADIR data CACHE PATH "Output directory for data and resource files")
++endif(NOT CMAKE_INSTALL_DATADIR)
++if(NOT CMAKE_INSTALL_INCLUDEDIR)
++ SET(CMAKE_INSTALL_INCLUDEDIR include CACHE PATH "Output directory for header files")
++endif(NOT CMAKE_INSTALL_INCLUDEDIR)
++if(NOT CMAKE_INSTALL_DOCDIR)
++ SET(CMAKE_INSTALL_DOCDIR doc CACHE PATH "Output directory for documentation and license files")
++endif(NOT CMAKE_INSTALL_DOCDIR)
+ # Don't set it without manual adaption of LibDir variable in src/App/FreeCADInit.py
+ SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries")
+
diff --git a/media-gfx/freecad/freecad-0.12.5284-r4.ebuild b/media-gfx/freecad/freecad-0.12.5284-r4.ebuild
new file mode 100644
index 000000000000..bb186a20fec9
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.12.5284-r4.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND=2
+
+inherit eutils multilib fortran-2 python cmake-utils
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://sourceforge.net/apps/mediawiki/free-cad/"
+SRC_URI="mirror://sourceforge/free-cad/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-cpp/eigen:3
+ dev-games/ode
+ dev-libs/boost
+ dev-libs/libf2c
+ dev-libs/libspnav[X]
+ dev-libs/xerces-c[icu]
+ dev-python/PyQt4[svg]
+ dev-python/pivy
+ dev-qt/designer:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ dev-qt/qtxmlpatterns:4
+ media-libs/SoQt
+ media-libs/coin[doc]
+ sci-libs/gts
+ || ( sci-libs/opencascade:6.7.1 sci-libs/opencascade:6.6.0 sci-libs/opencascade:6.5.5 )
+ sys-libs/zlib
+ virtual/glu"
+DEPEND="${RDEPEND}
+ >=dev-lang/swig-2.0.4-r1:0"
+
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+S="${WORKDIR}/FreeCAD-${PV}"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python_set_active_version 2
+
+ [ -z "${CASROOT}" ] && die "empty \$CASROOT, run eselect opencascade set or define otherwise"
+}
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf src/3rdParty/{Pivy{,-0.5},boost}
+ einfo cleanup build system
+ find . -name "configure*" -print -delete
+
+ epatch \
+ "${FILESDIR}"/${P}-gcc46.patch \
+ "${FILESDIR}"/${P}-removeoldswig.patch \
+ "${FILESDIR}"/${P}-glu.patch \
+ "${FILESDIR}"/${P}-nodir.patch \
+ "${FILESDIR}"/${P}-qt3support.patch \
+ "${FILESDIR}"/${P}-boost148.patch \
+ "${FILESDIR}"/${P}-nopivy.patch \
+ "${FILESDIR}"/${P}-no-permissive.patch \
+ "${FILESDIR}"/${P}-cmake-2.8.12.patch \
+ "${FILESDIR}"/${P}-occ-6.5.5.patch \
+ "${FILESDIR}"/${P}-salomesmesh-occ-6.5.5.patch \
+ "${FILESDIR}"/${P}-occ-6.6.patch
+
+ local my_coin_version=$(best_version media-libs/coin)
+ local my_coin_path="${EROOT}"usr/share/doc/${my_coin_version##*/}/html
+ sed -e "s:/usr/share/doc/libcoin60-doc/html:${my_coin_path}:" \
+ -i cMake/FindCoin3DDoc.cmake || die
+
+ sed -e '/FREECAD_BUILD_FEM/s: ON): OFF):' \
+ -i CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_INCLUDE_PATH="${CASROOT}"/inc
+ -DOCC_LIBRARY="${CASROOT}"/lib/libTKernel.so
+ -DOCC_LIBRARY_DIR="${CASROOT}"/lib
+ -DOCC_LIB_PATH="${CASROOT}"/lib
+ -DCOIN3D_INCLUDE_DIR="${EROOT}"usr/include/coin
+ -DCOIN3D_LIBRARY="${EROOT}"usr/$(get_libdir)/libCoin.so
+ -DSOQT_LIBRARY="${EROOT}"usr/$(get_libdir)/libSoQt.so
+ -DSOQT_INCLUDE_PATH="${EROOT}"usr/include/coin
+ -DCMAKE_INSTALL_PREFIX="${EROOT}"usr/$(get_libdir)/${P}
+ )
+ cmake-utils_src_configure
+ ewarn "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+ insinto /usr/$(get_libdir)/${P}/Mod/Start
+ doins -r src/Mod/Start/StartPage
+
+ prune_libtool_files
+
+ make_wrapper FreeCAD \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCAD \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+ make_wrapper FreeCADCmd \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCADCmd \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+
+ newicon src/Main/icon.ico ${PN}.ico
+ make_desktop_entry FreeCAD
+
+ dodoc README.Linux ChangeLog.txt
+}
diff --git a/media-gfx/freecad/freecad-0.13.1830-r1.ebuild b/media-gfx/freecad/freecad-0.13.1830-r1.ebuild
new file mode 100644
index 000000000000..eb1577f344cd
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.13.1830-r1.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils fortran-2 multilib python-single-r1
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://www.freecadweb.org/"
+SRC_URI="mirror://sourceforge/free-cad/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+COMMON_DEPEND="dev-cpp/eigen:3
+ dev-games/ode
+ dev-libs/boost
+ dev-libs/libf2c
+ dev-libs/libspnav[X]
+ dev-libs/xerces-c[icu]
+ dev-python/matplotlib
+ dev-qt/designer:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ dev-qt/qtxmlpatterns:4
+ media-libs/SoQt
+ media-libs/coin[doc]
+ sci-libs/gts
+ || ( sci-libs/opencascade:6.7.1 sci-libs/opencascade:6.6.0 sci-libs/opencascade:6.5.5 )
+ sys-libs/zlib
+ virtual/glu
+ ${PYTHON_DEPS}"
+RDEPEND="${COMMON_DEPEND}
+ dev-qt/assistant:4
+ dev-python/pycollada
+ dev-python/pivy
+ dev-python/PyQt4[svg]
+ dev-python/pyopencl
+ dev-python/numpy"
+DEPEND="${COMMON_DEPEND}
+ >=dev-lang/swig-2.0.4-r1:0"
+
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+# TODO:
+# DEPEND and RDEPEND:
+# salome-smesh - science overlay
+# zipio++ - not in portage yet
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ [ -z "${CASROOT}" ] && die "empty \$CASROOT, run eselect opencascade set or define otherwise"
+}
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf src/3rdParty/{boost,Pivy*}
+
+ epatch "${FILESDIR}"/${P}-remove-qt3-support.patch
+ epatch "${FILESDIR}"/${P}-cmake-2.8.12.patch
+ epatch "${FILESDIR}"/${P}-CMakefile.patch
+ epatch "${FILESDIR}"/${P}-avoid-include-salome.patch
+ epatch "${FILESDIR}"/${P}-startpage-links.patch
+
+ # disable Machining Distortion workbench because FEM will be disabled in src_configure()
+ # and also because the same module has been removed upstream (commit c0e2c9)
+ epatch "${FILESDIR}"/${P}-no-machdist.patch
+
+ epatch "${FILESDIR}"/${PN}-0.12.5284-occ-6.6.patch
+ epatch "${FILESDIR}"/${P}-occ-6.7.patch
+
+ einfo "Patching cMake/FindCoin3DDoc.cmake ..."
+ local my_coin_version=$(best_version media-libs/coin)
+ local my_coin_path="${EROOT}"usr/share/doc/${my_coin_version##*/}/html
+ sed -e "s:/usr/share/doc/libcoin60-doc/html:${my_coin_path}:" \
+ -i cMake/FindCoin3DDoc.cmake || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_INCLUDE_PATH="${CASROOT}"/inc
+ -DOCC_LIBRARY="${CASROOT}"/lib/libTKernel.so
+ -DOCC_LIBRARY_DIR="${CASROOT}"/lib
+ -DOCC_LIB_PATH="${CASROOT}"/lib
+ -DCOIN3D_INCLUDE_DIR="${EROOT}"usr/include/coin
+ -DCOIN3D_LIBRARY="${EROOT}"usr/$(get_libdir)/libCoin.so
+ -DSOQT_LIBRARY="${EROOT}"usr/$(get_libdir)/libSoQt.so
+ -DSOQT_INCLUDE_PATH="${EROOT}"usr/include/coin
+ -DCMAKE_INSTALL_PREFIX="${EROOT}"usr/$(get_libdir)/${P}
+ -DCMAKE_INSTALL_DATADIR="${EROOT}"usr/share/${P}/
+ -DCMAKE_INSTALL_DOCDIR="${EROOT}"usr/share/doc/${P}/
+ -DCMAKE_INSTALL_INCLUDEDIR="${EROOT}"usr/include/${P}/
+ -DFREECAD_USE_EXTERNAL_PIVY="ON"
+ -DFREECAD_BUILD_FEM="OFF"
+ )
+
+ # TODO to remove embedded dependencies:
+ #
+ # -DFREECAD_USE_EXTERNAL_ZIPIOS="ON" -- this option needs zipios++ but it's not yet in portage so the embedded zipios++
+ # (under src/zipios++) will be used
+ # salomesmesh is in 3rdparty but upstream's find_package function is not complete yet to compile against external version
+ # (external salomesmesh is available in "science" overlay)
+
+ cmake-utils_src_configure
+ ewarn "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ prune_libtool_files
+
+ make_wrapper FreeCAD \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCAD \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+ make_wrapper FreeCADCmd \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCADCmd \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+
+ newicon src/Main/icon.ico ${PN}.ico
+ make_desktop_entry FreeCAD
+
+ dodoc README.Linux ChangeLog.txt
+
+ # disable compression of QT assistant help files
+ >> "${ED}"usr/share/doc/${P}/freecad.qhc.ecompress.skip
+ >> "${ED}"usr/share/doc/${P}/freecad.qch.ecompress.skip
+
+ python_optimize "${ED}"usr/{$(get_libdir),share}/${P}/Mod/
+}
diff --git a/media-gfx/freecad/freecad-0.14.3702-r1.ebuild b/media-gfx/freecad/freecad-0.14.3702-r1.ebuild
new file mode 100644
index 000000000000..30df418e8e48
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.14.3702-r1.ebuild
@@ -0,0 +1,136 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils fortran-2 multilib python-single-r1
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://www.freecadweb.org/"
+SRC_URI="mirror://sourceforge/free-cad/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+COMMON_DEPEND="dev-cpp/eigen:3
+ dev-games/ode
+ dev-libs/boost
+ dev-libs/libf2c
+ dev-libs/libspnav[X]
+ dev-libs/xerces-c[icu]
+ dev-python/matplotlib
+ dev-python/pyside[X]
+ dev-python/shiboken
+ dev-qt/designer:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ media-libs/SoQt
+ media-libs/coin[doc]
+ net-libs/ptlib
+ sci-libs/gts
+ || ( sci-libs/opencascade:6.7.1 sci-libs/opencascade:6.6.0 sci-libs/opencascade:6.5.5 )
+ sys-libs/zlib
+ virtual/glu
+ ${PYTHON_DEPS}"
+RDEPEND="${COMMON_DEPEND}
+ dev-qt/assistant:4
+ dev-python/pycollada
+ dev-python/pivy
+ dev-python/pyopencl
+ dev-python/numpy"
+DEPEND="${COMMON_DEPEND}
+ >=dev-lang/swig-2.0.4-r1:0"
+
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+# TODO:
+# DEPEND and RDEPEND:
+# salome-smesh - science overlay
+# zipio++ - not in portage yet
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ [ -z "${CASROOT}" ] && die "empty \$CASROOT, run eselect opencascade set or define otherwise"
+}
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf src/3rdParty/{boost,Pivy*}
+
+ epatch "${FILESDIR}"/${P}-install-paths.patch
+
+ #bug 518996
+ sed -e "/LibDir = /s:'lib':'"$(get_libdir)"':g" \
+ -i src/App/FreeCADInit.py || die
+
+ einfo "Patching cMake/FindCoin3DDoc.cmake ..."
+ local my_coin_version=$(best_version media-libs/coin)
+ local my_coin_path="${EROOT}"usr/share/doc/${my_coin_version##*/}/html
+ sed -e "s:/usr/share/doc/libcoin60-doc/html:${my_coin_path}:" \
+ -i cMake/FindCoin3DDoc.cmake || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_INCLUDE_PATH="${CASROOT}"/inc
+ -DOCC_LIBRARY="${CASROOT}"/lib/libTKernel.so
+ -DOCC_LIBRARY_DIR="${CASROOT}"/lib
+ -DOCC_LIB_PATH="${CASROOT}"/lib
+ -DCOIN3D_INCLUDE_DIR="${EROOT}"usr/include/coin
+ -DCOIN3D_LIBRARY="${EROOT}"usr/$(get_libdir)/libCoin.so
+ -DSOQT_LIBRARY="${EROOT}"usr/$(get_libdir)/libSoQt.so
+ -DSOQT_INCLUDE_PATH="${EROOT}"usr/include/coin
+ -DCMAKE_INSTALL_PREFIX="${EROOT}"usr/$(get_libdir)/${P}
+ -DCMAKE_INSTALL_DATADIR="${EROOT}"usr/share/${P}/
+ -DCMAKE_INSTALL_DOCDIR="${EROOT}"usr/share/doc/${P}/
+ -DCMAKE_INSTALL_INCLUDEDIR="${EROOT}"usr/include/${P}/
+ -DFREECAD_USE_EXTERNAL_PIVY="ON"
+ -DFREECAD_BUILD_FEM="OFF"
+ )
+
+ # TODO to remove embedded dependencies:
+ #
+ # -DFREECAD_USE_EXTERNAL_ZIPIOS="ON" -- this option needs zipios++ but it's not yet in portage so the embedded zipios++
+ # (under src/zipios++) will be used
+ # salomesmesh is in 3rdparty but upstream's find_package function is not complete yet to compile against external version
+ # (external salomesmesh is available in "science" overlay)
+
+ cmake-utils_src_configure
+ ewarn "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ prune_libtool_files
+
+ make_wrapper FreeCAD \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCAD \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+ make_wrapper FreeCADCmd \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCADCmd \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+
+ newicon src/Main/icon.ico ${PN}.ico
+ make_desktop_entry FreeCAD
+
+ dodoc README.Linux ChangeLog.txt
+
+ # disable compression of QT assistant help files
+ >> "${ED}"usr/share/doc/${P}/freecad.qhc.ecompress.skip
+ >> "${ED}"usr/share/doc/${P}/freecad.qch.ecompress.skip
+
+ python_optimize "${ED}"usr/{$(get_libdir),share}/${P}/Mod/
+}
diff --git a/media-gfx/freecad/freecad-0.15.4671.ebuild b/media-gfx/freecad/freecad-0.15.4671.ebuild
new file mode 100644
index 000000000000..a1883530eb31
--- /dev/null
+++ b/media-gfx/freecad/freecad-0.15.4671.ebuild
@@ -0,0 +1,125 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils fortran-2 multilib python-single-r1
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://www.freecadweb.org/"
+SRC_URI="mirror://sourceforge/free-cad/${PN}_${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+COMMON_DEPEND="dev-cpp/eigen:3
+ dev-libs/boost
+ dev-libs/xerces-c[icu]
+ dev-python/matplotlib
+ dev-python/pyside[X]
+ dev-python/pyside-tools
+ dev-python/shiboken
+ dev-qt/designer:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ media-libs/coin
+ || ( sci-libs/opencascade:6.8.0 sci-libs/opencascade:6.7.1 sci-libs/opencascade:6.6.0 sci-libs/opencascade:6.5.5 )
+ sys-libs/zlib
+ virtual/glu
+ ${PYTHON_DEPS}"
+RDEPEND="${COMMON_DEPEND}
+ dev-qt/assistant:4
+ dev-python/pivy
+ dev-python/numpy"
+DEPEND="${COMMON_DEPEND}
+ dev-python/pyside-tools
+ >=dev-lang/swig-2.0.4-r1:0"
+
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+# TODO:
+# DEPEND and RDEPEND:
+# salome-smesh - science overlay
+# zipio++ - not in portage yet
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ [ -z "${CASROOT}" ] && die "empty \$CASROOT, run eselect opencascade set or define otherwise"
+}
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf src/3rdParty/{boost,Pivy*}
+
+ epatch "${FILESDIR}"/${PN}-0.14.3702-install-paths.patch
+
+ #bug 518996
+ sed -e "/LibDir = /s:'lib':'"$(get_libdir)"':g" \
+ -i src/App/FreeCADInit.py || die
+
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_INCLUDE_PATH="${CASROOT}"/inc
+ -DOCC_LIBRARY="${CASROOT}"/lib/libTKernel.so
+ -DOCC_LIBRARY_DIR="${CASROOT}"/lib
+ -DOCC_LIB_PATH="${CASROOT}"/lib
+ -DCOIN3D_INCLUDE_DIR="${EROOT}"usr/include/coin
+ -DCOIN3D_LIBRARY="${EROOT}"usr/$(get_libdir)/libCoin.so
+ -DSOQT_LIBRARY="${EROOT}"usr/$(get_libdir)/libSoQt.so
+ -DSOQT_INCLUDE_PATH="${EROOT}"usr/include/coin
+ -DCMAKE_INSTALL_PREFIX="${EROOT}"usr/$(get_libdir)/${P}
+ -DCMAKE_INSTALL_DATADIR="${EROOT}"usr/share/${P}/
+ -DCMAKE_INSTALL_DOCDIR="${EROOT}"usr/share/doc/${P}/
+ -DCMAKE_INSTALL_INCLUDEDIR="${EROOT}"usr/include/${P}/
+ -DFREECAD_USE_EXTERNAL_PIVY="ON"
+ -DFREECAD_BUILD_FEM="OFF"
+ )
+
+ # TODO to remove embedded dependencies:
+ #
+ # -DFREECAD_USE_EXTERNAL_ZIPIOS="ON" -- this option needs zipios++ but it's not yet in portage so the embedded zipios++
+ # (under src/zipios++) will be used
+ # salomesmesh is in 3rdparty but upstream's find_package function is not complete yet to compile against external version
+ # (external salomesmesh is available in "science" overlay)
+
+ cmake-utils_src_configure
+ ewarn "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ prune_libtool_files
+
+ make_wrapper FreeCAD \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCAD \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+ make_wrapper FreeCADCmd \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCADCmd \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+
+ newicon src/Main/icon.ico ${PN}.ico
+ make_desktop_entry FreeCAD
+
+ dodoc README.Linux ChangeLog.txt
+
+ # disable compression of QT assistant help files
+ >> "${ED}"usr/share/doc/${P}/freecad.qhc.ecompress.skip
+ >> "${ED}"usr/share/doc/${P}/freecad.qch.ecompress.skip
+
+ python_optimize "${ED}"usr/{$(get_libdir),share}/${P}/Mod/
+}
diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
new file mode 100644
index 000000000000..eac03449cbb7
--- /dev/null
+++ b/media-gfx/freecad/freecad-9999.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit cmake-utils eutils git-r3 fortran-2 multilib python-single-r1
+
+DESCRIPTION="QT based Computer Aided Design application"
+HOMEPAGE="http://www.freecadweb.org/"
+EGIT_REPO_URI="https://github.com/FreeCAD/FreeCAD.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+# sci-libs/opencascade ok: failed: 6.9.0
+COMMON_DEPEND="dev-cpp/eigen:3
+ dev-libs/boost
+ dev-libs/xerces-c[icu]
+ dev-python/matplotlib
+ dev-python/pyside[X]
+ dev-python/pyside-tools
+ dev-python/shiboken
+ dev-qt/designer:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtsvg:4
+ dev-qt/qtwebkit:4
+ media-libs/SoQt
+ media-libs/coin[doc]
+ net-libs/ptlib
+ sci-libs/gts
+ || ( sci-libs/opencascade:6.8.0 sci-libs/opencascade:6.7.1 sci-libs/opencascade:6.6.0 sci-libs/opencascade:6.5.5 )
+ sys-libs/zlib
+ virtual/glu
+ ${PYTHON_DEPS}"
+RDEPEND="${COMMON_DEPEND}
+ dev-qt/assistant:4
+ dev-python/pivy
+ dev-python/numpy"
+DEPEND="${COMMON_DEPEND}
+ dev-python/pyside-tools
+ >=dev-lang/swig-2.0.4-r1:0"
+
+# http://bugs.gentoo.org/show_bug.cgi?id=352435
+# http://www.gentoo.org/foundation/en/minutes/2011/20110220_trustees.meeting_log.txt
+RESTRICT="bindist mirror"
+
+# TODO:
+# DEPEND and RDEPEND:
+# salome-smesh - science overlay
+# zipio++ - not in portage yet
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ python-single-r1_pkg_setup
+
+ [ -z "${CASROOT}" ] && die "empty \$CASROOT, run eselect opencascade set or define otherwise"
+}
+
+src_prepare() {
+ einfo remove bundled libs
+ rm -rf src/3rdParty/{boost,Pivy*}
+
+ epatch "${FILESDIR}"/${PN}-0.14.3702-install-paths.patch
+
+ #bug 518996
+ sed -e "/LibDir = /s:'lib':'"$(get_libdir)"':g" \
+ -i src/App/FreeCADInit.py || die
+
+}
+
+src_configure() {
+ local my_occ_env=${EROOT}etc/env.d/50opencascade
+ if [ -e "${EROOT}etc//env.d/51opencascade" ] ; then
+ my_occ_env=${EROOT}etc/env.d/51opencascade
+ fi
+ export CASROOT=$(awk -F '=' '$1 == "CASROOT" {print $2}' $my_occ_env)
+ #my_occ_ver=$(echo $CASROOT |
+ # awk '{print gensub(".*opencascade-([0-9.]*).*","\\1","$0")}')
+ # or just $(eselect opencascade show)
+
+ local mycmakeargs=(
+ -DOCC_INCLUDE_DIR="${CASROOT}"/inc
+ -DOCC_INCLUDE_PATH="${CASROOT}"/inc
+ -DOCC_LIBRARY="${CASROOT}"/lib/libTKernel.so
+ -DOCC_LIBRARY_DIR="${CASROOT}"/lib
+ -DOCC_LIB_PATH="${CASROOT}"/lib
+ -DCOIN3D_INCLUDE_DIR="${EROOT}"usr/include/coin
+ -DCOIN3D_LIBRARY="${EROOT}"usr/$(get_libdir)/libCoin.so
+ -DSOQT_LIBRARY="${EROOT}"usr/$(get_libdir)/libSoQt.so
+ -DSOQT_INCLUDE_PATH="${EROOT}"usr/include/coin
+ -DCMAKE_INSTALL_PREFIX="${EROOT}"usr/$(get_libdir)/${P}
+ -DCMAKE_INSTALL_DATADIR="${EROOT}"usr/share/${P}/
+ -DCMAKE_INSTALL_DOCDIR="${EROOT}"usr/share/doc/${P}/
+ -DCMAKE_INSTALL_INCLUDEDIR="${EROOT}"usr/include/${P}/
+ -DFREECAD_USE_EXTERNAL_PIVY="ON"
+ -DFREECAD_BUILD_FEM="OFF"
+ )
+
+ # TODO to remove embedded dependencies:
+ #
+ # -DFREECAD_USE_EXTERNAL_ZIPIOS="ON" -- this option needs zipios++ but it's not yet in portage so the embedded zipios++
+ # (under src/zipios++) will be used
+ # salomesmesh is in 3rdparty but upstream's find_package function is not complete yet to compile against external version
+ # (external salomesmesh is available in "science" overlay)
+
+ cmake-utils_src_configure
+ ewarn "${P} will be built against opencascade version ${CASROOT}"
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ prune_libtool_files
+
+ make_wrapper FreeCAD \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCAD \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+ make_wrapper FreeCADCmd \
+ "${EROOT}"usr/$(get_libdir)/${P}/bin/FreeCADCmd \
+ "" "${EROOT}"usr/$(get_libdir)/${P}/lib
+
+ newicon src/Main/icon.ico ${PN}.ico
+ make_desktop_entry FreeCAD
+
+ dodoc README ChangeLog.txt
+
+ # disable compression of QT assistant help files
+ >> "${ED}"usr/share/doc/${P}/freecad.qhc.ecompress.skip
+ >> "${ED}"usr/share/doc/${P}/freecad.qch.ecompress.skip
+
+ python_optimize "${ED}"usr/{$(get_libdir),share}/${P}/Mod/
+}
diff --git a/media-gfx/freecad/metadata.xml b/media-gfx/freecad/metadata.xml
new file mode 100644
index 000000000000..59acc2cc580e
--- /dev/null
+++ b/media-gfx/freecad/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+
diff --git a/media-gfx/freepv/Manifest b/media-gfx/freepv/Manifest
new file mode 100644
index 000000000000..59ad54d81374
--- /dev/null
+++ b/media-gfx/freepv/Manifest
@@ -0,0 +1 @@
+DIST freepv-0.3.0.tar.gz 175545 SHA256 a66c58616cbe814b2e23c6fe109c3de906dad83a8faa32ea219c182bf15229f0 SHA512 0b207dc25c51b19fd76637743adb8e395c6098d03611612086d66d3f1aa6e4d0c5700aa0e23210082d6aa7495f19d1c3d8f0f93ad11a5236df86d709d5f71a7d WHIRLPOOL 993378bb9ef25e1a1064f9402c4608d0a54588f035f23fc67024b857705ff978a403f86e5140e9ed88b83a6d9ae7a74aa86bf9c0239eb07348904d1eeb9ef749
diff --git a/media-gfx/freepv/files/freepv-0.3.0-gcc44.patch b/media-gfx/freepv/files/freepv-0.3.0-gcc44.patch
new file mode 100644
index 000000000000..af5b1a0d196e
--- /dev/null
+++ b/media-gfx/freepv/files/freepv-0.3.0-gcc44.patch
@@ -0,0 +1,60 @@
+diff -Naur freepv-0.3.0.orig/src/libfreepv/OpenGLRenderer.cpp freepv-0.3.0/src/libfreepv/OpenGLRenderer.cpp
+--- freepv-0.3.0.orig/src/libfreepv/OpenGLRenderer.cpp 2010-03-11 16:15:04.000000000 +0100
++++ freepv-0.3.0/src/libfreepv/OpenGLRenderer.cpp 2010-03-11 16:25:15.000000000 +0100
+@@ -26,7 +26,8 @@
+ #include <config.h>
+
+ #include <vector>
+-#include <math.h>
++#include <cmath>
++#include <cstdio>
+
+ #include "OpenGLRenderer.h"
+ #include "Scene.h"
+diff -Naur freepv-0.3.0.orig/src/libfreepv/QTVRDecoder.cpp freepv-0.3.0/src/libfreepv/QTVRDecoder.cpp
+--- freepv-0.3.0.orig/src/libfreepv/QTVRDecoder.cpp 2010-03-11 16:15:04.000000000 +0100
++++ freepv-0.3.0/src/libfreepv/QTVRDecoder.cpp 2010-03-11 16:25:15.000000000 +0100
+@@ -42,6 +42,7 @@
+ #include <errno.h>
+ #include <vector>
+ #include <cstring>
++#include <cstdio>
+
+ #include <zlib.h>
+
+diff -Naur freepv-0.3.0.orig/src/libfreepv/SPiVparser.cpp freepv-0.3.0/src/libfreepv/SPiVparser.cpp
+--- freepv-0.3.0.orig/src/libfreepv/SPiVparser.cpp 2010-03-11 16:15:04.000000000 +0100
++++ freepv-0.3.0/src/libfreepv/SPiVparser.cpp 2010-03-11 16:18:53.000000000 +0100
+@@ -488,8 +488,8 @@
+ //This method remplace the nodes that has src attributes
+ void SPiVparser::parseNodeURL(const char* _url)
+ {
+- char * aux_url=NULL;
+- char * url=(char*) _url;
++ const char * aux_url=NULL;
++ const char * url=(char*) _url;
+ if(aux_url = strrchr (_url,'/'))
+ {
+ url=aux_url;
+diff -Naur freepv-0.3.0.orig/src/libfreepv/Utils/signatures.cpp freepv-0.3.0/src/libfreepv/Utils/signatures.cpp
+--- freepv-0.3.0.orig/src/libfreepv/Utils/signatures.cpp 2010-03-11 16:15:04.000000000 +0100
++++ freepv-0.3.0/src/libfreepv/Utils/signatures.cpp 2010-03-11 16:25:15.000000000 +0100
+@@ -24,6 +24,7 @@
+
+ #include "signatures.h"
+ #include <iostream>
++#include <cstdio>
+
+ namespace FPV{
+ namespace Utils{
+diff -Naur freepv-0.3.0.orig/src/libfreepv/utils.cpp freepv-0.3.0/src/libfreepv/utils.cpp
+--- freepv-0.3.0.orig/src/libfreepv/utils.cpp 2010-03-11 16:15:04.000000000 +0100
++++ freepv-0.3.0/src/libfreepv/utils.cpp 2010-03-11 16:25:15.000000000 +0100
+@@ -23,6 +23,7 @@
+ */
+
+ #include <algorithm>
++#include <cstdio>
+
+ #include "utils.h"
+
diff --git a/media-gfx/freepv/files/freepv-0.3.0-gcc46.patch b/media-gfx/freepv/files/freepv-0.3.0-gcc46.patch
new file mode 100644
index 000000000000..985d1443e7ce
--- /dev/null
+++ b/media-gfx/freepv/files/freepv-0.3.0-gcc46.patch
@@ -0,0 +1,10 @@
+--- src/libfreepv/Action.h.orig 2011-06-16 17:37:55.705868856 +0200
++++ src/libfreepv/Action.h 2011-06-16 17:38:19.792311535 +0200
+@@ -24,6 +24,7 @@
+
+ #ifndef FPV_ACTION_H
+ #define FPV_ACTION_H
++#include <cstddef>
+ #include "Behavior.h"
+
+ namespace FPV
diff --git a/media-gfx/freepv/files/freepv-0.3.0-libpng14.patch b/media-gfx/freepv/files/freepv-0.3.0-libpng14.patch
new file mode 100644
index 000000000000..e3b614f57490
--- /dev/null
+++ b/media-gfx/freepv/files/freepv-0.3.0-libpng14.patch
@@ -0,0 +1,20 @@
+--- src/libfreepv/pngReader.cpp
++++ src/libfreepv/pngReader.cpp
+@@ -135,7 +135,7 @@
+ //Transfor grayscale images with less
+ //than 8 bits to 8 bits
+ if(color_t == PNG_COLOR_TYPE_GRAY && depth<8)
+- png_set_gray_1_2_4_to_8(p_png_struct);
++ png_set_expand_gray_1_2_4_to_8(p_png_struct);
+
+ //Add a full alpha channel if there is
+ //transparency information in the tRNS chunk
+@@ -283,7 +283,7 @@
+ //Transfor grayscale images with less
+ //than 8 bits to 8 bits.
+ if(color_t == PNG_COLOR_TYPE_GRAY && depth<8)
+- png_set_gray_1_2_4_to_8(p_png_struct);
++ png_set_expand_gray_1_2_4_to_8(p_png_struct);
+
+ //Add a full alpha channel if there is
+ //transparency information in the tRNS chunk
diff --git a/media-gfx/freepv/files/freepv-0.3.0-noplugin.patch b/media-gfx/freepv/files/freepv-0.3.0-noplugin.patch
new file mode 100644
index 000000000000..4ea51d50b0cc
--- /dev/null
+++ b/media-gfx/freepv/files/freepv-0.3.0-noplugin.patch
@@ -0,0 +1,30 @@
+diff -Naur freepv-0.3.0.orig//CMakeLists.txt freepv-0.3.0/CMakeLists.txt
+--- freepv-0.3.0.orig//CMakeLists.txt 2010-03-11 16:05:09.000000000 +0100
++++ freepv-0.3.0/CMakeLists.txt 2010-03-11 16:05:18.000000000 +0100
+@@ -89,7 +89,6 @@
+ find_package(FREEGLUT REQUIRED)
+ find_package(OpenGL REQUIRED)
+ find_package(X11 REQUIRED)
+-find_package(GECKO REQUIRED)
+ find_package(LibXml2 REQUIRED)
+ find_package(PNG REQUIRED)
+ find_package(XF86VM REQUIRED)
+@@ -107,7 +106,6 @@
+ ${OPENGL_INCLUDE_DIR}
+ ${FREEGLUT_INCLUDE_DIR}
+ ${X11_INCLUDE_DIR}
+- ${GECKO_INCLUDE_DIR}
+ ${LIBXML2_INCLUDE_DIR}
+ ${PNG_INCLUDE_DIR}
+ ${XF86VM_INCLUDE_DIR})
+diff -Naur freepv-0.3.0.orig//src/CMakeLists.txt freepv-0.3.0/src/CMakeLists.txt
+--- freepv-0.3.0.orig//src/CMakeLists.txt 2010-03-11 16:05:09.000000000 +0100
++++ freepv-0.3.0/src/CMakeLists.txt 2010-03-11 16:05:28.000000000 +0100
+@@ -5,7 +5,6 @@
+ add_subdirectory (freepv-glut)
+ add_subdirectory (utils)
+ if(UNIX)
+- add_subdirectory (freepv-mozilla)
+ add_subdirectory (freepv-glx)
+ endif(UNIX)
+
diff --git a/media-gfx/freepv/files/freepv-0.3.0-stringh.patch b/media-gfx/freepv/files/freepv-0.3.0-stringh.patch
new file mode 100644
index 000000000000..083585e5750c
--- /dev/null
+++ b/media-gfx/freepv/files/freepv-0.3.0-stringh.patch
@@ -0,0 +1,10 @@
+--- src/libfreepv/Image.cpp.ORIG 2009-05-02 01:12:31.000000000 +0200
++++ src/libfreepv/Image.cpp 2013-04-11 09:37:07.436358208 +0200
+@@ -23,6 +23,7 @@
+ */
+
+ #include <assert.h>
++#include <string.h>
+
+ #include "Image.h"
+ #include "JpegReader.h"
diff --git a/media-gfx/freepv/freepv-0.3.0-r4.ebuild b/media-gfx/freepv/freepv-0.3.0-r4.ebuild
new file mode 100644
index 000000000000..c428f156dc75
--- /dev/null
+++ b/media-gfx/freepv/freepv-0.3.0-r4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils eutils
+
+DESCRIPTION="Panorama viewer (Quicktime, PangeaVR, GLPanoView formats)"
+HOMEPAGE="http://freepv.sourceforge.net/"
+SRC_URI="mirror://sourceforge/freepv/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="dev-libs/libxml2
+ media-libs/libpng:0=
+ media-libs/freeglut
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/libXmu
+ x11-libs/libXt
+ x11-libs/libXxf86vm"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc44.patch \
+ "${FILESDIR}"/${P}-gcc46.patch \
+ "${FILESDIR}"/${P}-noplugin.patch \
+ "${FILESDIR}"/${P}-libpng14.patch \
+ "${FILESDIR}"/${P}-stringh.patch
+
+ sed -i \
+ -e 's:jpeg_mem_src:freepv_jpeg_mem_src:g' \
+ src/libfreepv/JpegReader.cpp || die 'jpeg sed failed'
+
+ sed -i -e 's:^INSTALL(.*)::' \
+ src/libfreepv/CMakeLists.txt || die 'static lib install sed failed'
+}
diff --git a/media-gfx/freepv/metadata.xml b/media-gfx/freepv/metadata.xml
new file mode 100644
index 000000000000..ae44a85f0673
--- /dev/null
+++ b/media-gfx/freepv/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <longdescription>OpenGL accelerated panorama viewer and browser plugin (supports Quicktime, PangeaVR and GLPanoView panoramas)</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">freepv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/freewrl/Manifest b/media-gfx/freewrl/Manifest
new file mode 100644
index 000000000000..80dab2c5b08c
--- /dev/null
+++ b/media-gfx/freewrl/Manifest
@@ -0,0 +1,2 @@
+DIST freewrl-1.22.13.1.tar.bz2 1830305 SHA256 29069d63604dbbfde0f684f342f34e9d0eb216a026f83317a00fbdd31ece17e8 SHA512 6e751835a256ce08d4099e5301c0702e28e5cae2e77d8a51ab38f6f0c08680f22a9ef25ef9d2bb860680fc8c1fc22cfebf14cfb14b50ee514b5ef76e71ab1192 WHIRLPOOL 58d301f4f3c1d145b041bb626c8af18954d9cd3da88f348d2341928c2ff050b15e077855b1ef5a2fe18b2218b8d2f8a75e229ca5bf5d683c0c98e4ed132f71cd
+DIST freewrl-2.3.3.1.tar.gz 1731651 SHA256 71ed11f5f3b4b6a1d2fc740e8e3ed62a83b484c9695968fac5e30db14dbb6fef SHA512 e205e8d11a3650ddf4f7dd089bdca36fc1879424c88392229ca8c0d532ebc4662f4f2e3bc491a0a1d6300e78c55cebbb57eeef2145a8c96c727c35dfb2a7d00a WHIRLPOOL d61f65b9f0db94f73760d6b1800be5f77f9898e2305ec93cc43aa8a8631e5d002602a1b79bbec91d30a040479ae01530cb470cb411d803ff8f04c3792e35e545
diff --git a/media-gfx/freewrl/files/freewrl-1.22.13-desktop.patch b/media-gfx/freewrl/files/freewrl-1.22.13-desktop.patch
new file mode 100644
index 000000000000..6d620b7ab94b
--- /dev/null
+++ b/media-gfx/freewrl/files/freewrl-1.22.13-desktop.patch
@@ -0,0 +1,11 @@
+--- a/freewrl-1.22.13/data/freewrl.desktop 2009-06-08 06:26:21.000000000 -0400
++++ b/freewrl-1.22.13/data/freewrl.desktop 2013-12-23 10:45:54.916307951 -0500
+@@ -3,7 +3,7 @@
+ Name=FreeWRL
+ Comment=View X3D and VRML files
+ Exec=/usr/bin/freewrl
+-Icon=freewrl.png
++Icon=freewrl
+ Terminal=false
+ Type=Application
+ Categories=Graphics;3DGraphics;Viewer;
diff --git a/media-gfx/freewrl/files/freewrl-1.22.13-fontconfig-match.patch b/media-gfx/freewrl/files/freewrl-1.22.13-fontconfig-match.patch
new file mode 100644
index 000000000000..36b844ea8b62
--- /dev/null
+++ b/media-gfx/freewrl/files/freewrl-1.22.13-fontconfig-match.patch
@@ -0,0 +1,19 @@
+--- src/lib/scenegraph/Component_Text.c 15 Aug 2012 13:31:45 -0000 1.56
++++ src/lib/scenegraph/Component_Text.c 29 Aug 2012 14:18:43 -0000 1.57
+@@ -370,6 +370,7 @@
+ FcPattern *FW_fp=NULL;
+ FcPattern *FW_fm=NULL;
+ FcChar8 *FW_file=NULL;
++ FcResult fcjunkresult;
+ #else
+
+ if (!p->font_directory) {
+@@ -487,7 +488,7 @@
+ #ifdef HAVE_FONTCONFIG
+ FcConfigSubstitute(0,FW_fp,FcMatchPattern);
+ FcDefaultSubstitute(FW_fp);
+- if (!(FW_fm = FcFontMatch(0,FW_fp,0))) {
++ if (!(FW_fm = FcFontMatch(0,FW_fp,&fcjunkresult))) {
+ /* do whatever is done when no match found */
+ printf ("could not find font for id %x\n",num);
+ } else {
diff --git a/media-gfx/freewrl/files/freewrl-1.22.13-java-fix.patch b/media-gfx/freewrl/files/freewrl-1.22.13-java-fix.patch
new file mode 100644
index 000000000000..882062cb7e10
--- /dev/null
+++ b/media-gfx/freewrl/files/freewrl-1.22.13-java-fix.patch
@@ -0,0 +1,54 @@
+--- a/src/java/Makefile.sources
++++ b/src/java/Makefile.sources
+@@ -1,4 +1,4 @@
+-dist_noinst_JAVA = \
++noinst_JAVA = \
+ org/web3d/x3d/sai/Browser.java \
+ org/web3d/x3d/sai/BrowserEvent.java \
+ org/web3d/x3d/sai/BrowserFactoryImpl.java \
+@@ -309,6 +309,7 @@ noinst_JAVA = \
+ vrml/InvalidFieldException.java \
+ vrml/InvalidRouteException.java \
+ vrml/InvalidVRMLSyntaxException.java \
++ vrml/InvalidX3DSyntaxException.java \
+ vrml/MField.java \
+ vrml/field/ConstMFColor.java \
+ vrml/field/ConstMFFloat.java \
+--- /dev/null
++++ b/src/java/vrml/InvalidX3DSyntaxException.java
+@@ -0,0 +1,6 @@
++package vrml;
++
++public class InvalidX3DSyntaxException extends Exception {
++ public InvalidX3DSyntaxException() { super(); }
++ public InvalidX3DSyntaxException(String s) { super(s); }
++}
+--- a/src/java/Makefile.am 2014-03-10 10:37:09.000000000 -0400
++++ b/src/java/Makefile.am 2014-03-12 12:29:42.000000000 -0400
+@@ -1,5 +1,10 @@
+ # Java Classes for EAI/SAI/etc.
+
++# NOTE - automake-1.11.6 changed how class*.stamp is generated, now need
++# to use noinst_JAVA and EXTRA_DIST instead of dist_noinst_JAVA to
++# keep behaviour consistent and compatible with both automake-1.11.6 and
++# older automake
++
+ # Get global variables for Makefile defined by toplevel Makefile.globals
+ include $(top_srcdir)/Makefile.globals
+
+@@ -9,11 +14,12 @@
+ jarfile = vrml.jar
+ jardir = $(JAVA_DIR)
+
+-$(jarfile): $(dist_noinst_JAVA) classdist_noinst.stamp
+- $(JAR) cmf $(JAVAROOT)/manifest.extras $@ -C $(JAVAROOT) $$(echo $(dist_noinst_JAVA:.java=.class))
++$(jarfile): $(noinst_JAVA) manifest.extras classnoinst.stamp
++ $(JAR) cmf $(JAVAROOT)/manifest.extras $@ -C $(JAVAROOT) $$(echo $(noinst_JAVA:.java=.class))
+
+ jar_DATA = $(jarfile)
+
+-CLEANFILES = $(jarfile) $$(echo $(dist_noinst_JAVA:.java=.class))
++CLEANFILES = $(jarfile) $$(echo $(noinst_JAVA:.java=.class))
++EXTRA_DIST = $(noinst_JAVA) java.policy manifest.extras
+
+ include Makefile.sources
diff --git a/media-gfx/freewrl/files/freewrl-1.22.13-mozjs187-config.patch b/media-gfx/freewrl/files/freewrl-1.22.13-mozjs187-config.patch
new file mode 100644
index 000000000000..645a2315c161
--- /dev/null
+++ b/media-gfx/freewrl/files/freewrl-1.22.13-mozjs187-config.patch
@@ -0,0 +1,10 @@
+--- a/configure.ac 2012-06-13 13:17:43.000000000 -0400
++++ b/configure.ac 2012-06-18 15:34:59.000000000 -0400
+@@ -192,6 +192,7 @@
+ AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,[spidermonkey],[>=],[1.7.0])
+ ;;
+ *)
++ AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,[mozjs187])
+ AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,[mozjs185])
+ AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,[mozilla-js],[>=],[1.9])
+ AC_MY_CHECK_MODULE(JAVASCRIPT_ENGINE,[xulrunner-js],[>=],[1.8])
diff --git a/media-gfx/freewrl/files/freewrl-2.3.3-ld.gold.patch b/media-gfx/freewrl/files/freewrl-2.3.3-ld.gold.patch
new file mode 100644
index 000000000000..6660f175b502
--- /dev/null
+++ b/media-gfx/freewrl/files/freewrl-2.3.3-ld.gold.patch
@@ -0,0 +1,35 @@
+commit 57d2d3b900c7d57e167fb7c90b36ca8c9c80b8bd
+Author: Ian Stakenvicius <axs@gentoo.org>
+Date: Mon Apr 28 10:53:57 2014 -0400
+
+ autotools: fixed underlinking issue with libm
+
+ Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
+
+diff --git a/freex3d/configure.ac b/freex3d/configure.ac
+index 49db07c..48b09c8 100644
+--- a/freex3d/configure.ac
++++ b/freex3d/configure.ac
+@@ -73,6 +73,8 @@ AC_PROG_GCC_TRADITIONAL
+ dnl AC_FUNC_MALLOC
+ AC_CHECK_FUNCS([strchr strrchr strdup strndup strerror getopt getopt_long getopt_long_only malloc calloc realloc usleep gettimeofday])
+
++# Check for math
++AC_CHECK_LIBM
+
+ # ====================================================
+ # FreeWRL specific configuration: target system
+diff --git a/freex3d/src/lib/Makefile.am b/freex3d/src/lib/Makefile.am
+index ae7fb05..1b1af8a 100644
+--- a/freex3d/src/lib/Makefile.am
++++ b/freex3d/src/lib/Makefile.am
+@@ -40,7 +40,8 @@ EXTERNAL_LIBS = \
+ $(PNG_LIBS) \
+ $(LIBCURL_LIBS) \
+ $(IMLIB2_LIBS) \
+- $(LIBLO_LIBS)
++ $(LIBLO_LIBS) \
++ $(LIBM)
+
+
+ # X11 flags specific to x11 target (default on Linux -- optional on Mac)
diff --git a/media-gfx/freewrl/freewrl-1.22.13-r3.ebuild b/media-gfx/freewrl/freewrl-1.22.13-r3.ebuild
new file mode 100644
index 000000000000..aaf371c7e816
--- /dev/null
+++ b/media-gfx/freewrl/freewrl-1.22.13-r3.ebuild
@@ -0,0 +1,143 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools nsplugins eutils flag-o-matic java-pkg-opt-2 multilib
+
+DESCRIPTION="VRML97 and X3D compliant browser, library, and web-browser plugin"
+HOMEPAGE="http://freewrl.sourceforge.net/"
+SRC_URI="mirror://sourceforge/freewrl/${P}.1.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="curl debug +glew java libeai motif +nsplugin osc +sox static-libs"
+
+COMMONDEPEND="x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libX11
+ motif? ( x11-libs/motif )
+ !motif? ( x11-libs/libXaw )
+ media-libs/mesa
+ glew? ( media-libs/glew )
+ virtual/opengl
+ media-libs/libpng
+ virtual/jpeg
+ media-libs/imlib2
+ >=media-libs/freetype-2
+ media-libs/fontconfig
+ curl? ( net-misc/curl )
+ osc? ( media-libs/liblo )
+ dev-lang/spidermonkey:0="
+DEPEND="${COMMONDEPEND}
+ virtual/pkgconfig
+ java? ( >=virtual/jdk-1.4 )
+ nsplugin? ( net-misc/npapi-sdk )"
+RDEPEND="${COMMONDEPEND}
+ media-fonts/dejavu
+ || ( media-gfx/imagemagick
+ media-gfx/graphicsmagick[imagemagick] )
+ app-arch/unzip
+ java? ( >=virtual/jre-1.4 )
+ sox? ( media-sound/sox )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-fontconfig-match.patch
+ if has_version ">=dev-lang/spidermonkey-1.8.7:0" ; then
+ epatch "${FILESDIR}"/${P}-mozjs187-config.patch
+ fi
+ epatch "${FILESDIR}"/${P}-desktop.patch
+ epatch "${FILESDIR}"/${P}-java-fix.patch
+ epatch "${FILESDIR}"/${PN}-2.3.3-ld.gold.patch
+ eautoreconf
+}
+
+src_configure() {
+ local myconf="--enable-fontconfig
+ --without-expat
+ --with-x
+ --with-imageconvert=/usr/bin/convert
+ --with-unzip=/usr/bin/unzip"
+ if use motif; then
+ myconf+=" --with-target=motif --with-statusbar=standard"
+ else
+ myconf+=" --with-target=x11 --with-statusbar=hud"
+ fi
+ if use nsplugin; then
+ myconf+=" --with-plugindir=/usr/$(get_libdir)/${PLUGINS_DIR}"
+ myconf+=" --disable-mozilla-plugin --disable-xulrunner-plugin"
+ fi
+ if use sox; then
+ myconf+=" --with-soundconv=/usr/bin/sox"
+ fi
+ # disable the checks for other js libs, in case they are installed
+ if has_version ">=dev-lang/spidermonkey-1.8.5:0" ; then
+ # spidermonkey-1.8.5 provides a .pc to pkg-config, it should be findable via mozjs185
+ for x in mozilla-js xulrunner-js firefox-js firefox2-js seamonkey-js; do
+ myconf+=" --disable-${x}"
+ done
+ else
+ for x in mozjs187 mozjs185 mozilla-js xulrunner-js firefox-js seamonkey-js; do
+ myconf+=" --disable-${x}"
+ done
+ # spidermonkey pre-1.8.5 has no pkg-config, so override ./configure
+ JAVASCRIPT_ENGINE_CFLAGS="-I/usr/include/js -DXP_UNIX"
+ if has_version ">=dev-lang/spidermonkey-1.8:0" ; then
+ # spidermonkey-1.8 changed the name of the lib
+ JAVASCRIPT_ENGINE_LIBS="-lmozjs"
+ else
+ JAVASCRIPT_ENGINE_LIBS="-ljs"
+ fi
+ if has_version "dev-lang/spidermonkey:0[threadsafe]" ; then
+ JAVASCRIPT_ENGINE_CFLAGS+=" -DJS_THREADSAFE $(pkg-config --cflags nspr)"
+ JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) ${JAVASCRIPT_ENGINE_LIBS}"
+ fi
+ export JAVASCRIPT_ENGINE_CFLAGS
+ export JAVASCRIPT_ENGINE_LIBS
+ fi
+ econf ${myconf} \
+ $(use_enable curl libcurl) \
+ $(use_with glew) \
+ $(use_enable debug) $(use_enable debug thread_colorized) \
+ $(use_enable libeai) \
+ $(use_enable java) \
+ $(use_enable nsplugin plugin) \
+ $(use_enable osc) \
+ $(use_enable static-libs static) \
+ $(use_enable sox sound)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use java; then
+ insinto /usr/share/${PN}/lib
+ doins src/java/java.policy
+ java-pkg_regjar src/java/vrml.jar
+ # install vrml.jar as a JRE extension
+ dodir /usr/java/packages/lib/ext
+ dosym /usr/share/${PN}/lib/vrml.jar /usr/java/packages/lib/ext/vrml.jar
+ if ! has_version "media-gfx/freewrl[java]" ; then
+ elog "Because vrml.jar requires access to sockets, you will need to incorporate the"
+ elog "contents of /usr/share/${PN}/lib/java.policy into your system or user's default"
+ elog "java policy:"
+ elog " cat /usr/share/${PN}/lib/java.policy >>~/.java.policy"
+ fi
+ fi
+
+ # remove unneeded .la files (as per Flameeyes' rant)
+ cd "${D}"
+ rm "usr/$(get_libdir)"/*.la "usr/$(get_libdir)/${PLUGINS_DIR}"/*.la
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "By default, FreeWRL expects to find the 'firefox' binary in your include"
+ elog "path. If you do not have firefox installed or you wish to use a different"
+ elog "web browser to open links that are within VRML / X3D files, please be sure to"
+ elog "specify the command via your BROWSER environment variable."
+ fi
+}
diff --git a/media-gfx/freewrl/freewrl-2.3.3.ebuild b/media-gfx/freewrl/freewrl-2.3.3.ebuild
new file mode 100644
index 000000000000..05dfd309df18
--- /dev/null
+++ b/media-gfx/freewrl/freewrl-2.3.3.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools nsplugins eutils flag-o-matic java-pkg-opt-2 multilib
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.code.sf.net/p/freewrl/git"
+ S="${WORKDIR}/${P}/freex3d"
+ SRC_URI=
+ KEYWORDS=
+else
+ SRC_URI="mirror://sourceforge/freewrl/${P}.1.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="VRML97 and X3D compliant browser, library, and web-browser plugin"
+HOMEPAGE="http://freewrl.sourceforge.net/"
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="curl debug java libeai motif +nsplugin opencl osc +sox static-libs"
+
+COMMONDEPEND="x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libX11
+ motif? ( x11-libs/motif )
+ !motif? ( x11-libs/libXaw )
+ media-libs/mesa
+ virtual/opengl
+ media-libs/libpng
+ virtual/jpeg
+ media-libs/imlib2
+ >=media-libs/freetype-2
+ media-libs/fontconfig
+ curl? ( net-misc/curl )
+ osc? ( media-libs/liblo )
+ opencl? ( virtual/opencl )
+ dev-lang/spidermonkey:0="
+DEPEND="${COMMONDEPEND}
+ virtual/pkgconfig
+ java? ( >=virtual/jdk-1.4 )
+ nsplugin? ( net-misc/npapi-sdk )"
+RDEPEND="${COMMONDEPEND}
+ media-fonts/dejavu
+ || ( media-gfx/imagemagick
+ media-gfx/graphicsmagick[imagemagick] )
+ app-arch/unzip
+ java? ( >=virtual/jre-1.4 )
+ sox? ( media-sound/sox )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ld.gold.patch
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ # list of js libs without .pc support, to disable ./configure auto-checking
+ local spidermonkeys=( mozilla-js xulrunner-js firefox-js firefox2-js seamonkey-js )
+ # list of .pc supported spidermonkeys, to disable ./configure auto-checking
+ local spidermonkeys_pc=( mozjs187 mozjs185 )
+
+ local myconf="--enable-fontconfig
+ --without-expat
+ --with-x
+ --with-imageconvert=/usr/bin/convert
+ --with-unzip=/usr/bin/unzip
+ ${spidermonkeys[@]/#/ --disable-}"
+
+ if has_version "<dev-lang/spidermonkey-1.8.5" ; then
+ # spidermonkey pre-1.8.5 has no pkg-config, so override ./configure
+ myconf+="${spidermonkeys_pc[@]/#/ --disable-}"
+ JAVASCRIPT_ENGINE_CFLAGS="-I/usr/include/js -DXP_UNIX"
+ if has_version ">=dev-lang/spidermonkey-1.8:0" ; then
+ # spidermonkey-1.8 changed the name of the lib
+ JAVASCRIPT_ENGINE_LIBS="-lmozjs"
+ else
+ JAVASCRIPT_ENGINE_LIBS="-ljs"
+ fi
+ if has_version "dev-lang/spidermonkey:0[threadsafe]" ; then
+ JAVASCRIPT_ENGINE_CFLAGS+=" -DJS_THREADSAFE $(pkg-config --cflags nspr)"
+ JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) ${JAVASCRIPT_ENGINE_LIBS}"
+ fi
+ export JAVASCRIPT_ENGINE_CFLAGS
+ export JAVASCRIPT_ENGINE_LIBS
+ fi
+ if use nsplugin; then
+ myconf+=" --with-plugindir=/usr/$(get_libdir)/${PLUGINS_DIR}"
+ myconf+=" --disable-mozilla-plugin --disable-xulrunner-plugin"
+ fi
+ econf ${myconf} \
+ $(use_enable curl libcurl) \
+ $(use_with opencl OpenCL) \
+ $(use_enable debug) $(use_enable debug thread_colorized) \
+ $(use_enable libeai) \
+ $(use_enable java) \
+ $(use_enable nsplugin plugin) \
+ $(use_enable osc) \
+ $(use_enable static-libs static) \
+ $(use_enable sox sound) \
+ $(usex sox "--with-soundconv=/usr/bin/sox") \
+ $(usex motif "--with-target=motif" "--with-target=x11") \
+ $(usex motif "--with-statusbar=standard" "--with-statusbar=hud")
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use java; then
+ insinto /usr/share/${PN}/lib
+ doins src/java/java.policy
+ java-pkg_regjar src/java/vrml.jar
+ # install vrml.jar as a JRE extension
+ dodir /usr/java/packages/lib/ext
+ dosym /usr/share/${PN}/lib/vrml.jar /usr/java/packages/lib/ext/vrml.jar
+ if ! has_version "media-gfx/freewrl[java]" ; then
+ elog "Because vrml.jar requires access to sockets, you will need to incorporate the"
+ elog "contents of /usr/share/${PN}/lib/java.policy into your system or user's default"
+ elog "java policy:"
+ elog " cat /usr/share/${PN}/lib/java.policy >>~/.java.policy"
+ fi
+ fi
+
+ # remove unneeded .la files (as per Flameeyes' rant)
+ cd "${D}"
+ rm "usr/$(get_libdir)"/*.la "usr/$(get_libdir)/${PLUGINS_DIR}"/*.la
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "By default, FreeWRL expects to find the 'firefox' binary in your include"
+ elog "path. If you do not have firefox installed or you wish to use a different"
+ elog "web browser to open links that are within VRML / X3D files, please be sure to"
+ elog "specify the command via your BROWSER environment variable."
+ fi
+}
diff --git a/media-gfx/freewrl/freewrl-9999.ebuild b/media-gfx/freewrl/freewrl-9999.ebuild
new file mode 100644
index 000000000000..f1c85f6628f8
--- /dev/null
+++ b/media-gfx/freewrl/freewrl-9999.ebuild
@@ -0,0 +1,144 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools nsplugins eutils flag-o-matic java-pkg-opt-2 multilib
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.code.sf.net/p/freewrl/git"
+ S="${WORKDIR}/${P}/freex3d"
+ SRC_URI=
+ KEYWORDS=
+else
+ SRC_URI="mirror://sourceforge/freewrl/${P}.tar.bz2"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="VRML97 and X3D compliant browser, library, and web-browser plugin"
+HOMEPAGE="http://freewrl.sourceforge.net/"
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="curl debug java libeai motif +nsplugin opencl osc +sox static-libs"
+
+COMMONDEPEND="x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libX11
+ motif? ( x11-libs/motif )
+ !motif? ( x11-libs/libXaw )
+ media-libs/mesa
+ virtual/opengl
+ media-libs/libpng
+ virtual/jpeg
+ media-libs/imlib2
+ >=media-libs/freetype-2
+ media-libs/fontconfig
+ curl? ( net-misc/curl )
+ osc? ( media-libs/liblo )
+ opencl? ( virtual/opencl )
+ dev-lang/spidermonkey:0="
+DEPEND="${COMMONDEPEND}
+ virtual/pkgconfig
+ java? ( >=virtual/jdk-1.4 )
+ nsplugin? ( net-misc/npapi-sdk )"
+RDEPEND="${COMMONDEPEND}
+ media-fonts/dejavu
+ || ( media-gfx/imagemagick
+ media-gfx/graphicsmagick[imagemagick] )
+ app-arch/unzip
+ java? ( >=virtual/jre-1.4 )
+ sox? ( media-sound/sox )"
+
+src_prepare() {
+ if [[ ${PV} != "9999" ]]; then
+ epatch "${FILESDIR}"/${P}-fontconfig-match.patch
+ epatch "${FILESDIR}"/${P}-mozjs187-config.patch
+ fi
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ # list of js libs without .pc support, to disable ./configure auto-checking
+ local spidermonkeys=( mozilla-js xulrunner-js firefox-js firefox2-js seamonkey-js )
+ # list of .pc supported spidermonkeys, to disable ./configure auto-checking
+ local spidermonkeys_pc=( mozjs187 mozjs185 )
+
+ local myconf="--enable-fontconfig
+ --without-expat
+ --with-x
+ --with-imageconvert=/usr/bin/convert
+ --with-unzip=/usr/bin/unzip
+ --disable-mozjs-17.0
+ ${spidermonkeys[@]/#/ --disable-}"
+
+ if has_version "<dev-lang/spidermonkey-1.8.5" ; then
+ # spidermonkey pre-1.8.5 has no pkg-config, so override ./configure
+ myconf+="${spidermonkeys_pc[@]/#/ --disable-}"
+ JAVASCRIPT_ENGINE_CFLAGS="-I/usr/include/js -DXP_UNIX"
+ if has_version ">=dev-lang/spidermonkey-1.8:0" ; then
+ # spidermonkey-1.8 changed the name of the lib
+ JAVASCRIPT_ENGINE_LIBS="-lmozjs"
+ else
+ JAVASCRIPT_ENGINE_LIBS="-ljs"
+ fi
+ if has_version "dev-lang/spidermonkey:0[threadsafe]" ; then
+ JAVASCRIPT_ENGINE_CFLAGS+=" -DJS_THREADSAFE $(pkg-config --cflags nspr)"
+ JAVASCRIPT_ENGINE_LIBS="$(pkg-config --libs nspr) ${JAVASCRIPT_ENGINE_LIBS}"
+ fi
+ export JAVASCRIPT_ENGINE_CFLAGS
+ export JAVASCRIPT_ENGINE_LIBS
+ fi
+ if use nsplugin; then
+ myconf+=" --with-plugindir=/usr/$(get_libdir)/${PLUGINS_DIR}"
+ myconf+=" --disable-mozilla-plugin --disable-xulrunner-plugin"
+ fi
+ econf ${myconf} \
+ $(use_enable curl libcurl) \
+ $(use_with opencl OpenCL) \
+ $(use_enable debug) $(use_enable debug thread_colorized) \
+ $(use_enable libeai) \
+ $(use_enable java) \
+ $(use_enable nsplugin plugin) \
+ $(use_enable osc) \
+ $(use_enable static-libs static) \
+ $(use_enable sox sound) \
+ $(usex sox "--with-soundconv=/usr/bin/sox") \
+ $(usex motif "--with-target=motif" "--with-target=x11") \
+ $(usex motif "--with-statusbar=standard" "--with-statusbar=hud")
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if use java; then
+ insinto /usr/share/${PN}/lib
+ doins src/java/java.policy
+ java-pkg_regjar src/java/vrml.jar
+ # install vrml.jar as a JRE extension
+ dodir /usr/java/packages/lib/ext
+ dosym /usr/share/${PN}/lib/vrml.jar /usr/java/packages/lib/ext/vrml.jar
+ if ! has_version "media-gfx/freewrl[java]" ; then
+ elog "Because vrml.jar requires access to sockets, you will need to incorporate the"
+ elog "contents of /usr/share/${PN}/lib/java.policy into your system or user's default"
+ elog "java policy:"
+ elog " cat /usr/share/${PN}/lib/java.policy >>~/.java.policy"
+ fi
+ fi
+
+ # remove unneeded .la files (as per Flameeyes' rant)
+ cd "${D}"
+ rm "usr/$(get_libdir)"/*.la "usr/$(get_libdir)/${PLUGINS_DIR}"/*.la
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "By default, FreeWRL expects to find the 'firefox' binary in your include"
+ elog "path. If you do not have firefox installed or you wish to use a different"
+ elog "web browser to open links that are within VRML / X3D files, please be sure to"
+ elog "specify the command via your BROWSER environment variable."
+ fi
+}
diff --git a/media-gfx/freewrl/metadata.xml b/media-gfx/freewrl/metadata.xml
new file mode 100644
index 000000000000..548b124ab6bb
--- /dev/null
+++ b/media-gfx/freewrl/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>axs@gentoo.org</email>
+ <name>Ian Stakenvicius</name>
+ </maintainer>
+ <longdescription>
+FreeWRL is a VRML97 (VRML-2.0) and X3D interactive viewer, providing both a traditional Xorg application
+and a nsbrowser plugin for use with many available web browsers. The package depends heavily on OpenGL
+support for rendering. When developing your 3D world or model, you can program with GLSL Shaders using the
+X3D Shaders Component, put your model exactly where you want them with the Geospatial Component, or just
+throw triangles to the screen as Extrusions, IndexedFaceSets, TriangleSets, Circle2D, Disk2D, Spheres, Boxes,
+Cubes; the list goes on and on. With royalty free open standards, your models will continue to render, year after year.
+<pkg>=media-gfx/freewrl-1.22*</pkg> uses traditional OpenGL calls, while <pkg>&gt;=media-gfx/freewrl-2</pkg> uses
+"shaders" and requires hardware capable of at least OpenGL-2.0 or OpenGL-ES.
+</longdescription>
+ <use>
+ <flag name="glew">Enable glew extensions</flag>
+ <flag name="libeai">Build EAI C library</flag>
+ <flag name="opencl">Enable OpenCL support</flag>
+ <flag name="osc">Allows for OSC-based control and communication between multiple freewrl instances</flag>
+ <flag name="java">Build and install java EAI/SAI support library</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">freewrl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/galleryadd/Manifest b/media-gfx/galleryadd/Manifest
new file mode 100644
index 000000000000..48261598f30b
--- /dev/null
+++ b/media-gfx/galleryadd/Manifest
@@ -0,0 +1 @@
+DIST galleryadd-2.30.tar.gz 10763 SHA256 7f2f09539aeca02c6b8179b417c8f331fd135b714f3ce9b483b48f33bed5714b
diff --git a/media-gfx/galleryadd/galleryadd-2.30.ebuild b/media-gfx/galleryadd/galleryadd-2.30.ebuild
new file mode 100644
index 000000000000..215405477e23
--- /dev/null
+++ b/media-gfx/galleryadd/galleryadd-2.30.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Perl script to recursively adds directories/images to Gallery"
+HOMEPAGE="http://iainlea.dyndns.org/software/galleryadd/"
+SRC_URI="http://iainlea.dyndns.org/software/galleryadd/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+RDEPEND="dev-perl/libwww-perl
+ virtual/perl-Time-HiRes"
+DEPEND=""
+
+S="${WORKDIR}"
+
+src_install() {
+ dobin galleryadd.pl
+}
diff --git a/media-gfx/galleryadd/metadata.xml b/media-gfx/galleryadd/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/media-gfx/galleryadd/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/geeqie/Manifest b/media-gfx/geeqie/Manifest
new file mode 100644
index 000000000000..8799272ea3cc
--- /dev/null
+++ b/media-gfx/geeqie/Manifest
@@ -0,0 +1 @@
+DIST geeqie-1.2.tar.gz 1904764 SHA256 f13fc2489fb9bed31ed48aec8b2a3a573c11cd6e036f1b07ed2cf6495ccc75dd SHA512 cd27cc480cc649f6ba6ea2997bf9a3dc1aa3f655e6f949de27bb4bbfa79927126851604005bf0a0e2be86683f5b9b06dbfb86b919f828e54a79bafcdd6a0be92 WHIRLPOOL 82e25e743b62566dd99a630fb347966195a93b8eba51a300907e04e7113c5bc39a0bf74da28eeba6325558ff86d1bdea80cfe8c7fedf70ce5466e224e0b648c0
diff --git a/media-gfx/geeqie/files/geeqie-1.2-fix-lcms2-integration.patch b/media-gfx/geeqie/files/geeqie-1.2-fix-lcms2-integration.patch
new file mode 100644
index 000000000000..5f13c92cb6db
--- /dev/null
+++ b/media-gfx/geeqie/files/geeqie-1.2-fix-lcms2-integration.patch
@@ -0,0 +1,35 @@
+From a1afabd3ce740872a857234b91eeb64fcf239f6a Mon Sep 17 00:00:00 2001
+From: Klaus Ethgen <Klaus@Ethgen.de>
+Date: Sat, 27 Sep 2014 12:07:10 +0100
+Subject: [PATCH] Fix lcms2 integration
+
+Thanks Michael Schwendt <mschwendt@gmail.com> for the bug reporting and
+the patch.
+---
+ src/color-man.c | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/color-man.c b/src/color-man.c
+index 7788c7a..e4f1bab 100644
+--- a/src/color-man.c
++++ b/src/color-man.c
+@@ -432,10 +432,12 @@ static gchar *color_man_get_profile_name(ColorManProfileType type, cmsHPROFILE p
+ if (profile)
+ {
+ #ifdef HAVE_LCMS2
+- cmsUInt8Number profileID[17];
+- profileID[16] = '\0';
+- cmsGetHeaderProfileID(profile, profileID);
+- return g_strdup((gchar *) profileID);
++ cmsUInt32Number r;
++ char buffer[20];
++ buffer[0] = '\0';
++ r = cmsGetProfileInfoASCII(profile, cmsInfoDescription, "en", "US", &buffer, 20);
++ buffer[19] = '\0'; /* Just to be sure */
++ return g_strdup(buffer);
+ #else
+ return g_strdup(cmsTakeProductName(profile));
+ #endif
+--
+1.7.1
+
diff --git a/media-gfx/geeqie/files/geeqie-1.2-fix_version.patch b/media-gfx/geeqie/files/geeqie-1.2-fix_version.patch
new file mode 100644
index 000000000000..1d40ea02b2d4
--- /dev/null
+++ b/media-gfx/geeqie/files/geeqie-1.2-fix_version.patch
@@ -0,0 +1,11 @@
+--- configure.in.orig 2014-10-26 20:33:53.431516625 +0100
++++ configure.in 2014-10-26 20:33:58.790520392 +0100
+@@ -15,7 +15,7 @@
+ dnl GNU General Public License for more details.
+
+ AC_PREREQ(2.57)
+-AC_INIT(geeqie, 1.1, geeqie-devel@lists.sourceforge.net)
++AC_INIT(geeqie, 1.2, geeqie-devel@lists.sourceforge.net)
+
+ # Check for rightly dirs
+ AC_CONFIG_SRCDIR([src/main.c])
diff --git a/media-gfx/geeqie/geeqie-1.2-r1.ebuild b/media-gfx/geeqie/geeqie-1.2-r1.ebuild
new file mode 100644
index 000000000000..95a49039846c
--- /dev/null
+++ b/media-gfx/geeqie/geeqie-1.2-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools base eutils
+
+DESCRIPTION="A lightweight GTK image viewer forked from GQview"
+HOMEPAGE="http://www.geeqie.org"
+# Grab from tag snapshot: http://www.geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git
+SRC_URI="http://dev.gentoo.org/~voyageur/distfiles/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="doc exif jpeg lcms lirc lua tiff xmp"
+
+RDEPEND="x11-libs/gtk+:2
+ virtual/libintl
+ doc? ( app-text/gnome-doc-utils )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( media-libs/lcms:2 )
+ lirc? ( app-misc/lirc )
+ lua? ( >=dev-lang/lua-5.1:= )
+ xmp? ( >=media-gfx/exiv2-0.17:=[xmp] )
+ !xmp? ( exif? ( >=media-gfx/exiv2-0.17 ) )
+ tiff? ( media-libs/tiff:0 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ dev-util/intltool
+ sys-devel/gettext"
+
+S=${WORKDIR}/${PN}-${PN}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-lcms2-integration.patch
+ "${FILESDIR}"/${P}-fix_version.patch
+)
+
+src_prepare() {
+ base_src_prepare
+
+ epatch_user
+
+ eautoreconf
+}
+
+src_configure() {
+ # Force disable experimental stuff
+ local myconf="--disable-dependency-tracking
+ --with-readmedir=/usr/share/doc/${PF}
+ --disable-gtk3
+ --disable-clutter
+ --disable-gps
+ $(use_enable jpeg)
+ $(use_enable lcms)
+ $(use_enable lua)
+ $(use_enable lirc)
+ $(use_enable tiff)"
+
+ if use exif || use xmp; then
+ myconf="${myconf} --enable-exiv2"
+ else
+ myconf="${myconf} --disable-exiv2"
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -f "${D}/usr/share/doc/${MY_P}/COPYING"
+}
+
+pkg_postinst() {
+ elog "Some plugins may require additional packages"
+ elog "- Image rotate plugin: media-gfx/fbida (JPEG), media-gfx/imagemagick (TIFF/PNG)"
+ elog "- RAW images plugin: media-gfx/ufraw"
+}
diff --git a/media-gfx/geeqie/metadata.xml b/media-gfx/geeqie/metadata.xml
new file mode 100644
index 000000000000..aed8fe3e0896
--- /dev/null
+++ b/media-gfx/geeqie/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>voyageur@gentoo.org</email>
+ <name>Bernard Cafarelli</name>
+ </maintainer>
+ <longdescription>Geeqie is a lightweight image viewer. It was forked from GQview. The development is focused on features for photo collection maintenance: raw format, Exif/IPTC/XMP metadata and integration with programs like UFraw, ImageMagick, Gimp, gPhoto or ExifTool</longdescription>
+</pkgmetadata>
diff --git a/media-gfx/gif2apng/Manifest b/media-gfx/gif2apng/Manifest
new file mode 100644
index 000000000000..f4ab14577f95
--- /dev/null
+++ b/media-gfx/gif2apng/Manifest
@@ -0,0 +1,4 @@
+DIST gif2apng-1.6-src.zip 8450 SHA256 1827b443f84319e8549c3235f2c3ac75b88e423bc0bf3218e658ad13b502537b
+DIST gif2apng-1.7-src.zip 8380 SHA256 3ceca8a421bdb6e4f1253a74d20b25cbaf484d8f62edc7f964b423c69d179996
+DIST gif2apng-1.8-src.zip 254365 SHA256 7ef4030dcfaaa5a0cba759d78d3b15c783902dce3aefeb1e8d7d5a6cfacbb639 SHA512 5a99e2b791b4a480c173d02d6360c4760a942b751907e9b3bf5a8db04b9c4a22872e62360f2c8253d1b3a0c5312931ff307175753fac798e3496588171fa8d4a WHIRLPOOL 1553e7c4fc98e21f3c33dc32822a0eb2c627d25357cf626a70aa9ddb59375ce758ce1201360eb31450e2d50f2951ccf5950b90f35a3ddfdd293917ca34bfce60
+DIST gif2apng-1.9-src.zip 258946 SHA256 3b21308e935d799b3ffb4a86c6e00ffa4cb9b3f72f52d58d51c66eb0574ae7d2 SHA512 6f161699aad949466c60e0fb6abb2f38e7ec8353dd15e65ccb9944a66dabc5a4acf32523cb64073c73290e54cc2b753db68123c14f3f7789343491a4f65dcd2c WHIRLPOOL 5e2058886505a89015f756c4d6a9e5f9e1a3efb74a8c754940fe79c6b9a00f54be416d2026bb7c8a3e918d051a5c7bb4681e21dfb0971d55e38f92ef5f04d631
diff --git a/media-gfx/gif2apng/files/gif2apng-1.8-flags.patch b/media-gfx/gif2apng/files/gif2apng-1.8-flags.patch
new file mode 100644
index 000000000000..fd8884a4dd05
--- /dev/null
+++ b/media-gfx/gif2apng/files/gif2apng-1.8-flags.patch
@@ -0,0 +1,26 @@
+--- gif2apng-1.8-src/Makefile
++++ gif2apng-1.8-src/Makefile
+@@ -11,19 +11,19 @@
+ all : $(PROG_NAME)
+
+ gif2apng : objdirs $(OBJECTS)
+- $(CC) -o $@ $(OBJECTS) -s -lstdc++ -lz
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) -lstdc++ -lz -lm
+
+ objdirs :
+ mkdir -p $(OBJ_DIRS)
+
+ obj/%.o : %.cpp
+- $(CC) -o $@ -c $< $(INCUDE_DIRS) -O2 -Wall -pedantic -lz
++ $(CC) $(CFLAGS) -o $@ -c $< $(INCUDE_DIRS) -Wall -pedantic -lz -lm
+
+ obj/%.o : %.c
+- $(CC) -o $@ -c $< $(INCUDE_DIRS) -O2 -Wall -pedantic -lz
++ $(CC) $(CFLAGS) -o $@ -c $< $(INCUDE_DIRS) -Wall -pedantic -lz -lm
+
+ obj/%.o : %.cc
+- $(CC) -o $@ -c $< $(INCUDE_DIRS) -O2 -Wall -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses -lz
++ $(CC) $(CFLAGS) -o $@ -c $< $(INCUDE_DIRS) -Wall -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses -lz -lm
+
+ .PHONY : clean
+
diff --git a/media-gfx/gif2apng/files/gif2apng-1.9-flags.patch b/media-gfx/gif2apng/files/gif2apng-1.9-flags.patch
new file mode 100644
index 000000000000..0fe80eab8384
--- /dev/null
+++ b/media-gfx/gif2apng/files/gif2apng-1.9-flags.patch
@@ -0,0 +1,15 @@
+--- gif2apng-1.9-src/Makefile
++++ gif2apng-1.9-src/Makefile
+@@ -1,10 +1,9 @@
+ PACKAGE = gif2apng
+ CC = gcc
+ SRC_DIRS = . 7z zopfli
+-CFLAGS = -Wall -pedantic
+-CFLAGS_OPT = -O2
++CFLAGS += -Wall -pedantic
++CFLAGS_OPT =
+ CFLAGS_7Z = -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses
+-LDFLAGS = -s
+ LIBS = -lstdc++ -lm -lz
+
+ INCUDE_DIRS := $(addprefix -I./, $(SRC_DIRS))
diff --git a/media-gfx/gif2apng/gif2apng-1.6.ebuild b/media-gfx/gif2apng/gif2apng-1.6.ebuild
new file mode 100644
index 000000000000..02c481d62692
--- /dev/null
+++ b/media-gfx/gif2apng/gif2apng-1.6.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="create an APNG from a GIF"
+HOMEPAGE="http://sourceforge.net/projects/gif2apng/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDLIBS="-lz" ${PN}
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/gif2apng/gif2apng-1.7.ebuild b/media-gfx/gif2apng/gif2apng-1.7.ebuild
new file mode 100644
index 000000000000..4b543baae601
--- /dev/null
+++ b/media-gfx/gif2apng/gif2apng-1.7.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit toolchain-funcs
+
+DESCRIPTION="create an APNG from a GIF"
+HOMEPAGE="http://sourceforge.net/projects/gif2apng/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_compile() {
+ emake CC="$(tc-getCC)" LDLIBS="-lz" ${PN}
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/gif2apng/gif2apng-1.8.ebuild b/media-gfx/gif2apng/gif2apng-1.8.ebuild
new file mode 100644
index 000000000000..e99d85a1ba68
--- /dev/null
+++ b/media-gfx/gif2apng/gif2apng-1.8.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="create an APNG from a GIF"
+HOMEPAGE="http://sourceforge.net/projects/gif2apng/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-flags.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/gif2apng/gif2apng-1.9.ebuild b/media-gfx/gif2apng/gif2apng-1.9.ebuild
new file mode 100644
index 000000000000..f117e2e2715f
--- /dev/null
+++ b/media-gfx/gif2apng/gif2apng-1.9.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="create an APNG from a GIF"
+HOMEPAGE="http://sourceforge.net/projects/gif2apng/"
+SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}-src.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-flags.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/gif2apng/metadata.xml b/media-gfx/gif2apng/metadata.xml
new file mode 100644
index 000000000000..10f3816a1001
--- /dev/null
+++ b/media-gfx/gif2apng/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">gif2apng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/gif2png/Manifest b/media-gfx/gif2png/Manifest
new file mode 100644
index 000000000000..4ca003d9333d
--- /dev/null
+++ b/media-gfx/gif2png/Manifest
@@ -0,0 +1,3 @@
+DIST gif2png-2.5.10.tar.gz 138944 SHA256 c5a43875b3c616ce102462d8c23cd09c13c9e0c234d9d7df4e4eae7ccee5494d SHA512 3ca1c0d41a38b4b628f929afa231b8f67079f9998210e63b68e4438379a5d70b64d332f7e0786fb199ef866e188f5095c0d0d4570ec9da829aeac63c8918ad3e WHIRLPOOL 668dcc30a9644495f45c3ae93d08a4463290b79b1fd7f5cca6a1813da75e696ecaea1be93fd6278557d8b2760172d44b29f572e492f673bafd2d5a4f9d010a3f
+DIST gif2png-2.5.8.tar.gz 128373 SHA256 f962c6d1a76d6ec376cd380112235901dc0c130cc134db5e65a3408b4904ff18 SHA512 050c516c125efda315e6bc7e4fadcdd612a9596bd1e6f611865a457efb06153a45516eca343422e15ad75b1219f82ec855f03781285df411590008f5a67e0554 WHIRLPOOL 7e1e69e4f74b12033a30ef9ec86be2d454e9ce2b138af38a5a1e6438f1a264dad5d4ab02e79be089d89b7fa8694c371e6e18e4e81dc84bd0fb4e60f1049f4fc4
+DIST gif2png-2.5.9.tar.gz 137750 SHA256 c8406b7c0c08f504952a1719e04f2366ee44c888c0edfac3a63fea2ab05b64c7 SHA512 0632f1b4b96a1e4b5567101fbac36db55e658503977c8c875d75d9c1db5b374deba5afbda5507585b6b79242781fd70afc477e686458cc124adb8e1b29860c1e WHIRLPOOL c4777997a3222ca209dcb10a21503130a2a691f2c5b3deb8e27f800048e502199a2ab66cc417fbec306a7f7f26eb63ac33c2b224e8f3230fd325179e0fc0b901
diff --git a/media-gfx/gif2png/gif2png-2.5.10.ebuild b/media-gfx/gif2png/gif2png-2.5.10.ebuild
new file mode 100644
index 000000000000..213cf469aa92
--- /dev/null
+++ b/media-gfx/gif2png/gif2png-2.5.10.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Converts images from gif format to png format"
+HOMEPAGE="http://catb.org/~esr/gif2png/"
+SRC_URI="http://catb.org/~esr/${PN}/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+RDEPEND=">=media-libs/libpng-1.2:0
+ sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+DOCS="AUTHORS NEWS README"
diff --git a/media-gfx/gif2png/gif2png-2.5.8.ebuild b/media-gfx/gif2png/gif2png-2.5.8.ebuild
new file mode 100644
index 000000000000..04dfcd815b15
--- /dev/null
+++ b/media-gfx/gif2png/gif2png-2.5.8.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="Converts images from gif format to png format"
+HOMEPAGE="http://catb.org/~esr/gif2png/"
+SRC_URI="http://catb.org/~esr/${PN}/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+RDEPEND=">=media-libs/libpng-1.2:0
+ sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+DOCS="AUTHORS NEWS README"
diff --git a/media-gfx/gif2png/gif2png-2.5.9.ebuild b/media-gfx/gif2png/gif2png-2.5.9.ebuild
new file mode 100644
index 000000000000..47e3bfb1b765
--- /dev/null
+++ b/media-gfx/gif2png/gif2png-2.5.9.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="Converts images from gif format to png format"
+HOMEPAGE="http://catb.org/~esr/gif2png/"
+SRC_URI="http://catb.org/~esr/${PN}/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+RDEPEND=">=media-libs/libpng-1.2:0
+ sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+DOCS="AUTHORS NEWS README"
diff --git a/media-gfx/gif2png/metadata.xml b/media-gfx/gif2png/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/gif2png/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/gifsicle/Manifest b/media-gfx/gifsicle/Manifest
new file mode 100644
index 000000000000..1bff84126b16
--- /dev/null
+++ b/media-gfx/gifsicle/Manifest
@@ -0,0 +1,7 @@
+DIST gifsicle-1.67.tar.gz 259070 SHA256 9e31299ae3e64de420eac186036be718069e51f7e199d382f33ddcadc7ab23c2
+DIST gifsicle-1.70.tar.gz 262069 SHA256 8ed2afd9771a78b8afdc2c2f61c548e184fa0cc0b7e671b8dd8d29c109ebc90c SHA512 fce01f2bbec107d11f13045c35e00d9a8a3bb0124552af52735798325b55096bb5ccd7cc489252ac5a55e085377251da330479a7c99cdf914047d07d2f92dae9 WHIRLPOOL 82ffa26c0624498a43140a338abd598de8e6dba4ae842c0a61075edb4cdf754f4ab1397440e9e33963f94e4ea239491550d08a6e5ce191fb826d92eee6659844
+DIST gifsicle-1.78.tar.gz 279592 SHA256 a36c4fe7492b52768ae9edc6f9ce40742c979e67a406b92889924e819e2ef737 SHA512 500a75fbfb21aecaf86e429eaa869cadaa46c2a3413f72123850e9d7b0ac126d991c831247450667e9d1ed7310c1a4ed5ff512e25c2fd0307164f8ef2b3b2633 WHIRLPOOL 931b1801870ac6fd1eff7943896e97325816dacc497119ae17412ba100a11b9b56dd9e1b362efb0fef1a9dc47f596b2e1d6d84fcd5a303c1886c273ba1c914b0
+DIST gifsicle-1.83.tar.gz 562494 SHA256 bf9e94b186dec957d93db1292f4b021a5f5e4c835f412988cd063279bd450eeb SHA512 6de96c5a2f26f1d6838a2ef6d7527bb3c9859334b905fb22ef16dc66ce25e81f8420c7d8fd6b1cc3d889088ea1c1eb8e3b2731a5e86ecf4cd23c5cd3eeeb0e34 WHIRLPOOL d5033d67eed7ea7d0e5d19df860da1d074c3b55933f17dc7958f9b22d99f89699fd17d5ae9d95f38bf683ec4c495e793d26354e7cae0b93e4685f1670d73b881
+DIST gifsicle-1.86.tar.gz 563638 SHA256 b0046d5e619240de00a6401e0056843cd57006f674e2babe0e9013e0dcb47394 SHA512 d55609e5d71f63ec13c1eed6a9071d756f07c765d2496d468cc7291e3b9e29304be1c3a5b0e822d9dc2df29ac489bafca2650d226d5b3c51dad74dd22c725a13 WHIRLPOOL 90228030b3a75c284faa0dab42b88ce220d4bf229d17fe2b88de5af91eab4b80dfbb0fe090ce50d91a186076659e43185b27e9d176f9187966ff571d77295a34
+DIST gifsicle-1.87.tar.gz 565438 SHA256 470abe3cacaa40cd98ea0d4dc37574148700b50cbf58bbb0ecd120fc0e8c191d SHA512 78373733aab9458c6cd8ffedb5dbbd6929243927d39e4576e3b05f9d1ee98353774d1b967b0386e1c54fdbc9a7f12f18f08ba0b7613194fe07f891f62f337698 WHIRLPOOL 674c876d7beccdb9bf27eb47c6986ca73317c601dc259a9de5950cf961f3451516a93c443cb36d56c1fb174a9546248055e23b849aba1ee1639a9f8f1a7320ea
+DIST gifsicle-1.88.tar.gz 564670 SHA256 4585d2e683d7f68eb8fcb15504732d71d7ede48ab5963e61915201f9e68305be SHA512 4a54557d2a9acb4601151f7a266156ebd317bddb1255d84df042a62be0f57bd75ad8585794bd82081701977c84781696bb06565a3aa1709e0ef04ab89fb2df91 WHIRLPOOL c934fab55f04ed426126bbdfcc5ad6e450f3e642b6d28ef4ae31b225916aa2cecc2a91d7fe82784ea7ffddf8d7bb292bce6194e814f9d74a12fe8a78043c6c44
diff --git a/media-gfx/gifsicle/gifsicle-1.67.ebuild b/media-gfx/gifsicle/gifsicle-1.67.ebuild
new file mode 100644
index 000000000000..e45f33e044d5
--- /dev/null
+++ b/media-gfx/gifsicle/gifsicle-1.67.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A command-line tool for creating, editing, and getting information about GIF images and animations"
+HOMEPAGE="http://www.lcdf.org/~eddietwo/gifsicle/"
+SRC_URI="http://www.lcdf.org/~eddietwo/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="X"
+
+RDEPEND="X? ( x11-libs/libX11 x11-libs/libXt )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+src_configure() {
+ local myconf
+ use X || myconf='--disable-gifview'
+
+ econf ${myconf}
+}
diff --git a/media-gfx/gifsicle/gifsicle-1.70.ebuild b/media-gfx/gifsicle/gifsicle-1.70.ebuild
new file mode 100644
index 000000000000..3730256f6c4e
--- /dev/null
+++ b/media-gfx/gifsicle/gifsicle-1.70.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A command-line tool for creating, editing, and getting information about GIF images and animations"
+HOMEPAGE="http://www.lcdf.org/~eddietwo/gifsicle/"
+SRC_URI="http://www.lcdf.org/~eddietwo/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="X"
+
+RDEPEND="X? ( x11-libs/libX11 x11-libs/libXt )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+src_configure() {
+ local myconf
+ use X || myconf='--disable-gifview'
+
+ econf ${myconf}
+}
diff --git a/media-gfx/gifsicle/gifsicle-1.78.ebuild b/media-gfx/gifsicle/gifsicle-1.78.ebuild
new file mode 100644
index 000000000000..71e5e4f23ba1
--- /dev/null
+++ b/media-gfx/gifsicle/gifsicle-1.78.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A command-line tool for creating, editing, and getting information about GIF images and animations"
+HOMEPAGE="http://www.lcdf.org/~eddietwo/gifsicle/"
+SRC_URI="http://www.lcdf.org/~eddietwo/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="X"
+
+RDEPEND="X? ( x11-libs/libX11 x11-libs/libXt )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+src_configure() {
+ local myconf
+ use X || myconf='--disable-gifview'
+
+ econf ${myconf}
+}
diff --git a/media-gfx/gifsicle/gifsicle-1.83.ebuild b/media-gfx/gifsicle/gifsicle-1.83.ebuild
new file mode 100644
index 000000000000..2515993109bb
--- /dev/null
+++ b/media-gfx/gifsicle/gifsicle-1.83.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A command-line tool for creating, editing, and getting information about GIF images and animations"
+HOMEPAGE="http://www.lcdf.org/~eddietwo/gifsicle/"
+SRC_URI="http://www.lcdf.org/~eddietwo/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="X"
+
+RDEPEND="X? ( x11-libs/libX11 x11-libs/libXt )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+src_configure() {
+ local myconf
+ use X || myconf='--disable-gifview'
+
+ econf ${myconf}
+}
diff --git a/media-gfx/gifsicle/gifsicle-1.86.ebuild b/media-gfx/gifsicle/gifsicle-1.86.ebuild
new file mode 100644
index 000000000000..65a93c9f05be
--- /dev/null
+++ b/media-gfx/gifsicle/gifsicle-1.86.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A command-line tool for creating, editing, and getting information about GIF images and animations"
+HOMEPAGE="http://www.lcdf.org/~eddietwo/gifsicle/"
+SRC_URI="http://www.lcdf.org/~eddietwo/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="X"
+
+RDEPEND="X? ( x11-libs/libX11 x11-libs/libXt )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+src_configure() {
+ local myconf
+ use X || myconf='--disable-gifview'
+
+ econf ${myconf}
+}
diff --git a/media-gfx/gifsicle/gifsicle-1.87.ebuild b/media-gfx/gifsicle/gifsicle-1.87.ebuild
new file mode 100644
index 000000000000..4075fa397a62
--- /dev/null
+++ b/media-gfx/gifsicle/gifsicle-1.87.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A command-line tool for creating, editing, and getting information about GIF images and animations"
+HOMEPAGE="http://www.lcdf.org/~eddietwo/gifsicle/"
+SRC_URI="http://www.lcdf.org/~eddietwo/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="X"
+
+RDEPEND="X? ( x11-libs/libX11 x11-libs/libXt )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+src_configure() {
+ local myconf
+ use X || myconf='--disable-gifview'
+
+ econf ${myconf}
+}
diff --git a/media-gfx/gifsicle/gifsicle-1.88.ebuild b/media-gfx/gifsicle/gifsicle-1.88.ebuild
new file mode 100644
index 000000000000..4075fa397a62
--- /dev/null
+++ b/media-gfx/gifsicle/gifsicle-1.88.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+DESCRIPTION="A command-line tool for creating, editing, and getting information about GIF images and animations"
+HOMEPAGE="http://www.lcdf.org/~eddietwo/gifsicle/"
+SRC_URI="http://www.lcdf.org/~eddietwo/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="X"
+
+RDEPEND="X? ( x11-libs/libX11 x11-libs/libXt )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xproto )"
+
+src_configure() {
+ local myconf
+ use X || myconf='--disable-gifview'
+
+ econf ${myconf}
+}
diff --git a/media-gfx/gifsicle/metadata.xml b/media-gfx/gifsicle/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/gifsicle/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/gimageview/Manifest b/media-gfx/gimageview/Manifest
new file mode 100644
index 000000000000..07cf11601b06
--- /dev/null
+++ b/media-gfx/gimageview/Manifest
@@ -0,0 +1 @@
+DIST gimageview-0.2.27.tar.gz 1348286 SHA256 4bc899d734e9833478c1ae8fc6d9db0971d812aeefe6f1295b5edbd4e4639060 SHA512 36ac16f4fffcde34b608da35aa089d40225129a2f9dcd70cb024713738842600c7231522093b3d0bf5a7c4c4dcb7ba4b14d550e417e8b52030d43d4b51145220 WHIRLPOOL 61b53e811058447d74970666cb80830aeaa3da5f0d9298512bb34e5b4802101f00858ed6526b9b50a98f8528875fe9cbefc1b53500eaca7933c190e11f224e67
diff --git a/media-gfx/gimageview/files/gimageview-0.2.27-gtk12_fix.diff b/media-gfx/gimageview/files/gimageview-0.2.27-gtk12_fix.diff
new file mode 100644
index 000000000000..9b82d2f6479e
--- /dev/null
+++ b/media-gfx/gimageview/files/gimageview-0.2.27-gtk12_fix.diff
@@ -0,0 +1,11 @@
+--- src/gimv_thumb_win.c
++++ src/gimv_thumb_win.c
+@@ -2542,7 +2542,7 @@
+ {
+ if (tw && tw->priv)
+ tw->priv->slideshow_selected_only
+- = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget));
++ = GTK_CHECK_MENU_ITEM (widget)->active;
+ }
+
+
diff --git a/media-gfx/gimageview/files/gimageview-0.2.27-gtk2.patch b/media-gfx/gimageview/files/gimageview-0.2.27-gtk2.patch
new file mode 100644
index 000000000000..7ab7ebb03212
--- /dev/null
+++ b/media-gfx/gimageview/files/gimageview-0.2.27-gtk2.patch
@@ -0,0 +1,24 @@
+--- src/gimv_cell_pixmap.c
++++ src/gimv_cell_pixmap.c
+@@ -25,10 +25,6 @@
+ * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
+ */
+
+-#ifndef GTK_DISABLE_DEPRECATED
+-# define GTK_DISABLE_DEPRECATED
+-#endif /* GTK_DISABLE_DEPRECATED */
+-
+ #include "gimv_cell_pixmap.h"
+
+ #if (GTK_MAJOR_VERSION >= 2)
+--- src/gimv_image.c
++++ src/gimv_image.c
+@@ -35,7 +35,7 @@
+ #include "gimv_io.h"
+ #include "gimv_image_saver.h"
+
+-#if defined (HAVE_GDK_PIXBUF)
++#if defined (HAVE_GDK_PIXBUF) || defined (USE_GTK2)
+ # include <gdk-pixbuf/gdk-pixbuf.h>
+ # include "pixbuf_utils.h"
+ typedef GdkPixbuf GimvRawImage;
diff --git a/media-gfx/gimageview/files/gimageview-0.2.27-libpng15.patch b/media-gfx/gimageview/files/gimageview-0.2.27-libpng15.patch
new file mode 100644
index 000000000000..2df9712869e1
--- /dev/null
+++ b/media-gfx/gimageview/files/gimageview-0.2.27-libpng15.patch
@@ -0,0 +1,24 @@
+http://bugs.gentoo.org/361941
+
+--- plugins/image_loader/png_loader.c
++++ plugins/image_loader/png_loader.c
+@@ -255,7 +255,7 @@
+ return NULL;
+ }
+
+- if (setjmp (png_ptr->jmpbuf)) goto ERROR;
++ if (setjmp (png_jmpbuf(png_ptr))) goto ERROR;
+
+ context.gio = gio;
+ context.bytes_read = 0;
+--- plugins/image_saver/png_saver.c
++++ plugins/image_saver/png_saver.c
+@@ -130,7 +130,7 @@
+ return FALSE;
+ }
+
+- if (setjmp (png_ptr->jmpbuf)) {
++ if (setjmp (png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct (&png_ptr, &info_ptr);
+ fclose (handle);
+ return FALSE;
diff --git a/media-gfx/gimageview/files/gimageview-0.2.27-sort_fix.diff b/media-gfx/gimageview/files/gimageview-0.2.27-sort_fix.diff
new file mode 100644
index 000000000000..d65b3a07ad56
--- /dev/null
+++ b/media-gfx/gimageview/files/gimageview-0.2.27-sort_fix.diff
@@ -0,0 +1,30 @@
+--- src/gimv_thumb_view.c
++++ src/gimv_thumb_view.c
+@@ -1533,9 +1533,13 @@
+
+ gimv_thumb_view_sort_data (tv);
+
++#if 0
+ for (node = new_thumb_list; node; node = g_list_next (node))
+ tv->vfuncs->insert_thumb (tv, node->data, tv->summary_mode);
+ g_list_free(new_thumb_list);
++#endif
++
++ gimv_thumb_view_set_widget (tv, tv->tw, tv->container, tv->summary_mode);
+ }
+
+
+@@ -1577,9 +1581,13 @@
+
+ gimv_thumb_view_sort_data (tv);
+
++#if 0
+ for (node = new_thumb_list; node; node = g_list_next (node))
+ tv->vfuncs->insert_thumb (tv, node->data, tv->summary_mode);
+ g_list_free(new_thumb_list);
++#endif
++
++ gimv_thumb_view_set_widget (tv, tv->tw, tv->container, tv->summary_mode);
+ }
+
+
diff --git a/media-gfx/gimageview/gimageview-0.2.27-r3.ebuild b/media-gfx/gimageview/gimageview-0.2.27-r3.ebuild
new file mode 100644
index 000000000000..81442969d306
--- /dev/null
+++ b/media-gfx/gimageview/gimageview-0.2.27-r3.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# TODO: USE xine could be restored if support for xine-lib-1.2.x
+# is patched in wrt #397639
+
+EAPI=4
+inherit eutils libtool
+
+DESCRIPTION="Powerful GTK+ based image & movie viewer"
+HOMEPAGE="http://gtkmmviewer.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gtkmmviewer/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc ppc64 x86"
+IUSE="mng nls mplayer svg wmf" #xine
+
+RDEPEND="app-arch/bzip2
+ x11-libs/gtk+:2
+ >=media-libs/libpng-1.2:0
+ x11-libs/libXinerama
+ wmf? ( >=media-libs/libwmf-0.2.8 )
+ mng? ( media-libs/libmng )
+ svg? ( gnome-base/librsvg )
+ mplayer? ( media-video/mplayer )"
+#xine? ( media-libs/xine-lib )
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig"
+
+src_prepare() {
+ # link gimv executable against -lm for floor() and pow()
+ sed -i -e 's/$(gimv_LDADD)/& -lm/' src/Makefile.in || die #417995
+
+ epatch \
+ "${FILESDIR}"/${P}-sort_fix.diff \
+ "${FILESDIR}"/${P}-gtk12_fix.diff \
+ "${FILESDIR}"/${P}-gtk2.patch \
+ "${FILESDIR}"/${P}-libpng15.patch
+
+ # desktop-file-validate
+ sed -i -e '/^Term/s:0:false:' -e '/^Icon/s:.png::' etc/${PN}.desktop.in || die
+
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ --disable-imlib \
+ $(use_enable nls) \
+ --enable-splash \
+ $(use_enable mplayer) \
+ --with-gtk2 \
+ $(use_with mng libmng) \
+ $(use_with svg librsvg) \
+ $(use_with wmf libwmf) \
+ --without-xine
+}
+
+src_install() {
+ einstall \
+ desktopdir="${D}"usr/share/applications \
+ gimv_docdir="${D}"usr/share/doc/${PF}
+
+ find "${ED}"usr -name '*.la' -exec rm -f {} +
+}
diff --git a/media-gfx/gimageview/metadata.xml b/media-gfx/gimageview/metadata.xml
new file mode 100644
index 000000000000..930b43de954c
--- /dev/null
+++ b/media-gfx/gimageview/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">gtkmmviewer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/gimmage/Manifest b/media-gfx/gimmage/Manifest
new file mode 100644
index 000000000000..cf9a15cd31c9
--- /dev/null
+++ b/media-gfx/gimmage/Manifest
@@ -0,0 +1 @@
+DIST gimmage-0.2.3.tar.gz 193777 SHA256 3d5ce3c3fd22efc9fd930e97e33e2c13a755e0a9cf099d12d5f7ecf92cab907b SHA512 ff8fdf860d4712502e6e8656a14e5327a5b89af49f312e54de5f0e80cd6e406214a61228c79ad643c2640268d5eacfd760c83acbebdc7fa9b6e7c094728be167 WHIRLPOOL 7d1a9485da568baec8c430dc5a9fc12eb7dd8943fa17e5fbdc00ea4334548f1f42cad1690c6f171ecb682853a86d79e0e8324e49472c5ccbd8831a800d863792
diff --git a/media-gfx/gimmage/files/gimmage-0.2.3-as-needed.patch b/media-gfx/gimmage/files/gimmage-0.2.3-as-needed.patch
new file mode 100644
index 000000000000..2e24078bd85d
--- /dev/null
+++ b/media-gfx/gimmage/files/gimmage-0.2.3-as-needed.patch
@@ -0,0 +1,11 @@
+diff -ru gimmage-0.2.3.orig/src/Makefile.am gimmage-0.2.3/src/Makefile.am
+--- gimmage-0.2.3.orig/src/Makefile.am 2008-11-30 18:43:28.000000000 +0100
++++ gimmage-0.2.3/src/Makefile.am 2008-11-30 18:43:40.000000000 +0100
+@@ -7,5 +7,5 @@
+ SaveErrorDialog.cpp SaveErrorDialog.h \
+ main.cpp defines.h
+
+-AM_CXXFLAGS = @CXXFLAGS@ $(DEPS_CFLAGS) -lcurl -lmagic
+-LDADD = $(DEPS_LIBS)
++AM_CXXFLAGS = @CXXFLAGS@ $(DEPS_CFLAGS)
++LDADD = $(DEPS_LIBS) -lcurl -lmagic
diff --git a/media-gfx/gimmage/files/gimmage-0.2.3-desktop-entry.patch b/media-gfx/gimmage/files/gimmage-0.2.3-desktop-entry.patch
new file mode 100644
index 000000000000..c80b43d0b293
--- /dev/null
+++ b/media-gfx/gimmage/files/gimmage-0.2.3-desktop-entry.patch
@@ -0,0 +1,16 @@
+diff -ur gimmage-0.2.3.orig/gimmage.desktop.in gimmage-0.2.3/gimmage.desktop.in
+--- gimmage-0.2.3.orig/gimmage.desktop.in 2007-06-27 00:22:57.000000000 +0300
++++ gimmage-0.2.3/gimmage.desktop.in 2010-08-06 20:42:55.000000000 +0300
+@@ -1,8 +1,8 @@
+ [Desktop Entry]
+ Name=gimmage
+ Exec=@prefix@/bin/gimmage
+-Icon=gimmage.png
++Icon=gimmage
+ Type=Application
+-Categories=Application;Graphics;
++Categories=Graphics;
+ Comment=A simple image viewer.
+-MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/png;image/tiff;image/x-bmp;image/x-pcx;image/x-tga;image/x-portable-pixmap;image/x-portable-bitmap;image/x-targa;image/x-portable-greymap;application/pcx;image/svg+xml;image/svg-xml
+\ No newline at end of file
++MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/png;image/tiff;image/x-bmp;image/x-pcx;image/x-tga;image/x-portable-pixmap;image/x-portable-bitmap;image/x-targa;image/x-portable-greymap;application/pcx;image/svg+xml;image/svg-xml;
diff --git a/media-gfx/gimmage/files/gimmage-0.2.3-gcc43.patch b/media-gfx/gimmage/files/gimmage-0.2.3-gcc43.patch
new file mode 100644
index 000000000000..7dd6686c1314
--- /dev/null
+++ b/media-gfx/gimmage/files/gimmage-0.2.3-gcc43.patch
@@ -0,0 +1,11 @@
+--- gimmage-0.2.3/src/FileManager.cpp~ 2007-06-26 15:51:15.000000000 +0200
++++ gimmage-0.2.3/src/FileManager.cpp 2008-02-16 13:58:34.000000000 +0100
+@@ -21,6 +21,8 @@
+
+ // we make extensive use of get_current_dir_name() from Glib
+
++#include <cstring>
++
+ #include "FileManager.h"
+ #include "defines.h"
+
diff --git a/media-gfx/gimmage/files/gimmage-0.2.3-gcc47.patch b/media-gfx/gimmage/files/gimmage-0.2.3-gcc47.patch
new file mode 100644
index 000000000000..bc39028cf161
--- /dev/null
+++ b/media-gfx/gimmage/files/gimmage-0.2.3-gcc47.patch
@@ -0,0 +1,19 @@
+https://bugs.gentoo.org/422453
+
+error: 'get_current_dir_name' was not declared in this scope
+
+
+ src/FileManager.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/FileManager.cpp
++++ b/src/FileManager.cpp
+@@ -30,7 +30,7 @@ Copyright 2006 Bartek Kostrzewa
+
+ extern "C" {
+ #include <libintl.h>
+-// #include <unistd.h>
++#include <unistd.h>
+ #include <sys/stat.h>
+ }
+
diff --git a/media-gfx/gimmage/gimmage-0.2.3.ebuild b/media-gfx/gimmage/gimmage-0.2.3.ebuild
new file mode 100644
index 000000000000..308e52822bb3
--- /dev/null
+++ b/media-gfx/gimmage/gimmage-0.2.3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools eutils
+
+DESCRIPTION="A slim GTK-based image browser"
+HOMEPAGE="http://gimmage.berlios.de/"
+SRC_URI="mirror://berlios/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="debug"
+
+RDEPEND="dev-cpp/cairomm
+ >=dev-cpp/gtkmm-2.6.2:2.4
+ net-misc/curl
+ sys-apps/file"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-as-needed.patch \
+ "${FILESDIR}"/${P}-desktop-entry.patch \
+ "${FILESDIR}"/${P}-gcc47.patch
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ use debug && myconf="--enable-debug"
+
+ econf ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+}
diff --git a/media-gfx/gimmage/metadata.xml b/media-gfx/gimmage/metadata.xml
new file mode 100644
index 000000000000..d44388b7a8e8
--- /dev/null
+++ b/media-gfx/gimmage/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription lang="en">
+ gimmage: the gtkmm image viewer
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/gimp-arrow-brushes/Manifest b/media-gfx/gimp-arrow-brushes/Manifest
new file mode 100644
index 000000000000..94e5f81ba267
--- /dev/null
+++ b/media-gfx/gimp-arrow-brushes/Manifest
@@ -0,0 +1,9 @@
+DIST arrow_action.tar.bz2 200063 SHA256 8f8efc25459419a918f52c5daa56e8a70bdc757e5930d84ceb039526f6ec83d1
+DIST arrow_brushes_BW_1.tar.bz2 10222 SHA256 10acd8eaefe63eca977238863438a03a785ba2986de3a908dc73728005e532dc
+DIST arrow_brushes_BW_2.tar.bz2 8498 SHA256 41394917472ee5efca14d6bfea3559bdc2cc7f41aae0e71501333c50ad77d3bb
+DIST arrow_brushes_black_gloss.tar.bz2 35106 SHA256 3402da70b1eda195f7541ee250298446977d560482fbf7b22149567a0b6f84cc
+DIST arrow_brushes_color_1.tar.bz2 6911 SHA256 3c4e2d47a65ce1fd1b2374593ed457c9943046fc8024ea1e3d56d4488d2fd272
+DIST arrow_brushes_color_2.tar.bz2 33699 SHA256 b787c14fac6f347481bcdf34814b0f4bc423966d9a963c10d3eb879b57ec5cff
+DIST button_arrow_brushes.tar.bz2 35320 SHA256 0f53d8f2c87684cf78a2761fd1ae9aa35353535bcb1ee1b07109b573d0457a89
+DIST cursor_brushes-1.0.tar.bz2 18272 SHA256 b18af5ee326bcf39ae08eacab7fd393d349985abd6aeead5eb4230756ed68b0a
+DIST hand_pointer_brushes.tar.bz2 19068 SHA256 703a37b79db6084b915aa535f55eaecb6d6387ee4c4e9a1f482ef9951fda5f6e
diff --git a/media-gfx/gimp-arrow-brushes/gimp-arrow-brushes-20120122.ebuild b/media-gfx/gimp-arrow-brushes/gimp-arrow-brushes-20120122.ebuild
new file mode 100644
index 000000000000..d55fb56e84be
--- /dev/null
+++ b/media-gfx/gimp-arrow-brushes/gimp-arrow-brushes-20120122.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="Brushes for GIMP including the styles arrow, handpointer, button arrow and cursor"
+HOMEPAGE="http://www.gimphelp.org/index.shtml"
+SRC_URI="http://www.gimphelp.org/DL/arrow_brushes_color_1.tar.bz2
+ http://www.gimphelp.org/DL/arrow_brushes_color_2.tar.bz2
+ http://www.gimphelp.org/DL/arrow_brushes_BW_1.tar.bz2
+ http://www.gimphelp.org/DL/arrow_brushes_BW_2.tar.bz2
+ http://www.gimphelp.org/DL/arrow_brushes_black_gloss.tar.bz2
+ http://www.gimphelp.org/DL/hand_pointer_brushes.tar.bz2
+ http://www.gimphelp.org/DL/button_arrow_brushes.tar.bz2
+ http://www.gimphelp.org/DL/arrow_action.tar.bz2
+ http://www.gimphelp.org/DL/cursor_brushes-1.0.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND=""
+
+S="${WORKDIR}"
+
+src_install() {
+ for i in */*.gbr; do
+ insinto /usr/share/gimp/2.0/brushes
+ doins $i
+ done
+}
diff --git a/media-gfx/gimp-arrow-brushes/metadata.xml b/media-gfx/gimp-arrow-brushes/metadata.xml
new file mode 100644
index 000000000000..034358f2ddeb
--- /dev/null
+++ b/media-gfx/gimp-arrow-brushes/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>pacho@gentoo.org</email>
+ <name>Pacho Ramos</name>
+</maintainer>
+</pkgmetadata> \ No newline at end of file
diff --git a/media-gfx/gimp/Manifest b/media-gfx/gimp/Manifest
new file mode 100644
index 000000000000..6a2af6b6fef1
--- /dev/null
+++ b/media-gfx/gimp/Manifest
@@ -0,0 +1,2 @@
+DIST gimp-2.8.10.tar.bz2 20343461 SHA256 e7fd8b19f989138d826003c75f56bd5b6f136eef597e86e3978ede0bba470ae6 SHA512 21c96832ce61ecb2dad5276b454e7965263b6733add7e4a95cfc5f308fca681bceab21c1b77921332e0725d0e514e06868a4698ca9d7e4b30a28a07c7356a3a8 WHIRLPOOL 16b0a7e8a4197db41da29832977bee917e65d5cbbf308dde1ba73c150742c70c52cd60d449d0fd0269b0ed5db0378461d3277a2350898c3a5e07b1f3cf8bdf47
+DIST gimp-2.8.14.tar.bz2 20440077 SHA256 d82a958641c9c752d68e35f65840925c08e314cea90222ad845892a40e05b22d SHA512 533f6b931624d36525cb2f3fbc27fe27565d761bbe26873bb5445c06c01523c044d1814363a8cd76b6e381440db4c6e302b0d3f7a9e5aac7f60072770552f1ba WHIRLPOOL 8fd7b0fd5f8627b2df83481f7956727acd42eafcdc9c9116713d60faf8578005c2fb1e1d729f3b2c836a90e9bab063e477f9da5285e5c43a79f2dbe441a0565b
diff --git a/media-gfx/gimp/files/gimp-2.6.11-file-uri.patch b/media-gfx/gimp/files/gimp-2.6.11-file-uri.patch
new file mode 100644
index 000000000000..2d3f161e064b
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.6.11-file-uri.patch
@@ -0,0 +1,79 @@
+--- plug-ins/file-uri/uri-backend-libcurl.c.orig 2011-09-01 09:06:13.307741499 -0500
++++ plug-ins/file-uri/uri-backend-libcurl.c 2011-09-01 09:09:09.066152187 -0500
+@@ -62,7 +62,7 @@
+
+ vinfo = curl_version_info (CURLVERSION_NOW);
+
+- protocols = g_string_new ("http:,ftp:");
++ protocols = g_string_new ("http:,ftp:,gopher:");
+
+ if (vinfo->features & CURL_VERSION_SSL)
+ {
+@@ -153,6 +153,11 @@
+ CURL *curl_handle;
+ CURLcode result;
+ gint response_code;
++ gchar *eff_url = NULL;
++ gchar *proto = NULL;
++ gboolean is_http = FALSE;
++ gboolean is_ftp = FALSE;
++ gboolean is_gopher = FALSE;
+
+ gimp_progress_init (_("Connecting to server"));
+
+@@ -194,13 +199,52 @@
+
+ curl_easy_getinfo (curl_handle, CURLINFO_RESPONSE_CODE, &response_code);
+
+- if (response_code != 200)
++ /* protocol could be not specified in provided uri
++ get complete url guessed by curl */
++ curl_easy_getinfo (curl_handle, CURLINFO_EFFECTIVE_URL, &eff_url);
++
++ /* detect uri protocol */
++ if (! g_ascii_strncasecmp (eff_url, "http://", 7))
++ {
++ is_http = TRUE;
++ proto = "HTTP";
++ }
++ else
++ if (! g_ascii_strncasecmp (eff_url, "https://", 8))
++ {
++ is_http = TRUE;
++ proto = "HTTPS";
++ }
++ else
++ if (! g_ascii_strncasecmp (eff_url, "ftp://", 6))
++ {
++ is_ftp = TRUE;
++ proto = "FTP";
++ }
++ else
++ if (! g_ascii_strncasecmp (eff_url, "ftps://", 7))
++ {
++ is_ftp = TRUE;
++ proto = "FTPS";
++ }
++ else
++ if (! g_ascii_strncasecmp (eff_url ,"gopher://", 9))
++ {
++ is_gopher = TRUE;
++ proto = "GOPHER";
++ }
++ else
++ {
++ proto = "UNKNOWN";
++ }
++
++ if (! ((is_http && response_code == 200) || (is_ftp && response_code == 226) || (is_gopher)))
+ {
+ fclose (out_file);
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+- _("Opening '%s' for reading resulted in HTTP "
++ _("Opening '%s' for reading resulted in %s "
+ "response code: %d"),
+- uri, response_code);
++ uri, proto, response_code);
+ curl_easy_cleanup (curl_handle);
+ return FALSE;
+ }
diff --git a/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-2763.patch b/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-2763.patch
new file mode 100644
index 000000000000..c922b6399cc8
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-2763.patch
@@ -0,0 +1,20 @@
+Fix for CVE-2012-2763 for GIMP 2.6.x by mancha. Based on commit
+76155d79df8d497. Thanks to muks, Kevin, and Ankh for identifying
+the relevant code change.
+
+Ref: Fixed potential buffer overflow in readstr_upto().
+
+================================================
+
+--- a/plug-ins/script-fu/tinyscheme/scheme.c.orig 2012-06-30
++++ b/plug-ins/script-fu/tinyscheme/scheme.c 2012-06-30
+@@ -1727,7 +1727,8 @@ static char *readstr_upto(scheme *sc, ch
+ c = inchar(sc);
+ len = g_unichar_to_utf8(c, p);
+ p += len;
+- } while (c && !is_one_of(delim, c));
++ } while ((p - sc->strbuff < sizeof(sc->strbuff)) &&
++ (c && !is_one_of(delim, c)));
+
+ if(p==sc->strbuff+2 && c_prev=='\\')
+ *p = '\0';
diff --git a/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3236.patch b/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3236.patch
new file mode 100644
index 000000000000..e4d3a9f96fb4
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3236.patch
@@ -0,0 +1,39 @@
+From ace45631595e8781a1420842582d67160097163c Mon Sep 17 00:00:00 2001
+From: Michael Natterer <mitch@gimp.org>
+Date: Wed, 06 Jun 2012 19:21:10 +0000
+Subject: Bug 676804 - file handling DoS for fit file format
+
+Apply patch from joe@reactionis.co.uk which fixes a buffer overflow on
+broken/malicious fits files.
+---
+(limited to 'plug-ins/file-fits/fits-io.c')
+
+diff --git a/plug-ins/file-fits/fits-io.c b/plug-ins/file-fits/fits-io.c
+index 03d9652..ed77318 100644
+--- a/plug-ins/file-fits/fits-io.c
++++ b/plug-ins/file-fits/fits-io.c
+@@ -1054,10 +1054,18 @@ static FITS_HDU_LIST *fits_decode_header (FITS_RECORD_LIST *hdr,
+ hdulist->used.simple = (strncmp (hdr->data, "SIMPLE ", 8) == 0);
+ hdulist->used.xtension = (strncmp (hdr->data, "XTENSION", 8) == 0);
+ if (hdulist->used.xtension)
+- {
+- fdat = fits_decode_card (fits_search_card (hdr, "XTENSION"), typ_fstring);
+- strcpy (hdulist->xtension, fdat->fstring);
+- }
++ {
++ fdat = fits_decode_card (fits_search_card (hdr, "XTENSION"), typ_fstring);
++ if (fdat != NULL)
++ {
++ strcpy (hdulist->xtension, fdat->fstring);
++ }
++ else
++ {
++ strcpy (errmsg, "No valid XTENSION header found.");
++ goto err_return;
++ }
++ }
+
+ FITS_DECODE_CARD (hdr, "NAXIS", fdat, typ_flong);
+ hdulist->naxis = fdat->flong;
+--
+cgit v0.9.0.2
diff --git a/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3403.patch b/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3403.patch
new file mode 100644
index 000000000000..f7d0b3766a60
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3403.patch
@@ -0,0 +1,511 @@
+From 65ac6cda675fafd57bc182175f685e5d8c1a9cc9 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 20 Aug 2012 15:28:44 +0200
+Subject: [PATCH] patch: CVE-2012-3403
+
+Squashed commit of the following:
+
+commit d002e513039a9667a06d3e2ba180f9c18785cc5f
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri Jul 13 15:47:16 2012 +0200
+
+ file-cel: close file on error
+
+commit ec3f1fe7586527ea7e2735b5c8548b925f622d5b
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri Jul 13 15:33:27 2012 +0200
+
+ file-cel: use g_set_error() for errors instead of g_message()
+ (cherry picked from commit 86f4cd39bd493c88a7a19b56d1827d8b911e07f6)
+
+ Conflicts:
+ plug-ins/common/file-cel.c
+
+commit 79bd89bc39195974d5cae2c2b06c829dd90c36ee
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri Jul 13 15:30:44 2012 +0200
+
+ file-cel: use statically allocated palette buffer
+ (cherry picked from commit 69b98191cf315bcf0f7b8878896c01600e67c124)
+
+commit 52d85468980b5947cfd3e84f9a256769158210cc
+Author: Nils Philippsen <nils@redhat.com>
+Date: Fri Jul 13 15:20:06 2012 +0200
+
+ file-cel: validate header data (CVE-2012-3403)
+ (cherry picked from commit b772d1b84c9272bb46ab9a21db4390e6263c9892)
+
+commit 62da97876070839097671e83eb8f5d408515396f
+Author: Nils Philippsen <nils@redhat.com>
+Date: Thu Jul 12 15:50:02 2012 +0200
+
+ file-cel: check fread()/g_fopen() return values and pass on errors
+ (cherry picked from commit 797db58b94c64f418c35d38b7a608d933c8cebef)
+---
+ plug-ins/common/file-cel.c | 283 +++++++++++++++++++++++++++++++++++++--------
+ 1 file changed, 234 insertions(+), 49 deletions(-)
+
+diff --git a/plug-ins/common/file-cel.c b/plug-ins/common/file-cel.c
+index a94671c..3357561 100644
+--- a/plug-ins/common/file-cel.c
++++ b/plug-ins/common/file-cel.c
+@@ -44,8 +44,10 @@ static void run (const gchar *name,
+ gint *nreturn_vals,
+ GimpParam **return_vals);
+
+-static gint load_palette (FILE *fp,
+- guchar palette[]);
++static gint load_palette (const gchar *file,
++ FILE *fp,
++ guchar palette[],
++ GError **error);
+ static gint32 load_image (const gchar *file,
+ const gchar *brief,
+ GError **error);
+@@ -55,7 +57,8 @@ static gboolean save_image (const gchar *file,
+ gint32 layer,
+ GError **error);
+ static void palette_dialog (const gchar *title);
+-static gboolean need_palette (const gchar *file);
++static gboolean need_palette (const gchar *file,
++ GError **error);
+
+
+ /* Globals... */
+@@ -150,6 +153,7 @@ run (const gchar *name,
+ gint32 image;
+ GimpExportReturn export = GIMP_EXPORT_CANCEL;
+ GError *error = NULL;
++ gint needs_palette = 0;
+
+ run_mode = param[0].data.d_int32;
+
+@@ -187,20 +191,32 @@ run (const gchar *name,
+ else if (run_mode == GIMP_RUN_INTERACTIVE)
+ {
+ /* Let user choose KCF palette (cancel ignores) */
+- if (need_palette (param[1].data.d_string))
+- palette_dialog (_("Load KISS Palette"));
++ needs_palette = need_palette (param[1].data.d_string, &error);
+
+- gimp_set_data (SAVE_PROC, palette_file, data_length);
+- }
++ if (! error)
++ {
++ if (needs_palette)
++ palette_dialog (_("Load KISS Palette"));
+
+- image = load_image (param[1].data.d_string, param[2].data.d_string,
+- &error);
++ gimp_set_data (SAVE_PROC, palette_file, data_length);
++ }
++ }
+
+- if (image != -1)
++ if (! error)
+ {
+- *nreturn_vals = 2;
+- values[1].type = GIMP_PDB_IMAGE;
+- values[1].data.d_image = image;
++ image = load_image (param[1].data.d_string, param[2].data.d_string,
++ &error);
++
++ if (image != -1)
++ {
++ *nreturn_vals = 2;
++ values[1].type = GIMP_PDB_IMAGE;
++ values[1].data.d_image = image;
++ }
++ else
++ {
++ status = GIMP_PDB_EXECUTION_ERROR;
++ }
+ }
+ else
+ {
+@@ -263,18 +279,33 @@ run (const gchar *name,
+
+ /* Peek into the file to determine whether we need a palette */
+ static gboolean
+-need_palette (const gchar *file)
++need_palette (const gchar *file,
++ GError **error)
+ {
+ FILE *fp;
+ guchar header[32];
++ size_t n_read;
+
+ fp = g_fopen (file, "rb");
+- if (!fp)
+- return FALSE;
++ if (fp == NULL)
++ {
++ g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
++ _("Could not open '%s' for reading: %s"),
++ gimp_filename_to_utf8 (file), g_strerror (errno));
++ return FALSE;
++ }
++
++ n_read = fread (header, 32, 1, fp);
+
+- fread (header, 32, 1, fp);
+ fclose (fp);
+
++ if (n_read < 1)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("EOF or error while reading image header"));
++ return FALSE;
++ }
++
+ return (header[5] < 32);
+ }
+
+@@ -286,11 +317,12 @@ load_image (const gchar *file,
+ GError **error)
+ {
+ FILE *fp; /* Read file pointer */
+- guchar header[32]; /* File header */
++ guchar header[32], /* File header */
++ file_mark, /* KiSS file type */
++ bpp; /* Bits per pixel */
+ gint height, width, /* Dimensions of image */
+ offx, offy, /* Layer offets */
+- colours, /* Number of colours */
+- bpp; /* Bits per pixel */
++ colours; /* Number of colours */
+
+ gint32 image, /* Image */
+ layer; /* Layer */
+@@ -301,6 +333,7 @@ load_image (const gchar *file,
+ GimpPixelRgn pixel_rgn; /* Pixel region for layer */
+
+ gint i, j, k; /* Counters */
++ size_t n_read; /* Number of items read from file */
+
+
+ /* Open the file for reading */
+@@ -319,7 +352,14 @@ load_image (const gchar *file,
+
+ /* Get the image dimensions and create the image... */
+
+- fread (header, 4, 1, fp);
++ n_read = fread (header, 4, 1, fp);
++
++ if (n_read < 1)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("EOF or error while reading image header"));
++ return -1;
++ }
+
+ if (strncmp ((const gchar *) header, "KiSS", 4))
+ {
+@@ -332,18 +372,53 @@ load_image (const gchar *file,
+ }
+ else
+ { /* New-style image file, read full header */
+- fread (header, 28, 1, fp);
++ n_read = fread (header, 28, 1, fp);
++
++ if (n_read < 1)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("EOF or error while reading image header"));
++ return -1;
++ }
++
++ file_mark = header[0];
++ if (file_mark != 0x20 && file_mark != 0x21)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("is not a CEL image file"));
++ return -1;
++ }
++
+ bpp = header[1];
+- if (bpp == 24)
+- colours = -1;
+- else
+- colours = (1 << header[1]);
++ switch (bpp)
++ {
++ case 4:
++ case 8:
++ case 32:
++ colours = (1 << bpp);
++ break;
++ default:
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("illegal bpp value in image: %hhu"), bpp);
++ return -1;
++ }
++
+ width = header[4] + (256 * header[5]);
+ height = header[6] + (256 * header[7]);
+ offx = header[8] + (256 * header[9]);
+ offy = header[10] + (256 * header[11]);
+ }
+
++ if ((width == 0) || (height == 0) || (width + offx > GIMP_MAX_IMAGE_SIZE) ||
++ (height + offy > GIMP_MAX_IMAGE_SIZE))
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("illegal image dimensions: width: %d, horizontal offset: "
++ "%d, height: %d, vertical offset: %d"),
++ width, offx, height, offy);
++ return -1;
++ }
++
+ if (bpp == 32)
+ image = gimp_image_new (width + offx, height + offy, GIMP_RGB);
+ else
+@@ -351,7 +426,8 @@ load_image (const gchar *file,
+
+ if (image == -1)
+ {
+- g_message (_("Can't create a new image"));
++ g_set_error (error, 0, 0, _("Can't create a new image"));
++ fclose (fp);
+ return -1;
+ }
+
+@@ -383,7 +459,15 @@ load_image (const gchar *file,
+ switch (bpp)
+ {
+ case 4:
+- fread (buffer, (width+1)/2, 1, fp);
++ n_read = fread (buffer, (width+1)/2, 1, fp);
++
++ if (n_read < 1)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("EOF or error while reading image data"));
++ return -1;
++ }
++
+ for (j = 0, k = 0; j < width*2; j+= 4, ++k)
+ {
+ if (buffer[k] / 16 == 0)
+@@ -410,7 +494,15 @@ load_image (const gchar *file,
+ break;
+
+ case 8:
+- fread (buffer, width, 1, fp);
++ n_read = fread (buffer, width, 1, fp);
++
++ if (n_read < 1)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("EOF or error while reading image data"));
++ return -1;
++ }
++
+ for (j = 0, k = 0; j < width*2; j+= 2, ++k)
+ {
+ if (buffer[k] == 0)
+@@ -427,7 +519,15 @@ load_image (const gchar *file,
+ break;
+
+ case 32:
+- fread (line, width*4, 1, fp);
++ n_read = fread (line, width*4, 1, fp);
++
++ if (n_read < 1)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("EOF or error while reading image data"));
++ return -1;
++ }
++
+ /* The CEL file order is BGR so we need to swap B and R
+ * to get the Gimp RGB order.
+ */
+@@ -440,7 +540,8 @@ load_image (const gchar *file,
+ break;
+
+ default:
+- g_message (_("Unsupported bit depth (%d)!"), bpp);
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("Unsupported bit depth (%d)!"), bpp);
+ return -1;
+ }
+
+@@ -457,7 +558,7 @@ load_image (const gchar *file,
+ if (bpp != 32)
+ {
+ /* Use palette from file or otherwise default grey palette */
+- palette = g_new (guchar, colours*3);
++ guchar palette[256*3];
+
+ /* Open the file for reading if user picked one */
+ if (palette_file == NULL)
+@@ -467,12 +568,23 @@ load_image (const gchar *file,
+ else
+ {
+ fp = g_fopen (palette_file, "r");
++
++ if (fp == NULL)
++ {
++ g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
++ _("Could not open '%s' for reading: %s"),
++ gimp_filename_to_utf8 (palette_file),
++ g_strerror (errno));
++ return -1;
++ }
+ }
+
+ if (fp != NULL)
+ {
+- colours = load_palette (fp, palette);
++ colours = load_palette (palette_file, fp, palette, error);
+ fclose (fp);
++ if (colours < 0 || *error)
++ return -1;
+ }
+ else
+ {
+@@ -483,10 +595,6 @@ load_image (const gchar *file,
+ }
+
+ gimp_image_set_colormap (image, palette + 3, colours - 1);
+-
+- /* Close palette file, give back allocated memory */
+-
+- g_free (palette);
+ }
+
+ /* Now get everything redrawn and hand back the finished image */
+@@ -498,32 +606,100 @@ load_image (const gchar *file,
+ }
+
+ static gint
+-load_palette (FILE *fp,
+- guchar palette[])
++load_palette (const gchar *file,
++ FILE *fp,
++ guchar palette[],
++ GError **error)
+ {
+ guchar header[32]; /* File header */
+ guchar buffer[2];
+- int i, bpp, colours= 0;
++ guchar file_mark, bpp;
++ gint i, colours = 0;
++ size_t n_read;
++
++ n_read = fread (header, 4, 1, fp);
++
++ if (n_read < 1)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("'%s': EOF or error while reading palette header"),
++ gimp_filename_to_utf8 (file));
++ return -1;
++ }
+
+- fread (header, 4, 1, fp);
+ if (!strncmp ((const gchar *) header, "KiSS", 4))
+ {
+- fread (header+4, 28, 1, fp);
++ n_read = fread (header+4, 28, 1, fp);
++
++ if (n_read < 1)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("'%s': EOF or error while reading palette header"),
++ gimp_filename_to_utf8 (file));
++ return -1;
++ }
++
++ file_mark = header[4];
++ if (file_mark != 0x10)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("'%s': is not a KCF palette file"),
++ gimp_filename_to_utf8 (file));
++ return -1;
++ }
++
+ bpp = header[5];
++ if (bpp != 12 && bpp != 24)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("'%s': illegal bpp value in palette: %hhu"),
++ gimp_filename_to_utf8 (file), bpp);
++ return -1;
++ }
++
+ colours = header[8] + header[9] * 256;
+- if (bpp == 12)
++ if (colours != 16 && colours != 256)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("'%s': illegal number of colors: %u"),
++ gimp_filename_to_utf8 (file), colours);
++ return -1;
++ }
++
++ switch (bpp)
+ {
++ case 12:
+ for (i = 0; i < colours; ++i)
+ {
+- fread (buffer, 1, 2, fp);
++ n_read = fread (buffer, 1, 2, fp);
++
++ if (n_read < 2)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("'%s': EOF or error while reading "
++ "palette data"),
++ gimp_filename_to_utf8 (file));
++ return -1;
++ }
++
+ palette[i*3]= buffer[0] & 0xf0;
+ palette[i*3+1]= (buffer[1] & 0x0f) * 16;
+ palette[i*3+2]= (buffer[0] & 0x0f) * 16;
+ }
+- }
+- else
+- {
+- fread (palette, colours, 3, fp);
++ break;
++ case 24:
++ n_read = fread (palette, colours, 3, fp);
++
++ if (n_read < 3)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("'%s': EOF or error while reading palette data"),
++ gimp_filename_to_utf8 (file));
++ return -1;
++ }
++ break;
++ default:
++ g_assert_not_reached ();
+ }
+ }
+ else
+@@ -532,7 +708,16 @@ load_palette (FILE *fp,
+ fseek (fp, 0, SEEK_SET);
+ for (i= 0; i < colours; ++i)
+ {
+- fread (buffer, 1, 2, fp);
++ n_read = fread (buffer, 1, 2, fp);
++
++ if (n_read < 2)
++ {
++ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
++ _("'%s': EOF or error while reading palette data"),
++ gimp_filename_to_utf8 (file));
++ return -1;
++ }
++
+ palette[i*3] = buffer[0] & 0xf0;
+ palette[i*3+1] = (buffer[1] & 0x0f) * 16;
+ palette[i*3+2] = (buffer[0] & 0x0f) * 16;
+--
+1.7.11.4
+
diff --git a/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3481.patch b/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3481.patch
new file mode 100644
index 000000000000..a5aee6a34473
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.6.12-CVE-2012-3481.patch
@@ -0,0 +1,56 @@
+From 26b208c5aef5f7801bf0538f8df549f0bf8dcb92 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 20 Aug 2012 15:30:33 +0200
+Subject: [PATCH] patch: CVE-2012-3481
+
+Squashed commit of the following:
+
+commit c56f3dc25cd4941f465e88bd91a0e107a4ac1b5e
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Aug 14 15:27:39 2012 +0200
+
+ file-gif-load: fix type overflow (CVE-2012-3481)
+
+ Cast variables properly to avoid overflowing when computing how much
+ memory to allocate.
+ (cherry picked from commit 43fc9dbd8e2196944c8a71321e525b89b7df9f5c)
+
+commit 11e922a8cee5c9bb532e2a996d2db3beab6da6cb
+Author: Jan Lieskovsky <jlieskov@redhat.com>
+Date: Tue Aug 14 12:18:22 2012 +0200
+
+ file-gif-load: limit len and height (CVE-2012-3481)
+
+ Ensure values of len and height can't overflow g_malloc() argument type.
+ (cherry picked from commit d95c2f0bcb6775bdee2bef35b7d84f6dfd490783)
+---
+ plug-ins/common/file-gif-load.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/plug-ins/common/file-gif-load.c b/plug-ins/common/file-gif-load.c
+index 8460ec0..295c351 100644
+--- a/plug-ins/common/file-gif-load.c
++++ b/plug-ins/common/file-gif-load.c
+@@ -1028,10 +1028,17 @@ ReadImage (FILE *fd,
+ cur_progress = 0;
+ max_progress = height;
+
++ if (len > (G_MAXSIZE / height / (alpha_frame ? (promote_to_rgb ? 4 : 2) : 1)))
++ {
++ g_message ("'%s' has a larger image size than GIMP can handle.",
++ gimp_filename_to_utf8 (filename));
++ return -1;
++ }
++
+ if (alpha_frame)
+- dest = (guchar *) g_malloc (len * height * (promote_to_rgb ? 4 : 2));
++ dest = (guchar *) g_malloc ((gsize)len * (gsize)height * (promote_to_rgb ? 4 : 2));
+ else
+- dest = (guchar *) g_malloc (len * height);
++ dest = (guchar *) g_malloc ((gsize)len * (gsize)height);
+
+ #ifdef GIFDEBUG
+ g_print ("GIF: reading %d by %d%s GIF image, ncols=%d\n",
+--
+1.7.11.4
+
diff --git a/media-gfx/gimp/files/gimp-2.6.12-potfiles-skip.patch b/media-gfx/gimp/files/gimp-2.6.12-potfiles-skip.patch
new file mode 100644
index 000000000000..ee1b89adc5b6
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.6.12-potfiles-skip.patch
@@ -0,0 +1,17 @@
+From: Julian Ospald <julian.ospald@googlemail.com>
+Date: Fri Mar 2 17:29:14 CET 2012
+
+gimp-2.6.11 fails on FEATURES="test"
+correctly add "contactsheet.scm" and "test-sphere.scm" to POTFILES.skip
+
+--- po-script-fu/POTFILES.skip
++++ po-script-fu/POTFILES.skip
+@@ -37,6 +37,8 @@
+ plug-ins/pagecurl
+ plug-ins/print
+ plug-ins/pygimp
++plug-ins/script-fu/scripts/contactsheet.scm
++plug-ins/script-fu/scripts/test-sphere.scm
+ plug-ins/selection-to-path
+ plug-ins/twain
+ plug-ins/win-snap
diff --git a/media-gfx/gimp/files/gimp-2.7.4-no-deprecation.patch b/media-gfx/gimp/files/gimp-2.7.4-no-deprecation.patch
new file mode 100644
index 000000000000..66bd93d0d1aa
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.7.4-no-deprecation.patch
@@ -0,0 +1,36 @@
+--- configure.ac 2012-01-02 13:15:53.695067626 +0100
++++ configure.ac 2012-01-02 13:21:49.161623684 +0100
+@@ -1943,33 +1943,6 @@
+ AC_SUBST(MIME_TYPES)
+
+
+-#########################
+-# Disable deprecated APIs
+-#########################
+-
+-CPPFLAGS="${CPPFLAGS} -DGIMP_DISABLE_DEPRECATED -DBABL_DISABLE_DEPRECATED -DGSEAL_ENABLE"
+-
+-# Make sure not to disable deprecated APIs for unreleased versions.
+-# We must build without problems with future releases of libraries
+-# and disabling deprecated API risks breaking the build
+-
+-if test "x$have_glib_2_31" != "xyes"; then
+- CPPFLAGS="${CPPFLAGS} -DG_DISABLE_DEPRECATED"
+-fi
+-
+-if test "x$have_gtk_2_26" != "xyes"; then
+- CPPFLAGS="${CPPFLAGS} -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
+-fi
+-
+-if test "x$have_gdk_pixbuf_2_26" != "xyes"; then
+- CPPFLAGS="${CPPFLAGS} -DGDK_PIXBUF_DISABLE_DEPRECATED"
+-fi
+-
+-if test "x$have_pango_1_32" != "xyes"; then
+- CPPFLAGS="${CPPFLAGS} -DPANGO_DISABLE_DEPRECATED"
+-fi
+-
+-
+ ############################
+ # Require multihead safe API
+ ############################
diff --git a/media-gfx/gimp/files/gimp-2.8.10-CVE-2013-1913.patch b/media-gfx/gimp/files/gimp-2.8.10-CVE-2013-1913.patch
new file mode 100644
index 000000000000..e257c691bb09
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.8.10-CVE-2013-1913.patch
@@ -0,0 +1,31 @@
+From 32ae0f83e5748299641cceaabe3f80f1b3afd03e Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Thu, 14 Nov 2013 14:29:01 +0100
+Subject: file-xwd: sanity check colormap size (CVE-2013-1913)
+
+
+diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c
+index c8e1a6e..343129a 100644
+--- a/plug-ins/common/file-xwd.c
++++ b/plug-ins/common/file-xwd.c
+@@ -466,6 +466,17 @@ load_image (const gchar *filename,
+ /* Position to start of XWDColor structures */
+ fseek (ifp, (long)xwdhdr.l_header_size, SEEK_SET);
+
++ /* Guard against insanely huge color maps -- gimp_image_set_colormap() only
++ * accepts colormaps with 0..256 colors anyway. */
++ if (xwdhdr.l_colormap_entries > 256)
++ {
++ g_message (_("'%s':\nIllegal number of colormap entries: %ld"),
++ gimp_filename_to_utf8 (filename),
++ (long)xwdhdr.l_colormap_entries);
++ fclose (ifp);
++ return -1;
++ }
++
+ if (xwdhdr.l_colormap_entries > 0)
+ {
+ xwdcolmap = g_new (L_XWDCOLOR, xwdhdr.l_colormap_entries);
+--
+cgit v0.10.1
+
diff --git a/media-gfx/gimp/files/gimp-2.8.10-CVE-2013-1978.patch b/media-gfx/gimp/files/gimp-2.8.10-CVE-2013-1978.patch
new file mode 100644
index 000000000000..43b4bcbdc3f3
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.8.10-CVE-2013-1978.patch
@@ -0,0 +1,151 @@
+From 23f685931e5f000dd033a45c60c1e60d7f78caf4 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Tue, 26 Nov 2013 10:49:42 +0100
+Subject: file-xwd: sanity check # of colors and map entries (CVE-2013-1978)
+
+The number of colors in an image shouldn't be higher than the number of
+colormap entries. Additionally, consolidate post error cleanup in
+load_image().
+
+diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c
+index 343129a..4df9ce8 100644
+--- a/plug-ins/common/file-xwd.c
++++ b/plug-ins/common/file-xwd.c
+@@ -429,9 +429,9 @@ static gint32
+ load_image (const gchar *filename,
+ GError **error)
+ {
+- FILE *ifp;
++ FILE *ifp = NULL;
+ gint depth, bpp;
+- gint32 image_ID;
++ gint32 image_ID = -1;
+ L_XWDFILEHEADER xwdhdr;
+ L_XWDCOLOR *xwdcolmap = NULL;
+
+@@ -441,7 +441,7 @@ load_image (const gchar *filename,
+ g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
+ _("Could not open '%s' for reading: %s"),
+ gimp_filename_to_utf8 (filename), g_strerror (errno));
+- return -1;
++ goto out;
+ }
+
+ read_xwd_header (ifp, &xwdhdr);
+@@ -450,8 +450,7 @@ load_image (const gchar *filename,
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("Could not read XWD header from '%s'"),
+ gimp_filename_to_utf8 (filename));
+- fclose (ifp);
+- return -1;
++ goto out;
+ }
+
+ #ifdef XWD_COL_WAIT_DEBUG
+@@ -473,12 +472,18 @@ load_image (const gchar *filename,
+ g_message (_("'%s':\nIllegal number of colormap entries: %ld"),
+ gimp_filename_to_utf8 (filename),
+ (long)xwdhdr.l_colormap_entries);
+- fclose (ifp);
+- return -1;
++ goto out;
+ }
+
+ if (xwdhdr.l_colormap_entries > 0)
+ {
++ if (xwdhdr.l_colormap_entries < xwdhdr.l_ncolors)
++ {
++ g_message (_("'%s':\nNumber of colormap entries < number of colors"),
++ gimp_filename_to_utf8 (filename));
++ goto out;
++ }
++
+ xwdcolmap = g_new (L_XWDCOLOR, xwdhdr.l_colormap_entries);
+
+ read_xwd_cols (ifp, &xwdhdr, xwdcolmap);
+@@ -498,9 +503,7 @@ load_image (const gchar *filename,
+ if (xwdhdr.l_file_version != 7)
+ {
+ g_message (_("Can't read color entries"));
+- g_free (xwdcolmap);
+- fclose (ifp);
+- return (-1);
++ goto out;
+ }
+ }
+
+@@ -508,9 +511,7 @@ load_image (const gchar *filename,
+ {
+ g_message (_("'%s':\nNo image width specified"),
+ gimp_filename_to_utf8 (filename));
+- g_free (xwdcolmap);
+- fclose (ifp);
+- return (-1);
++ goto out;
+ }
+
+ if (xwdhdr.l_pixmap_width > GIMP_MAX_IMAGE_SIZE
+@@ -518,27 +519,21 @@ load_image (const gchar *filename,
+ {
+ g_message (_("'%s':\nImage width is larger than GIMP can handle"),
+ gimp_filename_to_utf8 (filename));
+- g_free (xwdcolmap);
+- fclose (ifp);
+- return (-1);
++ goto out;
+ }
+
+ if (xwdhdr.l_pixmap_height <= 0)
+ {
+ g_message (_("'%s':\nNo image height specified"),
+ gimp_filename_to_utf8 (filename));
+- g_free (xwdcolmap);
+- fclose (ifp);
+- return (-1);
++ goto out;
+ }
+
+ if (xwdhdr.l_pixmap_height > GIMP_MAX_IMAGE_SIZE)
+ {
+ g_message (_("'%s':\nImage height is larger than GIMP can handle"),
+ gimp_filename_to_utf8 (filename));
+- g_free (xwdcolmap);
+- fclose (ifp);
+- return (-1);
++ goto out;
+ }
+
+ gimp_progress_init_printf (_("Opening '%s'"),
+@@ -591,11 +586,6 @@ load_image (const gchar *filename,
+ }
+ gimp_progress_update (1.0);
+
+- fclose (ifp);
+-
+- if (xwdcolmap)
+- g_free (xwdcolmap);
+-
+ if (image_ID == -1 && ! (error && *error))
+ g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ _("XWD-file %s has format %d, depth %d and bits per pixel %d. "
+@@ -603,6 +593,17 @@ load_image (const gchar *filename,
+ gimp_filename_to_utf8 (filename),
+ (gint) xwdhdr.l_pixmap_format, depth, bpp);
+
++out:
++ if (ifp)
++ {
++ fclose (ifp);
++ }
++
++ if (xwdcolmap)
++ {
++ g_free (xwdcolmap);
++ }
++
+ return image_ID;
+ }
+
+--
+cgit v0.10.1
+
diff --git a/media-gfx/gimp/files/gimp-2.8.10-clang.patch b/media-gfx/gimp/files/gimp-2.8.10-clang.patch
new file mode 100644
index 000000000000..065c66b36139
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.8.10-clang.patch
@@ -0,0 +1,204 @@
+--- app/Makefile.am
++++ app/Makefile.am
+@@ -120,29 +120,29 @@
+
+ # FIXME: core should not depend on xcf
+ workaround_that_core_depends_on_xcf = \
+- -u $(SYMPREFIX)xcf_init
++ -Wl,-u,$(SYMPREFIX)xcf_init
+
+ # FIXME: core should not depend on pdb
+ workaround_that_core_depends_on_pdb = \
+- -u $(SYMPREFIX)internal_procs_init \
+- -u $(SYMPREFIX)gimp_plug_in_manager_restore
++ -Wl,-u,$(SYMPREFIX)internal_procs_init \
++ -Wl,-u,$(SYMPREFIX)gimp_plug_in_manager_restore
+
+ # FIXME: plug-in should not depend on pdb
+ workaround_that_plug_in_depends_on_pdb = \
+- -u $(SYMPREFIX)gimp_pdb_compat_param_spec
++ -Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec
+
+ # FIXME: file should not depend on plug-in
+ workaround_that_file_depends_on_plug_in = \
+- -u $(SYMPREFIX)plug_in_icc_profile_apply_rgb \
+- -u $(SYMPREFIX)gimp_image_map_config_get_type
++ -Wl,-u,$(SYMPREFIX)plug_in_icc_profile_apply_rgb \
++ -Wl,-u,$(SYMPREFIX)gimp_image_map_config_get_type
+
+ # core, vectors and gegl are on the same architectural layer, prevent
+ # the linker from panicing
+ calm_down_linker = \
+- -u $(SYMPREFIX)gimp_vectors_undo_get_type \
+- -u $(SYMPREFIX)gimp_vectors_mod_undo_get_type \
+- -u $(SYMPREFIX)gimp_vectors_prop_undo_get_type \
+- -u $(SYMPREFIX)gimp_curve_map_pixels
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_mod_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_prop_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_curve_map_pixels
+
+ AM_LDFLAGS = \
+ $(munix) \
+--- app/Makefile.in
++++ app/Makefile.in
+@@ -702,33 +702,33 @@
+
+ # FIXME: core should not depend on xcf
+ workaround_that_core_depends_on_xcf = \
+- -u $(SYMPREFIX)xcf_init
++ -Wl,-u,$(SYMPREFIX)xcf_init
+
+
+ # FIXME: core should not depend on pdb
+ workaround_that_core_depends_on_pdb = \
+- -u $(SYMPREFIX)internal_procs_init \
+- -u $(SYMPREFIX)gimp_plug_in_manager_restore
++ -Wl,-u,$(SYMPREFIX)internal_procs_init \
++ -Wl,-u,$(SYMPREFIX)gimp_plug_in_manager_restore
+
+
+ # FIXME: plug-in should not depend on pdb
+ workaround_that_plug_in_depends_on_pdb = \
+- -u $(SYMPREFIX)gimp_pdb_compat_param_spec
++ -Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec
+
+
+ # FIXME: file should not depend on plug-in
+ workaround_that_file_depends_on_plug_in = \
+- -u $(SYMPREFIX)plug_in_icc_profile_apply_rgb \
+- -u $(SYMPREFIX)gimp_image_map_config_get_type
++ -Wl,-u,$(SYMPREFIX)plug_in_icc_profile_apply_rgb \
++ -Wl,-u,$(SYMPREFIX)gimp_image_map_config_get_type
+
+
+ # core, vectors and gegl are on the same architectural layer, prevent
+ # the linker from panicing
+ calm_down_linker = \
+- -u $(SYMPREFIX)gimp_vectors_undo_get_type \
+- -u $(SYMPREFIX)gimp_vectors_mod_undo_get_type \
+- -u $(SYMPREFIX)gimp_vectors_prop_undo_get_type \
+- -u $(SYMPREFIX)gimp_curve_map_pixels
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_mod_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_prop_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_curve_map_pixels
+
+ AM_LDFLAGS = \
+ $(munix) \
+--- app/tests/Makefile.am
++++ app/tests/Makefile.am
+@@ -63,22 +63,22 @@
+ # We need this due to circular dependencies, see more detailed
+ # comments about it in app/Makefile.am
+ AM_LDFLAGS = \
+- -u $(SYMPREFIX)xcf_init \
+- -u $(SYMPREFIX)base_init \
+- -u $(SYMPREFIX)internal_procs_init \
+- -u $(SYMPREFIX)gimp_plug_in_manager_restore \
+- -u $(SYMPREFIX)gimp_pdb_compat_param_spec \
+- -u $(SYMPREFIX)gui_init \
+- -u $(SYMPREFIX)plug_in_icc_profile_apply_rgb \
+- -u $(SYMPREFIX)gimp_image_map_config_get_type \
+- -u $(SYMPREFIX)gimp_vectors_undo_get_type \
+- -u $(SYMPREFIX)gimp_vectors_mod_undo_get_type \
+- -u $(SYMPREFIX)gimp_vectors_prop_undo_get_type \
+- -u $(SYMPREFIX)actions_init \
+- -u $(SYMPREFIX)gimp_error_dialog_new \
+- -u $(SYMPREFIX)menus_save \
+- -u $(SYMPREFIX)gimp_tools_save \
+- -u $(SYMPREFIX)gimp_curve_map_pixels
++ -Wl,-u,$(SYMPREFIX)xcf_init \
++ -Wl,-u,$(SYMPREFIX)base_init \
++ -Wl,-u,$(SYMPREFIX)internal_procs_init \
++ -Wl,-u,$(SYMPREFIX)gimp_plug_in_manager_restore \
++ -Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec \
++ -Wl,-u,$(SYMPREFIX)gui_init \
++ -Wl,-u,$(SYMPREFIX)plug_in_icc_profile_apply_rgb \
++ -Wl,-u,$(SYMPREFIX)gimp_image_map_config_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_mod_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_prop_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)actions_init \
++ -Wl,-u,$(SYMPREFIX)gimp_error_dialog_new \
++ -Wl,-u,$(SYMPREFIX)menus_save \
++ -Wl,-u,$(SYMPREFIX)gimp_tools_save \
++ -Wl,-u,$(SYMPREFIX)gimp_curve_map_pixels
+
+ # Note that we have some duplicate entries here too to work around
+ # circular dependencies and systems on the same architectural layer as
+--- app/tests/Makefile.in
++++ app/tests/Makefile.in
+@@ -1221,22 +1221,22 @@
+ # We need this due to circular dependencies, see more detailed
+ # comments about it in app/Makefile.am
+ AM_LDFLAGS = \
+- -u $(SYMPREFIX)xcf_init \
+- -u $(SYMPREFIX)base_init \
+- -u $(SYMPREFIX)internal_procs_init \
+- -u $(SYMPREFIX)gimp_plug_in_manager_restore \
+- -u $(SYMPREFIX)gimp_pdb_compat_param_spec \
+- -u $(SYMPREFIX)gui_init \
+- -u $(SYMPREFIX)plug_in_icc_profile_apply_rgb \
+- -u $(SYMPREFIX)gimp_image_map_config_get_type \
+- -u $(SYMPREFIX)gimp_vectors_undo_get_type \
+- -u $(SYMPREFIX)gimp_vectors_mod_undo_get_type \
+- -u $(SYMPREFIX)gimp_vectors_prop_undo_get_type \
+- -u $(SYMPREFIX)actions_init \
+- -u $(SYMPREFIX)gimp_error_dialog_new \
+- -u $(SYMPREFIX)menus_save \
+- -u $(SYMPREFIX)gimp_tools_save \
+- -u $(SYMPREFIX)gimp_curve_map_pixels
++ -Wl,-u,$(SYMPREFIX)xcf_init \
++ -Wl,-u,$(SYMPREFIX)base_init \
++ -Wl,-u,$(SYMPREFIX)internal_procs_init \
++ -Wl,-u,$(SYMPREFIX)gimp_plug_in_manager_restore \
++ -Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec \
++ -Wl,-u,$(SYMPREFIX)gui_init \
++ -Wl,-u,$(SYMPREFIX)plug_in_icc_profile_apply_rgb \
++ -Wl,-u,$(SYMPREFIX)gimp_image_map_config_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_mod_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)gimp_vectors_prop_undo_get_type \
++ -Wl,-u,$(SYMPREFIX)actions_init \
++ -Wl,-u,$(SYMPREFIX)gimp_error_dialog_new \
++ -Wl,-u,$(SYMPREFIX)menus_save \
++ -Wl,-u,$(SYMPREFIX)gimp_tools_save \
++ -Wl,-u,$(SYMPREFIX)gimp_curve_map_pixels
+
+
+ # Note that we have some duplicate entries here too to work around
+--- devel-docs/app/Makefile.am
++++ devel-docs/app/Makefile.am
+@@ -62,10 +62,10 @@
+ -UGTK_DISABLE_SINGLE_INCLUDES
+
+ GTKDOC_LIBS = \
+- -u $(SYMPREFIX)xcf_init \
+- -u $(SYMPREFIX)internal_procs_init \
+- -u $(SYMPREFIX)gimp_coords_mix \
+- -u $(SYMPREFIX)gimp_plug_in_manager_restore \
++ -Wl,-u,$(SYMPREFIX)xcf_init \
++ -Wl,-u,$(SYMPREFIX)internal_procs_init \
++ -Wl,-u,$(SYMPREFIX)gimp_coords_mix \
++ -Wl,-u,$(SYMPREFIX)gimp_plug_in_manager_restore \
+ $(top_builddir)/app/app.o \
+ $(top_builddir)/app/batch.o \
+ $(top_builddir)/app/errors.o \
+--- devel-docs/app/Makefile.in
++++ devel-docs/app/Makefile.in
+@@ -511,10 +511,10 @@
+ -UGTK_DISABLE_SINGLE_INCLUDES
+
+ GTKDOC_LIBS = \
+- -u $(SYMPREFIX)xcf_init \
+- -u $(SYMPREFIX)internal_procs_init \
+- -u $(SYMPREFIX)gimp_coords_mix \
+- -u $(SYMPREFIX)gimp_plug_in_manager_restore \
++ -Wl,-u,$(SYMPREFIX)xcf_init \
++ -Wl,-u,$(SYMPREFIX)internal_procs_init \
++ -Wl,-u,$(SYMPREFIX)gimp_coords_mix \
++ -Wl,-u,$(SYMPREFIX)gimp_plug_in_manager_restore \
+ $(top_builddir)/app/app.o \
+ $(top_builddir)/app/batch.o \
+ $(top_builddir)/app/errors.o \
diff --git a/media-gfx/gimp/files/gimp-2.8.10-freetype251.patch b/media-gfx/gimp/files/gimp-2.8.10-freetype251.patch
new file mode 100644
index 000000000000..c5c20d510cbc
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.8.10-freetype251.patch
@@ -0,0 +1,26 @@
+From 6c73f28b6d87a2afd11974552a075bffec52347f Mon Sep 17 00:00:00 2001
+From: Michael Natterer <mitch@gimp.org>
+Date: Fri, 29 Nov 2013 21:57:46 +0100
+Subject: Bug 719560 - Build failure with freetype 2.5.1
+
+Apply patch from su-v that fixes the freetype include to
+the madness devised and recommended by freetype.
+
+diff --git a/app/text/gimpfont.c b/app/text/gimpfont.c
+index 4045ca9..66c6e52 100644
+--- a/app/text/gimpfont.c
++++ b/app/text/gimpfont.c
+@@ -28,7 +28,9 @@
+
+ #define PANGO_ENABLE_ENGINE 1 /* Argh */
+ #include <pango/pango-ot.h>
+-#include <freetype/tttables.h>
++
++#include <ft2build.h>
++#include FT_TRUETYPE_TABLES_H
+
+ #include "text-types.h"
+
+--
+cgit v0.10.1
+
diff --git a/media-gfx/gimp/files/gimp-2.8.6-uclibc.patch b/media-gfx/gimp/files/gimp-2.8.6-uclibc.patch
new file mode 100644
index 000000000000..855e9872f4b4
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-2.8.6-uclibc.patch
@@ -0,0 +1,45 @@
+From 4fb7a436bca3e11abfda8bc23818af0f09714b9d Mon Sep 17 00:00:00 2001
+From: Michael Natterer <mitch@gimp.org>
+Date: Fri, 02 Aug 2013 14:50:00 +0000
+Subject: Bug 704980 - uclibc - base-utils.c: execinfo.h: No such file or directory
+
+Apply patch from Amadeusz Slawinski that checks for execinfo.h and
+builds the code that needs it conditionally.
+---
+diff --git a/app/base/base-utils.c b/app/base/base-utils.c
+index 757f58d..44a9e89 100644
+--- a/app/base/base-utils.c
++++ b/app/base/base-utils.c
+@@ -29,7 +29,7 @@
+ #include <process.h>
+ #endif
+
+-#ifdef G_OS_UNIX
++#if defined(G_OS_UNIX) && defined(HAVE_EXECINFO_H)
+ /* For get_backtrace() */
+ #include <stdlib.h>
+ #include <string.h>
+@@ -112,7 +112,7 @@ get_physical_memory_size (void)
+ char *
+ get_backtrace (void)
+ {
+-#ifdef G_OS_UNIX
++#if defined(G_OS_UNIX) && defined(HAVE_EXECINFO_H)
+ void *functions[MAX_FUNC];
+ char **function_names;
+ int n_functions;
+diff --git a/configure.ac b/configure.ac
+index 0bbcbc7..15c7cc6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -416,7 +416,7 @@ AC_HEADER_STDC
+ AC_HEADER_SYS_WAIT
+ AC_HEADER_TIME
+
+-AC_CHECK_HEADERS(sys/param.h sys/time.h sys/times.h sys/wait.h unistd.h)
++AC_CHECK_HEADERS(execinfo.h sys/param.h sys/time.h sys/times.h sys/wait.h unistd.h)
+
+ AC_TYPE_PID_T
+ AC_FUNC_VPRINTF
+--
+cgit v0.9.2
diff --git a/media-gfx/gimp/files/gimp-curl-headers.diff b/media-gfx/gimp/files/gimp-curl-headers.diff
new file mode 100644
index 000000000000..ea8935d0080c
--- /dev/null
+++ b/media-gfx/gimp/files/gimp-curl-headers.diff
@@ -0,0 +1,12 @@
+diff --git a/plug-ins/file-uri/uri-backend-libcurl.c b/plug-ins/file-uri/uri-backend-libcurl.c
+index a566966..747dca7 100644
+--- a/plug-ins/file-uri/uri-backend-libcurl.c
++++ b/plug-ins/file-uri/uri-backend-libcurl.c
+@@ -24,7 +24,6 @@
+ #include <errno.h>
+
+ #include <curl/curl.h>
+-#include <curl/types.h>
+ #include <curl/easy.h>
+
+ #include <glib/gstdio.h>
diff --git a/media-gfx/gimp/gimp-2.8.10-r1.ebuild b/media-gfx/gimp/gimp-2.8.10-r1.ebuild
new file mode 100644
index 000000000000..4fdb741d3517
--- /dev/null
+++ b/media-gfx/gimp/gimp-2.8.10-r1.ebuild
@@ -0,0 +1,165 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit versionator autotools eutils gnome2 fdo-mime multilib python-single-r1
+
+DESCRIPTION="GNU Image Manipulation Program"
+HOMEPAGE="http://www.gimp.org/"
+SRC_URI="mirror://gimp/v$(get_version_component_range 1-2)/${P}.tar.bz2"
+LICENSE="GPL-3 LGPL-3"
+SLOT="2"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+LANGS="am ar ast az be bg br ca ca@valencia cs csb da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka kk km kn ko lt lv mk ml ms my nb nds ne nl nn oc pa pl pt pt_BR ro ru rw si sk sl sr sr@latin sv ta te th tr tt uk vi xh yi zh_CN zh_HK zh_TW"
+IUSE="alsa aalib altivec aqua bzip2 curl dbus debug doc exif gnome postscript jpeg jpeg2k lcms cpu_flags_x86_mmx mng pdf png python smp cpu_flags_x86_sse svg tiff udev webkit wmf xpm"
+
+for lang in ${LANGS}; do
+ IUSE+=" linguas_${lang}"
+done
+
+RDEPEND=">=dev-libs/glib-2.30.2:2
+ >=dev-libs/atk-2.2.0
+ >=x11-libs/gtk+-2.24.10:2
+ >=x11-libs/gdk-pixbuf-2.24.1:2
+ >=x11-libs/cairo-1.10.2
+ >=x11-libs/pango-1.29.4
+ xpm? ( x11-libs/libXpm )
+ >=media-libs/freetype-2.1.7
+ >=media-libs/fontconfig-2.2.0
+ sys-libs/zlib
+ dev-libs/libxml2
+ dev-libs/libxslt
+ x11-themes/hicolor-icon-theme
+ >=media-libs/babl-0.1.10
+ >=media-libs/gegl-0.2.0:0
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ aqua? ( x11-libs/gtk-mac-integration )
+ curl? ( net-misc/curl )
+ dbus? ( dev-libs/dbus-glib )
+ gnome? ( gnome-base/gvfs )
+ webkit? ( >=net-libs/webkit-gtk-1.6.1:2 )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ exif? ( >=media-libs/libexif-0.6.15 )
+ lcms? ( >=media-libs/lcms-2.2:2 )
+ mng? ( media-libs/libmng )
+ pdf? ( >=app-text/poppler-0.12.4[cairo] )
+ png? ( >=media-libs/libpng-1.2.37:0 )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]
+ )
+ tiff? ( >=media-libs/tiff-3.5.7:0 )
+ svg? ( >=gnome-base/librsvg-2.36.0:2 )
+ wmf? ( >=media-libs/libwmf-0.2.8 )
+ x11-libs/libXcursor
+ sys-libs/zlib
+ bzip2? ( app-arch/bzip2 )
+ postscript? ( app-text/ghostscript-gpl )
+ udev? ( virtual/libgudev:= )"
+DEPEND="${RDEPEND}
+ sys-apps/findutils
+ virtual/pkgconfig
+ >=dev-util/intltool-0.40.1
+ >=sys-devel/gettext-0.17
+ doc? ( >=dev-util/gtk-doc-1 )
+ >=sys-devel/libtool-2.2
+ >=sys-devel/automake-1.11
+ dev-util/gtk-doc-am" # due to our call to eautoreconf below (bug #386453)
+
+DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
+
+S="${WORKDIR}"/${P}
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ G2CONF="--enable-default-binary \
+ --disable-silent-rules \
+ $(use_with !aqua x) \
+ $(use_with aalib aa) \
+ $(use_with alsa) \
+ $(use_enable altivec) \
+ $(use_with bzip2) \
+ $(use_with curl libcurl) \
+ $(use_with dbus) \
+ $(use_with gnome gvfs) \
+ $(use_with webkit) \
+ $(use_with jpeg libjpeg) \
+ $(use_with jpeg2k libjasper) \
+ $(use_with exif libexif) \
+ $(use_with lcms lcms lcms2) \
+ $(use_with postscript gs) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_with mng libmng) \
+ $(use_with pdf poppler) \
+ $(use_with png libpng) \
+ $(use_enable python) \
+ $(use_enable smp mp) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_with svg librsvg) \
+ $(use_with tiff libtiff) \
+ $(use_with udev gudev) \
+ $(use_with wmf) \
+ --with-xmc \
+ $(use_with xpm libxpm) \
+ --without-xvfb-run"
+
+ if use python; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.7.4-no-deprecation.patch # bug 395695, comment 9 and 16
+ epatch "${FILESDIR}"/${P}-freetype251.patch # bug #493466
+ epatch "${FILESDIR}"/${P}-clang.patch # bug 449370 compile with clang
+ sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
+ eautoreconf # If you remove this: remove dev-util/gtk-doc-am from DEPEND, too
+
+ gnome2_src_prepare
+}
+
+_clean_up_locales() {
+ einfo "Cleaning up locales..."
+ for lang in ${LANGS}; do
+ use "linguas_${lang}" && {
+ einfo "- keeping ${lang}"
+ continue
+ }
+ rm -Rf "${ED}"/usr/share/locale/"${lang}" || die
+ done
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use python; then
+ python_optimize
+ fi
+
+ # Workaround for bug #321111 to give GIMP the least
+ # precedence on PDF documents by default
+ mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
+
+ prune_libtool_files --all
+
+ # Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527)
+ local gimp_app_version=$(get_version_component_range 1-2)
+ mv "${ED}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 || die
+
+ _clean_up_locales
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+}
diff --git a/media-gfx/gimp/gimp-2.8.10-r2.ebuild b/media-gfx/gimp/gimp-2.8.10-r2.ebuild
new file mode 100644
index 000000000000..0d295ffa6ce1
--- /dev/null
+++ b/media-gfx/gimp/gimp-2.8.10-r2.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit versionator autotools eutils gnome2 fdo-mime multilib python-single-r1
+
+DESCRIPTION="GNU Image Manipulation Program"
+HOMEPAGE="http://www.gimp.org/"
+SRC_URI="mirror://gimp/v$(get_version_component_range 1-2)/${P}.tar.bz2"
+LICENSE="GPL-3 LGPL-3"
+SLOT="2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+LANGS="am ar ast az be bg br ca ca@valencia cs csb da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka kk km kn ko lt lv mk ml ms my nb nds ne nl nn oc pa pl pt pt_BR ro ru rw si sk sl sr sr@latin sv ta te th tr tt uk vi xh yi zh_CN zh_HK zh_TW"
+IUSE="alsa aalib altivec aqua bzip2 curl dbus debug doc exif gnome postscript jpeg jpeg2k lcms cpu_flags_x86_mmx mng pdf png python smp cpu_flags_x86_sse svg tiff udev webkit wmf xpm"
+
+for lang in ${LANGS}; do
+ IUSE+=" linguas_${lang}"
+done
+
+RDEPEND=">=dev-libs/glib-2.30.2:2
+ >=dev-libs/atk-2.2.0
+ >=x11-libs/gtk+-2.24.10:2
+ >=x11-libs/gdk-pixbuf-2.24.1:2
+ >=x11-libs/cairo-1.10.2
+ >=x11-libs/pango-1.29.4
+ xpm? ( x11-libs/libXpm )
+ >=media-libs/freetype-2.1.7
+ >=media-libs/fontconfig-2.2.0
+ sys-libs/zlib
+ dev-libs/libxml2
+ dev-libs/libxslt
+ x11-themes/hicolor-icon-theme
+ >=media-libs/babl-0.1.10
+ >=media-libs/gegl-0.2.0:0
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ aqua? ( x11-libs/gtk-mac-integration )
+ curl? ( net-misc/curl )
+ dbus? ( dev-libs/dbus-glib )
+ gnome? ( gnome-base/gvfs )
+ webkit? ( >=net-libs/webkit-gtk-1.6.1:2 )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ exif? ( >=media-libs/libexif-0.6.15 )
+ lcms? ( >=media-libs/lcms-2.2:2 )
+ mng? ( media-libs/libmng )
+ pdf? ( >=app-text/poppler-0.12.4[cairo] )
+ png? ( >=media-libs/libpng-1.2.37:0 )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]
+ )
+ tiff? ( >=media-libs/tiff-3.5.7:0 )
+ svg? ( >=gnome-base/librsvg-2.36.0:2 )
+ wmf? ( >=media-libs/libwmf-0.2.8 )
+ x11-libs/libXcursor
+ sys-libs/zlib
+ bzip2? ( app-arch/bzip2 )
+ postscript? ( app-text/ghostscript-gpl )
+ udev? ( virtual/libgudev:= )"
+DEPEND="${RDEPEND}
+ sys-apps/findutils
+ virtual/pkgconfig
+ >=dev-util/intltool-0.40.1
+ >=sys-devel/gettext-0.17
+ doc? ( >=dev-util/gtk-doc-1 )
+ >=sys-devel/libtool-2.2
+ >=sys-devel/automake-1.11
+ dev-util/gtk-doc-am" # due to our call to eautoreconf below (bug #386453)
+
+DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
+
+S="${WORKDIR}"/${P}
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ G2CONF="--enable-default-binary \
+ --disable-silent-rules \
+ $(use_with !aqua x) \
+ $(use_with aalib aa) \
+ $(use_with alsa) \
+ $(use_enable altivec) \
+ $(use_with bzip2) \
+ $(use_with curl libcurl) \
+ $(use_with dbus) \
+ $(use_with gnome gvfs) \
+ $(use_with webkit) \
+ $(use_with jpeg libjpeg) \
+ $(use_with jpeg2k libjasper) \
+ $(use_with exif libexif) \
+ $(use_with lcms lcms lcms2) \
+ $(use_with postscript gs) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_with mng libmng) \
+ $(use_with pdf poppler) \
+ $(use_with png libpng) \
+ $(use_enable python) \
+ $(use_enable smp mp) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_with svg librsvg) \
+ $(use_with tiff libtiff) \
+ $(use_with udev gudev) \
+ $(use_with wmf) \
+ --with-xmc \
+ $(use_with xpm libxpm) \
+ --without-xvfb-run"
+
+ if use python; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-CVE-2013-1913.patch # bug 493372
+ epatch "${FILESDIR}"/${P}-CVE-2013-1978.patch # bug 493372
+
+ epatch "${FILESDIR}"/${PN}-2.7.4-no-deprecation.patch # bug 395695, comment 9 and 16
+ epatch "${FILESDIR}"/${P}-freetype251.patch # bug #493466
+ epatch "${FILESDIR}"/${P}-clang.patch # bug 449370 compile with clang
+ sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
+ eautoreconf # If you remove this: remove dev-util/gtk-doc-am from DEPEND, too
+
+ gnome2_src_prepare
+}
+
+_clean_up_locales() {
+ einfo "Cleaning up locales..."
+ for lang in ${LANGS}; do
+ use "linguas_${lang}" && {
+ einfo "- keeping ${lang}"
+ continue
+ }
+ rm -Rf "${ED}"/usr/share/locale/"${lang}" || die
+ done
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use python; then
+ python_optimize
+ fi
+
+ # Workaround for bug #321111 to give GIMP the least
+ # precedence on PDF documents by default
+ mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
+
+ prune_libtool_files --all
+
+ # Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527)
+ local gimp_app_version=$(get_version_component_range 1-2)
+ mv "${ED}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 || die
+
+ _clean_up_locales
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+}
diff --git a/media-gfx/gimp/gimp-2.8.14.ebuild b/media-gfx/gimp/gimp-2.8.14.ebuild
new file mode 100644
index 000000000000..36b484f210f6
--- /dev/null
+++ b/media-gfx/gimp/gimp-2.8.14.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit versionator autotools eutils gnome2 fdo-mime multilib python-single-r1
+
+DESCRIPTION="GNU Image Manipulation Program"
+HOMEPAGE="http://www.gimp.org/"
+SRC_URI="mirror://gimp/v$(get_version_component_range 1-2)/${P}.tar.bz2"
+LICENSE="GPL-3 LGPL-3"
+SLOT="2"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+LANGS="am ar ast az be bg br ca ca@valencia cs csb da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka kk km kn ko lt lv mk ml ms my nb nds ne nl nn oc pa pl pt pt_BR ro ru rw si sk sl sr sr@latin sv ta te th tr tt uk vi xh yi zh_CN zh_HK zh_TW"
+IUSE="alsa aalib altivec aqua bzip2 curl dbus debug doc exif gnome postscript jpeg jpeg2k lcms cpu_flags_x86_mmx mng pdf png python smp cpu_flags_x86_sse svg tiff udev webkit wmf xpm"
+
+for lang in ${LANGS}; do
+ IUSE+=" linguas_${lang}"
+done
+
+RDEPEND=">=dev-libs/glib-2.30.2:2
+ >=dev-libs/atk-2.2.0
+ >=x11-libs/gtk+-2.24.10:2
+ >=x11-libs/gdk-pixbuf-2.24.1:2
+ >=x11-libs/cairo-1.10.2
+ >=x11-libs/pango-1.29.4
+ xpm? ( x11-libs/libXpm )
+ >=media-libs/freetype-2.1.7
+ >=media-libs/fontconfig-2.2.0
+ sys-libs/zlib
+ dev-libs/libxml2
+ dev-libs/libxslt
+ x11-themes/hicolor-icon-theme
+ >=media-libs/babl-0.1.10
+ >=media-libs/gegl-0.2.0:0
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ aqua? ( x11-libs/gtk-mac-integration )
+ curl? ( net-misc/curl )
+ dbus? ( dev-libs/dbus-glib )
+ gnome? ( gnome-base/gvfs )
+ webkit? ( >=net-libs/webkit-gtk-1.6.1:2 )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ exif? ( >=media-libs/libexif-0.6.15 )
+ lcms? ( >=media-libs/lcms-2.2:2 )
+ mng? ( media-libs/libmng )
+ pdf? ( >=app-text/poppler-0.12.4[cairo] )
+ png? ( >=media-libs/libpng-1.2.37:0 )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]
+ )
+ tiff? ( >=media-libs/tiff-3.5.7:0 )
+ svg? ( >=gnome-base/librsvg-2.36.0:2 )
+ wmf? ( >=media-libs/libwmf-0.2.8 )
+ x11-libs/libXcursor
+ sys-libs/zlib
+ bzip2? ( app-arch/bzip2 )
+ postscript? ( app-text/ghostscript-gpl )
+ udev? ( virtual/libgudev:= )"
+DEPEND="${RDEPEND}
+ sys-apps/findutils
+ virtual/pkgconfig
+ >=dev-util/intltool-0.40.1
+ >=sys-devel/gettext-0.19
+ doc? ( >=dev-util/gtk-doc-1 )
+ >=sys-devel/libtool-2.2
+ >=sys-devel/automake-1.11
+ dev-util/gtk-doc-am" # due to our call to eautoreconf below (bug #386453)
+
+DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
+
+S="${WORKDIR}"/${P}
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ G2CONF="--enable-default-binary \
+ --disable-silent-rules \
+ $(use_with !aqua x) \
+ $(use_with aalib aa) \
+ $(use_with alsa) \
+ $(use_enable altivec) \
+ $(use_with bzip2) \
+ $(use_with curl libcurl) \
+ $(use_with dbus) \
+ $(use_with gnome gvfs) \
+ $(use_with webkit) \
+ $(use_with jpeg libjpeg) \
+ $(use_with jpeg2k libjasper) \
+ $(use_with exif libexif) \
+ $(use_with lcms lcms lcms2) \
+ $(use_with postscript gs) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_with mng libmng) \
+ $(use_with pdf poppler) \
+ $(use_with png libpng) \
+ $(use_enable python) \
+ $(use_enable smp mp) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_with svg librsvg) \
+ $(use_with tiff libtiff) \
+ $(use_with udev gudev) \
+ $(use_with wmf) \
+ --with-xmc \
+ $(use_with xpm libxpm) \
+ --without-xvfb-run"
+
+ if use python; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.7.4-no-deprecation.patch # bug 395695, comment 9 and 16
+ epatch "${FILESDIR}"/${PN}-2.8.10-clang.patch # bug 449370 compile with clang
+ sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
+ eautoreconf # If you remove this: remove dev-util/gtk-doc-am from DEPEND, too
+
+ gnome2_src_prepare
+}
+
+_clean_up_locales() {
+ einfo "Cleaning up locales..."
+ for lang in ${LANGS}; do
+ use "linguas_${lang}" && {
+ einfo "- keeping ${lang}"
+ continue
+ }
+ rm -Rf "${ED}"/usr/share/locale/"${lang}" || die
+ done
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use python; then
+ python_optimize
+ fi
+
+ # Workaround for bug #321111 to give GIMP the least
+ # precedence on PDF documents by default
+ mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
+
+ prune_libtool_files --all
+
+ # Prevent dead symlink gimp-console.1 from downstream man page compression (bug #433527)
+ local gimp_app_version=$(get_version_component_range 1-2)
+ mv "${ED}"/usr/share/man/man1/gimp-console{-${gimp_app_version},}.1 || die
+
+ _clean_up_locales
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+}
diff --git a/media-gfx/gimp/gimp-9999.ebuild b/media-gfx/gimp/gimp-9999.ebuild
new file mode 100644
index 000000000000..00128f98c675
--- /dev/null
+++ b/media-gfx/gimp/gimp-9999.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils gnome2 fdo-mime multilib python-single-r1 git-r3
+
+EGIT_REPO_URI="git://git.gnome.org/gimp"
+
+DESCRIPTION="GNU Image Manipulation Program"
+HOMEPAGE="http://www.gimp.org/"
+SRC_URI=""
+
+LICENSE="GPL-3 LGPL-3"
+SLOT="2"
+KEYWORDS=""
+
+LANGS="am ar ast az be bg br ca ca@valencia cs csb da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka kk km kn ko lt lv mk ml ms my nb nds ne nl nn oc pa pl pt pt_BR ro ru rw si sk sl sr sr@latin sv ta te th tr tt uk vi xh yi zh_CN zh_HK zh_TW"
+IUSE="alsa aalib altivec aqua bzip2 curl dbus debug doc exif gnome openexr postscript jpeg jpeg2k lcms cpu_flags_x86_mmx mng pdf png python smp cpu_flags_x86_sse svg tiff udev webkit wmf xpm"
+
+for lang in ${LANGS}; do
+ IUSE+=" linguas_${lang}"
+done
+
+RDEPEND=">=dev-libs/glib-2.40.0:2
+ >=dev-libs/atk-2.2.0
+ >=x11-libs/gtk+-2.24.10:2
+ >=x11-libs/gdk-pixbuf-2.24.1:2
+ >=x11-libs/cairo-1.12.2
+ >=x11-libs/pango-1.29.4
+ xpm? ( x11-libs/libXpm )
+ >=media-libs/freetype-2.1.7
+ >=media-libs/fontconfig-2.2.0
+ >=media-libs/freetype-2.1.7:2
+ >=media-libs/harfbuzz-0.9.19
+ sys-libs/zlib
+ dev-libs/libxml2
+ dev-libs/libxslt
+ x11-themes/hicolor-icon-theme
+ >=media-libs/babl-0.1.11
+ media-libs/gegl:0.3
+ aalib? ( media-libs/aalib )
+ alsa? ( media-libs/alsa-lib )
+ aqua? ( x11-libs/gtk-mac-integration )
+ curl? ( net-misc/curl )
+ dbus? ( dev-libs/dbus-glib )
+ gnome? ( gnome-base/gvfs )
+ webkit? ( >=net-libs/webkit-gtk-1.6.1:2 )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ >=media-libs/gexiv2-0.6.1
+ lcms? ( >=media-libs/lcms-2.2:2 )
+ mng? ( media-libs/libmng )
+ pdf? ( >=app-text/poppler-0.12.4[cairo] )
+ png? ( >=media-libs/libpng-1.2.37:0 )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-python/pygtk-2.10.4:2[${PYTHON_USEDEP}]
+ )
+ tiff? ( >=media-libs/tiff-3.5.7:0 )
+ svg? ( >=gnome-base/librsvg-2.36.0:2 )
+ wmf? ( >=media-libs/libwmf-0.2.8 )
+ x11-libs/libXcursor
+ sys-libs/zlib
+ >=app-arch/xz-utils-5.0.0
+ openexr? ( >=media-libs/openexr-1.6.1 )
+ >=app-text/poppler-data-0.4.7
+ bzip2? ( app-arch/bzip2 )
+ postscript? ( app-text/ghostscript-gpl )
+ udev? ( virtual/libgudev:= )"
+DEPEND="${RDEPEND}
+ sys-apps/findutils
+ virtual/pkgconfig
+ >=dev-util/intltool-0.40.1
+ >=sys-devel/gettext-0.19
+ doc? ( >=dev-util/gtk-doc-1 )
+ >=sys-devel/libtool-2.2
+ >=sys-devel/autoconf-2.54
+ >=sys-devel/automake-1.11
+ dev-util/gtk-doc-am" # due to our call to eautoreconf below (bug #386453)
+
+DOCS="AUTHORS ChangeLog* HACKING NEWS README*"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ G2CONF="--enable-default-binary \
+ --disable-silent-rules \
+ $(use_with !aqua x) \
+ $(use_with aalib aa) \
+ $(use_with alsa) \
+ $(use_enable altivec) \
+ $(use_with openexr) \
+ $(use_with webkit) \
+ $(use_with jpeg2k libjasper) \
+ $(use_with postscript gs) \
+ $(use_enable cpu_flags_x86_mmx mmx) \
+ $(use_with mng libmng) \
+ $(use_with pdf poppler) \
+ $(use_enable python) \
+ $(use_enable smp mp) \
+ $(use_enable cpu_flags_x86_sse sse) \
+ $(use_with svg librsvg) \
+ $(use_with tiff libtiff) \
+ $(use_with udev gudev) \
+ $(use_with wmf) \
+ --with-xmc \
+ $(use_with xpm libxpm) \
+ --without-xvfb-run"
+
+ if use python; then
+ python-single-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ sed -i -e 's/== "xquartz"/= "xquartz"/' configure.ac || die #494864
+
+ echo '#!/bin/sh' > py-compile
+ chmod a+x py-compile || die
+ sed -i -e 's:\$srcdir/configure:#:g' autogen.sh
+ local myconf
+ if ! use doc; then
+ myconf="${myconf} --disable-gtk-doc"
+ fi
+ ./autogen.sh ${myconf} || die
+
+ # Fix "libtoolize --force" of autogen.sh (bug #476626)
+ rm install-sh ltmain.sh || die
+ _elibtoolize --copy --install || die
+
+ gnome2_src_prepare
+}
+
+_clean_up_locales() {
+ einfo "Cleaning up locales..."
+ for lang in ${LANGS}; do
+ use "linguas_${lang}" && {
+ einfo "- keeping ${lang}"
+ continue
+ }
+ rm -Rf "${ED}"/usr/share/locale/"${lang}" || die
+ done
+}
+
+src_install() {
+ gnome2_src_install
+
+ if use python; then
+ python_optimize
+ fi
+
+ # Workaround for bug #321111 to give GIMP the least
+ # precedence on PDF documents by default
+ mv "${ED}"/usr/share/applications/{,zzz-}gimp.desktop || die
+
+ prune_libtool_files --all
+
+ _clean_up_locales
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+}
diff --git a/media-gfx/gimp/metadata.xml b/media-gfx/gimp/metadata.xml
new file mode 100644
index 000000000000..350a9b9c3954
--- /dev/null
+++ b/media-gfx/gimp/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>sping@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="smp">
+ Enable support for multiprocessors
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/gliv/Manifest b/media-gfx/gliv/Manifest
new file mode 100644
index 000000000000..07b7d17d71e9
--- /dev/null
+++ b/media-gfx/gliv/Manifest
@@ -0,0 +1,2 @@
+DIST gliv-1.9.6.tar.bz2 518971 SHA256 aa0f3c780d5fca1eb393deaa5289c024bf3aba5b4f980fc90d4b444906534830 SHA512 bf6e7108308884d50dc47faec7d65ed27c2ea1521cfc526fb8929675d52b3437276da904c8240c5c227d7bca2d0c268311f4fdc9b2d936fecda33318ad6bce6c WHIRLPOOL 3e1690198a9b09355ac5afaf05ef6984f4f352868d0fd2be0087af3953fbf3a5efa01128e302770ee7df7cff0eea2b843213764207d0a4c3d16d2c25c6f8467b
+DIST gliv-1.9.7.tar.bz2 644305 SHA256 5be6d071927dcb371676a9e4e9e4c54e8b2f4842f04dd63727b9a5032ddbcb69 SHA512 c2276bde4b13d0dc910062e8cdec8836d751ce25e5120f4fd7987c9ba5bd62844a71a5e92c1ccf766393b47f2ff95fc3298051d3729e38696fccc024be388c4e WHIRLPOOL b7fb5fe0dad22cb4d64900227deb757df698b61123d243123e52dfe8f012d1f11952d0171b147f45fa299d4405e97dc331efa340149cc7b2eb2026d184147ab3
diff --git a/media-gfx/gliv/files/gliv-1.9.6-as-needed.patch b/media-gfx/gliv/files/gliv-1.9.6-as-needed.patch
new file mode 100644
index 000000000000..3128b99e4435
--- /dev/null
+++ b/media-gfx/gliv/files/gliv-1.9.6-as-needed.patch
@@ -0,0 +1,99 @@
+--- gliv-1.9.6.orig/configure.ac 2005-09-21 23:05:57.000000000 +0200
++++ gliv-1.9.6/configure.ac 2010-01-03 15:51:41.464539460 +0100
+@@ -16,18 +16,17 @@
+ # Checks for programs.
+ AC_PROG_CC
+ AC_PROG_RANLIB
+-
++AC_USE_SYSTEM_EXTENSIONS
+
+ # Default CFLAGS.
+-if test "x$GCC" = "xyes" && test "$DEFAULT_CFLAGS" = "yes"; then
+- CFLAGS="-Wall -O2 -fomit-frame-pointer -ffast-math"
+-fi
+-CFLAGS="$CFLAGS -I${srcdir}/../lib"
++#if test "x$GCC" = "xyes" && test "$DEFAULT_CFLAGS" = "yes"; then
++# CFLAGS="-Wall -O2 -fomit-frame-pointer -ffast-math"
++#fi
++#CFLAGS="$CFLAGS -I${srcdir}/../lib"
+
+ # Checks for LFS flags, we may not handle big files, but it doesn't hurt.
+ AC_SYS_LARGEFILE
+
+-
+ AC_DEFUN([CHECK_MATH],
+ [OLD_CFLAGS="$CFLAGS"]
+ [CFLAGS="$CFLAGS -w"]
+@@ -127,35 +126,22 @@
+
+ # Checks for X.
+ AC_PATH_XTRA
+-CFLAGS="$X_CFLAGS $CFLAGS"
+-LDFLAGS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS $LDFLAGS"
+
+ # Checks for GtkGLExt.
+ PKG_CHECK_MODULES(GTKGLEXT, [gtkglext-1.0 >= 0.7.0])
+-CFLAGS="$GTKGLEXT_CFLAGS $CFLAGS"
+-LDFLAGS="$GTKGLEXT_LIBS $LDFLAGS"
+ GTKGL_VERSION="$($PKG_CONFIG --modversion gtkglext-1.0)"
+
+ # Checks for OpenGL.
+-AC_TRY_LINK([#include "GL/gl.h"],
+- [glBegin(GL_QUADS);],
+- [ogl="yes"],
+- [ogl="no"])
+-
++AC_SEARCH_LIBS([glBegin],[GL],[ogl="yes"],[ogl="no"],)
+ if test "x$ogl" = "xno"; then
+ AC_MSG_NOTICE([maybe libGL requires libpthread...])
+- OLD_LDFLAGS="$LDFLAGS"
+- LDFLAGS="$LDFLAGS -lpthread"
+- AC_TRY_LINK([#include "GL/gl.h"],
+- [glBegin(GL_QUADS);],
+- [],
+- AC_MSG_ERROR([cannot use -lGL]))
++ AC_SEARCH_LIBS([glBegin],[GL],[ogl="yes"],[ogl="no"],[-lpthread])
+ fi
+
+ # Checks for gtk.
+ AM_PATH_GTK_2_0([2.6.0], [
+ CFLAGS="$GTK_CFLAGS $CFLAGS"
+- LDFLAGS="$GTK_LIBS $LDFLAGS"
++ LIBS="$LIBS $GTK_LIBS"
+ GTK_VERSION="$($PKG_CONFIG --modversion gtk+-2.0)"
+ ], [exit 1], [gthread])
+
+@@ -163,9 +149,6 @@
+ ALL_LINGUAS=$(echo po/*.po | sed -e 's|\.po||g' -e 's|po/||g')
+ AM_GNU_GETTEXT_VERSION
+ AM_GNU_GETTEXT
+-CFLAGS="$CFLAGS -I../${srcdir}/intl"
+-LIBS="$LIBS $LIBINTL"
+-
+
+ AC_CONFIG_FILES([
+ Makefile
+--- gliv-1.9.6.orig/src/Makefile.am 2006-11-18 15:21:13.000000000 +0100
++++ gliv-1.9.6/src/Makefile.am 2010-01-03 15:48:45.765539472 +0100
+@@ -64,6 +64,9 @@
+ gliv_LDADD = -L../lib -lreplacements
+ endif
+
++gliv_CFLAGS = @GTKGLEXT_CFLAGS@
++gliv_LDADD = @GTKGLEXT_LIBS@
++
+ AM_CPPFLAGS = -I$(srcdir)/include -D_REENTRANT -D_THREAD_SAFE \
+ -DSYSCONFDIR=\"$(sysconfdir)\"
+
+--- gliv-1.9.6.orig/po/Makefile.in.in 2006-11-18 15:21:13.000000000 +0100
++++ gliv-1.9.6/po/Makefile.in.in 2010-01-03 16:05:43.860539403 +0100
+@@ -29,7 +29,7 @@
+
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+-MKINSTALLDIRS = @MKINSTALLDIRS@
++MKINSTALLDIRS = $(top_srcdir)/mkinstalldirs
+ mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
+
+ GMSGFMT = @GMSGFMT@
+
diff --git a/media-gfx/gliv/files/gliv-1.9.7-as-needed.patch b/media-gfx/gliv/files/gliv-1.9.7-as-needed.patch
new file mode 100644
index 000000000000..6998e5fd988d
--- /dev/null
+++ b/media-gfx/gliv/files/gliv-1.9.7-as-needed.patch
@@ -0,0 +1,87 @@
+--- gliv-1.9.7.orig/configure.ac
++++ gliv-1.9.7/configure.ac
+@@ -17,18 +17,17 @@
+ # Checks for programs.
+ AC_PROG_CC
+ AC_PROG_RANLIB
+-
++AC_USE_SYSTEM_EXTENSIONS
+
+ # Default CFLAGS.
+-if test "x$GCC" = "xyes" && test "$DEFAULT_CFLAGS" = "yes"; then
+- CFLAGS="-Wall -O2 -fomit-frame-pointer -ffast-math"
+-fi
+-CFLAGS="$CFLAGS -I${srcdir}/../lib"
++#if test "x$GCC" = "xyes" && test "$DEFAULT_CFLAGS" = "yes"; then
++# CFLAGS="-Wall -O2 -fomit-frame-pointer -ffast-math"
++#fi
++#CFLAGS="$CFLAGS -I${srcdir}/../lib"
+
+ # Checks for LFS flags, we may not handle big files, but it doesn't hurt.
+ AC_SYS_LARGEFILE
+
+-
+ AC_DEFUN([CHECK_MATH],
+ [OLD_CFLAGS="$CFLAGS"]
+ [CFLAGS="$CFLAGS -w"]
+@@ -128,35 +127,22 @@
+
+ # Checks for X.
+ AC_PATH_XTRA
+-CFLAGS="$X_CFLAGS $CFLAGS"
+-LDFLAGS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS $LDFLAGS"
+
+ # Checks for GtkGLExt.
+ PKG_CHECK_MODULES(GTKGLEXT, [gtkglext-1.0 >= 0.7.0])
+-CFLAGS="$GTKGLEXT_CFLAGS $CFLAGS"
+-LDFLAGS="$GTKGLEXT_LIBS $LDFLAGS"
+ GTKGL_VERSION="$($PKG_CONFIG --modversion gtkglext-1.0)"
+
+ # Checks for OpenGL.
+-AC_TRY_LINK([#include "GL/gl.h"],
+- [glBegin(GL_QUADS);],
+- [ogl="yes"],
+- [ogl="no"])
+-
++AC_SEARCH_LIBS([glBegin],[GL],[ogl="yes"],[ogl="no"],)
+ if test "x$ogl" = "xno"; then
+ AC_MSG_NOTICE([maybe libGL requires libpthread...])
+- OLD_LDFLAGS="$LDFLAGS"
+- LDFLAGS="$LDFLAGS -lpthread"
+- AC_TRY_LINK([#include "GL/gl.h"],
+- [glBegin(GL_QUADS);],
+- [],
+- AC_MSG_ERROR([cannot use -lGL]))
++ AC_SEARCH_LIBS([glBegin],[GL],[ogl="yes"],[ogl="no"],[-lpthread])
+ fi
+
+ # Checks for gtk.
+ AM_PATH_GTK_2_0([2.6.0], [
+ CFLAGS="$GTK_CFLAGS $CFLAGS"
+- LDFLAGS="$GTK_LIBS $LDFLAGS"
++ LIBS="$LIBS $GTK_LIBS"
+ GTK_VERSION="$($PKG_CONFIG --modversion gtk+-2.0)"
+ ], [exit 1], [gthread])
+
+@@ -164,9 +150,6 @@
+ ALL_LINGUAS=$(echo po/*.po | sed -e 's|\.po||g' -e 's|po/||g')
+ AM_GNU_GETTEXT_VERSION
+ AM_GNU_GETTEXT
+-CFLAGS="$CFLAGS -I../${srcdir}/intl"
+-LIBS="$LIBS $LIBINTL"
+-
+
+ AC_CONFIG_FILES([ intl/Makefile
+ Makefile
+--- gliv-1.9.7.orig/src/Makefile.am
++++ gliv-1.9.7/src/Makefile.am
+@@ -64,6 +64,9 @@
+ gliv_LDADD = -L../lib -lreplacements
+ endif
+
++gliv_CFLAGS = @GTKGLEXT_CFLAGS@
++gliv_LDADD = @GTKGLEXT_LIBS@
++
+ AM_CPPFLAGS = -I$(srcdir)/include -D_REENTRANT -D_THREAD_SAFE \
+ -DSYSCONFDIR=\"$(sysconfdir)\"
+
diff --git a/media-gfx/gliv/files/gliv-1.9.7-destdir.patch b/media-gfx/gliv/files/gliv-1.9.7-destdir.patch
new file mode 100644
index 000000000000..827c6adb10d8
--- /dev/null
+++ b/media-gfx/gliv/files/gliv-1.9.7-destdir.patch
@@ -0,0 +1,15 @@
+--- gliv-1.9.7/Makefile.am.orig
++++ gliv-1.9.7/Makefile.am
+@@ -31,9 +31,9 @@
+ @echo
+ @if desktop-file-install --help > /dev/null 2>&1; then \
+ echo "Installing the GLiv desktop file with desktop-file-install"; \
+- mkdir -p $(datadir)/{pixmaps,applications} || true; \
+- cp gliv.png $(datadir)/pixmaps/gliv.png || true; \
+- desktop-file-install --vendor=gnome --dir=$(datadir)/applications \
++ mkdir -p $(DESTDIR)$(datadir)/{pixmaps,applications} || true; \
++ cp gliv.png $(DESTDIR)$(datadir)/pixmaps/gliv.png || true; \
++ desktop-file-install --vendor=gnome --dir=$(DESTDIR)$(datadir)/applications \
+ gliv.desktop || true; \
+ else \
+ echo "No desktop-file-install(1), skipping gliv.desktop"; \
diff --git a/media-gfx/gliv/gliv-1.9.6.ebuild b/media-gfx/gliv/gliv-1.9.6.ebuild
new file mode 100644
index 000000000000..7dc18066a73f
--- /dev/null
+++ b/media-gfx/gliv/gliv-1.9.6.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils autotools
+
+DESCRIPTION="An image viewer that uses OpenGL"
+HOMEPAGE="http://guichaz.free.fr/gliv/"
+SRC_URI="http://guichaz.free.fr/gliv/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="nls"
+
+RDEPEND=">=x11-libs/gtk+-2.6:2
+ virtual/opengl
+ >x11-libs/gtkglext-1.0.6
+ nls? ( sys-devel/gettext )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/bison-1.875"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-as-needed.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable nls)
+}
+
+src_install() {
+ # Needed if desktop-file-install is present, else we get
+ # sandbox violations.
+ export DESKTOP_FILE_INSTALL_DIR="${D}/usr/share/applications"
+
+ einstall || die "make install failed"
+ dodoc README NEWS THANKS
+}
diff --git a/media-gfx/gliv/gliv-1.9.7.ebuild b/media-gfx/gliv/gliv-1.9.7.ebuild
new file mode 100644
index 000000000000..582a0329952e
--- /dev/null
+++ b/media-gfx/gliv/gliv-1.9.7.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools
+
+DESCRIPTION="An image viewer that uses OpenGL"
+HOMEPAGE="http://guichaz.free.fr/gliv/"
+SRC_URI="http://guichaz.free.fr/gliv/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc ~x86"
+IUSE="nls"
+
+RDEPEND="
+ >=x11-libs/gtk+-2.6:2
+ virtual/opengl
+ >x11-libs/gtkglext-1.0.6
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/bison-1.875
+ nls? ( sys-devel/gettext )
+"
+
+src_prepare() {
+ # Fix build with gettext-0.19, bug #512624
+ # using gettextize no-interactive example from dev-util/bless package
+ if use nls; then
+ cp $(type -p gettextize) "${T}"/
+ sed -i -e 's:read dummy < /dev/tty::' "${T}/gettextize" || die
+ "${T}"/gettextize -f --no-changelog --intl > /dev/null
+ fi
+
+ epatch "${FILESDIR}"/${P}-as-needed.patch \
+ "${FILESDIR}/${P}-destdir.patch"
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable nls)
+}
diff --git a/media-gfx/gliv/metadata.xml b/media-gfx/gliv/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/gliv/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/gmic/Manifest b/media-gfx/gmic/Manifest
new file mode 100644
index 000000000000..86fa815b986f
--- /dev/null
+++ b/media-gfx/gmic/Manifest
@@ -0,0 +1,4 @@
+DIST gmic_1.6.0.2.tar.gz 3013936 SHA256 ec9fa41bb8c27f883b9f845258d41f8024936c80bdec723a1c67cfe05ef9b900 SHA512 9d754cc2c72835bd139a39f72863f5315bebc25716efadb023f54661a4bb3fbf29066ddcd258ab8f084164edc9bd02f77a5a801b5c0753322f959205ce0adaf1 WHIRLPOOL 1d8e7126901b7a269f0aae9bdc1bd05a859efa3269de892e712892aa0c06eeb856c27cf05564bac30abcacf27f3e11d2bcc8f179fc29a675960d6640567cdc0c
+DIST gmic_1.6.0.3.tar.gz 3019692 SHA256 91ce6cfe58e29a6819bf849346bf049d2d73f826bbd7b8b8de42dae7d54c7752 SHA512 377b361fc178ab73a7542a39243d32de970ad6ec5928c295d86acf1bd67efc2ebaf72ce818b55c6a7aeda17eb657fbf4176f4f4c90bc48179419842343e3619b WHIRLPOOL fb78366cd72467b2c1ac2e3f704061be173ba28cb888dabee56f7c4c7c2a4b870293c2e1ae88c87edad8f4e511944bb99218e9fae2d30226c1a4b07b001927f6
+DIST gmic_1.6.0.4.tar.gz 3073596 SHA256 ef83e4efc31280e819d02315b1ebbaec6c0b8ebb960da3e785651572853b8f58 SHA512 75c0adc8a0460c140ec656403053e4533fc6434a0b23c2ac842045aeb788a8ce5da5338832574e76e06fd710bebf5ec627a5bc894f00081ffd1b37a5c6aa852e WHIRLPOOL 1eb3afc6c9fb9c07999e5e497e6d6c5075fda46293417e889511c28c9e0ce26b0070e1356dcf0db9bb49e76b83d75941ed917c01b61c98ab537430ea938c831d
+DIST gmic_1.6.5.0.tar.gz 3005945 SHA256 ebc98c4f5848b8343d581104e072299529ac3edbcea7b565ffd6e1fb4bfd66ed SHA512 3feb5589dcc341106ce1305ce2d3f90776f074607bec3b8413519aa5f2c9dc9554a9ee7a5ba1d52d1a9e7676e6bff135d444276c989511f973cd456136d0e4e1 WHIRLPOOL 02f3f711fa9c876fba39e56a42c30f62a6c2d0848ae836f9635d7df0ef57f48f2a8f09ca361232c2239e473046fe7d085260ac365d2e7b6d49e65c3c0aa2e9bc
diff --git a/media-gfx/gmic/files/gmic-1.6.0.2-makefile.patch b/media-gfx/gmic/files/gmic-1.6.0.2-makefile.patch
new file mode 100644
index 000000000000..2ec90476f410
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-1.6.0.2-makefile.patch
@@ -0,0 +1,155 @@
+--- gmic-1.6.0.2/src/Makefile
++++ gmic-1.6.0.2/src/Makefile
+@@ -85,7 +85,6 @@
+ else
+ MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/$(INCLUDE)
+ endif
+-MANDATORY_LIBS += -L$(USR)/$(LIB)
+ ifeq ($(notdir $(CC)),g++)
+ MANDATORY_CFLAGS += -Wall -W
+ MANDATORY_LIBS += -lm
+@@ -142,14 +141,14 @@
+ # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too).
+ # This requires the presence of the X11 include and library files.
+ # (package 'libx11-dev' on Debian).
+-X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr
+-X11_LIBS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr
++X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr
++X11_LIBS = -lX11 -lpthread #-lXrandr
+
+ # Flags to enable fast display, using XShm.
+ # This requires the presence of the X11 extension include and library files.
+ # (package 'libx11-dev' on Debian).
+ XSHM_CFLAGS = -Dcimg_use_xshm
+-XSHM_LIBS = -L$(USR)/X11R6/lib -lXext
++XSHM_LIBS = -lXext
+
+ # Flags to enable image display, using GDI32.
+ # This requires the presence of the GDI32 include and library files.
+@@ -177,8 +176,8 @@
+ # Flags to enable native support for MINC2 image files, using the MINC2 library.
+ # ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide )
+ # (package 'libminc-dev' on Debian).
+-MINC2_CFLAGS = -Dcimg_use_minc2 -I${HOME}/local/include
+-MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz -L${HOME}/local/lib
++MINC2_CFLAGS = -Dcimg_use_minc2
++MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz
+
+ # Flags to enable native support for compressed .cimgz files, using the Zlib library.
+ # This requires the presence of the Zlib include and library files.
+@@ -345,10 +344,10 @@
+ endif
+
+ gimp:
+- $(MAKE) "CFLAGS=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GIMP_LIBS) $(OPT_LIBS)" "STRIP_EXE=1" gmic_gimp
++ $(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GIMP_LIBS) $(OPT_LIBS)" gmic_gimp
+
+ lib:
+- $(MAKE) "CFLAGS=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_LIB_LIBS) $(OPT_LIBS)" gmic_lib
++ $(MAKE) "CFLAGS+=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_LIB_LIBS) $(OPT_LIBS)" gmic_lib
+
+ zart: lib
+ ifneq ($(OS),Darwin)
+@@ -359,7 +358,7 @@
+
+ # Entries for other configurations.
+ linux:
+- $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(STD_UNIX_LIBS)" "STRIP_EXE=1" gmic
++ $(MAKE) "CFLAGS+=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(STD_UNIX_LIBS)" gmic
+
+ solaris:
+ $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(STD_UNIX_LIBS) -R$(USR)/X11R6/lib -lrt -lnsl -lsocket" "STRIP_EXE=1" gmic
+@@ -386,28 +385,27 @@
+ $(MAKE) "CFLAGS+=$(MINIMAL_MACOSX_CFLAGS)" "LIBS+=$(MINIMAL_MACOSX_LIBS)" gmic
+
+ custom:
+- $(MAKE) "CFLAGS=$(CUSTOM_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(CUSTOM_UNIX_LIBS)" "STRIP_EXE=1" gmic
++ $(MAKE) "CFLAGS+=$(CUSTOM_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(CUSTOM_UNIX_LIBS)" gmic
+
+ # Internal rules to build compilation modules.
+ gmic_lib.o: gmic.cpp
+ $(CC) -o gmic_lib.o -c gmic.cpp -fPIC $(CFLAGS)
+ gmic_lib: gmic_lib.o
+- ar rcs libgmic.a gmic_lib.o
++ $(AR) rcs libgmic.a gmic_lib.o
+ ifneq ($(OS),Darwin)
+- $(CC) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LIBS)
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LIBS)
+ $(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic $(FFTW_LIBS)
+ else
+- $(CC) -shared -o libgmic.so gmic_lib.o $(LIBS)
++ $(CC) $(LDFLAGS) -shared -o libgmic.so gmic_lib.o $(LIBS)
+ endif
+
+ gmic_gimp.o: gmic.cpp CImg.h
+ $(CC) -o gmic_gimp.o -c gmic.cpp $(CFLAGS) -Dgmic_gimp
+ gmic_gimp : gmic_gimp.o gmic_gimp.cpp
+- $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS)
+- strip gmic_gimp$(EXE)
++ $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) $(LDFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS)
+
+ gmic: gmic.cpp gmic.h CImg.h
+- $(CC) -o gmic gmic.cpp $(CFLAGS) -Dgmic_main $(LIBS)
++ $(CC) -o gmic gmic.cpp $(CFLAGS) $(LDFLAGS) -Dgmic_main $(LIBS)
+
+ gmic_def.h: gmic_def.gmic
+ @echo "#ifndef gmic_gimp" > gmic_def.h
+@@ -422,20 +420,25 @@
+ # Generate bash completion script.
+ bashcompletion:
+ @mkdir -p ../resources
+- @\gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh
++ @./gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh
+
+ # Generate man page.
+ man:
+ @mkdir -p ../man
+- @\gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -__help man 2> ../man/gmic.1
+- @gzip -f ../man/gmic.1
++ @./gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -__help man 2> ../man/gmic.1
++
++install: install-gimp install-bin install-lib install-man install-bash
+
+ # Install/uninstall/clean procedures.
+-install:
++install-gimp:
+ mkdir -p $(DESTDIR)$(PLUGINDIR)/
+ cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/
++
++install-bin:
+ mkdir -p $(DESTDIR)$(USR)/$(BIN)/
+ cp -f gmic $(DESTDIR)$(USR)/$(BIN)/
++
++install-lib:
+ mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/
+ cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/
+ ifneq ($(OS),Darwin)
+@@ -445,13 +448,14 @@
+ ln -s libgmic.so.1.6.0 $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1
+ ln -s libgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libgmic.so
+ endif
++
++install-man:
+ mkdir -p $(DESTDIR)$(USR)/share/man/
+ mkdir -p $(DESTDIR)$(USR)/share/man/man1/
+- mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/
+- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz
+- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz
++ cp -f ../man/gmic.1 $(DESTDIR)$(USR)/share/man/man1/gmic.1
++
++install-bash:
+ if [ -d /etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/etc/bash_completion.d/gmic; fi
+- if [ -d /opt/local/etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/opt/local/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/opt/local/etc/bash_completion.d/gmic; fi
+
+ uninstall:
+ rm -f $(DESTDIR)$(USR)/$(BIN)/gmic
+@@ -460,8 +464,7 @@
+ rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1
+ rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so
+ rm -rf $(DESTDIR)$(USR)/share/doc/gmic/
+- rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz
+- rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz
++ rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1
+
+ distclean: clean
+
diff --git a/media-gfx/gmic/files/gmic-1.6.5.0-makefile.patch b/media-gfx/gmic/files/gmic-1.6.5.0-makefile.patch
new file mode 100644
index 000000000000..91e7528ae850
--- /dev/null
+++ b/media-gfx/gmic/files/gmic-1.6.5.0-makefile.patch
@@ -0,0 +1,154 @@
+--- gmic-1.6.5.0/src/Makefile
++++ gmic-1.6.5.0/src/Makefile
+@@ -85,7 +85,6 @@
+ ifndef NO_STDLIB
+ MANDATORY_CFLAGS += -std=c++11
+ endif
+-MANDATORY_LIBS += -L$(USR)/$(LIB)
+ ifeq ($(notdir $(CC)),g++)
+ MANDATORY_CFLAGS += -Wall -W
+ MANDATORY_LIBS += -lm
+@@ -139,14 +138,14 @@
+ # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too).
+ # This requires the presence of the X11 include and library files.
+ # (package 'libx11-dev' on Debian).
+-X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr
+-X11_LIBS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr
++X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr
++X11_LIBS = -lX11 -lpthread #-lXrandr
+
+ # Flags to enable fast display, using XShm.
+ # This requires the presence of the X11 extension include and library files.
+ # (package 'libx11-dev' on Debian).
+ XSHM_CFLAGS = -Dcimg_use_xshm
+-XSHM_LIBS = -L$(USR)/X11R6/lib -lXext
++XSHM_LIBS = -lXext
+
+ # Flags to enable image display, using GDI32.
+ # This requires the presence of the GDI32 include and library files.
+@@ -174,8 +173,8 @@
+ # Flags to enable native support for MINC2 image files, using the MINC2 library.
+ # ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide )
+ # (package 'libminc-dev' on Debian).
+-MINC2_CFLAGS = -Dcimg_use_minc2 -I${HOME}/local/include
+-MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz -L${HOME}/local/lib
++MINC2_CFLAGS = -Dcimg_use_minc2
++MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz
+
+ # Flags to enable native support for downloading files from the network.
+ # ( http://curl.haxx.se/libcurl/ )
+@@ -325,7 +324,6 @@
+
+ cli:
+ $(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic
+- strip gmic$(EXE)
+
+ gimp:
+ $(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GIMP_LIBS)" gmic_gimp
+@@ -335,11 +333,9 @@
+
+ gmicol:
+ $(MAKE) "CFLAGS+=$(STD_GMICOL_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GMICOL_LIBS)" gmic
+- strip gmic$(EXE)
+
+ static:
+ $(MAKE) "CFLAGS+=$(STATIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STATIC_CLI_LIBS)" gmic
+- strip gmic$(EXE)
+
+ debug:
+ $(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(DEBUG_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic
+@@ -355,24 +351,22 @@
+ libgmic.o: gmic.cpp gmic.h gmic_def.h CImg.h
+ $(CC) -o libgmic.o -c gmic.cpp -fPIC $(CFLAGS)
+
+-libgmic: libgmic.o gmic_use_lib.cpp
+- ar rcs libgmic.a libgmic.o
++libgmic: libgmic.o
++ $(AR) rcs libgmic.a libgmic.o
+ ifeq ($(OS),Darwin)
+- $(CC) -shared -o libgmic.so libgmic.o $(LIBS)
++ $(CC) $(LDFLAGS) -shared -o libgmic.so libgmic.o $(LIBS)
+ else
+- $(CC) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so libgmic.o $(LIBS)
+- $(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so libgmic.o $(LIBS)
+ endif
+
+ gmic_gimp.o: gmic.cpp gmic.h gmic_def.h CImg.h
+ $(CC) -o gmic_gimp.o -c gmic.cpp -Dgmic_gimp $(CFLAGS)
+
+ gmic_gimp : gmic_gimp.o gmic_gimp.cpp
+- $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS)
+- strip gmic_gimp$(EXE)
++ $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0$(EXE) --cflags` $(CFLAGS) $(LDFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS)
+
+ gmic: gmic.cpp gmic.h gmic_def.h CImg.h
+- $(CC) -o gmic gmic.cpp -Dgmic_main $(CFLAGS) $(LIBS)
++ $(CC) -o gmic gmic.cpp -Dgmic_main $(CFLAGS) $(LDFLAGS) $(LIBS)
+
+ gmic_def.h:
+ @wget --quiet -O gmic_def.h http://gmic.eu/gmic_def.h
+@@ -397,38 +391,43 @@
+ # Generate bash completion script (requires 'gmic' to be installed first).
+ bashcompletion:
+ @mkdir -p ../resources
+- @\gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh
++ @./gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh
+
+ # Generate man page (requires 'gmic' to be installed first).
+ man:
+ @mkdir -p ../man
+- @\gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -__help man 2> ../man/gmic.1
+- @gzip -f ../man/gmic.1
++ @./gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -__help man 2> ../man/gmic.1
+
+ # Install/uninstall/clean procedures.
+-install:
++install-gimp:
+ mkdir -p $(DESTDIR)$(PLUGINDIR)/
+ cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/
++
++install-bin:
+ mkdir -p $(DESTDIR)$(USR)/$(BIN)/
+ cp -f gmic $(DESTDIR)$(USR)/$(BIN)/
++
++install-lib:
+ mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/
+ cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/
+-
+ ifneq ($(OS),Darwin)
+ mkdir -p $(DESTDIR)$(USR)/share
+ mkdir -p $(DESTDIR)$(USR)/$(LIB)
+ cp -f libgmic.so $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.6.5
+ ln -fs libgmic.so.1.6.5 $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1
+ ln -fs libgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libgmic.so
+- cp -f ../zart/zart $(DESTDIR)$(USR)/$(BIN)/
+ endif
++
++install-zart:
++ cp -f ../zart/zart $(DESTDIR)$(USR)/$(BIN)/
++
++install-man:
+ mkdir -p $(DESTDIR)$(USR)/share/man/
+ mkdir -p $(DESTDIR)$(USR)/share/man/man1/
+- mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/
+- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz
+- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz
++ cp -f ../man/gmic.1 $(DESTDIR)$(USR)/share/man/man1/gmic.1
++
++install-bash:
+ if [ -d /etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/etc/bash_completion.d/gmic; fi
+- if [ -d /opt/local/etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/opt/local/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/opt/local/etc/bash_completion.d/gmic; fi
+
+ uninstall:
+ rm -f $(DESTDIR)$(USR)/$(BIN)/gmic
+@@ -438,8 +437,7 @@
+ rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1
+ rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so
+ rm -rf $(DESTDIR)$(USR)/share/doc/gmic/
+- rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz
+- rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz
++ rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1
+
+ distclean: clean
+
diff --git a/media-gfx/gmic/gmic-1.6.0.2.ebuild b/media-gfx/gmic/gmic-1.6.0.2.ebuild
new file mode 100644
index 000000000000..44c0c82095f9
--- /dev/null
+++ b/media-gfx/gmic/gmic-1.6.0.2.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs bash-completion-r1 flag-o-matic
+
+DESCRIPTION="GREYC's Magic Image Converter"
+HOMEPAGE="http://gmic.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="CeCILL-2 FDL-1.3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ffmpeg fftw graphicsmagick jpeg opencv openexr openmp png tiff X zlib"
+
+DEPEND="
+ fftw? ( sci-libs/fftw:3.0[threads] )
+ graphicsmagick? ( media-gfx/graphicsmagick )
+ jpeg? ( virtual/jpeg )
+ opencv? ( >=media-libs/opencv-2.3.1a-r1 )
+ openexr? (
+ media-libs/ilmbase
+ media-libs/openexr
+ )
+ png? ( media-libs/libpng )
+ tiff? ( media-libs/tiff )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ ffmpeg? ( media-video/ffmpeg:0 )
+"
+
+S=${WORKDIR}/${P}/src
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+
+ if ! test-flag-CXX -std=c++11 ; then
+ die "You need at least GCC 4.7.x or Clang >= 3.3 for C++11-specific compiler flags"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+
+ for i in fftw jpeg opencv openmp png tiff zlib ; do
+ use $i || { sed -i -r "s/^(${i}_(CFLAGS|LIBS) =).*/\1/I" Makefile || die ; }
+ done
+
+ use graphicsmagick || { sed -i -r "s/^(MAGICK_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
+ use openexr || { sed -i -r "s/^(EXR_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
+
+ if ! use X ; then
+ sed -i -r "s/^((X11|XSHM)_(CFLAGS|LIBS) =).*/\1/" Makefile || die
+
+ # disable display capabilities when X support is disabled
+ append-cxxflags -Dcimg_display=0
+ fi
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" CC="$(tc-getCXX)" CFLAGS="${CXXFLAGS}" \
+ LIB="$(get_libdir)" OPT_CFLAGS= DEBUG_CFLAGS= linux lib
+ emake man bashcompletion
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIB="$(get_libdir)" install-bin install-lib install-man install-bash
+ dodoc ../README
+}
diff --git a/media-gfx/gmic/gmic-1.6.0.3.ebuild b/media-gfx/gmic/gmic-1.6.0.3.ebuild
new file mode 100644
index 000000000000..a420b57aef15
--- /dev/null
+++ b/media-gfx/gmic/gmic-1.6.0.3.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs bash-completion-r1 flag-o-matic
+
+DESCRIPTION="GREYC's Magic Image Converter"
+HOMEPAGE="http://gmic.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="CeCILL-2 FDL-1.3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ffmpeg fftw graphicsmagick jpeg opencv openexr openmp png tiff X zlib"
+
+DEPEND="
+ fftw? ( sci-libs/fftw:3.0[threads] )
+ graphicsmagick? ( media-gfx/graphicsmagick )
+ jpeg? ( virtual/jpeg )
+ opencv? ( >=media-libs/opencv-2.3.1a-r1 )
+ openexr? (
+ media-libs/ilmbase
+ media-libs/openexr
+ )
+ png? ( media-libs/libpng )
+ tiff? ( media-libs/tiff )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ ffmpeg? ( media-video/ffmpeg:0 )
+"
+
+S=${WORKDIR}/${P}/src
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+
+ if ! test-flag-CXX -std=c++11 ; then
+ die "You need at least GCC 4.7.x or Clang >= 3.3 for C++11-specific compiler flags"
+ fi
+}
+
+src_prepare() {
+ cp "${FILESDIR}"/${PN}-1.6.0.2-makefile.patch "${WORKDIR}" || die
+ edos2unix "${WORKDIR}"/${PN}-1.6.0.2-makefile.patch
+ epatch "${WORKDIR}"/${PN}-1.6.0.2-makefile.patch
+
+ for i in fftw jpeg opencv openmp png tiff zlib ; do
+ use $i || { sed -i -r "s/^(${i}_(CFLAGS|LIBS) =).*/\1/I" Makefile || die ; }
+ done
+
+ use graphicsmagick || { sed -i -r "s/^(MAGICK_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
+ use openexr || { sed -i -r "s/^(EXR_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
+
+ if ! use X ; then
+ sed -i -r "s/^((X11|XSHM)_(CFLAGS|LIBS) =).*/\1/" Makefile || die
+
+ # disable display capabilities when X support is disabled
+ append-cxxflags -Dcimg_display=0
+ fi
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" CC="$(tc-getCXX)" CFLAGS="${CXXFLAGS}" \
+ LIB="$(get_libdir)" OPT_CFLAGS= DEBUG_CFLAGS= linux lib
+ emake man bashcompletion
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIB="$(get_libdir)" install-bin install-lib install-man install-bash
+ dodoc ../README
+}
diff --git a/media-gfx/gmic/gmic-1.6.0.4.ebuild b/media-gfx/gmic/gmic-1.6.0.4.ebuild
new file mode 100644
index 000000000000..7e0b7f75e825
--- /dev/null
+++ b/media-gfx/gmic/gmic-1.6.0.4.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs bash-completion-r1 flag-o-matic
+
+DESCRIPTION="GREYC's Magic Image Converter"
+HOMEPAGE="http://gmic.eu/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.tar.gz"
+
+LICENSE="CeCILL-2 FDL-1.3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ffmpeg fftw graphicsmagick jpeg opencv openexr openmp png tiff X zlib"
+
+DEPEND="
+ fftw? ( sci-libs/fftw:3.0[threads] )
+ graphicsmagick? ( media-gfx/graphicsmagick )
+ jpeg? ( virtual/jpeg )
+ opencv? ( >=media-libs/opencv-2.3.1a-r1 )
+ openexr? (
+ media-libs/ilmbase
+ media-libs/openexr
+ )
+ png? ( media-libs/libpng )
+ tiff? ( media-libs/tiff )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ ffmpeg? ( media-video/ffmpeg:0 )
+"
+
+S=${WORKDIR}/${P}/src
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+
+ if ! test-flag-CXX -std=c++11 ; then
+ die "You need at least GCC 4.7.x or Clang >= 3.3 for C++11-specific compiler flags"
+ fi
+}
+
+src_prepare() {
+ cp "${FILESDIR}"/${PN}-1.6.0.2-makefile.patch "${WORKDIR}" || die
+ edos2unix "${WORKDIR}"/${PN}-1.6.0.2-makefile.patch
+ epatch "${WORKDIR}"/${PN}-1.6.0.2-makefile.patch
+
+ for i in fftw jpeg opencv openmp png tiff zlib ; do
+ use $i || { sed -i -r "s/^(${i}_(CFLAGS|LIBS) =).*/\1/I" Makefile || die ; }
+ done
+
+ use graphicsmagick || { sed -i -r "s/^(MAGICK_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
+ use openexr || { sed -i -r "s/^(EXR_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
+
+ if ! use X ; then
+ sed -i -r "s/^((X11|XSHM)_(CFLAGS|LIBS) =).*/\1/" Makefile || die
+
+ # disable display capabilities when X support is disabled
+ append-cxxflags -Dcimg_display=0
+ fi
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" CC="$(tc-getCXX)" CFLAGS="${CXXFLAGS}" \
+ LIB="$(get_libdir)" OPT_CFLAGS= DEBUG_CFLAGS= linux lib
+ emake man bashcompletion
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIB="$(get_libdir)" install-bin install-lib install-man install-bash
+ dodoc ../README
+}
diff --git a/media-gfx/gmic/gmic-1.6.5.0.ebuild b/media-gfx/gmic/gmic-1.6.5.0.ebuild
new file mode 100644
index 000000000000..f7502c81a7b5
--- /dev/null
+++ b/media-gfx/gmic/gmic-1.6.5.0.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs bash-completion-r1 flag-o-matic
+
+DESCRIPTION="GREYC's Magic Image Converter"
+HOMEPAGE="http://gmic.eu/"
+SRC_URI="http://gmic.eu/files/source/${PN}_${PV}.tar.gz"
+
+LICENSE="CeCILL-2 FDL-1.3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ffmpeg fftw graphicsmagick jpeg opencv openexr openmp png tiff X zlib"
+
+DEPEND="
+ fftw? ( sci-libs/fftw:3.0[threads] )
+ graphicsmagick? ( media-gfx/graphicsmagick )
+ jpeg? ( virtual/jpeg:0 )
+ opencv? ( >=media-libs/opencv-2.3.1a-r1 )
+ openexr? (
+ media-libs/ilmbase
+ media-libs/openexr
+ )
+ png? ( media-libs/libpng:0= )
+ tiff? ( media-libs/tiff:0 )
+ X? (
+ x11-libs/libX11
+ x11-libs/libXext
+ )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ ffmpeg? ( media-video/ffmpeg:0 )
+"
+
+S=${WORKDIR}/${P}/src
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+
+ if ! test-flag-CXX -std=c++11 ; then
+ die "You need at least GCC 4.7.x or Clang >= 3.3 for C++11-specific compiler flags"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+
+ for i in fftw jpeg opencv openmp png tiff zlib ; do
+ use $i || { sed -i -r "s/^(${i}_(CFLAGS|LIBS) =).*/\1/I" Makefile || die ; }
+ done
+
+ use graphicsmagick || { sed -i -r "s/^(MAGICK_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
+ use openexr || { sed -i -r "s/^(EXR_(CFLAGS|LIBS) =).*/\1/" Makefile || die ; }
+
+ if ! use X ; then
+ sed -i -r "s/^((X11|XSHM)_(CFLAGS|LIBS) =).*/\1/" Makefile || die
+
+ # disable display capabilities when X support is disabled
+ append-cxxflags -Dcimg_display=0
+ fi
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" CC="$(tc-getCXX)" CFLAGS="${CXXFLAGS}" \
+ LIB="$(get_libdir)" OPT_CFLAGS= DEBUG_CFLAGS= cli lib
+ emake man bashcompletion
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIB="$(get_libdir)" install-bin install-lib install-man install-bash
+ dodoc ../README
+}
diff --git a/media-gfx/gmic/metadata.xml b/media-gfx/gmic/metadata.xml
new file mode 100644
index 000000000000..250b14f8c1c7
--- /dev/null
+++ b/media-gfx/gmic/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="graphicsmagick">Enable support for many common image file formats using the GraphicsMagick++ library</flag>
+ <flag name="opencv">Enable support for webcams using the OpenCV library</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">gmic</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/gnofract4d/Manifest b/media-gfx/gnofract4d/Manifest
new file mode 100644
index 000000000000..e7d7464ccacc
--- /dev/null
+++ b/media-gfx/gnofract4d/Manifest
@@ -0,0 +1,2 @@
+DIST gnofract4d-3.13.tar.gz 859872 SHA256 99f6334ab19696505f0becbbe002c112db9c3188515a30961b3031e9f31154e8
+DIST gnofract4d-3.14.tar.gz 862499 SHA256 bdd8e950a98221054d52883d5303a435cbaa3d5d4239c36aff91598a6433d20a SHA512 cf3614f60a43f7ab20208fb1a62d3823495c84060d177d2926bad20a475e661d7ec45a7bc14e826229656027fe7c0f68aac093b6b0dc7912e84d8d8ec8ff81e5 WHIRLPOOL a4dd1f239ef0d9396288b335cd67c8d3ce0c858a18c0840ed3d07ac3fc4ba24d940f697f30b414fec82dc85843842c1173188077e2eb1b2b157997731f9733e8
diff --git a/media-gfx/gnofract4d/files/gnofract4d-3.12-libpng14.patch b/media-gfx/gnofract4d/files/gnofract4d-3.12-libpng14.patch
new file mode 100644
index 000000000000..f509fad57869
--- /dev/null
+++ b/media-gfx/gnofract4d/files/gnofract4d-3.12-libpng14.patch
@@ -0,0 +1,47 @@
+--- fract4d/c/imageIO.cpp
++++ fract4d/c/imageIO.cpp
+@@ -119,7 +119,7 @@
+ info_ptr = png_create_info_struct(png_ptr);
+ if(NULL == info_ptr)
+ {
+- png_destroy_write_struct(&png_ptr, png_infopp_NULL);
++ png_destroy_write_struct(&png_ptr, NULL);
+ return;
+ }
+
+@@ -312,7 +312,7 @@
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL)
+ {
+- png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return;
+ }
+
+@@ -325,7 +325,7 @@
+ //printf("shutdown\n");
+ if(ok)
+ {
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ }
+ }
+
+@@ -351,7 +351,7 @@
+
+ //printf("get IHDR\n");
+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+- &interlace_type, int_p_NULL, int_p_NULL);
++ &interlace_type, (int *) NULL, (int *) NULL);
+
+ //printf("set res(%d,%d)\n",width,height);
+ if(!im->set_resolution(width, height, -1, -1))
+@@ -372,7 +372,7 @@
+ for (int y = 0; y < im->Yres(); y++)
+ {
+ png_bytep row = (png_bytep)(im->getBuffer() + im->row_length() * y);
+- png_read_rows(png_ptr, &row, png_bytepp_NULL, 1);
++ png_read_rows(png_ptr, &row, NULL, 1);
+ }
+ }
+ return true;
diff --git a/media-gfx/gnofract4d/gnofract4d-3.13.ebuild b/media-gfx/gnofract4d/gnofract4d-3.13.ebuild
new file mode 100644
index 000000000000..6c57656a82da
--- /dev/null
+++ b/media-gfx/gnofract4d/gnofract4d-3.13.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.6"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="2.[45] 3.* *-jython"
+
+inherit distutils eutils fdo-mime
+
+DESCRIPTION="A program for drawing beautiful mathematically-based images known as fractals"
+HOMEPAGE="http://gnofract4d.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2
+ >=media-libs/libpng-1.4
+ virtual/jpeg
+ >=dev-python/pygtk-2
+ >=gnome-base/gconf-2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PYTHON_MODNAME="fract4d fractutils fract4dgui"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.12-libpng14.patch
+ distutils_src_prepare
+}
+
+src_install() {
+ distutils_src_install
+ rm -rf "${D}"/usr/share/doc/${PN}
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/gnofract4d/gnofract4d-3.14-r1.ebuild b/media-gfx/gnofract4d/gnofract4d-3.14-r1.ebuild
new file mode 100644
index 000000000000..03a737dd19e9
--- /dev/null
+++ b/media-gfx/gnofract4d/gnofract4d-3.14-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 fdo-mime
+
+DESCRIPTION="A program for drawing beautiful mathematically-based images known as fractals"
+HOMEPAGE="http://gnofract4d.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2
+ >=media-libs/libpng-1.4
+ virtual/jpeg
+ >=dev-python/pygtk-2[${PYTHON_USEDEP}]
+ >=gnome-base/gconf-2[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_install() {
+ distutils-r1_src_install
+ rm -rf "${D}"/usr/share/doc/${PN}
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/gnofract4d/gnofract4d-3.14.ebuild b/media-gfx/gnofract4d/gnofract4d-3.14.ebuild
new file mode 100644
index 000000000000..91f376a9b3a8
--- /dev/null
+++ b/media-gfx/gnofract4d/gnofract4d-3.14.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.6"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="2.[45] 3.* *-jython"
+PYTHON_MODNAME="fract4d fractutils fract4dgui"
+
+inherit distutils eutils fdo-mime
+
+DESCRIPTION="A program for drawing beautiful mathematically-based images known as fractals"
+HOMEPAGE="http://gnofract4d.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2
+ >=media-libs/libpng-1.4
+ virtual/jpeg
+ >=dev-python/pygtk-2
+ >=gnome-base/gconf-2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_install() {
+ distutils_src_install
+ rm -rf "${D}"/usr/share/doc/${PN}
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ distutils_pkg_postrm
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/gnofract4d/metadata.xml b/media-gfx/gnofract4d/metadata.xml
new file mode 100644
index 000000000000..4e0171efad95
--- /dev/null
+++ b/media-gfx/gnofract4d/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">gnofract4d</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/gnome-font-viewer/Manifest b/media-gfx/gnome-font-viewer/Manifest
new file mode 100644
index 000000000000..4d43e8bb79f4
--- /dev/null
+++ b/media-gfx/gnome-font-viewer/Manifest
@@ -0,0 +1,2 @@
+DIST gnome-font-viewer-3.14.1.tar.xz 300408 SHA256 29a6d0ab3937d87b1f5e0fa89b7a2cada6f6ef524364050c51a701f5dffef4b7 SHA512 751e3523a1bd29dbd8f4d9972904f0accdf73dbdd11de9e9863e53cee419e1b48167926e1682e8e4ea0f498928773860d0296cae8dec60cb4c27fbd87c230d82 WHIRLPOOL d684a3506a9e45e4939e72dce3c79813ca3fcf8e15f5f80c0ccfce3cd9a9eb83ca563268f2ebebf69d41669ed04507b56439819c75cc62f679aa26468b44adc2
+DIST gnome-font-viewer-3.16.2.tar.xz 306488 SHA256 f5367417d926d1dbe175aceb8eb4d2733d723a237428f130edd4b4023c0dc1cf SHA512 f294e4e080eb3a3a4951bd062b531d07be5e86de40e72e17b1ba73dd8348aa6027dba26fbb04903e192064748d86975e72b32ea81305f6dd05f661a54ffb4f0c WHIRLPOOL f9886a24e6af32720e33930cd65fdd2293b4654de1e4eb359532d7aea2fafc6cd758f8c199cf71dc53939a3e8f981e088d7ebf00f94611a305ea34e9d24d6ca7
diff --git a/media-gfx/gnome-font-viewer/gnome-font-viewer-3.14.1.ebuild b/media-gfx/gnome-font-viewer/gnome-font-viewer-3.14.1.ebuild
new file mode 100644
index 000000000000..570eda8be534
--- /dev/null
+++ b/media-gfx/gnome-font-viewer/gnome-font-viewer-3.14.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Font viewer for GNOME"
+HOMEPAGE="https://git.gnome.org/browse/gnome-font-viewer"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+IUSE=""
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.35.1:2
+ gnome-base/gnome-desktop:3=
+ media-libs/fontconfig:1.0
+ media-libs/freetype:2
+ >=media-libs/harfbuzz-0.9.9
+ >=x11-libs/gtk+-3.11.4:3
+"
+RDEPEND="${COMMON_DEPEND}
+ !<gnome-base/gnome-control-center-2.91
+ !<gnome-extra/gnome-utils-3.4
+"
+# ${PN} was part of gnome-utils before 3.4, and of g-c-c before 2.91
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+"
diff --git a/media-gfx/gnome-font-viewer/gnome-font-viewer-3.16.2.ebuild b/media-gfx/gnome-font-viewer/gnome-font-viewer-3.16.2.ebuild
new file mode 100644
index 000000000000..2a88939d23f6
--- /dev/null
+++ b/media-gfx/gnome-font-viewer/gnome-font-viewer-3.16.2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Font viewer for GNOME"
+HOMEPAGE="https://git.gnome.org/browse/gnome-font-viewer"
+
+LICENSE="GPL-2+ LGPL-2.1+"
+SLOT="0"
+IUSE=""
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.35.1:2
+ gnome-base/gnome-desktop:3=
+ media-libs/fontconfig:1.0
+ media-libs/freetype:2
+ >=media-libs/harfbuzz-0.9.9
+ >=x11-libs/gtk+-3.11.4:3
+"
+RDEPEND="${COMMON_DEPEND}
+ !<gnome-base/gnome-control-center-2.91
+ !<gnome-extra/gnome-utils-3.4
+"
+# ${PN} was part of gnome-utils before 3.4, and of g-c-c before 2.91
+DEPEND="${COMMON_DEPEND}
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+"
diff --git a/media-gfx/gnome-font-viewer/metadata.xml b/media-gfx/gnome-font-viewer/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/media-gfx/gnome-font-viewer/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+</pkgmetadata>
diff --git a/media-gfx/gnome-photos/Manifest b/media-gfx/gnome-photos/Manifest
new file mode 100644
index 000000000000..626181e28e97
--- /dev/null
+++ b/media-gfx/gnome-photos/Manifest
@@ -0,0 +1,3 @@
+DIST gnome-photos-3.14.2.tar.xz 756784 SHA256 1bce84bd0467647decf26f81e03535940ab65a7774f44e1395a2b87d88c0be96 SHA512 6c55844f40197f1e3d8f0779bac1fdf0ba5e32bd639a8878adb109444c816ffcdc8acf3d6023d8c75ce298d61e4b6f9fa76ef81a2ec1592fb6e0633ef1e6cc23 WHIRLPOOL bf4e2157fd544f2aa0e74dc9742cf58977c7fa89fb23dda9f037d60a2fa2124f64e6f350bee0bc1e1a094075110f84d5ec9827bb5a4a5e1599b272502b1ee2ea
+DIST gnome-photos-3.14.3.tar.xz 759244 SHA256 7cce615869f98ec038fb308ee6cec725e72a2c2cf67aaf44d4d01e2303d878b0 SHA512 595322d9f01c886c4184ce9c95c17f4c745e7faf148c4c1d051e76606c1067f4a27a20b34629d445ce1d7938d85813097b8a2e479e48563be9176210361f397b WHIRLPOOL 105ab02c84aaef8c5f80ffd5c5d42187da3d04ee83f43c8fdc15a8053679f44920755a8ced630933ab7032e85c987f48e3305363259e5076addd51274da04c05
+DIST gnome-photos-3.16.2.tar.xz 762760 SHA256 9eb6a08a1d198f174f006b1c4e60a7db4f2e05cce7776e3f989470638cda2e20 SHA512 0c54789ac69541000d6fc67f3dc32af7b60041aaa7a580e38b91a2abc6d114216bd37573a185386dc6a8598c58844ed21a18af760aa59690c056c4da2b7736d6 WHIRLPOOL ac09949c35ab6266f15136a1dac35103fdb5f6f333710d110564af84906a095474cc218476c6eda08bd38f3d49526fd6f17412e58c202de576e24eafc07fb608
diff --git a/media-gfx/gnome-photos/gnome-photos-3.14.2.ebuild b/media-gfx/gnome-photos/gnome-photos-3.14.2.ebuild
new file mode 100644
index 000000000000..02f877599d58
--- /dev/null
+++ b/media-gfx/gnome-photos/gnome-photos-3.14.2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Access, organize and share your photos on GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/Photos"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="
+ >=app-misc/tracker-1:=
+ >=dev-libs/glib-2.39.3:2
+ gnome-base/gnome-desktop:3=
+ >=gnome-base/librsvg-2.26.0
+ >=dev-libs/libgdata-0.15.2
+ media-libs/babl
+ >=media-libs/gegl-0.2:0
+ >=media-libs/grilo-0.2.6:0.2
+ >=media-plugins/grilo-plugins-0.2.6:0.2[upnp-av]
+ >=media-libs/exempi-1.99.5
+ media-libs/lcms:2
+ >=media-libs/libexif-0.6.14
+ >=net-libs/gnome-online-accounts-3.8
+ >=net-libs/libgfbgraph-0.2.1:0.2
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-3.13.2:3
+"
+DEPEND="${RDEPEND}
+ dev-util/desktop-file-utils
+ >=dev-util/intltool-0.50.1
+ virtual/pkgconfig
+"
+
+# Requires dogtail
+RESTRICT="test"
+
+src_configure() {
+ gnome2_src_configure ITSTOOL=$(type -P true)
+}
diff --git a/media-gfx/gnome-photos/gnome-photos-3.14.3.ebuild b/media-gfx/gnome-photos/gnome-photos-3.14.3.ebuild
new file mode 100644
index 000000000000..1fb282433ba3
--- /dev/null
+++ b/media-gfx/gnome-photos/gnome-photos-3.14.3.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2
+
+DESCRIPTION="Access, organize and share your photos on GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/Photos"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="
+ >=app-misc/tracker-1:=
+ >=dev-libs/glib-2.39.3:2
+ dev-libs/libxml2
+ gnome-base/gnome-desktop:3=
+ >=gnome-base/librsvg-2.26.0
+ >=dev-libs/libgdata-0.15.2
+ media-libs/babl
+ >=media-libs/gegl-0.2:0
+ >=media-libs/grilo-0.2.6:0.2
+ >=media-plugins/grilo-plugins-0.2.6:0.2[upnp-av]
+ >=media-libs/exempi-1.99.5
+ media-libs/lcms:2
+ >=media-libs/libexif-0.6.14
+ >=net-libs/gnome-online-accounts-3.8
+ >=net-libs/libgfbgraph-0.2.1:0.2
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-3.13.2:3
+"
+DEPEND="${RDEPEND}
+ dev-util/desktop-file-utils
+ >=dev-util/intltool-0.50.1
+ virtual/pkgconfig
+"
+
+# Requires dogtail
+RESTRICT="test"
diff --git a/media-gfx/gnome-photos/gnome-photos-3.16.2.ebuild b/media-gfx/gnome-photos/gnome-photos-3.16.2.ebuild
new file mode 100644
index 000000000000..fac1f6a9c4d2
--- /dev/null
+++ b/media-gfx/gnome-photos/gnome-photos-3.16.2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2 virtualx
+
+DESCRIPTION="Access, organize and share your photos on GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/Photos"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="
+ >=app-misc/tracker-1:=
+ >=dev-libs/glib-2.39.3:2
+ gnome-base/gnome-desktop:3=
+ >=gnome-base/librsvg-2.26.0
+ >=dev-libs/libgdata-0.15.2:0=
+ media-libs/babl
+ >=media-libs/gegl-0.3:0.3
+ >=media-libs/grilo-0.2.6:0.2
+ >=media-plugins/grilo-plugins-0.2.6:0.2[upnp-av]
+ >=media-libs/exempi-1.99.5
+ media-libs/lcms:2
+ >=media-libs/libexif-0.6.14
+ >=net-libs/gnome-online-accounts-3.8
+ >=net-libs/libgfbgraph-0.2.1:0.2
+ >=x11-libs/cairo-1.14
+ x11-libs/gdk-pixbuf:2
+ >=x11-libs/gtk+-3.15.5:3
+"
+DEPEND="${RDEPEND}
+ dev-util/desktop-file-utils
+ >=dev-util/intltool-0.50.1
+ virtual/pkgconfig
+ test? ( dev-util/dogtail )
+"
+# eautoreconf
+# app-text/yelp-tools
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_enable test dogtail) \
+ ITSTOOL=$(type -P true)
+}
+
+src_test() {
+ Xemake check
+}
diff --git a/media-gfx/gnome-photos/metadata.xml b/media-gfx/gnome-photos/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/media-gfx/gnome-photos/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+</pkgmetadata>
diff --git a/media-gfx/gnome-raw-thumbnailer/Manifest b/media-gfx/gnome-raw-thumbnailer/Manifest
new file mode 100644
index 000000000000..0d7c1fc9a41a
--- /dev/null
+++ b/media-gfx/gnome-raw-thumbnailer/Manifest
@@ -0,0 +1 @@
+DIST raw-thumbnailer-3.0.0.tar.bz2 270499 SHA256 27afbc429f2772d5b9190c5443158ac33352e6bd5fede3aa1a7aa6b5fbb9d253
diff --git a/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-0.99.1-drop-libgsf.patch b/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-0.99.1-drop-libgsf.patch
new file mode 100644
index 000000000000..33cf2c65898d
--- /dev/null
+++ b/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-0.99.1-drop-libgsf.patch
@@ -0,0 +1,32 @@
+--- configure.ac
++++ configure.ac
+@@ -17,9 +17,9 @@
+
+ SCROLLKEEPER_REQUIRED=0.1.4
+
+-PKG_CHECK_MODULES(GSF, gnome-vfs-2.0 libgsf-gnome-1 gdk-pixbuf-2.0)
+-AC_SUBST(GSF_CFLAGS)
+-AC_SUBST(GSF_LIBS)
++PKG_CHECK_MODULES(GNOME, gnome-vfs-2.0 gdk-pixbuf-2.0)
++AC_SUBST(GNOME_CFLAGS)
++AC_SUBST(GNOME_LIBS)
+
+ PKG_CHECK_MODULES(OPENRAW, libopenraw-gnome-1.0 >= 0.0.4)
+ AC_SUBST(OPENRAW_CFLAGS)
+--- src/Makefile.am
++++ src/Makefile.am
+@@ -2,7 +2,7 @@
+
+
+ INCLUDES = -I$(top_srcdir) \
+- $(GSF_CFLAGS) \
++ $(GNOME_CFLAGS) \
+ $(OPENRAW_CFLAGS) \
+ -DG_LOG_DOMAIN=\"raw-thumbnailer\" \
+ -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+@@ -15,4 +15,4 @@
+
+ raw_thumbnailer_SOURCES = raw-thumbnailer.c
+
+-raw_thumbnailer_LDADD = $(GSF_LIBS) $(OPENRAW_LIBS) $(INTLLIBS)
++raw_thumbnailer_LDADD = $(GNOME_LIBS) $(OPENRAW_LIBS) $(INTLLIBS)
diff --git a/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-0.99.1-make-382.patch b/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-0.99.1-make-382.patch
new file mode 100644
index 000000000000..411198977261
--- /dev/null
+++ b/media-gfx/gnome-raw-thumbnailer/files/gnome-raw-thumbnailer-0.99.1-make-382.patch
@@ -0,0 +1,34 @@
+http://bugs.gentoo.org/333715
+
+--- data/Makefile.am
++++ data/Makefile.am
+@@ -20,11 +20,11 @@
+
+ install-data-local: $(schema_DATA)
+ if GCONF_SCHEMAS_INSTALL
+- if test -z "$(DESTDIR)" ; then \
+- for p in $^ ; do \
+- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p 2>&1 > /dev/null; \
+- done \
+- fi
++ if test -z "$(DESTDIR)" ; then \
++ for p in $^ ; do \
++ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p 2>&1 > /dev/null; \
++ done \
++ fi
+ endif
+
+ EXTRA_DIST = \
+@@ -34,8 +34,8 @@
+ raw-thumbnailer.xml
+
+ CLEANFILES = \
+- $(generated_schema_in_files) \
+- $(schema_DATA) \
+- raw-thumbnailer.schemas.in \
+- update-gconf.sh
++ $(generated_schema_in_files) \
++ $(schema_DATA) \
++ raw-thumbnailer.schemas.in \
++ update-gconf.sh
+
diff --git a/media-gfx/gnome-raw-thumbnailer/gnome-raw-thumbnailer-3.0.0.ebuild b/media-gfx/gnome-raw-thumbnailer/gnome-raw-thumbnailer-3.0.0.ebuild
new file mode 100644
index 000000000000..ada2a6ea033b
--- /dev/null
+++ b/media-gfx/gnome-raw-thumbnailer/gnome-raw-thumbnailer-3.0.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+GCONF_DEBUG=no
+inherit gnome2
+
+MY_P=${PN/gnome-}-${PV}
+
+DESCRIPTION="A lightweight and fast raw image thumbnailer for GNOME"
+HOMEPAGE="http://libopenraw.freedesktop.org/wiki/RawThumbnailer"
+SRC_URI="http://libopenraw.freedesktop.org/download/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=media-libs/libopenraw-0.0.9[gtk]
+ >=x11-libs/gdk-pixbuf-2
+ >=dev-libs/glib-2.26
+ !media-gfx/raw-thumbnailer"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ DOCS="AUTHORS ChangeLog NEWS"
+}
diff --git a/media-gfx/gnome-raw-thumbnailer/metadata.xml b/media-gfx/gnome-raw-thumbnailer/metadata.xml
new file mode 100644
index 000000000000..6e0e2ecb48ca
--- /dev/null
+++ b/media-gfx/gnome-raw-thumbnailer/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>gnome</herd>
+</pkgmetadata>
diff --git a/media-gfx/gnome-screenshot/Manifest b/media-gfx/gnome-screenshot/Manifest
new file mode 100644
index 000000000000..600ce6d95f68
--- /dev/null
+++ b/media-gfx/gnome-screenshot/Manifest
@@ -0,0 +1,2 @@
+DIST gnome-screenshot-3.14.0.tar.xz 259796 SHA256 d96f108421ab04ee5d26387387df3858764e61d7718c7376cbf87890bf33912a SHA512 b8ccdc9db548824eb6e7bc7c783c429363a510921c2187d5daa3f83cfda202a3a0e447db1cb49649940add84e4e404c2a821f96ec3e895e0fc3f549362bf79a3 WHIRLPOOL a2347d6509336d9872557a6db29657d15ecb22a642b5d2c20836b4f32559f166617e620f77676a67703a939a515e2ef4d1e5e1c793ba588e8dd915300c11ea58
+DIST gnome-screenshot-3.16.2.tar.xz 279828 SHA256 5dd4bafb3deb0967866726ba89dab62bbd6dc3bda3b190474281142aa3dee948 SHA512 98092e2779cc6fa67a40a2318c1f5637ac948f0c1c933552b66483230c9b17751f88082a2812635121b09af06a6e3e98e0f6f69aba97ebc8bfd4cd55d7d50135 WHIRLPOOL fc7d5e5f88fb78e400459685b1c65dbd07f3908471368aa15714ff41825c565f02285a101dc2b3ba2cf978e9fb2247c43a3d67cb3681a711639cf99a9928944a
diff --git a/media-gfx/gnome-screenshot/files/gnome-screenshot-3.14.0-use-dash.patch b/media-gfx/gnome-screenshot/files/gnome-screenshot-3.14.0-use-dash.patch
new file mode 100644
index 000000000000..5a6580ee3f35
--- /dev/null
+++ b/media-gfx/gnome-screenshot/files/gnome-screenshot-3.14.0-use-dash.patch
@@ -0,0 +1,23 @@
+From aa23783c39f96dd0b45f70d82557736a5b884c55 Mon Sep 17 00:00:00 2001
+From: Cosimo Cecchi <cosimoc@gnome.org>
+Date: Wed, 28 Jan 2015 12:43:58 +0000
+Subject: filename-builder: use dash for time format separator
+
+We can't use colons, but a separator here still looks nice. Use a dash.
+
+diff --git a/src/screenshot-filename-builder.c b/src/screenshot-filename-builder.c
+index 06706d6..5eade9c 100644
+--- a/src/screenshot-filename-builder.c
++++ b/src/screenshot-filename-builder.c
+@@ -130,7 +130,7 @@ build_path (AsyncExistenceJob *job)
+ GDateTime *d;
+
+ d = g_date_time_new_now_local ();
+- origin = g_date_time_format (d, "%Y-%m-%d %H:%M:%S");
++ origin = g_date_time_format (d, "%Y-%m-%d %H-%M-%S");
+ g_date_time_unref (d);
+ }
+ else
+--
+cgit v0.10.1
+
diff --git a/media-gfx/gnome-screenshot/gnome-screenshot-3.14.0-r1.ebuild b/media-gfx/gnome-screenshot/gnome-screenshot-3.14.0-r1.ebuild
new file mode 100644
index 000000000000..9c1aeb7e7362
--- /dev/null
+++ b/media-gfx/gnome-screenshot/gnome-screenshot-3.14.0-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2 readme.gentoo
+
+DESCRIPTION="Screenshot utility for GNOME"
+HOMEPAGE="https://git.gnome.org/browse/gnome-screenshot"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE=""
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+
+# libcanberra 0.26-r2 is needed for gtk+:3 fixes
+COMMON_DEPEND="
+ >=dev-libs/glib-2.35.1:2[dbus]
+ >=media-libs/libcanberra-0.26-r2[gtk3]
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf
+ >=x11-libs/gtk+-3.0.3:3
+ x11-libs/libX11
+ x11-libs/libXext
+"
+RDEPEND="${COMMON_DEPEND}
+ >=gnome-base/gsettings-desktop-schemas-0.1.0
+ !<gnome-extra/gnome-utils-3.4
+"
+# ${PN} was part of gnome-utils before 3.4
+DEPEND="${COMMON_DEPEND}
+ x11-proto/xextproto
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+"
+
+DOC_CONTENTS="${P} saves screenshots in ~/Pictures/ and defaults to
+ non-interactive mode when launched from a terminal. If you want to choose
+ where to save the screenshot, run 'gnome-screenshot --interactive'"
+
+src_prepare() {
+ # filename-builder: use dash for time format separator (from 'master')
+ epatch "${FILESDIR}"/${PN}-3.14.0-use-dash.patch
+ gnome2_src_prepare
+}
+
+src_install() {
+ gnome2_src_install
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ readme.gentoo_print_elog
+}
diff --git a/media-gfx/gnome-screenshot/gnome-screenshot-3.16.2.ebuild b/media-gfx/gnome-screenshot/gnome-screenshot-3.16.2.ebuild
new file mode 100644
index 000000000000..e2d3c37bb85a
--- /dev/null
+++ b/media-gfx/gnome-screenshot/gnome-screenshot-3.16.2.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2 readme.gentoo
+
+DESCRIPTION="Screenshot utility for GNOME"
+HOMEPAGE="https://git.gnome.org/browse/gnome-screenshot"
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE=""
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux"
+
+# libcanberra 0.26-r2 is needed for gtk+:3 fixes
+COMMON_DEPEND="
+ >=dev-libs/glib-2.35.1:2[dbus]
+ >=media-libs/libcanberra-0.26-r2[gtk3]
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf
+ >=x11-libs/gtk+-3.0.3:3
+ x11-libs/libX11
+ x11-libs/libXext
+"
+RDEPEND="${COMMON_DEPEND}
+ >=gnome-base/gsettings-desktop-schemas-0.1.0
+ !<gnome-extra/gnome-utils-3.4
+"
+# ${PN} was part of gnome-utils before 3.4
+DEPEND="${COMMON_DEPEND}
+ x11-proto/xextproto
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+"
+
+DOC_CONTENTS="${P} saves screenshots in ~/Pictures/ and defaults to
+ non-interactive mode when launched from a terminal. If you want to choose
+ where to save the screenshot, run 'gnome-screenshot --interactive'"
+
+src_install() {
+ gnome2_src_install
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ readme.gentoo_print_elog
+}
diff --git a/media-gfx/gnome-screenshot/metadata.xml b/media-gfx/gnome-screenshot/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/media-gfx/gnome-screenshot/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+</pkgmetadata>
diff --git a/media-gfx/gnome-specimen/Manifest b/media-gfx/gnome-specimen/Manifest
new file mode 100644
index 000000000000..5c899a2229ad
--- /dev/null
+++ b/media-gfx/gnome-specimen/Manifest
@@ -0,0 +1 @@
+DIST gnome-specimen-0.4.tar.gz 220574 SHA256 353ef10e647e5d06354dd827a4152a8cb45bf56b2f1c72e449a41e5175880424 SHA512 87edab052f777a67671d644aa132c3461662f1905cecc494777da44cf909d9ad8f85c5ae7a1114f2944a671079b89dc6a1c72f2e7ee6cc05594ba970c149afc9 WHIRLPOOL e6404bb813f84663494c3b6b307cf2924f8742baf809df884c2e694a17d7e331723b356db67dfbadc8ecbfc2f9765a04272311e451ec5fe8b2adc4c8eaacbfcf
diff --git a/media-gfx/gnome-specimen/gnome-specimen-0.4-r1.ebuild b/media-gfx/gnome-specimen/gnome-specimen-0.4-r1.ebuild
new file mode 100644
index 000000000000..a89fb03fa34f
--- /dev/null
+++ b/media-gfx/gnome-specimen/gnome-specimen-0.4-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG=no
+PYTHON_COMPAT=( python2_7)
+
+inherit autotools gnome2 python-single-r1
+
+DESCRIPTION="Font preview application"
+HOMEPAGE="http://uwstopia.nl"
+SRC_URI="http://uwstopia.nl/geek/projects/${PN}/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-python/gconf-python[${PYTHON_USEDEP}]
+ dev-python/libgnome-python[${PYTHON_USEDEP}]
+ dev-python/pygtk[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ sys-devel/gettext
+"
+
+src_prepare() {
+ eautoreconf # To fix bug 408099
+ gnome2_src_prepare
+}
diff --git a/media-gfx/gnome-specimen/metadata.xml b/media-gfx/gnome-specimen/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/gnome-specimen/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/gozer/Manifest b/media-gfx/gozer/Manifest
new file mode 100644
index 000000000000..a71bf60b2d2b
--- /dev/null
+++ b/media-gfx/gozer/Manifest
@@ -0,0 +1 @@
+DIST gozer-0.7.tar.gz 103545 SHA256 a99400630cb7f362717f08d650aff8c59624fdd5dd70cfa7c1efe17d3bf58fd9 SHA512 ae39b74272f87d5e9bf71c9df7e6e9ac37a44a54dafba45aa5e8037657ba128e4e6c77a5624921fbca5c57791a0047f491013582cd9e5a6a5c8932a23233a29c WHIRLPOOL 78179c93e0a8e1bbac21910039de7651ce16fbb67330fe5c622707edbd8128773da23444f21ebabb25635a0f5c466fb7eaf53d036f55311ad28222c41b29dd93
diff --git a/media-gfx/gozer/gozer-0.7-r2.ebuild b/media-gfx/gozer/gozer-0.7-r2.ebuild
new file mode 100644
index 000000000000..14f909866863
--- /dev/null
+++ b/media-gfx/gozer/gozer-0.7-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools
+
+DESCRIPTION="tool for rendering arbitrary text as graphics, using ttfs and styles"
+HOMEPAGE="http://www.linuxbrit.co.uk/gozer/"
+SRC_URI="http://www.linuxbrit.co.uk/downloads/${P}.tar.gz"
+
+LICENSE="feh LGPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND="x11-libs/libXext
+ >=media-libs/giblib-1.2.1"
+RDEPEND=">=media-libs/giblib-1.2.1
+ media-libs/imlib2"
+
+src_prepare() {
+ sed -i src/Makefile.am \
+ -e 's|-g -O3|$(CFLAGS)|g' \
+ -e '/LDFLAGS/s|=|+=|g' \
+ || die "sed src/Makefile.am"
+ eautoreconf
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die
+ rm -rf "${D}"/usr/doc
+ dodoc TODO README AUTHORS ChangeLog
+}
diff --git a/media-gfx/gozer/metadata.xml b/media-gfx/gozer/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/media-gfx/gozer/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/gphoto2/Manifest b/media-gfx/gphoto2/Manifest
new file mode 100644
index 000000000000..8385caa0102c
--- /dev/null
+++ b/media-gfx/gphoto2/Manifest
@@ -0,0 +1,2 @@
+DIST gphoto2-2.5.5.tar.bz2 751227 SHA256 54e9aea97d926bfd7ffbe3b91fcf239ce58be0833df2938a385a67fdcadd14b4 SHA512 542653b5285df2941b971e7f158c6fddebddbe42525f5f7dfcb9ad69007568e8c7f60e49f220823aaa0b93fd4ba35b47e3b81ac222a3e666b98f7f01d905ef19 WHIRLPOOL 3f1d8ae18525c262623da24202c56a902ce74644e35efe6e2a7dc4d0ba5f4afeb46e6806820807885b4099614d8fa9f3f5fd059dacc934ea119d7bbe542a2d73
+DIST gphoto2-2.5.6.tar.bz2 756926 SHA256 55e5ec8b2bba4ed358f15eda466f61c79d6f75c220237f821ac687a3ceb336e8 SHA512 8877a87f624c9036f3409e78e9f28cccea2bcb8218d7d46636f19c7576a7480ab0d2fabd0a486b3f75e1be7db93f5121dd90ce806a772963f49f7a0c409ffba1 WHIRLPOOL 28be1adce983b6029cb1c781cbc3f45e1f1bce50085d0bce67c2015eddb10deb24ab55096d76928499af4db4eab0d0fc0a7e7bc9b3fd64a1530a403aad3ae3fc
diff --git a/media-gfx/gphoto2/gphoto2-2.5.5.ebuild b/media-gfx/gphoto2/gphoto2-2.5.5.ebuild
new file mode 100644
index 000000000000..146ea40bd990
--- /dev/null
+++ b/media-gfx/gphoto2/gphoto2-2.5.5.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools
+
+DESCRIPTION="Free, redistributable digital camera software application"
+HOMEPAGE="http://www.gphoto.org/"
+SRC_URI="mirror://sourceforge/gphoto/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86"
+IUSE="aalib exif ncurses nls readline"
+
+# aalib -> needs libjpeg
+RDEPEND="
+ dev-libs/popt
+ >=media-libs/libgphoto2-2.5.4[exif?]
+ aalib? (
+ media-libs/aalib
+ virtual/jpeg:0 )
+ exif? ( media-libs/libexif )
+ ncurses? ( dev-libs/cdk )
+ readline? ( sys-libs/readline )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( >=sys-devel/gettext-0.14.1 )
+"
+
+src_prepare() {
+ # Leave GCC debug builds under user control
+ sed -r '/(C|LD)FLAGS/ s/ -g( |")/\1/' \
+ -i configure{.ac,} || die
+ eautoreconf
+}
+
+src_configure() {
+ CPPFLAGS="-I/usr/include/cdk" econf \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_with aalib) \
+ $(use_with aalib jpeg) \
+ $(use_with exif libexif auto) \
+ $(use_with ncurses cdk) \
+ $(use_enable nls) \
+ $(use_with readline)
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ HTML_DIR="${D}"/usr/share/doc/${PF}/sgml \
+ install
+
+ dodoc ChangeLog NEWS* README AUTHORS
+ rm -rf "${D}"/usr/share/doc/${PF}/sgml/gphoto2
+}
diff --git a/media-gfx/gphoto2/gphoto2-2.5.6.ebuild b/media-gfx/gphoto2/gphoto2-2.5.6.ebuild
new file mode 100644
index 000000000000..c2377d36753e
--- /dev/null
+++ b/media-gfx/gphoto2/gphoto2-2.5.6.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit autotools
+
+DESCRIPTION="Free, redistributable digital camera software application"
+HOMEPAGE="http://www.gphoto.org/"
+SRC_URI="mirror://sourceforge/gphoto/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86"
+IUSE="aalib exif ncurses nls readline"
+
+# aalib -> needs libjpeg
+RDEPEND="
+ dev-libs/popt
+ >=media-libs/libgphoto2-2.5.6[exif?]
+ aalib? (
+ media-libs/aalib
+ virtual/jpeg:0 )
+ exif? ( media-libs/libexif )
+ ncurses? ( dev-libs/cdk )
+ readline? ( sys-libs/readline )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( >=sys-devel/gettext-0.14.1 )
+"
+
+src_prepare() {
+ # Leave GCC debug builds under user control
+ sed -r '/(C|LD)FLAGS/ s/ -g( |")/\1/' \
+ -i configure{.ac,} || die
+ eautoreconf
+}
+
+src_configure() {
+ CPPFLAGS="-I/usr/include/cdk" econf \
+ --docdir=/usr/share/doc/${PF} \
+ $(use_with aalib) \
+ $(use_with aalib jpeg) \
+ $(use_with exif libexif auto) \
+ $(use_with ncurses cdk) \
+ $(use_enable nls) \
+ $(use_with readline)
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ HTML_DIR="${D}"/usr/share/doc/${PF}/sgml \
+ install
+
+ dodoc ChangeLog NEWS* README AUTHORS
+ rm -rf "${D}"/usr/share/doc/${PF}/sgml/gphoto2
+}
diff --git a/media-gfx/gphoto2/metadata.xml b/media-gfx/gphoto2/metadata.xml
new file mode 100644
index 000000000000..f0e3725b295f
--- /dev/null
+++ b/media-gfx/gphoto2/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>gnome</herd>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">gphoto</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/gphotofs/Manifest b/media-gfx/gphotofs/Manifest
new file mode 100644
index 000000000000..cb49182547c0
--- /dev/null
+++ b/media-gfx/gphotofs/Manifest
@@ -0,0 +1 @@
+DIST gphotofs-0.5.tar.bz2 261357 SHA256 676ec4de69a81c193ffc31bdc7b587ac2a2cc3780b14f0e7c9c4c0a517b343cc SHA512 6f5bcaf8ca820c0590ec95af55ec9438c864a298660ad15c6d6e8f59201a7f873d29f16cf77d13538111f6cec3f958ea0ac88c6c51836ab2d8c9d6cca156ed3a WHIRLPOOL b149c965d51a5c5b6f9ce37603760f4d2b98ee188611863cf22ecad6e3dc26e6984233ce95ab8b3d9256eb7c9d76f7ca0ee164a37870f3bbcddd85fe7d044ca4
diff --git a/media-gfx/gphotofs/gphotofs-0.5.ebuild b/media-gfx/gphotofs/gphotofs-0.5.ebuild
new file mode 100644
index 000000000000..8b4dde8c4d18
--- /dev/null
+++ b/media-gfx/gphotofs/gphotofs-0.5.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+DESCRIPTION="FUSE file system for interfacing with digital cameras using gphoto2"
+HOMEPAGE="http://www.gphoto.org/"
+SRC_URI="mirror://sourceforge/gphoto/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=media-libs/libgphoto2-2.5.0
+ >=sys-fs/fuse-2.5
+ >=dev-libs/glib-2.6"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/gettext-0.14.1"
diff --git a/media-gfx/gphotofs/metadata.xml b/media-gfx/gphotofs/metadata.xml
new file mode 100644
index 000000000000..8f88f2314eed
--- /dev/null
+++ b/media-gfx/gphotofs/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <maintainer>
+ <email>zx2c4@gentoo.org</email>
+ <name>Jason A. Donenfeld</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">gphoto</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/gpicview/Manifest b/media-gfx/gpicview/Manifest
new file mode 100644
index 000000000000..fca47a6aa95f
--- /dev/null
+++ b/media-gfx/gpicview/Manifest
@@ -0,0 +1 @@
+DIST gpicview-0.2.4.tar.gz 488510 SHA256 99beb7df6765b386cd3f65b3ff77e9a25027a009db432f02bd60be8558f06ceb SHA512 60aeae5100ceafc5131cf61d600be5e5fd21c7d0fa62b8124b6f5bc917666b80908ba9e540010867c6d3eab485d9735dfa72f16095be468a718c55eeb65cef34 WHIRLPOOL 347196e41ada9345c42268e59c9ee35e5372802f32b17c19cdcb96f25c3e525ec144dd6f4cbe168808f4436e73f2fb76341d60084f3e4d637af04d8a13863bd1
diff --git a/media-gfx/gpicview/gpicview-0.2.4.ebuild b/media-gfx/gpicview/gpicview-0.2.4.ebuild
new file mode 100644
index 000000000000..96856ca96a27
--- /dev/null
+++ b/media-gfx/gpicview/gpicview-0.2.4.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A Simple and Fast Image Viewer for X"
+HOMEPAGE="http://lxde.sourceforge.net/gpicview"
+SRC_URI="mirror://sourceforge/lxde/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~arm64 ppc x86 ~arm-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="virtual/jpeg
+ >=x11-libs/gtk+-2.6:2"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS
+}
diff --git a/media-gfx/gpicview/metadata.xml b/media-gfx/gpicview/metadata.xml
new file mode 100644
index 000000000000..30802789f1b2
--- /dev/null
+++ b/media-gfx/gpicview/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <herd>lxde</herd>
+ <upstream>
+ <remote-id type="sourceforge">lxde</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/gqview/Manifest b/media-gfx/gqview/Manifest
new file mode 100644
index 000000000000..e9762b9ce3bb
--- /dev/null
+++ b/media-gfx/gqview/Manifest
@@ -0,0 +1 @@
+DIST gqview-2.1.5.tar.gz 1685061 SHA256 12fea494e607a69eff31cdca13d306ef1b0b3b7850be0f8b236f267d8f2e9546 SHA512 a9e184f9bfbcb789fa732f490b5b1883aaa4c153fb924e2995f36ddef2d170ad9d0695689221d7a0ccae587f5de07b34ca03fa407f774ed3505d0183bf44b555 WHIRLPOOL 04c0adab83e6a0114dd7d73c1dc6705122dfd44d5851532c59ac9c3b1a231d4110069978ba85a6f98c8675cac59c72b0304667b4e967daef4d4e9a9475d07083
diff --git a/media-gfx/gqview/files/gqview-2.1.5-glibc.patch b/media-gfx/gqview/files/gqview-2.1.5-glibc.patch
new file mode 100644
index 000000000000..957080737040
--- /dev/null
+++ b/media-gfx/gqview/files/gqview-2.1.5-glibc.patch
@@ -0,0 +1,39 @@
+diff --git a/Makefile.in b/Makefile.in
+index 38f6b25..4d7ad2c 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -123,6 +123,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ INSTOBJEXT = @INSTOBJEXT@
+ INTLLIBS = @INTLLIBS@
+ LCMS_LIBS = @LCMS_LIBS@
++LIBM = @LIBM@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
+diff --git a/configure.in b/configure.in
+index 9335493..2299b4a 100644
+--- a/configure.in
++++ b/configure.in
+@@ -52,6 +52,9 @@ fi
+ AC_SUBST(LCMS_LIBS)
+ AM_CONDITIONAL(HAVE_LCMS, test "$have_lcms" = "yes")
+
++AC_CHECK_LIB(m, ceil, LIBM="-lm")
++AC_SUBST(LIBM)
++
+ ALL_LINGUAS="ar be bg ca cs da de eo es et eu fi fr hu id it ja ko nl no pl pt_BR ro ru sk sl sv th tr uk vi zh_CN.GB2312 zh_TW"
+ GETTEXT_PACKAGE=$PACKAGE
+ AC_SUBST(GETTEXT_PACKAGE)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 7ce4702..5005877 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -166,7 +166,7 @@ gqview_SOURCES = \
+ view_file_icon.c \
+ view_file_icon.h
+
+-gqview_LDADD = $(GTK_LIBS) $(INTLLIBS) $(LCMS_LIBS)
++gqview_LDADD = $(GTK_LIBS) $(INTLLIBS) $(LCMS_LIBS) $(LIBM)
+
+ EXTRA_DIST = \
+ $(extra_SLIK)
diff --git a/media-gfx/gqview/files/gqview-2.1.5-windows.patch b/media-gfx/gqview/files/gqview-2.1.5-windows.patch
new file mode 100644
index 000000000000..207f3c02fabd
--- /dev/null
+++ b/media-gfx/gqview/files/gqview-2.1.5-windows.patch
@@ -0,0 +1,16 @@
+--- old/src/main.c 2006-11-01 17:28:37.000000000 +0000
++++ new/src/main.c 2008-06-21 23:31:06.000000000 +0000
+@@ -1054,11 +1054,8 @@
+ if (layout_valid(&lw))
+ {
+ main_window_maximized = window_maximized(lw->window);
+- if (!main_window_maximized)
+- {
+- layout_geometry_get(NULL, &main_window_x, &main_window_y,
+- &main_window_w, &main_window_h);
+- }
++ layout_geometry_get(NULL, &main_window_x, &main_window_y,
++ &main_window_w, &main_window_h);
+ }
+
+ layout_geometry_get_dividers(NULL, &window_hdivider_pos, &window_vdivider_pos);
diff --git a/media-gfx/gqview/gqview-2.1.5-r1.ebuild b/media-gfx/gqview/gqview-2.1.5-r1.ebuild
new file mode 100644
index 000000000000..a57d74d5772c
--- /dev/null
+++ b/media-gfx/gqview/gqview-2.1.5-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils autotools
+
+DESCRIPTION="A GTK-based image browser"
+HOMEPAGE="http://gqview.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gqview/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~mips ppc ppc64 ~sparc x86"
+IUSE=""
+
+RDEPEND=">=x11-libs/gtk+-2.4:2
+ virtual/libintl"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-windows.patch" \
+ "${FILESDIR}/${P}-glibc.patch"
+ sed -i \
+ -e '/^Encoding/d' \
+ -e '/^Icon/s/\.png//' \
+ -e '/^Categories/s/Application;//' \
+ gqview.desktop || die
+ mv configure.in configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ econf --without-lcms
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ # leave README uncompressed because the program reads it
+ dodoc AUTHORS ChangeLog TODO
+ rm -f "${D}/usr/share/doc/${PF}/COPYING"
+}
diff --git a/media-gfx/gqview/metadata.xml b/media-gfx/gqview/metadata.xml
new file mode 100644
index 000000000000..e0c49a133083
--- /dev/null
+++ b/media-gfx/gqview/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <maintainer>
+ <email>mr_bones_@gentoo.org</email>
+ <name>Michael Sterrett</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">gqview</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/graphicsmagick/Manifest b/media-gfx/graphicsmagick/Manifest
new file mode 100644
index 000000000000..c91e31d38f49
--- /dev/null
+++ b/media-gfx/graphicsmagick/Manifest
@@ -0,0 +1,3 @@
+DIST GraphicsMagick-1.3.18.tar.xz 5124436 SHA256 fd48eebe200793e6f62a2b7d96413c94a8967ab56295605513898e2c8524b0ab SHA512 c04dbca467d2ac94d9c47818c7087954ceb54a736fdd062be6d499319037f4bbca3a779542d8acad262b59cb599521f895177574a21975f496ba57061b64b960 WHIRLPOOL d3b396d1cf3691f4aec1387066a55e4105e220cba22ef690234cb8724e955cc5dd4e39c269fddf610d61249850499facaaa54d2150660ed8f5126554a27c11dc
+DIST GraphicsMagick-1.3.19.tar.xz 5153772 SHA256 de64372bb7bbff18cf14afd35c8239d9588592f053fd51a82f7239ad42174a54 SHA512 cdfbdc75356ade5037eab836739e7e59156d8b3555112d350f25e47072142e19d47ea9da718d93e40fd864c5bb88810737c078d6fbee9950b964f49519881f6e WHIRLPOOL d4cc6eba8472a5e25cbc9e6b49ec5e1449f1b44e2962936b35227c654d3712d65b4201938127e758be2a6f1818a099de04be4761fd115d3806749965f5c42282
+DIST GraphicsMagick-1.3.20.tar.xz 5206616 SHA256 35fa21da4c1479e08da8351c5b1e363adaca803a0064cfc83084363adce387c9 SHA512 59f5eece3a38a98aea43bfc2aefd9c2df458c7f836c8ac05e908c29ea1de295e3f26b63f8daeadac4f40094e5d50aa860472c48e7a52e9f694471d0dcc5bbe37 WHIRLPOOL 13bc6154fbb2224eefdb6f437179a279f8959b4ccff9dc8eb6ef2cec205774a2a7cac4093ac81d36ba22a9879edaca15576ecc56e91da0318b7fffe029a6aecc
diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.16-libpng14.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.16-libpng14.patch
new file mode 100644
index 000000000000..bacf70e9ec24
--- /dev/null
+++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.16-libpng14.patch
@@ -0,0 +1,65 @@
+
+# HG changeset patch
+# User Glenn Randers-Pehrson <glennrp@simple...>
+# Date 1343491548 18000
+# Node ID d6e469d02cd260b6531e86a8a6c8a5a2b9ff51cb
+# Parent fe9e2eb655ce8b85abfd9b88d20a8a1648ad71e7
+coders/png.c: Some typecasts were inconsistent with libpng-1.4 and later.
+
+diff -r fe9e2eb655ce -r d6e469d02cd2 coders/png.c
+--- a/coders/png.c Thu Jul 26 20:24:26 2012 -0500
++++ b/coders/png.c Sat Jul 28 11:05:48 2012 -0500
+@@ -1360,7 +1360,11 @@
+ }
+
+ #ifdef PNG_USER_MEM_SUPPORTED
+-static png_voidp png_IM_malloc(png_structp png_ptr,png_uint_32 size)
++#if PNG_LIBPNG_VER >= 14000
++static png_voidp png_IM_malloc(png_structp png_ptr,png_alloc_size_t size)
++#else
++static png_voidp png_IM_malloc(png_structp png_ptr,png_size_t size)
++#endif
+ {
+ (void) png_ptr;
+ return MagickAllocateMemory(png_voidp,(size_t) size);
+@@ -6169,12 +6173,22 @@
+ (void) printf("writing raw profile: type=%.1024s, length=%lu\n",
+ profile_type, (unsigned long)length);
+ }
+- text=(png_textp) png_malloc(ping,(png_uint_32) sizeof(png_text));
++#if PNG_LIBPNG_VER >= 14000
++ text=(png_textp) png_malloc(ping,(png_alloc_size_t) sizeof(png_text));
++#else
++ text=(png_textp) png_malloc(ping,(png_size_t) sizeof(png_text));
++#endif
+ description_length=strlen((const char *) profile_description);
+ allocated_length=(png_uint_32) (length*2 + (length >> 5) + 20
+ + description_length);
+- text[0].text=(png_charp) png_malloc(ping,allocated_length);
+- text[0].key=(png_charp) png_malloc(ping, (png_uint_32) 80);
++#if PNG_LIBPNG_VER >= 14000
++ text[0].text=(png_charp) png_malloc(ping,
++ (png_alloc_size_t) allocated_length);
++ text[0].key=(png_charp) png_malloc(ping, (png_alloc_size_t) 80);
++#else
++ text[0].text=(png_charp) png_malloc(ping, (png_size_t) allocated_length);
++ text[0].key=(png_charp) png_malloc(ping, (png_size_t) 80);
++#endif
+ text[0].key[0]='\0';
+ (void) strcat(text[0].key, "Raw profile type ");
+ (void) strncat(text[0].key, (const char *) profile_type, 61);
+@@ -7620,7 +7634,12 @@
+
+ if (*attribute->key == '[')
+ continue;
+- text=(png_textp) png_malloc(ping,(png_uint_32) sizeof(png_text));
++#if PNG_LIBPNG_VER >= 14000
++ text=(png_textp) png_malloc(ping,
++ (png_alloc_size_t) sizeof(png_text));
++#else
++ text=(png_textp) png_malloc(ping,(png_size_t) sizeof(png_text));
++#endif
+ text[0].key=attribute->key;
+ text[0].text=attribute->value;
+ text[0].text_length=strlen(attribute->value);
+
diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.17-freetype.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.17-freetype.patch
new file mode 100644
index 000000000000..3ae4ad49f00b
--- /dev/null
+++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.17-freetype.patch
@@ -0,0 +1,32 @@
+https://sourceforge.net/tracker/?func=detail&aid=3601612&group_id=73485&atid=537940
+
+--- a/configure
++++ b/configure
+@@ -26488,7 +26488,6 @@
+ # directory as GraphicsMagick installation prefix.
+ #LDFLAGS="$LDFLAGS -L$LIB_DIR"
+ #CPPFLAGS="$CPPFLAGS -I$INCLUDE_DIR"
+-MAGICK_API_CPPFLAGS="-I$INCLUDE_DIR/GraphicsMagick $MAGICK_API_CPPFLAGS"
+
+ #
+ # Find the X11 RGB database
+@@ -29490,8 +29490,8 @@
+ then
+ freetype_prefix=`${freetype_config} --prefix`
+ freetype_exec_prefix=`${freetype_config} --exec-prefix`
+- LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib"
+- CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2"
++ LDFLAGS="$LDFLAGS `${PKG_CONFIG:-pkg-config} freetype2 --libs`"
++ CPPFLAGS="$CPPFLAGS `${PKG_CONFIG:-pkg-config} freetype2 --cflags`"
+ fi
+
+ dnl First see if there is a library
+@@ -35767,7 +35767,7 @@
+
+ MAGICK_API_CFLAGS=$CFLAGS
+ MAGICK_API_CPPFLAGS=`echo $MAGICK_API_CPPFLAGS | sed -e 's/ */ /g'`
+-MAGICK_API_LDFLAGS="-L$LIB_DIR $LDFLAGS"
++MAGICK_API_LDFLAGS="$LDFLAGS"
+ MAGICK_API_DEP_LIBS="$MAGICK_DEP_LIBS $MAGICK_API_LIBLTDL"
+ MAGICK_API_LIBS="-lGraphicsMagick $MAGICK_API_DEP_LIBS"
+
diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.18-freetype.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.18-freetype.patch
new file mode 100644
index 000000000000..d6504e6d0ffe
--- /dev/null
+++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.18-freetype.patch
@@ -0,0 +1,32 @@
+https://sourceforge.net/tracker/?func=detail&aid=3601612&group_id=73485&atid=537940
+
+--- GraphicsMagick-1.3.18/configure
++++ GraphicsMagick-1.3.18/configure
+@@ -22249,7 +22249,6 @@
+ # directory as GraphicsMagick installation prefix.
+ #LDFLAGS="$LDFLAGS -L$LIB_DIR"
+ #CPPFLAGS="$CPPFLAGS -I$INCLUDE_DIR"
+-MAGICK_API_CPPFLAGS="-I$INCLUDE_DIR/GraphicsMagick $MAGICK_API_CPPFLAGS"
+
+ #
+ # Find the X11 RGB database
+@@ -25994,8 +25993,8 @@
+ then
+ freetype_prefix=`${freetype_config} --prefix`
+ freetype_exec_prefix=`${freetype_config} --exec-prefix`
+- LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib"
+- CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2"
++ LDFLAGS="$LDFLAGS `${PKG_CONFIG:-pkg-config} freetype2 --libs`"
++ CPPFLAGS="$CPPFLAGS `${PKG_CONFIG:-pkg-config} freetype2 --cflags`"
+ fi
+
+ if test "$LIB_TTF" = ''
+@@ -29605,7 +29604,7 @@
+
+ MAGICK_API_CFLAGS=$CFLAGS
+ MAGICK_API_CPPFLAGS=`echo $MAGICK_API_CPPFLAGS | sed -e 's/ */ /g'`
+-MAGICK_API_LDFLAGS="-L$LIB_DIR $LDFLAGS"
++MAGICK_API_LDFLAGS="$LDFLAGS"
+ MAGICK_API_DEP_LIBS="$MAGICK_DEP_LIBS"
+ MAGICK_API_LIBS="-lGraphicsMagick $MAGICK_API_DEP_LIBS"
+
diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.18-powerpc.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.18-powerpc.patch
new file mode 100644
index 000000000000..30a67fdc3e2d
--- /dev/null
+++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.18-powerpc.patch
@@ -0,0 +1,11 @@
+--- a/magick/studio.h
++++ b/magick/studio.h
+@@ -51,7 +51,7 @@
+ threads. Most CPUs have cache lines of 32 or 64 bytes. IBM Power CPUs have
+ cache lines of 128 bytes.
+ */
+-#if defined(MAGICK_TARGET_CPU) && (MAGICK_TARGET_CPU == powerpc)
++#ifdef __powerpc__
+ # define MAGICK_CACHE_LINE_SIZE 128
+ #else
+ # define MAGICK_CACHE_LINE_SIZE 64
diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-flags.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-flags.patch
new file mode 100644
index 000000000000..1ebef5400337
--- /dev/null
+++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-flags.patch
@@ -0,0 +1,56 @@
+Fix various preprocessor, compiler, and linker flags added to config wrappers.
+Previously they would add build time flags to the files which is incorrect.
+
+--- GraphicsMagick-1.3.19/configure.ac
++++ GraphicsMagick-1.3.19/configure.ac
+@@ -346,6 +346,7 @@
+
+ AC_OPENMP([C])
+ CFLAGS="$OPENMP_CFLAGS $CFLAGS"
++MAGICK_API_CFLAGS="$MAGICK_API_CFLAGS $OPENMP_CFLAGS"
+ #CXXFLAGS="$OPENMP_CXXFLAGS $CXXFLAGS"
+ #LDFLAGS="$LDFLAGS $OPENMP_CFLAGS"
+ AC_SUBST(OPENMP_CFLAGS)
+@@ -3407,9 +3408,10 @@
+ MAGICK_DEP_LIBS=`echo $MAGICK_DEP_LIBS | sed -e 's/ */ /g'`
+ #LIBS=`echo $LIBS | sed -e 's/ */ /g'`
+
+-MAGICK_API_CFLAGS=$CFLAGS
++MAGICK_API_CFLAGS=`echo $MAGICK_API_CFLAGS | sed -e 's/ */ /g'`
+ MAGICK_API_CPPFLAGS=`echo $MAGICK_API_CPPFLAGS | sed -e 's/ */ /g'`
+-MAGICK_API_LDFLAGS="-L$LIB_DIR $LDFLAGS"
++MAGICK_API_CXXFLAGS=""
++MAGICK_API_LDFLAGS="-L$LIB_DIR"
+ MAGICK_API_DEP_LIBS="$MAGICK_DEP_LIBS"
+ MAGICK_API_LIBS="-lGraphicsMagick $MAGICK_API_DEP_LIBS"
+
+@@ -3440,6 +3442,7 @@
+
+ AC_SUBST(MAGICK_API_CFLAGS)
+ AC_SUBST(MAGICK_API_CPPFLAGS)
++AC_SUBST(MAGICK_API_CXXFLAGS)
+ AC_SUBST(MAGICK_API_PC_CPPFLAGS)
+ AC_SUBST(MAGICK_API_LDFLAGS)
+ AC_SUBST(MAGICK_API_LIBS)
+--- GraphicsMagick-1.3.19/magick/GraphicsMagick-config.in
++++ GraphicsMagick-1.3.19/magick/GraphicsMagick-config.in
+@@ -30,7 +30,7 @@
+ echo @PACKAGE_VERSION@
+ ;;
+ --cflags)
+- echo '@CFLAGS@'
++ echo '@MAGICK_API_CFLAGS@'
+ ;;
+ --cppflags)
+ echo '@MAGICK_API_CPPFLAGS@'
+--- GraphicsMagick-1.3.19/Magick++/bin/GraphicsMagick++-config.in
++++ GraphicsMagick-1.3.19/Magick++/bin/GraphicsMagick++-config.in
+@@ -33,7 +33,7 @@
+ echo '@MAGICK_API_CPPFLAGS@'
+ ;;
+ --cxxflags)
+- echo '@CXXFLAGS@'
++ echo '@MAGICK_API_CXXFLAGS@'
+ ;;
+ --ldflags)
+ echo '@MAGICK_API_LDFLAGS@'
diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-freetype.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-freetype.patch
new file mode 100644
index 000000000000..4ef1fb997edc
--- /dev/null
+++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-freetype.patch
@@ -0,0 +1,15 @@
+https://sourceforge.net/tracker/?func=detail&aid=3601612&group_id=73485&atid=537940
+
+--- GraphicsMagick-1.3.19/configure.ac
++++ GraphicsMagick-1.3.19/configure.ac
+@@ -2283,8 +2284,8 @@
+ then
+ freetype_prefix=`${freetype_config} --prefix`
+ freetype_exec_prefix=`${freetype_config} --exec-prefix`
+- LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib"
+- CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2"
++ LDFLAGS="$LDFLAGS `${PKG_CONFIG:-pkg-config} freetype2 --libs`"
++ CPPFLAGS="$CPPFLAGS `${PKG_CONFIG:-pkg-config} freetype2 --cflags`"
+ fi
+
+ dnl First see if there is a library
diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-perl.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-perl.patch
new file mode 100644
index 000000000000..39cf05fd55f1
--- /dev/null
+++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.19-perl.patch
@@ -0,0 +1,13 @@
+Link perl bindings against built libraries instead of system libraries (bug #456180).
+
+--- GraphicsMagick-1.3.19/PerlMagick/Makefile.PL.in
++++ GraphicsMagick-1.3.19/PerlMagick/Makefile.PL.in
+@@ -23,7 +23,7 @@
+ my $magick_BIN_DIR="$ENV{'DESTDIR'}@BIN_DIR@";
+ my $magick_DEP_LIBS='@MAGICK_DEP_LIBS@';
+ my $magick_PERLMAINCC='@PERLMAINCC@';
+-my $magick_LIB_DIR="$ENV{'DESTDIR'}@MAGICKLIBDIR@";
++my $magick_LIB_DIR="../magick/.libs";
+
+ # Compute test specification
+ my $delegate_tests='t/*.t';
diff --git a/media-gfx/graphicsmagick/files/graphicsmagick-1.3.20-powerpc.patch b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.20-powerpc.patch
new file mode 100644
index 000000000000..44a13581e42a
--- /dev/null
+++ b/media-gfx/graphicsmagick/files/graphicsmagick-1.3.20-powerpc.patch
@@ -0,0 +1,20 @@
+--- GraphicsMagick-1.3.20/magick/studio.h
++++ GraphicsMagick-1.3.20/magick/studio.h
+@@ -51,12 +51,11 @@
+ threads. Most CPUs have cache lines of 32 or 64 bytes. IBM Power CPUs have
+ cache lines of 128 bytes.
+ */
+-/* FIXME: C pre-processor does not support comparing strings. */
+-/* #if defined(MAGICK_TARGET_CPU) && (MAGICK_TARGET_CPU == powerpc) */
+-/* # define MAGICK_CACHE_LINE_SIZE 128 */
+-/* #else */
+-# define MAGICK_CACHE_LINE_SIZE 64
+-/* #endif */
++#ifdef __powerpc__
++#define MAGICK_CACHE_LINE_SIZE 128
++#else
++#define MAGICK_CACHE_LINE_SIZE 64
++#endif
+
+
+ /*
diff --git a/media-gfx/graphicsmagick/graphicsmagick-1.3.18.ebuild b/media-gfx/graphicsmagick/graphicsmagick-1.3.18.ebuild
new file mode 100644
index 000000000000..afb482ce3ee1
--- /dev/null
+++ b/media-gfx/graphicsmagick/graphicsmagick-1.3.18.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs eutils
+
+MY_P=${P/graphicsm/GraphicsM}
+
+DESCRIPTION="Collection of tools and libraries for many image formats"
+HOMEPAGE="http://www.graphicsmagick.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="bzip2 cxx debug fpx imagemagick jbig jpeg jpeg2k lcms lzma modules openmp perl png postscript q16 q32 static-libs svg threads tiff truetype wmf X zlib"
+
+RDEPEND=">=sys-devel/libtool-2.2.6b
+ bzip2? ( app-arch/bzip2 )
+ fpx? ( media-libs/libfpx )
+ imagemagick? ( !media-gfx/imagemagick )
+ jbig? ( media-libs/jbigkit )
+ jpeg? ( virtual/jpeg )
+ jpeg2k? ( media-libs/jasper )
+ lcms? ( media-libs/lcms:2 )
+ lzma? ( app-arch/xz-utils )
+ perl? ( dev-lang/perl )
+ png? ( media-libs/libpng:0 )
+ postscript? ( app-text/ghostscript-gpl )
+ svg? ( dev-libs/libxml2 )
+ tiff? ( media-libs/tiff:0 )
+ truetype? (
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2
+ )
+ wmf? ( media-libs/libwmf )
+ X? (
+ x11-libs/libSM
+ x11-libs/libXext
+ )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.3.18-freetype.patch
+ epatch "${FILESDIR}"/${PN}-1.3.18-powerpc.patch
+}
+
+src_configure() {
+ local depth=8
+ use q16 && depth=16
+ use q32 && depth=32
+
+ local openmp=disable
+ if use openmp && tc-has-openmp; then
+ openmp=enable
+ fi
+
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ --${openmp}-openmp \
+ --enable-largefile \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable debug prof) \
+ $(use_enable debug gcov) \
+ $(use_enable imagemagick magick-compat) \
+ $(use_with threads) \
+ $(use_with modules) \
+ --with-quantum-depth=${depth} \
+ --without-frozenpaths \
+ $(use_with cxx magick-plus-plus) \
+ $(use_with perl) \
+ --with-perl-options=INSTALLDIRS=vendor \
+ $(use_with bzip2 bzlib) \
+ $(use_with postscript dps) \
+ $(use_with fpx) \
+ --without-gslib \
+ $(use_with jbig) \
+ $(use_with jpeg) \
+ $(use_with jpeg2k jp2) \
+ --without-lcms \
+ $(use_with lcms lcms2) \
+ $(use_with lzma) \
+ $(use_with png) \
+ $(use_with tiff) \
+ $(use_with truetype ttf) \
+ $(use_with wmf) \
+ --with-fontpath="${EPREFIX}"/usr/share/fonts \
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts \
+ --with-windows-font-dir="${EPREFIX}"/usr/share/fonts/corefonts \
+ $(use_with svg xml) \
+ $(use_with zlib) \
+ $(use_with X x)
+}
+
+src_compile() {
+ default
+ use perl && emake perl-build
+}
+
+src_install() {
+ default
+
+ if use perl; then
+ emake -C PerlMagick DESTDIR="${D}" install
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} +
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} +
+ fi
+
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+}
diff --git a/media-gfx/graphicsmagick/graphicsmagick-1.3.19.ebuild b/media-gfx/graphicsmagick/graphicsmagick-1.3.19.ebuild
new file mode 100644
index 000000000000..3f5d217b51ed
--- /dev/null
+++ b/media-gfx/graphicsmagick/graphicsmagick-1.3.19.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils toolchain-funcs
+
+MY_P=${P/graphicsm/GraphicsM}
+
+DESCRIPTION="Collection of tools and libraries for many image formats"
+HOMEPAGE="http://www.graphicsmagick.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="bzip2 cxx debug fpx imagemagick jbig jpeg jpeg2k lcms lzma modules openmp
+ perl png postscript q16 q32 static-libs svg threads tiff truetype webp wmf X zlib"
+
+RDEPEND=">=sys-devel/libtool-2.2.6b
+ bzip2? ( app-arch/bzip2 )
+ fpx? ( media-libs/libfpx )
+ imagemagick? ( !media-gfx/imagemagick )
+ jbig? ( media-libs/jbigkit )
+ jpeg? ( virtual/jpeg )
+ jpeg2k? ( media-libs/jasper )
+ lcms? ( media-libs/lcms:2 )
+ lzma? ( app-arch/xz-utils )
+ perl? ( dev-lang/perl )
+ png? ( media-libs/libpng:0 )
+ postscript? ( app-text/ghostscript-gpl )
+ svg? ( dev-libs/libxml2 )
+ tiff? ( media-libs/tiff:0 )
+ truetype? (
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2
+ )
+ webp? ( media-libs/libwebp )
+ wmf? ( media-libs/libwmf )
+ X? (
+ x11-libs/libSM
+ x11-libs/libXext
+ )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.3.19-freetype.patch
+ epatch "${FILESDIR}"/${PN}-1.3.19-flags.patch
+ epatch "${FILESDIR}"/${PN}-1.3.19-perl.patch
+ epatch "${FILESDIR}"/${PN}-1.3.18-powerpc.patch
+
+ epatch_user #498942
+
+ eautoreconf
+}
+
+src_configure() {
+ local depth=8
+ use q16 && depth=16
+ use q32 && depth=32
+
+ local openmp=disable
+ if use openmp && tc-has-openmp; then
+ openmp=enable
+ fi
+
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ --${openmp}-openmp \
+ --enable-largefile \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable debug prof) \
+ $(use_enable debug gcov) \
+ $(use_enable imagemagick magick-compat) \
+ $(use_with threads) \
+ $(use_with modules) \
+ --with-quantum-depth=${depth} \
+ --without-frozenpaths \
+ $(use_with cxx magick-plus-plus) \
+ $(use_with perl) \
+ --with-perl-options=INSTALLDIRS=vendor \
+ $(use_with bzip2 bzlib) \
+ $(use_with postscript dps) \
+ $(use_with fpx) \
+ --without-gslib \
+ $(use_with jbig) \
+ $(use_with webp) \
+ $(use_with jpeg) \
+ $(use_with jpeg2k jp2) \
+ --without-lcms \
+ $(use_with lcms lcms2) \
+ $(use_with lzma) \
+ $(use_with png) \
+ $(use_with tiff) \
+ $(use_with truetype ttf) \
+ $(use_with wmf) \
+ --with-fontpath="${EPREFIX}"/usr/share/fonts \
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts \
+ --with-windows-font-dir="${EPREFIX}"/usr/share/fonts/corefonts \
+ $(use_with svg xml) \
+ $(use_with zlib) \
+ $(use_with X x)
+}
+
+src_compile() {
+ default
+ use perl && emake perl-build
+}
+
+src_test() {
+ unset DISPLAY # some perl tests fail when DISPLAY is set
+ default
+}
+
+src_install() {
+ default
+
+ if use perl; then
+ emake -C PerlMagick DESTDIR="${D}" install
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} +
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} +
+ fi
+
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+}
diff --git a/media-gfx/graphicsmagick/graphicsmagick-1.3.20-r1.ebuild b/media-gfx/graphicsmagick/graphicsmagick-1.3.20-r1.ebuild
new file mode 100644
index 000000000000..6cc10fe84eb6
--- /dev/null
+++ b/media-gfx/graphicsmagick/graphicsmagick-1.3.20-r1.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils toolchain-funcs
+
+MY_P=${P/graphicsm/GraphicsM}
+
+DESCRIPTION="Collection of tools and libraries for many image formats"
+HOMEPAGE="http://www.graphicsmagick.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="bzip2 cxx debug fpx imagemagick jbig jpeg jpeg2k lcms lzma modules openmp
+ perl png postscript q16 q32 static-libs svg threads tiff truetype webp wmf X zlib"
+
+RDEPEND=">=sys-devel/libtool-2.2.6b
+ bzip2? ( app-arch/bzip2 )
+ fpx? ( media-libs/libfpx )
+ imagemagick? ( !media-gfx/imagemagick )
+ jbig? ( media-libs/jbigkit )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/jasper )
+ lcms? ( media-libs/lcms:2 )
+ lzma? ( app-arch/xz-utils )
+ perl? ( dev-lang/perl )
+ png? ( media-libs/libpng:0 )
+ postscript? ( app-text/ghostscript-gpl )
+ svg? ( dev-libs/libxml2 )
+ tiff? ( media-libs/tiff:0 )
+ truetype? (
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2
+ )
+ webp? ( media-libs/libwebp )
+ wmf? ( media-libs/libwmf )
+ X? (
+ x11-libs/libSM
+ x11-libs/libXext
+ )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.3.19-freetype.patch
+ epatch "${FILESDIR}"/${PN}-1.3.19-flags.patch
+ epatch "${FILESDIR}"/${PN}-1.3.19-perl.patch
+ epatch "${FILESDIR}"/${P}-powerpc.patch
+
+ epatch_user #498942
+
+ eautoreconf
+}
+
+src_configure() {
+ local depth=8
+ use q16 && depth=16
+ use q32 && depth=32
+
+ local openmp=disable
+ if use openmp && tc-has-openmp; then
+ openmp=enable
+ fi
+
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ --${openmp}-openmp \
+ --enable-largefile \
+ --enable-shared \
+ $(use_enable static-libs static) \
+ $(use_enable debug prof) \
+ $(use_enable debug gcov) \
+ $(use_enable imagemagick magick-compat) \
+ $(use_with threads) \
+ $(use_with modules) \
+ --with-quantum-depth=${depth} \
+ --without-frozenpaths \
+ $(use_with cxx magick-plus-plus) \
+ $(use_with perl) \
+ --with-perl-options=INSTALLDIRS=vendor \
+ $(use_with bzip2 bzlib) \
+ $(use_with postscript dps) \
+ $(use_with fpx) \
+ --without-gslib \
+ $(use_with jbig) \
+ $(use_with webp) \
+ $(use_with jpeg) \
+ $(use_with jpeg2k jp2) \
+ --without-lcms \
+ $(use_with lcms lcms2) \
+ $(use_with lzma) \
+ $(use_with png) \
+ $(use_with tiff) \
+ $(use_with truetype ttf) \
+ $(use_with wmf) \
+ --with-fontpath="${EPREFIX}"/usr/share/fonts \
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts \
+ --with-windows-font-dir="${EPREFIX}"/usr/share/fonts/corefonts \
+ $(use_with svg xml) \
+ $(use_with zlib) \
+ $(use_with X x)
+}
+
+src_compile() {
+ default
+ use perl && emake perl-build
+}
+
+src_test() {
+ unset DISPLAY # some perl tests fail when DISPLAY is set
+ default
+}
+
+src_install() {
+ default
+
+ if use perl; then
+ emake -C PerlMagick DESTDIR="${D}" install
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} +
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} +
+ fi
+
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+}
diff --git a/media-gfx/graphicsmagick/metadata.xml b/media-gfx/graphicsmagick/metadata.xml
new file mode 100644
index 000000000000..09f36fa05818
--- /dev/null
+++ b/media-gfx/graphicsmagick/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription lang="en">
+ This is a port of GraphicsMagick(TM), the "swiss army knife" of
+ image processing. It provides a robust collection of tools and libraries
+ which support reading, writing, and manipulating an image in over 88 major
+ formats including formats like DPX, GIF, JPEG, JPEG-2000, PNG, PDF,
+ SVG and TIFF.
+ The program is the fork of a better-known ImageMagick (5.5.2), which
+ emphasizes end-user and API-stabilities.
+</longdescription>
+ <use>
+ <flag name="fpx">Enable FlashPix support with <pkg>media-libs/libfpx</pkg></flag>
+ <flag name="modules">Compile graphicsmagick with dynamically loadable modules</flag>
+ <flag name="q16">Set storage quantum size to 16 (~2*memory)</flag>
+ <flag name="q32">Set storage quantum size to 32 (~5*memory)</flag>
+ <flag name="webp">Enable support for webp image format</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">graphicsmagick</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/graphite2/Manifest b/media-gfx/graphite2/Manifest
new file mode 100644
index 000000000000..e952aaad4772
--- /dev/null
+++ b/media-gfx/graphite2/Manifest
@@ -0,0 +1,2 @@
+DIST graphite2-1.2.1.tgz 4665169 SHA256 7b15b749ae65c1ce3cfb4b98b8d4125e91b695ca31fa83aa51d6542109ab449d SHA512 834de9185c861f1fe54cffc2b6d12117cdd956e64167b0021ea5cb1b83deacff91a2e9d78df9a1a1c038016bf2aad252c88836c49315ca027a0fd0386d8392d9 WHIRLPOOL ec13995a19f9251bf66eeb3d66b7c8ff504ae8993868aa716cb475a69db8f675012445cd2dcb1ac594121c657aafcc1276abfa5ee38620dc6d428c1c8f51e755
+DIST graphite2-1.2.4.tgz 6938866 SHA256 4bc3d5168029bcc0aa00eb2c973269d29407be2796ff56f9c80e10736bd8b003 SHA512 fb4a7bfd5656233975ce339e4e155ccb4fd401b87e30440edab98739355596e41abf5dccf6487d53f6353840a7c87b8270ee33e79c6630cf13a25ac2cb2114de WHIRLPOOL a869dcf293ba1f1d547f86ad88c6bb27879c8ad793135ba29ea12daf19d4fb84f9660fb43bd524934970d163e8bb779a050ec37a734784e25de99bd6463f3d57
diff --git a/media-gfx/graphite2/files/graphite2-1.0.2-no_harfbuzz_tests.patch b/media-gfx/graphite2/files/graphite2-1.0.2-no_harfbuzz_tests.patch
new file mode 100644
index 000000000000..eb413345ca79
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.0.2-no_harfbuzz_tests.patch
@@ -0,0 +1,12 @@
+diff -urN graphite2-1.0.2.old/tests/comparerenderer/CMakeLists.txt graphite2-1.0.2/tests/comparerenderer/CMakeLists.txt
+--- graphite2-1.0.2.old/tests/comparerenderer/CMakeLists.txt 2011-09-04 13:39:16.206450690 +0200
++++ graphite2-1.0.2/tests/comparerenderer/CMakeLists.txt 2011-09-04 13:39:44.516450716 +0200
+@@ -43,7 +43,7 @@
+ find_package(PkgConfig)
+
+ pkg_check_modules(GR silgraphite)
+- pkg_check_modules(HB harfbuzz)
++ #pkg_check_modules(HB harfbuzz)
+ pkg_check_modules(GLIB glib-2.0)
+ # pkg_check_modules(GRNG graphite)
+
diff --git a/media-gfx/graphite2/files/graphite2-1.0.3-no-test-binaries.patch b/media-gfx/graphite2/files/graphite2-1.0.3-no-test-binaries.patch
new file mode 100644
index 000000000000..bbc28f5183d4
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.0.3-no-test-binaries.patch
@@ -0,0 +1,9 @@
+diff -urN graphite2-1.0.3.old/tests/comparerenderer/CMakeLists.txt graphite2-1.0.3/tests/comparerenderer/CMakeLists.txt
+--- graphite2-1.0.3.old/tests/comparerenderer/CMakeLists.txt 2011-10-28 10:28:43.688602080 +0200
++++ graphite2-1.0.3/tests/comparerenderer/CMakeLists.txt 2011-10-28 10:30:06.694603526 +0200
+@@ -132,4 +132,4 @@
+ # comparetest(scheherazade_arb Scheherazadegr.ttf udhr_arb.txt --rtl)
+
+ # comparerenderer can also be used for font testing
+-install(TARGETS comparerenderer EXPORT comparerenderer RUNTIME DESTINATION bin)
++# install(TARGETS comparerenderer EXPORT comparerenderer RUNTIME DESTINATION bin)
diff --git a/media-gfx/graphite2/files/graphite2-1.1.0-includes-libs-perl.patch b/media-gfx/graphite2/files/graphite2-1.1.0-includes-libs-perl.patch
new file mode 100644
index 000000000000..be4122937703
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.1.0-includes-libs-perl.patch
@@ -0,0 +1,13 @@
+--- graphite2-0.9.3.orig/contrib/perl/Build.PL
++++ graphite2-0.9.3/contrib/perl/Build.PL
+@@ -8,8 +8,8 @@ my $builder = Module::Build->new(
+ dist_author => 'Simon Cozens <simon@cpan.org>',
+ dist_version_from => 'lib/Text/Graphite2.pm',
+ extra_compiler_flags => $^O ne 'MSWin32' ? '-Wall -Wno-unused-variable' : '',
+- extra_linker_flags => $^O eq 'MSWin32' ? '../../build/src/graphite2.lib' : '-lgraphite2',
+- include_dirs => ['.'],
++ extra_linker_flags => $^O eq 'MSWin32' ? '../../build/src/graphite2.lib' : '-L @BUILD_DIR@ -lgraphite2',
++ include_dirs => ['.', '../../include'],
+ requires => {
+ 'Test::More' => 0,
+ },
diff --git a/media-gfx/graphite2/files/graphite2-1.2.0-solaris.patch b/media-gfx/graphite2/files/graphite2-1.2.0-solaris.patch
new file mode 100644
index 000000000000..c3bbe51e8695
--- /dev/null
+++ b/media-gfx/graphite2/files/graphite2-1.2.0-solaris.patch
@@ -0,0 +1,22 @@
+Bidi: undef conflicting constants
+
+On Solaris ES and CS are already defined, resulting in compilation
+errors. Since we won't need Solaris' ones here, simply undef them.
+
+--- graphite2-1.2.0/src/Bidi.cpp
++++ graphite2-1.2.0/src/Bidi.cpp
+@@ -30,6 +30,14 @@
+
+ using namespace graphite2;
+
++/* Solaris' headers define these */
++#ifdef ES
++# undef ES
++#endif
++#ifdef CS
++# undef CS
++#endif
++
+ enum DirCode { // Hungarian: dirc
+ Unk = -1,
+ N = 0, // other neutrals (default) - ON
diff --git a/media-gfx/graphite2/graphite2-1.2.1.ebuild b/media-gfx/graphite2/graphite2-1.2.1.ebuild
new file mode 100644
index 000000000000..0cb3b1220498
--- /dev/null
+++ b/media-gfx/graphite2/graphite2-1.2.1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+GENTOO_DEPEND_ON_PERL="no"
+inherit base eutils cmake-utils perl-module python-any-r1
+
+DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
+HOMEPAGE="http://graphite.sil.org/"
+SRC_URI="mirror://sourceforge/silgraphite/${PN}/${P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="perl test"
+
+RDEPEND="
+ perl? ( dev-lang/perl:= )
+"
+DEPEND="${RDEPEND}
+ perl? ( dev-perl/Module-Build )
+ test? (
+ dev-libs/glib:2
+ media-libs/fontconfig
+ media-libs/silgraphite
+ ${PYTHON_DEPS}
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.0-includes-libs-perl.patch"
+ "${FILESDIR}/${PN}-1.0.2-no_harfbuzz_tests.patch"
+ "${FILESDIR}/${PN}-1.0.3-no-test-binaries.patch"
+ "${FILESDIR}/${PN}-1.2.0-solaris.patch"
+)
+
+pkg_setup() {
+ use perl && perl_set_version
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ base_src_prepare
+
+ # fix perl linking
+ if use perl; then
+ _check_build_dir init
+ sed -i \
+ -e "s:@BUILD_DIR@:\"${CMAKE_BUILD_DIR}/src\":" \
+ contrib/perl/Build.PL || die
+ fi
+
+ # make tests optional
+ if ! use test; then
+ sed -i \
+ -e '/tests/d' \
+ CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DVM_MACHINE_TYPE=direct"
+ # http://sourceforge.net/p/silgraphite/bugs/49/
+ $([[ ${CHOST} == powerpc*-apple* ]] && \
+ echo "-DGRAPHITE2_NSEGCACHE:BOOL=ON")
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ if use perl; then
+ cd contrib/perl
+ perl-module_src_configure
+ perl-module_src_compile
+ fi
+}
+
+src_test() {
+ cmake-utils_src_test
+ if use perl; then
+ cd contrib/perl
+ perl-module_src_test
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+ if use perl; then
+ cd contrib/perl
+ perl-module_src_install
+ perl_delete_localpod
+ fi
+
+ prune_libtool_files --all
+}
diff --git a/media-gfx/graphite2/graphite2-1.2.4-r1.ebuild b/media-gfx/graphite2/graphite2-1.2.4-r1.ebuild
new file mode 100644
index 000000000000..42b25cf256a7
--- /dev/null
+++ b/media-gfx/graphite2/graphite2-1.2.4-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+GENTOO_DEPEND_ON_PERL="no"
+inherit eutils perl-module python-any-r1 cmake-multilib
+
+DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
+HOMEPAGE="http://graphite.sil.org/"
+SRC_URI="mirror://sourceforge/silgraphite/${PN}/${P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="perl test"
+
+RDEPEND="
+ perl? ( dev-lang/perl:= )
+"
+DEPEND="${RDEPEND}
+ perl? (
+ dev-perl/Module-Build
+ dev-perl/Locale-Maketext-Lexicon
+ )
+ test? (
+ dev-libs/glib:2
+ media-libs/fontconfig
+ media-libs/silgraphite
+ ${PYTHON_DEPS}
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.0-includes-libs-perl.patch"
+ "${FILESDIR}/${PN}-1.0.2-no_harfbuzz_tests.patch"
+ "${FILESDIR}/${PN}-1.0.3-no-test-binaries.patch"
+ "${FILESDIR}/${PN}-1.2.0-solaris.patch"
+)
+
+pkg_setup() {
+ use perl && perl_set_version
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # make tests optional
+ if ! use test; then
+ sed -i \
+ -e '/tests/d' \
+ CMakeLists.txt || die
+ fi
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ "-DVM_MACHINE_TYPE=direct"
+ # http://sourceforge.net/p/silgraphite/bugs/49/
+ $([[ ${CHOST} == powerpc*-apple* ]] && \
+ echo "-DGRAPHITE2_NSEGCACHE:BOOL=ON")
+ )
+
+ cmake-utils_src_configure
+
+ # fix perl linking
+ if multilib_is_native_abi && use perl; then
+ _check_build_dir init
+ sed -i \
+ -e "s:@BUILD_DIR@:\"${BUILD_DIR}/src\":" \
+ "${S}"/contrib/perl/Build.PL || die
+ fi
+}
+
+src_compile() {
+ cmake-multilib_src_compile
+ if use perl; then
+ cd contrib/perl || die
+ perl-module_src_configure
+ perl-module_src_compile
+ fi
+}
+
+src_test() {
+ cmake-multilib_src_test
+ if use perl; then
+ cd contrib/perl || die
+ perl-module_src_test
+ fi
+}
+
+src_install() {
+ cmake-multilib_src_install
+ if use perl; then
+ cd contrib/perl || die
+ perl-module_src_install
+ perl_delete_localpod
+ fi
+
+ prune_libtool_files --all
+}
diff --git a/media-gfx/graphite2/graphite2-1.2.4.ebuild b/media-gfx/graphite2/graphite2-1.2.4.ebuild
new file mode 100644
index 000000000000..4d5525cc464a
--- /dev/null
+++ b/media-gfx/graphite2/graphite2-1.2.4.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+GENTOO_DEPEND_ON_PERL="no"
+inherit base eutils cmake-utils perl-module python-any-r1
+
+DESCRIPTION="Library providing rendering capabilities for complex non-Roman writing systems"
+HOMEPAGE="http://graphite.sil.org/"
+SRC_URI="mirror://sourceforge/silgraphite/${PN}/${P}.tgz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="perl test"
+
+RDEPEND="
+ perl? ( dev-lang/perl:= )
+"
+DEPEND="${RDEPEND}
+ perl? ( dev-perl/Module-Build )
+ test? (
+ dev-libs/glib:2
+ media-libs/fontconfig
+ media-libs/silgraphite
+ ${PYTHON_DEPS}
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.1.0-includes-libs-perl.patch"
+ "${FILESDIR}/${PN}-1.0.2-no_harfbuzz_tests.patch"
+ "${FILESDIR}/${PN}-1.0.3-no-test-binaries.patch"
+ "${FILESDIR}/${PN}-1.2.0-solaris.patch"
+)
+
+pkg_setup() {
+ use perl && perl_set_version
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ base_src_prepare
+
+ # fix perl linking
+ if use perl; then
+ _check_build_dir init
+ sed -i \
+ -e "s:@BUILD_DIR@:\"${CMAKE_BUILD_DIR}/src\":" \
+ contrib/perl/Build.PL || die
+ fi
+
+ # make tests optional
+ if ! use test; then
+ sed -i \
+ -e '/tests/d' \
+ CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ "-DVM_MACHINE_TYPE=direct"
+ # http://sourceforge.net/p/silgraphite/bugs/49/
+ $([[ ${CHOST} == powerpc*-apple* ]] && \
+ echo "-DGRAPHITE2_NSEGCACHE:BOOL=ON")
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile
+ if use perl; then
+ cd contrib/perl
+ perl-module_src_configure
+ perl-module_src_compile
+ fi
+}
+
+src_test() {
+ cmake-utils_src_test
+ if use perl; then
+ cd contrib/perl
+ perl-module_src_test
+ fi
+}
+
+src_install() {
+ cmake-utils_src_install
+ if use perl; then
+ cd contrib/perl
+ perl-module_src_install
+ perl_delete_localpod
+ fi
+
+ prune_libtool_files --all
+}
diff --git a/media-gfx/graphite2/metadata.xml b/media-gfx/graphite2/metadata.xml
new file mode 100644
index 000000000000..aa274edbb077
--- /dev/null
+++ b/media-gfx/graphite2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>openoffice</herd>
+ <upstream>
+ <remote-id type="sourceforge">silgraphite</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/graphviz/Manifest b/media-gfx/graphviz/Manifest
new file mode 100644
index 000000000000..0d3b41f3d113
--- /dev/null
+++ b/media-gfx/graphviz/Manifest
@@ -0,0 +1,5 @@
+DIST graphviz-2.26.3.tar.gz 17092429 SHA256 f410996e69b1095237c2128deae5fc7b6ce99055b095271abb14447bc2f37fa1 SHA512 6225141752318af0b50714d70d31dd1ef1bc414d134d22f066f159843991194215bb9bc4e8df38a194e1de67ebbf137d371e875948fa6a6eebfca9df1a414a6d WHIRLPOOL ca35d0ed9cb3751ae968e1c6d425efe42e8b681685eb66f975c0ff1b73e245fc3db6418ec69300331c94275fe3bfcdcd168b931b880c280f3dd63f1f03c4d4db
+DIST graphviz-2.28.0.tar.gz 19620087 SHA256 d3aa7973c578cae4cc26d9d6498c57ed06680cab9a4e940d0357a3c6527afc76 SHA512 d6dbcd99487e382f9ca83ef63a3ff3fbe9208f6d3969cf03d15b8944dfb58c7fefe1bf96939e3e69019ae9a562619c6d64ad24e390c408b7271caade443233e0 WHIRLPOOL f0274567661f16993a107f45685f0716e64ea493e064efd2e72a4680120cbee8989fb0eab6429d432d18106d42bfc37d4113816efb14e7888d00014b83dea72a
+DIST graphviz-2.34.0.tar.gz 23921350 SHA256 d94abca5745aa4c5808ab56cd3d0ec9ed14fb76a5a88d39e1f234fa84d22d764 SHA512 73dc8c25bc5747fda717d6d2162a8b37bf883544a13b487354a6000d528816a69a021f33cbeec0f6e718a7e9905ab2a04ee63f787ca7f79226055b2da21f4832 WHIRLPOOL 0fe3bf7420eccef9de51789ae9a8d8cab55b6fae7382e557604fb974e04eaa1e0610392dc7f6d5fa85a0b83a3cc955a4ff08d594bf8805c7f06625c7d9ac9007
+DIST graphviz-2.36.0.tar.gz 23846318 SHA256 37fd66d8def158575c75c4f6dbf536839e4ee468aa59314eb472d1aecb076361 SHA512 cca1339cea8d36acbae647a78ff6743a4f77bfa208e74fef615a99dc7d380d2a0a0f0b3fc00de09a9f67c3fad16dc3837ef3aefbfce5a8a3d0f974ed5afbbab5 WHIRLPOOL c9f25f28869afef943121a24b580518d822eb76f30b4c874554f2f1dd4f16ffaf2683644c59746f4295aa574c4b5541f1205787870eed5567cd4bd5c755e5f8b
+DIST graphviz-2.38.0.tar.gz 25848858 SHA256 81aa238d9d4a010afa73a9d2a704fc3221c731e1e06577c2ab3496bdef67859e SHA512 0e51a97dae595f4e80bc9e4a12ba3c48485fab19941a28d522f5a0624b6a767e0ba720e9e55bff8efe8308dd1cd3793e2c99cb5fdfceb2d5cafb0cbee907e531 WHIRLPOOL b59bb517c4aa690ffd23e1b4d448d5dbaae5594eb1059d574e0cb3bf2091beb9ed867bd4fa7e8ca0259863f24849c96d4d1da056091922bf33ace7da43c8b5d4
diff --git a/media-gfx/graphviz/files/graphviz-2.26.3-automake-1.11.2.patch b/media-gfx/graphviz/files/graphviz-2.26.3-automake-1.11.2.patch
new file mode 100644
index 000000000000..86280f2b05dd
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.26.3-automake-1.11.2.patch
@@ -0,0 +1,35 @@
+Install dir ( buiding with media-libs/ming ):
+ /usr/$(get_libdir)/graphviz/Bitstream_Vera_Serif.fdb
+ /usr/$(get_libdir)/graphviz/Bitstream_Vera_Sans.fdb
+ /usr/include/graphviz/gv.cpp
+ /usr/include/graphviz/gv.i
+
+Due to the following change, {pkglib,pkginclude}_DATA is invalid:
+ http://git.savannah.gnu.org/cgit/automake.git/commit/?id=9ca632642b006ac6b0fc4ce0ae5b34023faa8cbf
+
+---
+diff --git a/plugin/ming/Makefile.am b/plugin/ming/Makefile.am
+--- a/plugin/ming/Makefile.am
++++ b/plugin/ming/Makefile.am
+@@ -17,7 +17,8 @@ lib_LTLIBRARIES = libgvplugin_ming.la
+ else
+ pkglib_LTLIBRARIES = libgvplugin_ming.la
+ endif
+-pkglib_DATA = Bitstream_Vera_Sans.fdb Bitstream_Vera_Serif.fdb
++fdblibdir = $(libdir)/@PACKAGE@
++fdblib_DATA = Bitstream_Vera_Sans.fdb Bitstream_Vera_Serif.fdb
+ endif
+
+ libgvplugin_ming_C_la_SOURCES = \
+diff --git a/tclpkg/gv/Makefile.am b/tclpkg/gv/Makefile.am
+--- a/tclpkg/gv/Makefile.am
++++ b/tclpkg/gv/Makefile.am
+@@ -258,7 +258,7 @@ libgv_tcl_la_CPPFLAGS = $(BASECPPFLAGS)
+ gv_tcl.cpp: gv.i
+ $(SWIG) -c++ -tcl -namespace -o gv_tcl.cpp $(srcdir)/gv.i
+
+-pkginclude_DATA = gv.i gv.cpp
++pkginclude_HEADERS = gv.i gv.cpp
+ pkglib_LTLIBRARIES =
+ man_MANS =
+ pdf_DATA =
diff --git a/media-gfx/graphviz/files/graphviz-2.26.3-libtool-configure.patch b/media-gfx/graphviz/files/graphviz-2.26.3-libtool-configure.patch
new file mode 100644
index 000000000000..142aea2843fd
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.26.3-libtool-configure.patch
@@ -0,0 +1,52 @@
+backport newer libtool logic
+
+https://bugs.gentoo.org/539032
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -464,28 +464,15 @@
+ dnl -----------------------------------
+ dnl libtool ltdl on-demand plugin loading
+
+-m4_ifdef([LT_INIT],
+- [ #code that is for Libtool 2.x
+-AM_PROG_LIBTOOL
+- ],
+- [ #code that is for 1.5.x
+- ])
++LT_INIT([dlopen])
++LT_CONFIG_LTDL_DIR([libltdl])
++LTDL_INIT
++
+ AC_ARG_ENABLE(ltdl,
+ [AS_HELP_STRING([--enable-ltdl],[support on-demand plugin loading])])
+ if test "x$enable_ltdl" != "xno"; then
+ AC_DEFINE(ENABLE_LTDL,1,[Define if you want on-demand plugin loading])
+- AC_LIBTOOL_DLOPEN
+-m4_ifdef([LT_INIT],
+- [ #code that is for Libtool 2.x
+- LT_CONFIG_LTDL_DIR([libltdl])
+- LTDL_INIT
+- ],
+- [ #code that is for 1.5.x
+- AC_CONFIG_SUBDIRS([libltdl])
+- ])
+ use_ltdl="Yes"
+-
+- AC_LIBLTDL_CONVENIENCE
+ if test "x$DARWIN9" = "xyes"; then
+ LIBLTDL_LDFLAGS="-Wl,-unexported_symbol,_lt_*"
+ fi
+@@ -494,12 +483,6 @@
+ AC_SUBST(INCLTDL)
+ AC_SUBST(LIBLTDL)
+ AC_SUBST(LIBLTDL_LDFLAGS)
+-m4_ifdef([LT_INIT],
+- [ #code that is for Libtool 2.x
+- ],
+- [ #code that is for 1.5.x
+-AM_PROG_LIBTOOL
+- ])
+
+ # Checks for libraries.
+ #AC_CHECK_LIB([ICE], [main])
diff --git a/media-gfx/graphviz/files/graphviz-2.26.3-libtool.patch b/media-gfx/graphviz/files/graphviz-2.26.3-libtool.patch
new file mode 100644
index 000000000000..f82312dbbebf
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.26.3-libtool.patch
@@ -0,0 +1,27 @@
+http://bugs.gentoo.org/339298
+
+--- lib/gvc/gvcext.h
++++ lib/gvc/gvcext.h
+@@ -80,9 +80,11 @@
+ #if defined(GVDLL)
+ __declspec(dllexport) lt_symlist_t lt_preloaded_symbols[];
+ #else
++#if !defined(LTDL_H)
+ extern lt_symlist_t lt_preloaded_symbols[];
+ #endif
+ #endif
++#endif
+
+
+ #ifdef __cplusplus
+--- lib/gvc/Makefile.am
++++ lib/gvc/Makefile.am
+@@ -18,7 +18,7 @@
+ -I$(top_srcdir)/lib/pathplan \
+ -I$(top_srcdir)/lib/$(GRAPH) \
+ -I$(top_srcdir)/lib/cdt \
+- $(INCLTDL) -I$(top_srcdir)/libltdl \
++ $(INCLTDL) \
+ -DGVLIBDIR=\"$(pkglibdir)\"
+
+ if WITH_WIN32
diff --git a/media-gfx/graphviz/files/graphviz-2.28.0-Xaw-configure.patch b/media-gfx/graphviz/files/graphviz-2.28.0-Xaw-configure.patch
new file mode 100644
index 000000000000..095354f49536
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.28.0-Xaw-configure.patch
@@ -0,0 +1,71 @@
+--- configure.ac.old 2011-05-07 05:25:24.000000000 +0200
++++ configure.ac 2011-06-24 13:24:49.000000000 +0200
+@@ -1924,6 +1924,10 @@
+ # so we set HAVE_LIBXPMFORLEFTY instead of the usual HAVE_LIBXPM
+ #
+
++AC_ARG_WITH(lefty,
++ [AS_HELP_STRING([--with-lefty=yes],[build lefty])],
++ [],[with_xaw=yes])
++
+ AC_ARG_WITH(Xpmincludedir,
+ [AS_HELP_STRING([--with-Xpmincludedir=DIR],[use Xpm includes from DIR])],
+ [XPM_INCLUDES="-I$withval"])
+@@ -1931,6 +1935,17 @@
+ [AS_HELP_STRING([--with-Xpmlibdir=DIR],[use Xpm libraries from DIR])],
+ [XPM_LIBS="-L$withval"])
+
++AC_ARG_WITH(Xawincludedir,
++ [AS_HELP_STRING([--with-Xawincludedir=DIR],[use Xaw includes from DIR])],
++ [XAW_INCLUDES="-I$withval"])
++AC_ARG_WITH(Xawlibdir,
++ [AS_HELP_STRING([--with-Xawlibdir=DIR],[use Xaw libraries from DIR])],
++ [XAW_LIBS="-L$withval"])
++
++if test "x$with_xaw" != "xyes"; then
++ use_lefty="No (disabled)"
++else
++
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CPPFLAGS="$CPPFLAGS $XPM_INCLUDES $X_CFLAGS"
+@@ -1941,18 +1956,10 @@
+ AC_MSG_WARN(Optional Xpm library not available), [-lXmu -lXt -lX11 -lXext $SOCKET_LIBS])
+ LDFLAGS=$save_LDFLAGS
+ CPPFLAGS=$save_CPPFLAGS
+-AC_SUBST(XPM_INCLUDES)
+-AC_SUBST(XPM_LIBS)
+
+ dnl -----------------------------------
+ dnl INCLUDES and LIBS for XAW
+
+-AC_ARG_WITH(Xawincludedir,
+- [AS_HELP_STRING([--with-Xawincludedir=DIR],[use Xaw includes from DIR])],
+- [XAW_INCLUDES="-I$withval"])
+-AC_ARG_WITH(Xawlibdir,
+- [AS_HELP_STRING([--with-Xawlibdir=DIR],[use Xaw libraries from DIR])],
+- [XAW_LIBS="-L$withval"])
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CPPFLAGS="$CPPFLAGS $XAW_INCLUDES $X_CFLAGS"
+@@ -1978,12 +1985,17 @@
+ fi
+ LDFLAGS=$save_LDFLAGS
+ CPPFLAGS=$save_CPPFLAGS
++
++fi
++
++AC_SUBST(XPM_INCLUDES)
++AC_SUBST(XPM_LIBS)
+ AC_SUBST(XAW_INCLUDES)
+ AC_SUBST(XAW_LIBS)
+-AM_CONDITIONAL(WITH_XAW, [test "x$with_xaw" != "xno"])
+-if test "x$with_xaw" = "xno"; then
++AM_CONDITIONAL(WITH_XAW, [test "x$with_xaw" = "xyes"])
++if test "x$with_xaw" != "xyes"; then
+ if test "x$no_x" != "xyes"; then
+- AC_MSG_WARN(Lefty cannot be built)
++ AC_MSG_WARN(Lefty will not be built)
+ fi
+ fi
+
diff --git a/media-gfx/graphviz/files/graphviz-2.28.0-automake-1.11.2.patch b/media-gfx/graphviz/files/graphviz-2.28.0-automake-1.11.2.patch
new file mode 100644
index 000000000000..7b279fccc145
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.28.0-automake-1.11.2.patch
@@ -0,0 +1,33 @@
+Install dir ( buiding with media-libs/ming ):
+ /usr/$(get_libdir)/graphviz/Bitstream_Vera_Serif.fdb
+ /usr/$(get_libdir)/graphviz/Bitstream_Vera_Sans.fdb
+ /usr/include/graphviz/gv.cpp
+ /usr/include/graphviz/gv.i
+
+Due to the following change, {pkglib,pkginclude}_DATA is invalid:
+ http://git.savannah.gnu.org/cgit/automake.git/commit/?id=9ca632642b006ac6b0fc4ce0ae5b34023faa8cbf
+
+---
+--- a/plugin/ming/Makefile.am
++++ b/plugin/ming/Makefile.am
+@@ -17,7 +17,8 @@ lib_LTLIBRARIES = libgvplugin_ming.la
+ else
+ pkglib_LTLIBRARIES = libgvplugin_ming.la
+ endif
+-pkglib_DATA = Bitstream_Vera_Sans.fdb Bitstream_Vera_Serif.fdb
++fdblibdir = $(libdir)/@PACKAGE@
++fdblib_DATA = Bitstream_Vera_Sans.fdb Bitstream_Vera_Serif.fdb
+ endif
+
+ libgvplugin_ming_C_la_SOURCES = \
+--- a/tclpkg/gv/Makefile.am
++++ b/tclpkg/gv/Makefile.am
+@@ -257,7 +257,7 @@ $(TCL_data): gv_tcl.cpp
+ gv_tcl.cpp: gv.i
+ $(SWIG) -c++ -tcl -namespace -o gv_tcl.cpp $(srcdir)/gv.i
+
+-pkginclude_DATA = gv.i gv.cpp
++pkginclude_HEADERS = gv.i gv.cpp
+ pkglib_LTLIBRARIES =
+ man_MANS =
+ DEVTSTS =
diff --git a/media-gfx/graphviz/files/graphviz-2.28.0-dot-pangocairo-link.patch b/media-gfx/graphviz/files/graphviz-2.28.0-dot-pangocairo-link.patch
new file mode 100644
index 000000000000..cf1715cf2ad0
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.28.0-dot-pangocairo-link.patch
@@ -0,0 +1,13 @@
+--- cmd/dot/Makefile.am 2012-05-29 01:00:08.965321443 +0200
++++ cmd/dot/Makefile.am 2012-05-29 01:01:57.471964924 +0200
+@@ -115,8 +115,8 @@
+ endif
+
+ if WITH_PANGOCAIRO
+-dot_static_LDADD += $(top_builddir)/plugin/pango/.libs/libgvplugin_pango_C.a $(PANGOCAIRO_LIBS)
+-dot_builtins_LDADD += $(top_builddir)/plugin/pango/libgvplugin_pango.la $(PANGOCAIRO_LIBS)
++dot_static_LDADD += $(top_builddir)/plugin/pango/.libs/libgvplugin_pango_C.a $(PANGOCAIRO_LIBS) $(PANGOFT2_LIBS)
++dot_builtins_LDADD += $(top_builddir)/plugin/pango/libgvplugin_pango.la $(PANGOCAIRO_LIBS) $(PANGOFT2_LIBS)
+ endif
+
+ EXTRA_DIST = Makefile.old dot.1 dot.1.pdf osage.1 osage.1.pdf patchwork.1 patchwork.1.pdf dot.vcproj
diff --git a/media-gfx/graphviz/files/graphviz-2.34.0-Xaw-configure.patch b/media-gfx/graphviz/files/graphviz-2.34.0-Xaw-configure.patch
new file mode 100644
index 000000000000..ac91d4bd4d46
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.34.0-Xaw-configure.patch
@@ -0,0 +1,81 @@
+--- configure.ac 2011-05-07 05:25:24.000000000 +0200
++++ configure.ac 2011-06-24 13:24:49.000000000 +0200
+@@ -560,8 +560,8 @@
+ use_xlib="Yes"
+ #no x11.pc on centos4
+ # PKG_CHECK_MODULES(X11, [x11])
+- PKG_CHECK_MODULES(XRENDER, [xrender],HAVE_XRENDER="yes" ,HAVE_XRENDER="no")
+ fi
++PKG_CHECK_MODULES(XRENDER, [xrender],HAVE_XRENDER="yes" ,HAVE_XRENDER="no")
+ AM_CONDITIONAL(WITH_X, [test "x$use_xlib" = "xYes"])
+ AM_CONDITIONAL(WITH_XRENDER, [test "x$,HAVE_XRENDER" = "xyes"])
+
+@@ -1924,6 +1924,10 @@
+ # so we set HAVE_LIBXPMFORLEFTY instead of the usual HAVE_LIBXPM
+ #
+
++AC_ARG_WITH(lefty,
++ [AS_HELP_STRING([--with-lefty=yes],[build lefty])],
++ [],[with_xaw=yes])
++
+ AC_ARG_WITH(Xpmincludedir,
+ [AS_HELP_STRING([--with-Xpmincludedir=DIR],[use Xpm includes from DIR])],
+ [XPM_INCLUDES="-I$withval"])
+@@ -1931,6 +1935,17 @@
+ [AS_HELP_STRING([--with-Xpmlibdir=DIR],[use Xpm libraries from DIR])],
+ [XPM_LIBS="-L$withval"])
+
++AC_ARG_WITH(Xawincludedir,
++ [AS_HELP_STRING([--with-Xawincludedir=DIR],[use Xaw includes from DIR])],
++ [XAW_INCLUDES="-I$withval"])
++AC_ARG_WITH(Xawlibdir,
++ [AS_HELP_STRING([--with-Xawlibdir=DIR],[use Xaw libraries from DIR])],
++ [XAW_LIBS="-L$withval"])
++
++if test "x$with_xaw" != "xyes"; then
++ use_lefty="No (disabled)"
++else
++
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CPPFLAGS="$CPPFLAGS $XPM_INCLUDES $X_CFLAGS"
+@@ -1941,18 +1956,10 @@
+ AC_MSG_WARN(Optional Xpm library not available), [-lXmu -lXt -lX11 -lXext $SOCKET_LIBS])
+ LDFLAGS=$save_LDFLAGS
+ CPPFLAGS=$save_CPPFLAGS
+-AC_SUBST([XPM_INCLUDES])
+-AC_SUBST([XPM_LIBS])
+
+ dnl -----------------------------------
+ dnl INCLUDES and LIBS for XAW
+
+-AC_ARG_WITH(Xawincludedir,
+- [AS_HELP_STRING([--with-Xawincludedir=DIR],[use Xaw includes from DIR])],
+- [XAW_INCLUDES="-I$withval"])
+-AC_ARG_WITH(Xawlibdir,
+- [AS_HELP_STRING([--with-Xawlibdir=DIR],[use Xaw libraries from DIR])],
+- [XAW_LIBS="-L$withval"])
+ save_CPPFLAGS=$CPPFLAGS
+ save_LDFLAGS=$LDFLAGS
+ CPPFLAGS="$CPPFLAGS $XAW_INCLUDES $X_CFLAGS"
+@@ -1978,12 +1985,17 @@
+ fi
+ LDFLAGS=$save_LDFLAGS
+ CPPFLAGS=$save_CPPFLAGS
++
++fi
++
++AC_SUBST([XPM_INCLUDES])
++AC_SUBST([XPM_LIBS])
+ AC_SUBST([XAW_INCLUDES])
+ AC_SUBST([XAW_LIBS])
+-AM_CONDITIONAL(WITH_XAW, [test "x$with_xaw" != "xno"])
+-if test "x$with_xaw" = "xno"; then
++AM_CONDITIONAL(WITH_XAW, [test "x$with_xaw" = "xyes"])
++if test "x$with_xaw" != "xyes"; then
+ if test "x$no_x" != "xyes"; then
+- AC_MSG_WARN(Lefty cannot be built)
++ AC_MSG_WARN(Lefty will not be built)
+ fi
+ fi
+
diff --git a/media-gfx/graphviz/files/graphviz-2.34.0-dot-pangocairo-link.patch b/media-gfx/graphviz/files/graphviz-2.34.0-dot-pangocairo-link.patch
new file mode 100644
index 000000000000..143beabe5058
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.34.0-dot-pangocairo-link.patch
@@ -0,0 +1,17 @@
+--- cmd/dot/Makefile.am 2013-01-14 04:11:21.000000000 +0100
++++ cmd/dot/Makefile.am 2013-02-01 17:19:30.893949329 +0100
+@@ -115,12 +115,8 @@
+ dot_static_LDADD += $(top_builddir)/plugin/webp/.libs/libgvplugin_webp_C.a $(WEBP_LIBS)
+ dot_builtins_LDADD += $(top_builddir)/plugin/webp/libgvplugin_webp.la $(WEBP_LIBS)
+ endif
+-dot_static_LDADD += $(top_builddir)/plugin/pango/.libs/libgvplugin_pango_C.a $(PANGOCAIRO_LIBS)
+-dot_builtins_LDADD += $(top_builddir)/plugin/pango/libgvplugin_pango.la $(PANGOCAIRO_LIBS)
+-if WITH_WEBP
+-dot_static_LDADD += $(top_builddir)/plugin/webp/.libs/libgvplugin_webp_C.a $(WEBP_LIBS)
+-dot_builtins_LDADD += $(top_builddir)/plugin/webp/libgvplugin_webp.la $(WEBP_LIBS)
+-endif
++dot_static_LDADD += $(top_builddir)/plugin/pango/.libs/libgvplugin_pango_C.a $(PANGOCAIRO_LIBS) $(PANGOFT2_LIBS)
++dot_builtins_LDADD += $(top_builddir)/plugin/pango/libgvplugin_pango.la $(PANGOCAIRO_LIBS) $(PANGOFT2_LIBS)
+ endif
+
+ if WITH_LASI
diff --git a/media-gfx/graphviz/files/graphviz-2.38-fix-backslashes.patch b/media-gfx/graphviz/files/graphviz-2.38-fix-backslashes.patch
new file mode 100644
index 000000000000..b4e911de6a94
--- /dev/null
+++ b/media-gfx/graphviz/files/graphviz-2.38-fix-backslashes.patch
@@ -0,0 +1,34 @@
+User reported a regression between 2.26 and 2.36
+when trying to .dot the following graph:
+
+ digraph g {
+ 1 -> 2 [label="\\"]
+ }
+
+2.26 shows it as '\' while 2.36 fails as:
+ $ dot -Tpng a.dot -o a.png
+ Warning: 1.dot: syntax error in line 2 near ''
+
+Thanks to Ulya Trofimovich who found and bisected
+the problem down to this commit, which fixes problem
+only in git version.
+
+commit 386e47c14b3a8e83bdf3ec8772963213095a7294
+Author: Emden R. Gansner <erg@alum.mit.edu>
+Date: Thu Jan 30 08:45:06 2014 -0500
+
+ Remove change made in d19b672a3c06f0ae95b1da38b63b068f71eb266f until we can
+ remember why this change was made.
+
+diff --git a/lib/cgraph/scan.l b/lib/cgraph/scan.l
+index 0a31f0c..5bb30b7 100644
+--- a/lib/cgraph/scan.l
++++ b/lib/cgraph/scan.l
+@@ -199,6 +199,7 @@ ID ({NAME}|{NUMBER})
+ ["] BEGIN(qstring); beginstr();
+ <qstring>["] BEGIN(INITIAL); endstr(); return (T_qatom);
+ <qstring>[\\]["] addstr ("\"");
++<qstring>[\\][\\] addstr ("\\\\");
+ <qstring>[\\][\n] line_num++; /* ignore escaped newlines */
+ <qstring>([^"\\]*|[\\]) addstr(yytext);
+ [<] BEGIN(hstring); html_nest = 1; beginstr();
diff --git a/media-gfx/graphviz/graphviz-2.26.3-r4.ebuild b/media-gfx/graphviz/graphviz-2.26.3-r4.ebuild
new file mode 100644
index 000000000000..e6af5ad6ac1e
--- /dev/null
+++ b/media-gfx/graphviz/graphviz-2.26.3-r4.ebuild
@@ -0,0 +1,224 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+PYTHON_DEPEND="python? 2"
+
+inherit eutils autotools multilib python flag-o-matic
+
+DESCRIPTION="Open Source Graph Visualization Software"
+HOMEPAGE="http://www.graphviz.org/"
+SRC_URI="http://www.graphviz.org/pub/graphviz/ARCHIVE/${P}.tar.gz"
+
+LICENSE="CPL-1.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
+IUSE="cairo doc examples gtk java lasi nls perl python ruby static-libs tcl elibc_FreeBSD"
+
+# Requires ksh
+RESTRICT="test"
+
+RDEPEND="
+ >=dev-libs/expat-2.0.0
+ >=dev-libs/glib-2.11.1
+ >=media-libs/fontconfig-2.3.95
+ >=media-libs/freetype-2.1.10
+ >=media-libs/gd-2.0.28[fontconfig,jpeg,png,truetype,zlib]
+ >=media-libs/libpng-1.4
+ virtual/jpeg:0
+ virtual/libiconv
+ cairo? (
+ x11-libs/libXaw
+ >=x11-libs/pango-1.12
+ >=x11-libs/cairo-1.1.10[svg]
+ )
+ gtk? (
+ x11-libs/gtk+:2
+ x11-libs/libXaw
+ >=x11-libs/pango-1.12
+ >=x11-libs/cairo-1.1.10
+ )
+ lasi? ( media-libs/lasi )
+ perl? ( dev-lang/perl )
+ ruby? ( dev-lang/ruby )
+ tcl? ( >=dev-lang/tcl-8.3:0 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ java? ( dev-lang/swig )
+ nls? ( >=sys-devel/gettext-0.14.5 )
+ perl? ( dev-lang/swig )
+ python? ( dev-lang/swig )
+ ruby? ( dev-lang/swig )
+ tcl? ( dev-lang/swig )"
+
+# Dependency description / Maintainer-Info:
+
+# Rendering is done via the following plugins (/plugins):
+# - core, dot_layout, neato_layout, gd , dot
+# the ones which are always compiled in, depend on zlib, gd
+# - gtk
+# Directly depends on gtk-2.
+# gtk-2 depends on pango, cairo and libX11 directly.
+# - gdk-pixbuf
+# Disabled, GTK-1 junk.
+# - ming
+# flash plugin via -Tswf requires media-libs/ming-0.4. Disabled as it's
+# incomplete.
+# - cairo:
+# Needs pango for text layout, uses cairo methods to draw stuff
+# - xlib :
+# needs cairo+pango,
+# can make use of gnomeui and inotify support,
+# needs libXaw for UI
+
+# There can be swig-generated bindings for the following languages (/tclpkg/gv):
+# - c-sharp (disabled)
+# - scheme (enabled via guile) ... broken on ~x86
+# - io (disabled)
+# - java (enabled via java) *2
+# - lua (enabled via lua)
+# - ocaml (enabled via ocaml)
+# - perl (enabled via perl) *1
+# - php (enabled via php) *2
+# - python (enabled via python) *1
+# - ruby (enabled via ruby) *1
+# - tcl (enabled via tcl)
+# *1 = The ${P}-bindings.patch takes care that those bindings are installed to the right location
+# *2 = Those bindings don't build because the paths for the headers/libs aren't
+# detected correctly and/or the options passed to swig are wrong (-php instead of -php4/5)
+
+# There are several other tools in /tclpkg:
+# gdtclft, tcldot, tclhandle, tclpathplan, tclstubs ; enabled with: --with-tcl
+# tkspline, tkstubs ; enabled with: --with-tk
+
+# And the commands (/cmd):
+# - dot, dotty, gvpr, lefty, lneato, tools/* :)
+# Lefty needs Xaw and X to build
+
+pkg_setup() {
+ if use python; then
+ python_set_active_version 2
+ python_pkg_setup
+ fi
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-libtool.patch \
+ "${FILESDIR}"/${P}-libtool-configure.patch \
+ "${FILESDIR}"/${P}-automake-1.11.2.patch
+
+ # ToDo: Do the same thing for examples and/or
+ # write a patch for a configuration-option
+ # and send it to upstream
+ if ! use doc ; then
+ find . -iname Makefile.am \
+ | xargs sed -i -e '/html_DATA/d' -e '/pdf_DATA/d' || die
+ fi
+
+ # This is an old version of libtool
+ # use the ./configure option to exclude its use, and
+ # delete the dir since we don't need to eautoreconf it
+ rm -rf libltdl
+
+ # no nls, no gettext, no iconv macro, so disable it
+ use nls || { sed -i -e '/^AM_ICONV/d' configure.ac || die; }
+
+ # Nuke the dead symlinks for the bindings
+ sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die
+
+ # replace the whitespace with tabs
+ sed -i -e 's: :\t:g' doc/info/Makefile.am || die
+
+ # workaround for http://www.graphviz.org/mantisbt/view.php?id=1895
+ use elibc_FreeBSD && append-flags $(test-flags -fno-builtin-sincos)
+
+ eautoreconf
+}
+
+src_configure() {
+ # libtool file collision, bug 276609
+ local myconf="--without-included-ltdl --disable-ltdl-install"
+
+ # Core functionality:
+ # All of X, cairo-output, gtk need the pango+cairo functionality
+ if use gtk || use cairo; then
+ myconf="${myconf} --with-x"
+ else
+ myconf="${myconf} --without-x"
+ fi
+ myconf="${myconf}
+ $(use_with cairo pangocairo)
+ $(use_with gtk)
+ $(use_with lasi)
+ --with-digcola
+ --with-fontconfig
+ --with-freetype2
+ --with-ipsepcola
+ --with-libgd
+ --with-sfdp
+ --without-gdk-pixbuf
+ --without-ming"
+
+ # new/experimental features, to be tested, disable for now
+ myconf="${myconf}
+ --without-cgraph
+ --without-devil
+ --without-digcola
+ --without-ipsepcola
+ --without-rsvg
+ --without-smyrna"
+
+ # Bindings:
+ myconf="${myconf}
+ --disable-guile
+ --disable-io
+ $(use_enable java)
+ --disable-lua
+ --disable-ocaml
+ $(use_enable perl)
+ --disable-php
+ $(use_enable python)
+ --disable-r
+ $(use_enable ruby)
+ --disable-sharp
+ $(use_enable tcl)"
+
+ econf \
+ --enable-ltdl \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_install() {
+ sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die
+
+ emake DESTDIR="${D}" \
+ txtdir="${EPREFIX}"/usr/share/doc/${PF} \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \
+ pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
+ pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
+ install || die "emake install failed"
+
+ use examples || rm -rf "${D}/usr/share/graphviz/demo"
+
+ if ! use static-libs; then
+ find "${ED}"/usr/$(get_libdir)/ -name '*.la' -delete || die
+ fi
+
+ dodoc AUTHORS ChangeLog NEWS README
+}
+
+pkg_postinst() {
+ # This actually works if --enable-ltdl is passed
+ # to configure
+ dot -c
+ use python && python_mod_optimize gv.py
+}
+
+pkg_postrm() {
+ use python && python_mod_cleanup gv.py
+}
diff --git a/media-gfx/graphviz/graphviz-2.28.0.ebuild b/media-gfx/graphviz/graphviz-2.28.0.ebuild
new file mode 100644
index 000000000000..b702ab3f359f
--- /dev/null
+++ b/media-gfx/graphviz/graphviz-2.28.0.ebuild
@@ -0,0 +1,255 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils flag-o-matic multilib python-single-r1
+
+DESCRIPTION="Open Source Graph Visualization Software"
+HOMEPAGE="http://www.graphviz.org/"
+SRC_URI="http://www.graphviz.org/pub/graphviz/ARCHIVE/${P}.tar.gz"
+
+LICENSE="CPL-1.0"
+SLOT="0"
+#original KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="+cairo devil doc examples gtk gts java lasi nls perl postscript python qt4 ruby svg static-libs tcl X elibc_FreeBSD"
+
+# Requires ksh
+RESTRICT="test"
+
+RDEPEND="
+ sys-libs/zlib
+ >=dev-libs/expat-2
+ >=dev-libs/glib-2.11.1
+ >=media-libs/fontconfig-2.3.95
+ >=media-libs/freetype-2.1.10
+ >=media-libs/gd-2.0.34[fontconfig,jpeg,png,truetype,zlib]
+ >=media-libs/libpng-1.2:0
+ !<=sci-chemistry/cluster-1.3.081231
+ virtual/jpeg:0
+ virtual/libiconv
+ X? (
+ x11-libs/libXaw
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXpm
+ x11-libs/libXt
+ )
+ cairo? (
+ >=x11-libs/pango-1.12
+ >=x11-libs/cairo-1.1.10[svg]
+ )
+ devil? ( media-libs/devil[png,jpeg] )
+ postscript? ( app-text/ghostscript-gpl )
+ gtk? ( x11-libs/gtk+:2 )
+ gts? ( sci-libs/gts )
+ lasi? ( media-libs/lasi )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ ruby? ( dev-lang/ruby )
+ svg? ( gnome-base/librsvg )
+ tcl? ( >=dev-lang/tcl-8.3:0= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ java? ( dev-lang/swig )
+ nls? ( >=sys-devel/gettext-0.14.5 )
+ perl? ( dev-lang/swig )
+ python? (
+ dev-lang/swig
+ ${PYTHON_DEPS}
+ )
+ ruby? ( dev-lang/swig )
+ tcl? ( dev-lang/swig )"
+REQUIRED_USE="
+ !cairo? ( !X !gtk !postscript !lasi )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Dependency description / Maintainer-Info:
+
+# Rendering is done via the following plugins (/plugins):
+# - core, dot_layout, neato_layout, gd , dot
+# the ones which are always compiled in, depend on zlib, gd
+# - gtk
+# Directly depends on gtk-2.
+# needs 'pangocairo' enabled in graphviz configuration
+# gtk-2 depends on pango, cairo and libX11 directly.
+# - gdk-pixbuf
+# Disabled, GTK-1 junk.
+# - glitz
+# Disabled, no particular reason
+# needs 'pangocairo' enabled in graphviz configuration
+# - ming
+# flash plugin via -Tswf requires media-libs/ming-0.4. Disabled as it's
+# incomplete.
+# - cairo/pango:
+# Needs pango for text layout, uses cairo methods to draw stuff
+# - xlib:
+# needs cairo+pango,
+# can make use of gnomeui and inotify support (??? unsure),
+# needs libXaw for UI
+# UI also links directly against libX11, libXmu, and libXt
+# and uses libXpm if available so we make sure it always is
+
+# There can be swig-generated bindings for the following languages (/tclpkg/gv):
+# - c-sharp (disabled)
+# - scheme (enabled via guile) ... broken on ~x86
+# - io (disabled)
+# - java (enabled via java) *2
+# - lua (enabled via lua)
+# - ocaml (enabled via ocaml)
+# - perl (enabled via perl) *1
+# - php (enabled via php) *2
+# - python (enabled via python) *1
+# - ruby (enabled via ruby) *1
+# - tcl (enabled via tcl)
+# *1 = The ${P}-bindings.patch takes care that those bindings are installed to the right location
+# *2 = Those bindings don't build because the paths for the headers/libs aren't
+# detected correctly and/or the options passed to swig are wrong (-php instead of -php4/5)
+
+# There are several other tools in /tclpkg:
+# gdtclft, tcldot, tclhandle, tclpathplan, tclstubs ; enabled with: --with-tcl
+# tkspline, tkstubs ; enabled with: --with-tk
+
+# And the commands (/cmd):
+# - dot, dotty, gvedit, gvpr, lefty, lneato, smyrna, tools/* :)
+# sci-libs/gts can be used for some of these
+# - lefty:
+# needs Xaw and X to build
+# - gvedit (via 'qt4'):
+# based on ./configure it needs qt-core and qt-gui only
+# - smyrna : experimental opengl front-end (via 'smyrna')
+# currently disabled -- it segfaults a lot
+# needs x11-libs/gtkglext, gnome-base/libglade, media-libs/freeglut
+# sci-libs/gts, x11-libs/gtk. Also needs 'gtk','glade','glut','gts' and 'png'
+# with flags enabled at configure time
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-Xaw-configure.patch \
+ "${FILESDIR}"/${P}-automake-1.11.2.patch \
+ "${FILESDIR}"/${P}-dot-pangocairo-link.patch
+
+ # ToDo: Do the same thing for examples and/or
+ # write a patch for a configuration-option
+ # and send it to upstream
+ # note - the longer sed expression removes multi-line assignments that are extended via '\'
+ if ! use doc ; then
+ find . -iname Makefile.am \
+ | xargs sed -i -e '/^\(html\|pdf\)_DATA.*\\[[:space:]]*$/{:m;N;s/\\\n//;tm;d}' \
+ -e '/^\(html\|pdf\)_DATA/d' || die
+ fi
+
+ # This is an old version of libtool
+ # use the ./configure option to exclude its use, and
+ # delete the dir since we don't need to eautoreconf it
+ rm -rf libltdl
+
+ # no nls, no gettext, no iconv macro, so disable it
+ use nls || { sed -i -e '/^AM_ICONV/d' configure.ac || die; }
+
+ # Nuke the dead symlinks for the bindings
+ sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die
+
+ # replace the whitespace with tabs
+ sed -i -e 's: :\t:g' doc/info/Makefile.am || die
+
+ # workaround for http://www.graphviz.org/mantisbt/view.php?id=1895
+ use elibc_FreeBSD && append-flags $(test-flags -fno-builtin-sincos)
+
+ eautoreconf
+}
+
+src_configure() {
+ # libtool file collision, bug 276609
+ local myconf="--without-included-ltdl --disable-ltdl-install"
+
+ myconf="${myconf}
+ $(use_with cairo pangocairo)
+ $(use_with devil)
+ $(use_with gtk)
+ $(use_with gts)
+ $(use_with qt4)
+ $(use_with lasi)
+ $(use_with svg rsvg)
+ $(use_with X x)
+ $(use_with X xaw)
+ $(use_with X lefty)
+ --with-digcola
+ --with-fontconfig
+ --with-freetype2
+ --with-ipsepcola
+ --with-libgd
+ --with-sfdp
+ --without-gdk-pixbuf
+ --without-ming"
+
+ # new/experimental features, to be tested, disable for now
+ myconf="${myconf}
+ --without-cgraph
+ --without-glitz
+ --without-ipsepcola
+ --without-smyrna
+ --without-visio"
+
+ # Bindings:
+ myconf="${myconf}
+ --disable-guile
+ --disable-io
+ $(use_enable java)
+ --disable-lua
+ --disable-ocaml
+ $(use_enable perl)
+ --disable-php
+ $(use_enable python)
+ --disable-r
+ $(use_enable ruby)
+ --disable-sharp
+ $(use_enable tcl)"
+
+ econf \
+ --enable-ltdl \
+ --disable-silent-rules \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_install() {
+ sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die
+
+ emake DESTDIR="${D}" \
+ txtdir="${EPREFIX}"/usr/share/doc/${PF} \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \
+ pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
+ pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
+ install
+
+ use examples || rm -rf "${ED}"/usr/share/graphviz/demo
+
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ use python && python_optimize \
+ "${D}$(python_get_sitedir)" \
+ "${D}/usr/$(get_libdir)/graphviz/python"
+}
+
+pkg_postinst() {
+ # This actually works if --enable-ltdl is passed
+ # to configure
+ dot -c
+}
diff --git a/media-gfx/graphviz/graphviz-2.34.0.ebuild b/media-gfx/graphviz/graphviz-2.34.0.ebuild
new file mode 100644
index 000000000000..58440493bce4
--- /dev/null
+++ b/media-gfx/graphviz/graphviz-2.34.0.ebuild
@@ -0,0 +1,260 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils flag-o-matic java-pkg-opt-2 multilib python-single-r1
+
+DESCRIPTION="Open Source Graph Visualization Software"
+HOMEPAGE="http://www.graphviz.org/"
+SRC_URI="http://www.graphviz.org/pub/graphviz/stable/SOURCES/${P}.tar.gz"
+
+LICENSE="CPL-1.0"
+SLOT="0"
+#original KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="+cairo devil doc examples gdk-pixbuf gtk gts guile java lasi nls pdf perl postscript python qt4 ruby svg static-libs tcl X elibc_FreeBSD"
+
+# Requires ksh
+RESTRICT="test"
+
+RDEPEND="
+ sys-libs/zlib
+ >=dev-libs/expat-2
+ >=dev-libs/glib-2.11.1
+ >=media-libs/fontconfig-2.3.95
+ >=media-libs/freetype-2.1.10
+ >=media-libs/gd-2.0.34[fontconfig,jpeg,png,truetype,zlib]
+ >=media-libs/libpng-1.2:0
+ !<=sci-chemistry/cluster-1.3.081231
+ virtual/jpeg:0
+ virtual/libiconv
+ X? (
+ x11-libs/libXaw
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXpm
+ x11-libs/libXt
+ )
+ cairo? (
+ >=x11-libs/pango-1.12
+ >=x11-libs/cairo-1.1.10[svg]
+ )
+ devil? ( media-libs/devil[png,jpeg] )
+ postscript? ( app-text/ghostscript-gpl )
+ gtk? ( x11-libs/gtk+:2 )
+ gts? ( sci-libs/gts )
+ lasi? ( media-libs/lasi )
+ pdf? ( app-text/poppler )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ ruby? ( dev-lang/ruby )
+ svg? ( gnome-base/librsvg )
+ tcl? ( >=dev-lang/tcl-8.3:0= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ guile? ( dev-scheme/guile dev-lang/swig )
+ java? ( >=virtual/jdk-1.5 dev-lang/swig )
+ nls? ( >=sys-devel/gettext-0.14.5 )
+ perl? ( dev-lang/swig )
+ python? (
+ dev-lang/swig
+ ${PYTHON_DEPS}
+ )
+ ruby? ( dev-lang/swig )
+ tcl? ( dev-lang/swig )"
+REQUIRED_USE="
+ !cairo? ( !X !gtk !postscript !lasi )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Dependency description / Maintainer-Info:
+
+# Rendering is done via the following plugins (/plugins):
+# - core, dot_layout, neato_layout, gd , dot
+# the ones which are always compiled in, depend on zlib, gd
+# - gtk
+# Directly depends on gtk-2.
+# needs 'pangocairo' enabled in graphviz configuration
+# gtk-2 depends on pango, cairo and libX11 directly.
+# - gdk-pixbuf
+# Disabled, GTK-1 junk.
+# - glitz
+# Disabled, no particular reason
+# needs 'pangocairo' enabled in graphviz configuration
+# - ming
+# flash plugin via -Tswf requires media-libs/ming-0.4. Disabled as it's
+# incomplete.
+# - cairo/pango:
+# Needs pango for text layout, uses cairo methods to draw stuff
+# - xlib:
+# needs cairo+pango,
+# can make use of gnomeui and inotify support (??? unsure),
+# needs libXaw for UI
+# UI also links directly against libX11, libXmu, and libXt
+# and uses libXpm if available so we make sure it always is
+
+# There can be swig-generated bindings for the following languages (/tclpkg/gv):
+# - c-sharp (disabled)
+# - scheme (enabled via guile) ... no longer broken on ~x86
+# - io (disabled)
+# - java (enabled via java) *2
+# - lua (enabled via lua)
+# - ocaml (enabled via ocaml)
+# - perl (enabled via perl) *1
+# - php (enabled via php) *2
+# - python (enabled via python) *1
+# - ruby (enabled via ruby) *1
+# - tcl (enabled via tcl)
+# *1 = The ${P}-bindings.patch takes care that those bindings are installed to the right location
+# *2 = Those bindings don't build because the paths for the headers/libs aren't
+# detected correctly and/or the options passed to swig are wrong (-php instead of -php4/5)
+
+# There are several other tools in /tclpkg:
+# gdtclft, tcldot, tclhandle, tclpathplan, tclstubs ; enabled with: --with-tcl
+# tkspline, tkstubs ; enabled with: --with-tk
+
+# And the commands (/cmd):
+# - dot, dotty, gvedit, gvpr, lefty, lneato, smyrna, tools/* :)
+# sci-libs/gts can be used for some of these
+# - lefty:
+# needs Xaw and X to build
+# - gvedit (via 'qt4'):
+# based on ./configure it needs qt-core and qt-gui only
+# - smyrna : experimental opengl front-end (via 'smyrna')
+# currently disabled -- it segfaults a lot
+# needs x11-libs/gtkglext, gnome-base/libglade, media-libs/freeglut
+# sci-libs/gts, x11-libs/gtk. Also needs 'gtk','glade','glut','gts' and 'png'
+# with flags enabled at configure time
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-Xaw-configure.patch \
+ "${FILESDIR}"/${P}-dot-pangocairo-link.patch
+
+ # ToDo: Do the same thing for examples and/or
+ # write a patch for a configuration-option
+ # and send it to upstream
+ # note - the longer sed expression removes multi-line assignments that are extended via '\'
+ if ! use doc ; then
+ find . -iname Makefile.am \
+ | xargs sed -i -e '/^\(html\|pdf\)_DATA.*\\[[:space:]]*$/{:m;N;s/\\\n//;tm;d}' \
+ -e '/^\(html\|pdf\)_DATA/d' || die
+ fi
+
+ # This is an old version of libtool
+ # use the ./configure option to exclude its use, and
+ # delete the dir since we don't need to eautoreconf it
+ rm -rf libltdl
+
+ # no nls, no gettext, no iconv macro, so disable it
+ use nls || { sed -i -e '/^AM_ICONV/d' configure.ac || die; }
+
+ # Nuke the dead symlinks for the bindings
+ sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die
+
+ # replace the whitespace with tabs
+ sed -i -e 's: :\t:g' doc/info/Makefile.am || die
+
+ # workaround for http://www.graphviz.org/mantisbt/view.php?id=1895
+ use elibc_FreeBSD && append-flags $(test-flags -fno-builtin-sincos)
+
+ use java && append-cppflags $(java-pkg_get-jni-cflags)
+
+ eautoreconf
+}
+
+src_configure() {
+ # libtool file collision, bug 276609
+ local myconf="--without-included-ltdl --disable-ltdl-install"
+
+ myconf="${myconf}
+ $(use_with cairo pangocairo)
+ $(use_with devil)
+ $(use_with gtk)
+ $(use_with gts)
+ $(use_with qt4)
+ $(use_with lasi)
+ $(use_with svg rsvg)
+ $(use_with X x)
+ $(use_with X xaw)
+ $(use_with X lefty)
+ --with-digcola
+ --with-fontconfig
+ --with-freetype2
+ --with-ipsepcola
+ --with-libgd
+ --with-sfdp
+ $(use_enable gdk-pixbuf)
+ --without-ming"
+
+ # new/experimental features, to be tested, disable for now
+ myconf="${myconf}
+ --with-cgraph
+ --without-glitz
+ --without-ipsepcola
+ --without-smyrna
+ --without-visio"
+
+ # Bindings:
+ myconf="${myconf}
+ $(use_enable guile)
+ --disable-io
+ $(use_enable java)
+ --disable-lua
+ --disable-ocaml
+ $(use_enable perl)
+ --disable-php
+ $(use_enable python)
+ --disable-r
+ $(use_enable ruby)
+ --disable-sharp
+ $(use_enable tcl)"
+
+ econf \
+ --enable-ltdl \
+ --disable-silent-rules \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_install() {
+ sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die
+
+ emake DESTDIR="${D}" \
+ txtdir="${EPREFIX}"/usr/share/doc/${PF} \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \
+ pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
+ pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
+ install
+
+ use examples || rm -rf "${ED}"/usr/share/graphviz/demo
+
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ use python && python_optimize \
+ "${D}$(python_get_sitedir)" \
+ "${D}/usr/$(get_libdir)/graphviz/python"
+}
+
+pkg_postinst() {
+ # This actually works if --enable-ltdl is passed
+ # to configure
+ dot -c
+}
diff --git a/media-gfx/graphviz/graphviz-2.36.0-r1.ebuild b/media-gfx/graphviz/graphviz-2.36.0-r1.ebuild
new file mode 100644
index 000000000000..b29219c32670
--- /dev/null
+++ b/media-gfx/graphviz/graphviz-2.36.0-r1.ebuild
@@ -0,0 +1,259 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils flag-o-matic java-pkg-opt-2 multilib python-single-r1
+
+DESCRIPTION="Open Source Graph Visualization Software"
+HOMEPAGE="http://www.graphviz.org/"
+SRC_URI="http://www.graphviz.org/pub/graphviz/stable/SOURCES/${P}.tar.gz"
+
+LICENSE="CPL-1.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="+cairo devil doc examples gdk-pixbuf gtk gts guile java lasi nls pdf perl postscript python qt4 ruby svg static-libs tcl X elibc_FreeBSD"
+
+# Requires ksh
+RESTRICT="test"
+
+RDEPEND="
+ sys-libs/zlib
+ >=dev-libs/expat-2
+ >=dev-libs/glib-2.11.1
+ >=media-libs/fontconfig-2.3.95
+ >=media-libs/freetype-2.1.10
+ >=media-libs/gd-2.0.34[fontconfig,jpeg,png,truetype,zlib]
+ >=media-libs/libpng-1.2:0
+ !<=sci-chemistry/cluster-1.3.081231
+ sys-devel/libtool
+ virtual/jpeg:0
+ virtual/libiconv
+ X? (
+ x11-libs/libXaw
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXpm
+ x11-libs/libXt
+ )
+ cairo? (
+ >=x11-libs/pango-1.12
+ >=x11-libs/cairo-1.1.10[svg]
+ )
+ devil? ( media-libs/devil[png,jpeg] )
+ postscript? ( app-text/ghostscript-gpl )
+ gtk? ( x11-libs/gtk+:2 )
+ gts? ( sci-libs/gts )
+ lasi? ( media-libs/lasi )
+ pdf? ( app-text/poppler )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ ruby? ( dev-lang/ruby )
+ svg? ( gnome-base/librsvg )
+ tcl? ( >=dev-lang/tcl-8.3:0= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ guile? ( dev-scheme/guile dev-lang/swig )
+ java? ( >=virtual/jdk-1.5 dev-lang/swig )
+ nls? ( >=sys-devel/gettext-0.14.5 )
+ perl? ( dev-lang/swig )
+ python? ( dev-lang/swig )
+ ruby? ( dev-lang/swig )
+ tcl? ( dev-lang/swig )"
+REQUIRED_USE="
+ !cairo? ( !X !gtk !postscript !lasi )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Dependency description / Maintainer-Info:
+
+# Rendering is done via the following plugins (/plugins):
+# - core, dot_layout, neato_layout, gd , dot
+# the ones which are always compiled in, depend on zlib, gd
+# - gtk
+# Directly depends on gtk-2.
+# needs 'pangocairo' enabled in graphviz configuration
+# gtk-2 depends on pango, cairo and libX11 directly.
+# - gdk-pixbuf
+# Disabled, GTK-1 junk.
+# - glitz
+# Disabled, no particular reason
+# needs 'pangocairo' enabled in graphviz configuration
+# - ming
+# flash plugin via -Tswf requires media-libs/ming-0.4. Disabled as it's
+# incomplete.
+# - cairo/pango:
+# Needs pango for text layout, uses cairo methods to draw stuff
+# - xlib:
+# needs cairo+pango,
+# can make use of gnomeui and inotify support (??? unsure),
+# needs libXaw for UI
+# UI also links directly against libX11, libXmu, and libXt
+# and uses libXpm if available so we make sure it always is
+
+# There can be swig-generated bindings for the following languages (/tclpkg/gv):
+# - c-sharp (disabled)
+# - scheme (enabled via guile) ... no longer broken on ~x86
+# - io (disabled)
+# - java (enabled via java) *2
+# - lua (enabled via lua)
+# - ocaml (enabled via ocaml)
+# - perl (enabled via perl) *1
+# - php (enabled via php) *2
+# - python (enabled via python) *1
+# - ruby (enabled via ruby) *1
+# - tcl (enabled via tcl)
+# *1 = The ${P}-bindings.patch takes care that those bindings are installed to the right location
+# *2 = Those bindings don't build because the paths for the headers/libs aren't
+# detected correctly and/or the options passed to swig are wrong (-php instead of -php4/5)
+
+# There are several other tools in /tclpkg:
+# gdtclft, tcldot, tclhandle, tclpathplan, tclstubs ; enabled with: --with-tcl
+# tkspline, tkstubs ; enabled with: --with-tk
+
+# And the commands (/cmd):
+# - dot, dotty, gvedit, gvpr, lefty, lneato, smyrna, tools/* :)
+# sci-libs/gts can be used for some of these
+# - lefty:
+# needs Xaw and X to build
+# - gvedit (via 'qt4'):
+# based on ./configure it needs qt-core and qt-gui only
+# - smyrna : experimental opengl front-end (via 'smyrna')
+# currently disabled -- it segfaults a lot
+# needs x11-libs/gtkglext, gnome-base/libglade, media-libs/freeglut
+# sci-libs/gts, x11-libs/gtk. Also needs 'gtk','glade','glut','gts' and 'png'
+# with flags enabled at configure time
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-2.34.0-Xaw-configure.patch \
+ "${FILESDIR}"/${PN}-2.34.0-dot-pangocairo-link.patch
+
+ epatch \
+ "${FILESDIR}"/${PN}-2.38-fix-backslashes.patch
+
+ # ToDo: Do the same thing for examples and/or
+ # write a patch for a configuration-option
+ # and send it to upstream
+ # note - the longer sed expression removes multi-line assignments that are extended via '\'
+ if ! use doc ; then
+ find . -iname Makefile.am \
+ | xargs sed -i -e '/^\(html\|pdf\)_DATA.*\\[[:space:]]*$/{:m;N;s/\\\n//;tm;d}' \
+ -e '/^\(html\|pdf\)_DATA/d' || die
+ fi
+
+ # This is an old version of libtool
+ # use the ./configure option to exclude its use, and
+ # delete the dir since we don't need to eautoreconf it
+ rm -rf libltdl
+
+ # no nls, no gettext, no iconv macro, so disable it
+ use nls || { sed -i -e '/^AM_ICONV/d' configure.ac || die; }
+
+ # Nuke the dead symlinks for the bindings
+ sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die
+
+ # replace the whitespace with tabs
+ sed -i -e 's: :\t:g' doc/info/Makefile.am || die
+
+ # workaround for http://www.graphviz.org/mantisbt/view.php?id=1895
+ use elibc_FreeBSD && append-flags $(test-flags -fno-builtin-sincos)
+
+ use java && append-cppflags $(java-pkg_get-jni-cflags)
+
+ eautoreconf
+}
+
+src_configure() {
+ # libtool file collision, bug 276609
+ local myconf="--without-included-ltdl --disable-ltdl-install"
+
+ myconf="${myconf}
+ $(use_with cairo pangocairo)
+ $(use_with devil)
+ $(use_with gtk)
+ $(use_with gts)
+ $(use_with qt4)
+ $(use_with lasi)
+ $(use_with svg rsvg)
+ $(use_with X x)
+ $(use_with X xaw)
+ $(use_with X lefty)
+ --with-digcola
+ --with-fontconfig
+ --with-freetype2
+ --with-ipsepcola
+ --with-libgd
+ --with-sfdp
+ $(use_enable gdk-pixbuf)
+ --without-ming"
+
+ # new/experimental features, to be tested, disable for now
+ myconf="${myconf}
+ --with-cgraph
+ --without-glitz
+ --without-ipsepcola
+ --without-smyrna
+ --without-visio"
+
+ # Bindings:
+ myconf="${myconf}
+ $(use_enable guile)
+ --disable-io
+ $(use_enable java)
+ --disable-lua
+ --disable-ocaml
+ $(use_enable perl)
+ --disable-php
+ $(use_enable python)
+ --disable-r
+ $(use_enable ruby)
+ --disable-sharp
+ $(use_enable tcl)"
+
+ econf \
+ --enable-ltdl \
+ --disable-silent-rules \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_install() {
+ sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die
+
+ emake DESTDIR="${D}" \
+ txtdir="${EPREFIX}"/usr/share/doc/${PF} \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \
+ pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
+ pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
+ install
+
+ use examples || rm -rf "${ED}"/usr/share/graphviz/demo
+
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ use python && python_optimize \
+ "${D}$(python_get_sitedir)" \
+ "${D}/usr/$(get_libdir)/graphviz/python"
+}
+
+pkg_postinst() {
+ # This actually works if --enable-ltdl is passed
+ # to configure
+ dot -c
+}
diff --git a/media-gfx/graphviz/graphviz-2.36.0.ebuild b/media-gfx/graphviz/graphviz-2.36.0.ebuild
new file mode 100644
index 000000000000..19ce277aa44b
--- /dev/null
+++ b/media-gfx/graphviz/graphviz-2.36.0.ebuild
@@ -0,0 +1,256 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils flag-o-matic java-pkg-opt-2 multilib python-single-r1
+
+DESCRIPTION="Open Source Graph Visualization Software"
+HOMEPAGE="http://www.graphviz.org/"
+SRC_URI="http://www.graphviz.org/pub/graphviz/stable/SOURCES/${P}.tar.gz"
+
+LICENSE="CPL-1.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="+cairo devil doc examples gdk-pixbuf gtk gts guile java lasi nls pdf perl postscript python qt4 ruby svg static-libs tcl X elibc_FreeBSD"
+
+# Requires ksh
+RESTRICT="test"
+
+RDEPEND="
+ sys-libs/zlib
+ >=dev-libs/expat-2
+ >=dev-libs/glib-2.11.1
+ >=media-libs/fontconfig-2.3.95
+ >=media-libs/freetype-2.1.10
+ >=media-libs/gd-2.0.34[fontconfig,jpeg,png,truetype,zlib]
+ >=media-libs/libpng-1.2:0
+ !<=sci-chemistry/cluster-1.3.081231
+ sys-devel/libtool
+ virtual/jpeg:0
+ virtual/libiconv
+ X? (
+ x11-libs/libXaw
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXpm
+ x11-libs/libXt
+ )
+ cairo? (
+ >=x11-libs/pango-1.12
+ >=x11-libs/cairo-1.1.10[svg]
+ )
+ devil? ( media-libs/devil[png,jpeg] )
+ postscript? ( app-text/ghostscript-gpl )
+ gtk? ( x11-libs/gtk+:2 )
+ gts? ( sci-libs/gts )
+ lasi? ( media-libs/lasi )
+ pdf? ( app-text/poppler )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ ruby? ( dev-lang/ruby )
+ svg? ( gnome-base/librsvg )
+ tcl? ( >=dev-lang/tcl-8.3:0= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ guile? ( dev-scheme/guile dev-lang/swig )
+ java? ( >=virtual/jdk-1.5 dev-lang/swig )
+ nls? ( >=sys-devel/gettext-0.14.5 )
+ perl? ( dev-lang/swig )
+ python? ( dev-lang/swig )
+ ruby? ( dev-lang/swig )
+ tcl? ( dev-lang/swig )"
+REQUIRED_USE="
+ !cairo? ( !X !gtk !postscript !lasi )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Dependency description / Maintainer-Info:
+
+# Rendering is done via the following plugins (/plugins):
+# - core, dot_layout, neato_layout, gd , dot
+# the ones which are always compiled in, depend on zlib, gd
+# - gtk
+# Directly depends on gtk-2.
+# needs 'pangocairo' enabled in graphviz configuration
+# gtk-2 depends on pango, cairo and libX11 directly.
+# - gdk-pixbuf
+# Disabled, GTK-1 junk.
+# - glitz
+# Disabled, no particular reason
+# needs 'pangocairo' enabled in graphviz configuration
+# - ming
+# flash plugin via -Tswf requires media-libs/ming-0.4. Disabled as it's
+# incomplete.
+# - cairo/pango:
+# Needs pango for text layout, uses cairo methods to draw stuff
+# - xlib:
+# needs cairo+pango,
+# can make use of gnomeui and inotify support (??? unsure),
+# needs libXaw for UI
+# UI also links directly against libX11, libXmu, and libXt
+# and uses libXpm if available so we make sure it always is
+
+# There can be swig-generated bindings for the following languages (/tclpkg/gv):
+# - c-sharp (disabled)
+# - scheme (enabled via guile) ... no longer broken on ~x86
+# - io (disabled)
+# - java (enabled via java) *2
+# - lua (enabled via lua)
+# - ocaml (enabled via ocaml)
+# - perl (enabled via perl) *1
+# - php (enabled via php) *2
+# - python (enabled via python) *1
+# - ruby (enabled via ruby) *1
+# - tcl (enabled via tcl)
+# *1 = The ${P}-bindings.patch takes care that those bindings are installed to the right location
+# *2 = Those bindings don't build because the paths for the headers/libs aren't
+# detected correctly and/or the options passed to swig are wrong (-php instead of -php4/5)
+
+# There are several other tools in /tclpkg:
+# gdtclft, tcldot, tclhandle, tclpathplan, tclstubs ; enabled with: --with-tcl
+# tkspline, tkstubs ; enabled with: --with-tk
+
+# And the commands (/cmd):
+# - dot, dotty, gvedit, gvpr, lefty, lneato, smyrna, tools/* :)
+# sci-libs/gts can be used for some of these
+# - lefty:
+# needs Xaw and X to build
+# - gvedit (via 'qt4'):
+# based on ./configure it needs qt-core and qt-gui only
+# - smyrna : experimental opengl front-end (via 'smyrna')
+# currently disabled -- it segfaults a lot
+# needs x11-libs/gtkglext, gnome-base/libglade, media-libs/freeglut
+# sci-libs/gts, x11-libs/gtk. Also needs 'gtk','glade','glut','gts' and 'png'
+# with flags enabled at configure time
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-2.34.0-Xaw-configure.patch \
+ "${FILESDIR}"/${PN}-2.34.0-dot-pangocairo-link.patch
+
+ # ToDo: Do the same thing for examples and/or
+ # write a patch for a configuration-option
+ # and send it to upstream
+ # note - the longer sed expression removes multi-line assignments that are extended via '\'
+ if ! use doc ; then
+ find . -iname Makefile.am \
+ | xargs sed -i -e '/^\(html\|pdf\)_DATA.*\\[[:space:]]*$/{:m;N;s/\\\n//;tm;d}' \
+ -e '/^\(html\|pdf\)_DATA/d' || die
+ fi
+
+ # This is an old version of libtool
+ # use the ./configure option to exclude its use, and
+ # delete the dir since we don't need to eautoreconf it
+ rm -rf libltdl
+
+ # no nls, no gettext, no iconv macro, so disable it
+ use nls || { sed -i -e '/^AM_ICONV/d' configure.ac || die; }
+
+ # Nuke the dead symlinks for the bindings
+ sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die
+
+ # replace the whitespace with tabs
+ sed -i -e 's: :\t:g' doc/info/Makefile.am || die
+
+ # workaround for http://www.graphviz.org/mantisbt/view.php?id=1895
+ use elibc_FreeBSD && append-flags $(test-flags -fno-builtin-sincos)
+
+ use java && append-cppflags $(java-pkg_get-jni-cflags)
+
+ eautoreconf
+}
+
+src_configure() {
+ # libtool file collision, bug 276609
+ local myconf="--without-included-ltdl --disable-ltdl-install"
+
+ myconf="${myconf}
+ $(use_with cairo pangocairo)
+ $(use_with devil)
+ $(use_with gtk)
+ $(use_with gts)
+ $(use_with qt4)
+ $(use_with lasi)
+ $(use_with svg rsvg)
+ $(use_with X x)
+ $(use_with X xaw)
+ $(use_with X lefty)
+ --with-digcola
+ --with-fontconfig
+ --with-freetype2
+ --with-ipsepcola
+ --with-libgd
+ --with-sfdp
+ $(use_enable gdk-pixbuf)
+ --without-ming"
+
+ # new/experimental features, to be tested, disable for now
+ myconf="${myconf}
+ --with-cgraph
+ --without-glitz
+ --without-ipsepcola
+ --without-smyrna
+ --without-visio"
+
+ # Bindings:
+ myconf="${myconf}
+ $(use_enable guile)
+ --disable-io
+ $(use_enable java)
+ --disable-lua
+ --disable-ocaml
+ $(use_enable perl)
+ --disable-php
+ $(use_enable python)
+ --disable-r
+ $(use_enable ruby)
+ --disable-sharp
+ $(use_enable tcl)"
+
+ econf \
+ --enable-ltdl \
+ --disable-silent-rules \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_install() {
+ sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die
+
+ emake DESTDIR="${D}" \
+ txtdir="${EPREFIX}"/usr/share/doc/${PF} \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \
+ pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
+ pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
+ install
+
+ use examples || rm -rf "${ED}"/usr/share/graphviz/demo
+
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ use python && python_optimize \
+ "${D}$(python_get_sitedir)" \
+ "${D}/usr/$(get_libdir)/graphviz/python"
+}
+
+pkg_postinst() {
+ # This actually works if --enable-ltdl is passed
+ # to configure
+ dot -c
+}
diff --git a/media-gfx/graphviz/graphviz-2.38.0.ebuild b/media-gfx/graphviz/graphviz-2.38.0.ebuild
new file mode 100644
index 000000000000..19ce277aa44b
--- /dev/null
+++ b/media-gfx/graphviz/graphviz-2.38.0.ebuild
@@ -0,0 +1,256 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils flag-o-matic java-pkg-opt-2 multilib python-single-r1
+
+DESCRIPTION="Open Source Graph Visualization Software"
+HOMEPAGE="http://www.graphviz.org/"
+SRC_URI="http://www.graphviz.org/pub/graphviz/stable/SOURCES/${P}.tar.gz"
+
+LICENSE="CPL-1.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="+cairo devil doc examples gdk-pixbuf gtk gts guile java lasi nls pdf perl postscript python qt4 ruby svg static-libs tcl X elibc_FreeBSD"
+
+# Requires ksh
+RESTRICT="test"
+
+RDEPEND="
+ sys-libs/zlib
+ >=dev-libs/expat-2
+ >=dev-libs/glib-2.11.1
+ >=media-libs/fontconfig-2.3.95
+ >=media-libs/freetype-2.1.10
+ >=media-libs/gd-2.0.34[fontconfig,jpeg,png,truetype,zlib]
+ >=media-libs/libpng-1.2:0
+ !<=sci-chemistry/cluster-1.3.081231
+ sys-devel/libtool
+ virtual/jpeg:0
+ virtual/libiconv
+ X? (
+ x11-libs/libXaw
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXpm
+ x11-libs/libXt
+ )
+ cairo? (
+ >=x11-libs/pango-1.12
+ >=x11-libs/cairo-1.1.10[svg]
+ )
+ devil? ( media-libs/devil[png,jpeg] )
+ postscript? ( app-text/ghostscript-gpl )
+ gtk? ( x11-libs/gtk+:2 )
+ gts? ( sci-libs/gts )
+ lasi? ( media-libs/lasi )
+ pdf? ( app-text/poppler )
+ perl? ( dev-lang/perl:= )
+ python? ( ${PYTHON_DEPS} )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ )
+ ruby? ( dev-lang/ruby )
+ svg? ( gnome-base/librsvg )
+ tcl? ( >=dev-lang/tcl-8.3:0= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/flex
+ guile? ( dev-scheme/guile dev-lang/swig )
+ java? ( >=virtual/jdk-1.5 dev-lang/swig )
+ nls? ( >=sys-devel/gettext-0.14.5 )
+ perl? ( dev-lang/swig )
+ python? ( dev-lang/swig )
+ ruby? ( dev-lang/swig )
+ tcl? ( dev-lang/swig )"
+REQUIRED_USE="
+ !cairo? ( !X !gtk !postscript !lasi )
+ python? ( ${PYTHON_REQUIRED_USE} )"
+
+# Dependency description / Maintainer-Info:
+
+# Rendering is done via the following plugins (/plugins):
+# - core, dot_layout, neato_layout, gd , dot
+# the ones which are always compiled in, depend on zlib, gd
+# - gtk
+# Directly depends on gtk-2.
+# needs 'pangocairo' enabled in graphviz configuration
+# gtk-2 depends on pango, cairo and libX11 directly.
+# - gdk-pixbuf
+# Disabled, GTK-1 junk.
+# - glitz
+# Disabled, no particular reason
+# needs 'pangocairo' enabled in graphviz configuration
+# - ming
+# flash plugin via -Tswf requires media-libs/ming-0.4. Disabled as it's
+# incomplete.
+# - cairo/pango:
+# Needs pango for text layout, uses cairo methods to draw stuff
+# - xlib:
+# needs cairo+pango,
+# can make use of gnomeui and inotify support (??? unsure),
+# needs libXaw for UI
+# UI also links directly against libX11, libXmu, and libXt
+# and uses libXpm if available so we make sure it always is
+
+# There can be swig-generated bindings for the following languages (/tclpkg/gv):
+# - c-sharp (disabled)
+# - scheme (enabled via guile) ... no longer broken on ~x86
+# - io (disabled)
+# - java (enabled via java) *2
+# - lua (enabled via lua)
+# - ocaml (enabled via ocaml)
+# - perl (enabled via perl) *1
+# - php (enabled via php) *2
+# - python (enabled via python) *1
+# - ruby (enabled via ruby) *1
+# - tcl (enabled via tcl)
+# *1 = The ${P}-bindings.patch takes care that those bindings are installed to the right location
+# *2 = Those bindings don't build because the paths for the headers/libs aren't
+# detected correctly and/or the options passed to swig are wrong (-php instead of -php4/5)
+
+# There are several other tools in /tclpkg:
+# gdtclft, tcldot, tclhandle, tclpathplan, tclstubs ; enabled with: --with-tcl
+# tkspline, tkstubs ; enabled with: --with-tk
+
+# And the commands (/cmd):
+# - dot, dotty, gvedit, gvpr, lefty, lneato, smyrna, tools/* :)
+# sci-libs/gts can be used for some of these
+# - lefty:
+# needs Xaw and X to build
+# - gvedit (via 'qt4'):
+# based on ./configure it needs qt-core and qt-gui only
+# - smyrna : experimental opengl front-end (via 'smyrna')
+# currently disabled -- it segfaults a lot
+# needs x11-libs/gtkglext, gnome-base/libglade, media-libs/freeglut
+# sci-libs/gts, x11-libs/gtk. Also needs 'gtk','glade','glut','gts' and 'png'
+# with flags enabled at configure time
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-2.34.0-Xaw-configure.patch \
+ "${FILESDIR}"/${PN}-2.34.0-dot-pangocairo-link.patch
+
+ # ToDo: Do the same thing for examples and/or
+ # write a patch for a configuration-option
+ # and send it to upstream
+ # note - the longer sed expression removes multi-line assignments that are extended via '\'
+ if ! use doc ; then
+ find . -iname Makefile.am \
+ | xargs sed -i -e '/^\(html\|pdf\)_DATA.*\\[[:space:]]*$/{:m;N;s/\\\n//;tm;d}' \
+ -e '/^\(html\|pdf\)_DATA/d' || die
+ fi
+
+ # This is an old version of libtool
+ # use the ./configure option to exclude its use, and
+ # delete the dir since we don't need to eautoreconf it
+ rm -rf libltdl
+
+ # no nls, no gettext, no iconv macro, so disable it
+ use nls || { sed -i -e '/^AM_ICONV/d' configure.ac || die; }
+
+ # Nuke the dead symlinks for the bindings
+ sed -i -e '/$(pkgluadir)/d' tclpkg/gv/Makefile.am || die
+
+ # replace the whitespace with tabs
+ sed -i -e 's: :\t:g' doc/info/Makefile.am || die
+
+ # workaround for http://www.graphviz.org/mantisbt/view.php?id=1895
+ use elibc_FreeBSD && append-flags $(test-flags -fno-builtin-sincos)
+
+ use java && append-cppflags $(java-pkg_get-jni-cflags)
+
+ eautoreconf
+}
+
+src_configure() {
+ # libtool file collision, bug 276609
+ local myconf="--without-included-ltdl --disable-ltdl-install"
+
+ myconf="${myconf}
+ $(use_with cairo pangocairo)
+ $(use_with devil)
+ $(use_with gtk)
+ $(use_with gts)
+ $(use_with qt4)
+ $(use_with lasi)
+ $(use_with svg rsvg)
+ $(use_with X x)
+ $(use_with X xaw)
+ $(use_with X lefty)
+ --with-digcola
+ --with-fontconfig
+ --with-freetype2
+ --with-ipsepcola
+ --with-libgd
+ --with-sfdp
+ $(use_enable gdk-pixbuf)
+ --without-ming"
+
+ # new/experimental features, to be tested, disable for now
+ myconf="${myconf}
+ --with-cgraph
+ --without-glitz
+ --without-ipsepcola
+ --without-smyrna
+ --without-visio"
+
+ # Bindings:
+ myconf="${myconf}
+ $(use_enable guile)
+ --disable-io
+ $(use_enable java)
+ --disable-lua
+ --disable-ocaml
+ $(use_enable perl)
+ --disable-php
+ $(use_enable python)
+ --disable-r
+ $(use_enable ruby)
+ --disable-sharp
+ $(use_enable tcl)"
+
+ econf \
+ --enable-ltdl \
+ --disable-silent-rules \
+ $(use_enable static-libs static) \
+ ${myconf}
+}
+
+src_install() {
+ sed -i -e "s:htmldir:htmlinfodir:g" doc/info/Makefile || die
+
+ emake DESTDIR="${D}" \
+ txtdir="${EPREFIX}"/usr/share/doc/${PF} \
+ htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
+ htmlinfodir="${EPREFIX}"/usr/share/doc/${PF}/html/info \
+ pdfdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \
+ pkgconfigdir="${EPREFIX}"/usr/$(get_libdir)/pkgconfig \
+ install
+
+ use examples || rm -rf "${ED}"/usr/share/graphviz/demo
+
+ use static-libs || find "${ED}" -name '*.la' -exec rm -f {} +
+
+ dodoc AUTHORS ChangeLog NEWS README
+
+ use python && python_optimize \
+ "${D}$(python_get_sitedir)" \
+ "${D}/usr/$(get_libdir)/graphviz/python"
+}
+
+pkg_postinst() {
+ # This actually works if --enable-ltdl is passed
+ # to configure
+ dot -c
+}
diff --git a/media-gfx/graphviz/metadata.xml b/media-gfx/graphviz/metadata.xml
new file mode 100644
index 000000000000..4772c3130252
--- /dev/null
+++ b/media-gfx/graphviz/metadata.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription>
+graphviz is a set of graph drawing tools for Unix or MS-Windows
+(win32), including a web service interface (webdot). Source code and
+binary executables for common platforms are available. Graph drawing
+addresses the problem of visualizing structural information by
+constructing geometric representations of abstract graphs and networks.
+Automatic generation of graph drawings has important applications in key
+technologies such as database design, software engineering, VLSI and
+network design and visual interfaces in other domains. Situations where
+these tools might be particularly useful include:
+
+ * you would like to restructure a program and first need to
+understand the relationships between its types, procedures, and source
+files.
+ * you need to find the bottlenecks in an Internet backbone - not
+only individual links, but their relationships
+ * you're debugging a protocol or microarchitecture represented as a
+finite state machine and need to figure out how a certain
+ error state arises
+ * you would like to browse a database schema, knowledge base, or
+distributed program represented pictorially
+ * you would like to see an overview of a collection of linked
+documents
+ * you would like to discover patterns and communities of interest in
+a database of telephone calls or e-mail messages
+</longdescription>
+ <use>
+ <flag name="devil">Enables DevIL output plugin -Tdevil</flag>
+ <flag name="gdk-pixbuf">Enables gdk-pixbuf2 plugin</flag>
+ <flag name="gtk">Enables gtk+ output plugin -Tgtk (needs cairo)</flag>
+ <flag name="gts">Enables support for gts</flag>
+ <flag name="lasi">
+ Enables PostScript output via <pkg>media-libs/lasi</pkg>, for
+ plugin -Tlasi (needs cairo)
+ </flag>
+ <flag name="qt4">Builds gvedit front-end</flag>
+ <flag name="X">
+ Builds lefty front-end, builds plugin -Txlib, and enables support
+ for x11 in various other modules (needs cairo)
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/greycstoration/Manifest b/media-gfx/greycstoration/Manifest
new file mode 100644
index 000000000000..6b9abbbd01ed
--- /dev/null
+++ b/media-gfx/greycstoration/Manifest
@@ -0,0 +1 @@
+DIST GREYCstoration-2.9.zip 3639412 SHA256 dfc867bffd38fc204b5fe6a3952d7aa4ac53c2b75aabf45102ed7f6022c1c7be SHA512 f0f90e02087d2670213ed72876105202eab996bb483bed069046c0e01153eb05da91d92f00aa3ed5cc2fecba19f35e20739049c149426453e0e11efd446844ba WHIRLPOOL 667e7411261446d507f26a54d1a95691f81ca878908661ad0c51145a9956b872553b62eeb1937e72fb0d819c97f160af8479c544c9b7b7879afed297daf4f57e
diff --git a/media-gfx/greycstoration/files/greycstoration-2.9-libpng14.patch b/media-gfx/greycstoration/files/greycstoration-2.9-libpng14.patch
new file mode 100644
index 000000000000..e8c0276f8917
--- /dev/null
+++ b/media-gfx/greycstoration/files/greycstoration-2.9-libpng14.patch
@@ -0,0 +1,22 @@
+http://repos.archlinux.org/wsvn/community/greycstoration/trunk/libpng14.patch
+
+--- CImg.h
++++ CImg.h
+@@ -25671,7 +25671,7 @@
+ png_read_info(png_ptr,info_ptr);
+ png_uint_32 W, H;
+ int bit_depth, color_type, interlace_type;
+- png_get_IHDR(png_ptr,info_ptr,&W,&H,&bit_depth,&color_type,&interlace_type,int_p_NULL,int_p_NULL);
++ png_get_IHDR(png_ptr,info_ptr,&W,&H,&bit_depth,&color_type,&interlace_type,NULL,NULL);
+ int new_bit_depth = bit_depth;
+ int new_color_type = color_type;
+
+@@ -25682,7 +25682,7 @@
+ new_bit_depth = 8;
+ }
+ if (new_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8){
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ new_bit_depth = 8;
+ }
+ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
diff --git a/media-gfx/greycstoration/greycstoration-2.9-r1.ebuild b/media-gfx/greycstoration/greycstoration-2.9-r1.ebuild
new file mode 100644
index 000000000000..25a0f823bca1
--- /dev/null
+++ b/media-gfx/greycstoration/greycstoration-2.9-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Image regularization algorithm for denoising, inpainting and resizing"
+HOMEPAGE="http://www.greyc.ensicaen.fr/~dtschump/greycstoration/"
+SRC_URI="mirror://sourceforge/cimg/GREYCstoration-${PV}.zip"
+
+LICENSE="CeCILL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="fftw imagemagick jpeg lapack png tiff"
+
+RDEPEND="
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXrandr
+ fftw? ( >=sci-libs/fftw-3 )
+ imagemagick? ( media-gfx/imagemagick )
+ jpeg? ( virtual/jpeg )
+ lapack? ( virtual/lapack )
+ png? ( >=media-libs/libpng-1.4 )
+ tiff? ( media-libs/tiff )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ fftw? ( virtual/pkgconfig )
+ lapack? ( virtual/pkgconfig )
+ png? ( virtual/pkgconfig )"
+
+S=${WORKDIR}/GREYCstoration-${PV}/src
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng14.patch
+
+ sed -i \
+ -e "s:../CImg.h:CImg.h:" \
+ greycstoration.cpp || die
+}
+
+src_compile() {
+ local myconf="-Dcimg_use_xshm -Dcimg_use_xrandr -lX11 -lXext -lXrandr"
+
+ use png && myconf+=" -Dcimg_use_png $($(tc-getPKG_CONFIG) --libs libpng) -lz"
+ use jpeg && myconf+=" -Dcimg_use_jpeg -ljpeg"
+ use tiff && myconf+=" -Dcimg_use_tiff -ltiff"
+ use imagemagick && \
+ myconf+=" -Dcimg_use_magick $(Magick++-config --cppflags) $(Magick++-config --libs)"
+ use fftw && myconf+=" -Dcimg_use_fftw3 $($(tc-getPKG_CONFIG) --libs fftw3)"
+ use lapack && myconf+=" -Dcimg_use_lapack $($(tc-getPKG_CONFIG) --libs lapack)"
+
+ _cmd="$(tc-getCXX) ${LDFLAGS} ${CXXFLAGS} -fno-tree-pre \
+ -o greycstoration greycstoration.cpp \
+ ${myconf} -lm -lpthread"
+ einfo "${_cmd}"
+ eval ${_cmd} || die
+}
+
+src_install() {
+ dobin greycstoration
+}
diff --git a/media-gfx/greycstoration/metadata.xml b/media-gfx/greycstoration/metadata.xml
new file mode 100644
index 000000000000..31b8fca48b10
--- /dev/null
+++ b/media-gfx/greycstoration/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>calchan@gentoo.org</email>
+ <name>Denis Dupeyron</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">cimg</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/grub-splashes/Manifest b/media-gfx/grub-splashes/Manifest
new file mode 100644
index 000000000000..eef081d08b35
--- /dev/null
+++ b/media-gfx/grub-splashes/Manifest
@@ -0,0 +1,3 @@
+DIST 49074-natural_gentoo-8.0.tar.gz 278632 RMD160 50594e8049c3bc4063c2437ad35c2744e6499d11 SHA1 4933ed02f6e74039dabb33c77c4cdef890e7a20c SHA256 89c142d782a813af1fa39f1dcf5294a7b6cb12957eebb0c0a33b133b05b595e5
+DIST 98478-gentoo-splash.xpm.gz 18681 RMD160 f35d408240eaa440dc927846e2787c36595a8642 SHA1 cce6100630a9a156b5c991428a0530f91db9dbbe SHA256 c5ec10b98bd4d699e2a6e389ebce30c296ec1243efafcd16757116a2b20db2cd
+DIST grub-splashes-0.1.tar.gz 180413 RMD160 35f5633310591667d752b8d0e2a3eab7db0c7304 SHA1 74e5c565c1c941c9179c8379a3fe4f756ed1ad96 SHA256 a3f8e54e215315b91603300e20e2599e5ffcf34358427fe3417dbdf6b5cf74b5
diff --git a/media-gfx/grub-splashes/grub-splashes-20091109.ebuild b/media-gfx/grub-splashes/grub-splashes-20091109.ebuild
new file mode 100644
index 000000000000..60d638cb7821
--- /dev/null
+++ b/media-gfx/grub-splashes/grub-splashes-20091109.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Collection of grub splashes"
+HOMEPAGE="http://dev.gentoo.org/~welp/grub-splashes.xml"
+SRC_URI="mirror://gentoo/${PN}-0.1.tar.gz
+ http://www.kde-look.org/CONTENT/content-files/49074-natural_gentoo-8.0.tar.gz
+ http://www.kde-look.org/CONTENT/content-files/98478-gentoo-splash.xpm.gz"
+
+LICENSE="GPL-2 Artistic-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND="|| ( sys-boot/grub sys-boot/grub-static )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ [[ -d ${ROOT}/boot/grub ]] || \
+ die "${ROOT}/boot/grub does not exist, please make sure you have /boot mounted"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ cp "${DISTDIR}"/98478-gentoo-splash.xpm.gz gentoo-blue.xpm.gz
+}
+
+src_install() {
+ insinto /boot/grub
+ find . -name '*.xpm.gz' -exec doins {} \;
+}
+
+pkg_postinst() {
+ elog "Please note that this ebuild makes the assumption that you're"
+ elog "using /boot/grub/ for your grub configuration."
+ elog ""
+ elog "To use your new grub splashes edit your /boot/grub/grub.conf"
+ elog "You can see available splash screens by running"
+ elog "\`ls /boot/grub/ | grep xpm\`"
+}
diff --git a/media-gfx/grub-splashes/metadata.xml b/media-gfx/grub-splashes/metadata.xml
new file mode 100644
index 000000000000..17bf9b50f5e7
--- /dev/null
+++ b/media-gfx/grub-splashes/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+<longdescription>
+A collection of grub themes provided and maintained by the Gentoo Artwork project
+</longdescription>
+</pkgmetadata>
diff --git a/media-gfx/gthumb/Manifest b/media-gfx/gthumb/Manifest
new file mode 100644
index 000000000000..95be4946f1c2
--- /dev/null
+++ b/media-gfx/gthumb/Manifest
@@ -0,0 +1,2 @@
+DIST gthumb-3.2.9.1.tar.xz 5969180 SHA256 eda012f410fc3c45aafab727a81d484857d83e51f69febdfe76a44d2b5965f01 SHA512 68ab839153d258ca726b558f3b5245f0f3568465859086a57b12a72569257a6e76a3d32f1efdbec708ba9df542b2d726eb91422a2a646c5e18b98d66954236e1 WHIRLPOOL a4a2020f0b4f394841912132038cb5ce26bb8c8eee60a35b40b16689f8395d6b75820b4eb9ff3032ddcb96ee1e34d0e38b7036745089311e33a458d1f4264fe5
+DIST gthumb-3.4.0.tar.xz 3366284 SHA256 abd1afe457c65289af31c6db7037452faa3838356480857d8cdc19f0ecde4933 SHA512 04b962ada75ab46a6be2ad192dfc9b34bd5f7b0189d970e688d0ec89130a766ab7e5a23d34b305829092c3b8756baad83d0367f4a972e384dac16fcff0255d85 WHIRLPOOL 7b4a9cdc46473e8fb7731b276741bdfc32f0791bb3ce9197fbef79bf30eef4694cf7d5a53c28d98c150d48652b25a662185c6a67252666637c04707928c2e0d7
diff --git a/media-gfx/gthumb/gthumb-3.2.9.1.ebuild b/media-gfx/gthumb/gthumb-3.2.9.1.ebuild
new file mode 100644
index 000000000000..035293e705bc
--- /dev/null
+++ b/media-gfx/gthumb/gthumb-3.2.9.1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2
+
+DESCRIPTION="Image viewer and browser for Gnome"
+HOMEPAGE="https://wiki.gnome.org/Apps/gthumb"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="cdr exif gstreamer http jpeg json libsecret raw slideshow svg tiff test webkit webp"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.34.0:2
+ >=x11-libs/gtk+-3.4.0:3
+
+ media-libs/libpng:0=
+ sys-libs/zlib
+ x11-libs/libICE
+ x11-libs/libSM
+
+ cdr? ( >=app-cdr/brasero-3.2 )
+ exif? ( >=media-gfx/exiv2-0.21:= )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0 )
+ http? ( >=net-libs/libsoup-gnome-2.36:2.4 )
+ jpeg? ( virtual/jpeg:0= )
+ json? ( >=dev-libs/json-glib-0.15.0 )
+ libsecret? ( >=app-crypt/libsecret-0.11 )
+ slideshow? (
+ >=media-libs/clutter-1:1.0
+ >=media-libs/clutter-gtk-1:1.0 )
+ svg? ( >=gnome-base/librsvg-2.34 )
+ tiff? ( media-libs/tiff:= )
+ raw? ( >=media-libs/libopenraw-0.0.8:= )
+ !raw? ( media-gfx/dcraw )
+ webkit? ( >=net-libs/webkit-gtk-1.10.0:3 )
+ webp? ( >=media-libs/libwebp-0.2.0 )
+"
+RDEPEND="${COMMON_DEPEND}
+ >=gnome-base/gsettings-desktop-schemas-0.1.4
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/yelp-tools
+ app-text/scrollkeeper
+ >=dev-util/intltool-0.35
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ test? ( ~app-text/docbook-xml-dtd-4.1.2 )
+"
+# eautoreconf needs:
+# gnome-base/gnome-common
+
+src_prepare() {
+ # Remove unwanted CFLAGS added with USE=debug
+ sed -e 's/CFLAGS="$CFLAGS -g -O0 -DDEBUG"//' \
+ -i configure.ac -i configure || die
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # Upstream says in configure help that libchamplain support
+ # crashes frequently
+ gnome2_src_configure \
+ --disable-static \
+ --disable-libchamplain \
+ $(use_enable cdr libbrasero) \
+ $(use_enable exif exiv2) \
+ $(use_enable gstreamer) \
+ $(use_enable http libsoup) \
+ $(use_enable jpeg) \
+ $(use_enable json libjson-glib) \
+ $(use_enable libsecret) \
+ $(use_enable raw libopenraw) \
+ $(use_enable slideshow clutter) \
+ $(use_enable svg librsvg) \
+ $(use_enable test test-suite) \
+ $(use_enable tiff) \
+ $(use_enable webkit webkit2) \
+ $(use_enable webp libwebp)
+}
diff --git a/media-gfx/gthumb/gthumb-3.4.0.ebuild b/media-gfx/gthumb/gthumb-3.4.0.ebuild
new file mode 100644
index 000000000000..ead252ef0e15
--- /dev/null
+++ b/media-gfx/gthumb/gthumb-3.4.0.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="yes"
+GNOME2_LA_PUNT="yes"
+
+inherit gnome2
+
+DESCRIPTION="Image viewer and browser for Gnome"
+HOMEPAGE="https://wiki.gnome.org/Apps/gthumb"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="cdr exif gnome-keyring gstreamer http jpeg json lcms raw slideshow svg tiff test webkit webp"
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.36.0:2[dbus]
+ >=x11-libs/gtk+-3.10.0:3
+
+ media-libs/libpng:0=
+ sys-libs/zlib
+ x11-libs/libICE
+ x11-libs/libSM
+
+ cdr? ( >=app-cdr/brasero-3.2 )
+ exif? ( >=media-gfx/exiv2-0.21:= )
+ gnome-keyring? ( >=app-crypt/libsecret-0.11 )
+ gstreamer? (
+ media-libs/gstreamer:1.0
+ media-libs/gst-plugins-base:1.0 )
+ http? ( >=net-libs/libsoup-2.42.0:2.4 )
+ jpeg? ( virtual/jpeg:0= )
+ json? ( >=dev-libs/json-glib-0.15.0 )
+ lcms? ( >=media-libs/lcms-2.6:2 )
+ slideshow? (
+ >=media-libs/clutter-1.12.0:1.0
+ >=media-libs/clutter-gtk-1:1.0 )
+ svg? ( >=gnome-base/librsvg-2.34 )
+ tiff? ( media-libs/tiff:= )
+ raw? ( >=media-libs/libraw-0.14:= )
+ !raw? ( media-gfx/dcraw )
+ webkit? ( net-libs/webkit-gtk:4 )
+ webp? ( >=media-libs/libwebp-0.2.0 )
+"
+RDEPEND="${COMMON_DEPEND}
+ >=gnome-base/gsettings-desktop-schemas-0.1.4
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/yelp-tools
+ >=dev-util/intltool-0.35
+ sys-devel/bison
+ sys-devel/flex
+ virtual/pkgconfig
+ test? ( ~app-text/docbook-xml-dtd-4.1.2 )
+"
+# eautoreconf needs:
+# gnome-base/gnome-common
+
+src_prepare() {
+ # Remove unwanted CFLAGS added with USE=debug
+ sed -e 's/CFLAGS="$CFLAGS -g -O0 -DDEBUG"//' \
+ -i configure.ac -i configure || die
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ # Upstream says in configure help that libchamplain support
+ # crashes frequently
+ gnome2_src_configure \
+ --disable-static \
+ --disable-libchamplain \
+ $(use_enable cdr libbrasero) \
+ $(use_enable exif exiv2) \
+ $(use_enable gnome-keyring libsecret) \
+ $(use_enable gstreamer) \
+ $(use_enable http libsoup) \
+ $(use_enable jpeg) \
+ $(use_enable json libjson-glib) \
+ $(use_enable lcms lcms2) \
+ $(use_enable raw libraw) \
+ $(use_enable slideshow clutter) \
+ $(use_enable svg librsvg) \
+ $(use_enable test test-suite) \
+ $(use_enable tiff) \
+ $(use_enable webkit webkit2) \
+ $(use_enable webp libwebp)
+}
diff --git a/media-gfx/gthumb/metadata.xml b/media-gfx/gthumb/metadata.xml
new file mode 100644
index 000000000000..415357c02fb3
--- /dev/null
+++ b/media-gfx/gthumb/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>gnome</herd>
+ <use>
+ <flag name="http">Enable webservice integration through <pkg>net-libs/libsoup</pkg></flag>
+ <flag name="json">Compile code that uses the libjson-glib library</flag>
+ <flag name="libsecret">Enable libsecret support to store login credentials</flag>
+ <flag name="slideshow">Enable slideshow plugin</flag>
+ <flag name="webp">Enable support for webp image format</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/gtkam/Manifest b/media-gfx/gtkam/Manifest
new file mode 100644
index 000000000000..8e69b3feb3bc
--- /dev/null
+++ b/media-gfx/gtkam/Manifest
@@ -0,0 +1 @@
+DIST gtkam-0.2.0.tar.bz2 1137547 SHA256 527b1318ed8f49fbf8c13b80a4d2859e41bb34ab6bb5cc728c8816aa6ecf97c2 SHA512 648a8f4d85ec802ee3bc391d4c20517eefe2da253db964e3fb578bd2b98abe79bc6ae6e7de2b91e03ae73b5ebfd5f963fb453c44f5347d3c700c1881f79c2c4d WHIRLPOOL b7d7c0af01c70e34f62a2b0cd7a6beb0115cba20771f9e6d5dbc1cdf866689bf29a95a97e8de70c95d80a7e3801ab0648d0951b06fe9bded2a40cad4bca333fe
diff --git a/media-gfx/gtkam/files/gtkam-0.1.18-desktop-validation.patch b/media-gfx/gtkam/files/gtkam-0.1.18-desktop-validation.patch
new file mode 100644
index 000000000000..ac0643f077b5
--- /dev/null
+++ b/media-gfx/gtkam/files/gtkam-0.1.18-desktop-validation.patch
@@ -0,0 +1,15 @@
+--- gtkam.desktop.in~ 2011-05-26 09:57:43.000000000 +0200
++++ gtkam.desktop.in 2012-01-31 10:00:56.687216188 +0100
+@@ -1,11 +1,10 @@
+ [Desktop Entry]
+-Encoding=UTF-8
+ _Name=Gtkam Digital Camera Browser
+ _Comment=Browse and download images from an attached digital camera
+ Exec=gtkam
+ Icon=gtkam-camera
+ Terminal=false
+ Type=Application
+-Categories=GNOME;GTK;Photography;Graphics;RasterGraphics;Viewer;
++Categories=GNOME;GTK;Photography;Graphics;2DGraphics;RasterGraphics;Viewer;
+ StartupNotify=true
+ X-GNOME-DocPath=gtkam/gtkam.xml
diff --git a/media-gfx/gtkam/files/gtkam-0.2.0-underlinking.patch b/media-gfx/gtkam/files/gtkam-0.2.0-underlinking.patch
new file mode 100644
index 000000000000..c1bacf0f24f2
--- /dev/null
+++ b/media-gfx/gtkam/files/gtkam-0.2.0-underlinking.patch
@@ -0,0 +1,86 @@
+diff -ur gtkam-0.2.0/configure.ac gtkam-0.2.0.new/configure.ac
+--- gtkam-0.2.0/configure.ac 2012-07-10 09:50:52.000000000 +0200
++++ gtkam-0.2.0.new/configure.ac 2013-12-28 17:10:16.899893905 +0100
+@@ -32,7 +32,6 @@
+ dnl Some programs we need
+ dnl ---------------------------------------------------------------------------
+ AC_PROG_CC
+-AM_PROG_CC_STDC
+ AC_HEADER_STDC
+ AM_PROG_LIBTOOL
+ AC_PROG_INSTALL
+@@ -86,9 +85,7 @@
+ )
+ LIBS="$save_LIBS"
+
+-PKG_CHECK_MODULES([GTK], [gtk+-2.0])
+-AC_SUBST([GTK_CFLAGS])
+-AC_SUBST([GTK_LIBS])
++GP_CHECK_LIBRARY([GTK2], [gtk+-2.0])
+
+
+ dnl ---------------------------------------------------------------------------
+Sólo en gtkam-0.2.0.new/: configure.ac.orig
+diff -ur gtkam-0.2.0/src/Makefile.am gtkam-0.2.0.new/src/Makefile.am
+--- gtkam-0.2.0/src/Makefile.am 2009-10-10 11:10:26.000000000 +0200
++++ gtkam-0.2.0.new/src/Makefile.am 2013-12-28 17:10:13.118834763 +0100
+@@ -6,7 +6,7 @@
+ $(LIBEXIF_GTK_CFLAGS) \
+ $(LIBGPHOTO2_CFLAGS) \
+ $(GNOME_CFLAGS) \
+- $(GTK_CFLAGS) \
++ $(GTK2_CFLAGS) \
+ $(BONOBO_CFLAGS) \
+ $(GTKAM_GIMP_CFLAGS)
+
+@@ -46,14 +46,14 @@
+ gtkam-exif.c gtkam-exif.h \
+ gtkam-main.c gtkam-main.h \
+ i18n.h main.c
+-gtkam_LDADD = \
+- libgtkam.a \
+- $(LIBEXIF_LIBS) \
+- $(LIBEXIF_GTK_LIBS) \
++gtkam_LDADD = \
++ libgtkam.a \
++ $(LIBEXIF_LIBS) \
++ $(LIBEXIF_GTK_LIBS) \
+ $(LIBGPHOTO2_LIBS) \
+- $(GTKAM_LIBS) \
+- $(BONOBO_LIBS) \
+- $(GNOME_LIBS) \
++ $(GTK2_LIBS) \
++ $(BONOBO_LIBS) \
++ $(GNOME_LIBS) \
+ $(INTLLIBS)
+
+ if HAVE_GIMP
+@@ -69,6 +69,7 @@
+ $(LIBEXIF_LIBS) \
+ $(LIBEXIF_GTK_LIBS) \
+ $(LIBGPHOTO2_LIBS) \
++ $(GTK2_LIBS) \
+ $(BONOBO_LIBS) \
+ $(GNOME_LIBS) \
+ $(INTLLIBS)
+diff -ur gtkam-0.2.0/test/Makefile.am gtkam-0.2.0.new/test/Makefile.am
+--- gtkam-0.2.0/test/Makefile.am 2009-10-10 11:10:25.000000000 +0200
++++ gtkam-0.2.0.new/test/Makefile.am 2013-12-28 17:10:13.119834775 +0100
+@@ -4,7 +4,7 @@
+ $(LIBEXIF_GTK_CFLAGS) \
+ $(LIBGPHOTO2_CFLAGS) \
+ $(GNOME_CFLAGS) \
+- $(GTK_CFLAGS) \
++ $(GTK2_CFLAGS) \
+ $(BONOBO_CFLAGS) \
+ $(GTKAM_GIMP_CFLAGS)
+
+@@ -13,7 +13,7 @@
+ $(LIBEXIF_LIBS) \
+ $(LIBEXIF_GTK_LIBS) \
+ $(LIBGPHOTO2_LIBS) \
+- $(GTK_LIBS) \
++ $(GTK2_LIBS) \
+ $(BONOBO_LIBS) \
+ $(INTLLIBS)
+
diff --git a/media-gfx/gtkam/gtkam-0.2.0.ebuild b/media-gfx/gtkam/gtkam-0.2.0.ebuild
new file mode 100644
index 000000000000..739e6aacda1c
--- /dev/null
+++ b/media-gfx/gtkam/gtkam-0.2.0.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+GCONF_DEBUG="yes"
+
+inherit autotools eutils gnome2
+
+DESCRIPTION="A frontend for gPhoto 2"
+HOMEPAGE="http://gphoto.org/proj/gtkam"
+SRC_URI="mirror://sourceforge/gphoto/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ppc ~sparc x86"
+IUSE="gimp gnome nls"
+
+RDEPEND="
+ x11-libs/gtk+:2
+ >=media-libs/libgphoto2-2.5.0
+ >=media-libs/libexif-0.3.2
+ media-libs/libexif-gtk
+ gimp? ( >=media-gfx/gimp-2 )
+ gnome? (
+ >=gnome-base/libbonobo-2
+ >=gnome-base/libgnomeui-2 )
+"
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.40
+ virtual/pkgconfig
+ app-text/scrollkeeper
+ nls? ( >=sys-devel/gettext-0.14.1 )
+"
+
+src_prepare() {
+ # Fix .desktop validity, bug #271569
+ epatch "${FILESDIR}/${PN}-0.1.18-desktop-validation.patch"
+
+ # Fix underlinking, bug #496136
+ epatch "${FILESDIR}/${PN}-0.2.0-underlinking.patch"
+
+ eautoreconf
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ $(use_with gimp) \
+ $(use_with gnome) \
+ $(use_with gnome bonobo) \
+ $(use_enable nls) \
+ --with-rpmbuild=/bin/false
+}
+
+src_install() {
+ gnome2_src_install
+ rm -rf "${ED}"/usr/share/doc/gtkam || die "rm failed"
+}
diff --git a/media-gfx/gtkam/metadata.xml b/media-gfx/gtkam/metadata.xml
new file mode 100644
index 000000000000..f0e3725b295f
--- /dev/null
+++ b/media-gfx/gtkam/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>gnome</herd>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">gphoto</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/gtkimageview/Manifest b/media-gfx/gtkimageview/Manifest
new file mode 100644
index 000000000000..dd8af5d2110b
--- /dev/null
+++ b/media-gfx/gtkimageview/Manifest
@@ -0,0 +1 @@
+DIST gtkimageview-1.6.4.tar.gz 1158138 SHA256 4c681d38d127ee3950a29bce9aa7aa8a2abe3b4d915f7a0c88e526999c1a46f2 SHA512 6378c640006e73aa1ffbf92eb9d4e42570707bc159f0a657b11f027d328088f5e89fc334de170de5ab1a39bed588b0b76f4633688a894cb7def16f1dea9f8e39 WHIRLPOOL b623aad67b2cc3c2f6ed9bb61bf62fe75095ec3119cd0c2abd87de4d79a1d9a855f0a224e49e14f884f12a32270145233eb83f43847577b02cc536ce6212e24b
diff --git a/media-gfx/gtkimageview/gtkimageview-1.6.4.ebuild b/media-gfx/gtkimageview/gtkimageview-1.6.4.ebuild
new file mode 100644
index 000000000000..19d3b30f9130
--- /dev/null
+++ b/media-gfx/gtkimageview/gtkimageview-1.6.4.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+GNOME2_LA_PUNT="yes"
+VIRTUALX_REQUIRED=test
+
+inherit autotools gnome2 virtualx
+
+DESCRIPTION="A simple image viewer widget for GTK"
+HOMEPAGE="https://projects.gnome.org/gtkimageview/"
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
+IUSE="doc examples static-libs"
+
+# tests do not work with userpriv
+RESTRICT="test? ( userpriv )"
+
+RDEPEND="x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+ gnome-base/gnome-common
+ dev-util/gtk-doc-am
+ doc? ( >=dev-util/gtk-doc-1.8 )"
+
+pkg_setup() {
+ DOCS="README"
+ G2CONF="$(use_enable static-libs static)"
+}
+
+src_prepare() {
+ gnome2_src_prepare
+
+ # Prevent excessive build failures due to gcc changes
+ sed -e '/CFLAGS/s/-Werror //g' -i configure.in || die "sed 1 failed"
+
+ # Prevent excessive build failures due to glib/gtk changes
+ sed '/DEPRECATED_FLAGS/d' -i configure.in || die "sed 2 failed"
+
+ # Gold linker fix
+ sed -e '/libtest.la/s:$: -lm:g' -i tests/Makefile.am || die
+
+ if use doc; then
+ sed "/^TARGET_DIR/i \GTKDOC_REBASE=${EPREFIX}/usr/bin/gtkdoc-rebase" \
+ -i gtk-doc.make || die "sed 3 failed"
+ else
+ sed "/^TARGET_DIR/i \GTKDOC_REBASE=true" \
+ -i gtk-doc.make || die "sed 4 failed"
+ fi
+
+ AT_NOELIBTOOLIZE=yes eautoreconf
+}
+
+src_test() {
+ # the tests are only built, but not run by default
+ local failed="0"
+ Xemake check
+ cd "${S}"/tests
+ for test in ./test-* ; do
+ if [[ -x ${test} ]] ; then
+ VIRTUALX_COMMAND="${test}"
+ virtualmake || failed=$((${failed}+1))
+ fi
+ done
+ [[ ${failed} -gt 0 ]] && die "${failed} tests failed"
+}
+
+src_install() {
+ gnome2_src_install
+ if use examples ; then
+ docinto examples
+ dodoc tests/ex-*.c
+ fi
+}
diff --git a/media-gfx/gtkimageview/metadata.xml b/media-gfx/gtkimageview/metadata.xml
new file mode 100644
index 000000000000..a083c07fab9e
--- /dev/null
+++ b/media-gfx/gtkimageview/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/hp2xx/Manifest b/media-gfx/hp2xx/Manifest
new file mode 100644
index 000000000000..8a191ea78234
--- /dev/null
+++ b/media-gfx/hp2xx/Manifest
@@ -0,0 +1 @@
+DIST hp2xx-3.4.4.tar.gz 610330 SHA256 47b72fb386a189b52f07e31e424c038954c4e0ce405803841bed742bab488817 SHA512 ccfe4a23ca482471506e59d6d459ce3ed56d9d775613e3238bd82d11cf4ea0595bf57ff95b3bd22a674865ec7f07dc63c1bcf0deb2a430b7ae241734c7e57ccd WHIRLPOOL ee3415eadaef3065239859de414d78f6619feef9e70c80a53fc835b52a2acb476645d7040880d2ab480cd92b53f002f58da7a6774bc436a5bfe587acc6b38f00
diff --git a/media-gfx/hp2xx/files/hp2xx-3.4.4-docbuild.patch b/media-gfx/hp2xx/files/hp2xx-3.4.4-docbuild.patch
new file mode 100644
index 000000000000..4245eea61254
--- /dev/null
+++ b/media-gfx/hp2xx/files/hp2xx-3.4.4-docbuild.patch
@@ -0,0 +1,14 @@
+https://bugs.gentoo.org/attachment.cgi?id=399898
+Only first hunk preserved.
+diff -ruN hp2xx-3.4.4-r0/doc/hp2xxinf.tex hp2xx-3.4.4-r3/doc/hp2xxinf.tex
+--- hp2xx-3.4.4-r0/doc/hp2xxinf.tex 2003-06-21 17:41:16.000000000 +0200
++++ hp2xx-3.4.4-r3/doc/hp2xxinf.tex 2015-03-27 20:36:32.000000000 +0100
+@@ -92,7 +92,7 @@
+ @page
+ @tex
+ {\parskip=0pt
+-\hfill mk\@daveg.com\par
++\hfill mk@@daveg.com\par
+ \hfill {\it Using HP2XX}, \manvers\par
+ \hfill \TeX{}info \texinfoversion\par
+ }
diff --git a/media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch b/media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch
new file mode 100644
index 000000000000..9bff4f43b922
--- /dev/null
+++ b/media-gfx/hp2xx/files/hp2xx-3.4.4-r1.patch
@@ -0,0 +1,137 @@
+diff -ruN hp2xx-3.4.4.orig/makes/generic.mak hp2xx-3.4.4/makes/generic.mak
+--- hp2xx-3.4.4.orig/makes/generic.mak 2003-06-21 17:16:35.000000000 +0200
++++ hp2xx-3.4.4/makes/generic.mak 2012-02-07 22:30:29.000000000 +0100
+@@ -30,11 +30,11 @@
+ CP = cp
+ MKINFO = makeinfo
+ RMCMD = rm -f
+-STRIP = strip
++STRIP = true
+
+ # Installation sites (GNU conventions):
+ #
+-prefix = /usr/local
++prefix = /usr
+ bindir = $(prefix)/bin
+ includedir = $(prefix)/include
+ mandir = $(prefix)/man
+@@ -44,10 +44,10 @@
+ # CC and CFLAGS set for gcc, but any ANSI-C compiler should work.
+ # For non-gcc compilers, simply set CFLAGS = -O (to start with)
+ #
+-CC = gcc
+-CFLAGS = -O2 -Wall -finline-functions
++#CC = gcc
++#CFLAGS = -O2 -Wall -finline-functions
+
+-LFLAGS = # only sometimes needed; see below for examples
++LFLAGS = $(LDFLAGS) # only sometimes needed; see below for examples
+ CPPFLAGS = -I. # only sometimes needed; see below for examples
+ BINDCMD = # only needed for EMX and DJGPP DOS extenders
+
+@@ -62,7 +62,7 @@
+ #
+ DEFINES = -DUNIX -DHAS_UNIX_X11
+ PREVIEWER = to_x11
+-ALL_LIBS = -lX11 -lm # Maybe -lX instead of -lX11 is needed?
++ALL_LIBS = -L/usr/X11R6/lib/ -lX11 -lm # Maybe -lX instead of -lX11 is needed?
+ #
+ # Generic UNIX, no previewer
+ #
+@@ -195,31 +195,41 @@
+ EX_SRC =
+ EX_OBJ =
+ EX_DEFS =
++EX_LIBS = -lz
+ #
+ # PNG support (requires -lpng and -lz on the ALL_LIBS line)
+-#EX_SRC = png.c to_png.c
+-#EX_OBJ = png.o to_png.o
+-#EX_DEFS= -DPNG
++EX_SRC += png.c to_png.c
++EX_OBJ += png.o to_png.o
++EX_DEFS += -DPNG
++EX_LIBS += -lpng
+ #
+ # TIFF support (requires -ltiff and possibly -lz on the ALL_LIBS line)
+-#EX_SRC = to_tif.c
+-#EX_OBJ = to_tif.o
+-#EX_DEFS = -DTIF
++EX_SRC += to_tif.c
++EX_OBJ += to_tif.o
++EX_DEFS += -DTIF
++EX_LIBS += -ltiff
+ #
+ # JPEG support (requires -ljpeg)
+-#EX_SRC = to_jpg.c
+-#EX_OBJ = to_jpg.o
+-#EX_DEFS = -DJPG
++EX_SRC += to_jpg.c
++EX_OBJ += to_jpg.o
++EX_DEFS += -DJPG
++EX_LIBS += -ljpeg
+ #
+ # PDF support (requires -lpdf)
+-#EX_SRC = to_pdf.c
+-#EX_OBJ = to_pdf.o
+-#EX_DEFS = -DUSEPDF
++#EX_SRC += to_pdf.c
++#EX_OBJ += to_pdf.o
++#EX_DEFS += -DUSEPDF
++#EX_LIBS += -lpdf
+ #
+ # Include extras:
+-# EX_SRC = to_pic.c to_pac.c
+-# EX_OBJ = to_pic.o to_pac.o
+-# EX_DEFS = -DPIC_PAC
++EX_SRC += to_pic.c to_pac.c
++EX_OBJ += to_pic.o to_pac.o
++EX_DEFS += -DPIC_PAC
++#
++# Epson Esc/P2 support
++EX_SRC += to_escp2.c
++EX_OBJ += to_escp2.o
++EX_DEFS += -DEPSON
+ #
+ #############################################################################
+ # No user-serviceable parts below!
+@@ -245,8 +255,8 @@
+ PROGRAM = hp2xx
+
+ default:
+- @echo "This makefile needs manual configuration! Edit it now!
+- @echo "After configuration, you may use the following commands:
++ @echo "This makefile needs manual configuration! Edit it now!"
++ @echo "After configuration, you may use the following commands:"
+ @echo ""
+ @echo "make all Compile everything"
+ @echo "make check Run a color application in preview mode"
+@@ -267,7 +277,7 @@
+ #########################################################################
+
+ all: $(OBJS)
+- $(CC) $(LFLAGS) $(OBJS) $(ALL_LIBS) -o $(PROGRAM)
++ $(CC) $(LFLAGS) $(OBJS) $(ALL_LIBS) $(EX_LIBS) -o $(PROGRAM)
+ $(BINDCMD)
+
+
+diff -ruN hp2xx-3.4.4.orig/sources/png.c hp2xx-3.4.4/sources/png.c
+--- hp2xx-3.4.4.orig/sources/png.c 2003-06-21 17:31:51.000000000 +0200
++++ hp2xx-3.4.4/sources/png.c 2012-02-07 22:26:33.000000000 +0100
+@@ -5,6 +5,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "to_png.h"
++#include <zlib.h>
+ #include <png.h>
+
+ #define PDNCOL 256
+@@ -36,7 +37,7 @@
+ }
+
+ /* set up error handlimg for libpng */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return;
+ }
diff --git a/media-gfx/hp2xx/hp2xx-3.4.4-r1.ebuild b/media-gfx/hp2xx/hp2xx-3.4.4-r1.ebuild
new file mode 100644
index 000000000000..6b5b8157e332
--- /dev/null
+++ b/media-gfx/hp2xx/hp2xx-3.4.4-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils base
+
+DESCRIPTION="Versatile tool to convert Hewlett-Packard's HP-GL plotter language into other graphics formats"
+HOMEPAGE="http://www.gnu.org/software/hp2xx/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="X jpeg png tiff"
+
+RDEPEND="
+ png? ( media-libs/libpng sys-libs/zlib )
+ tiff? ( media-libs/tiff )
+ jpeg? ( virtual/jpeg )
+ X? ( x11-libs/libX11 )"
+DEPEND="${RDEPEND}
+ sys-apps/texinfo"
+
+PATCHES=( "${FILESDIR}"/${P}-r1.patch
+ "${FILESDIR}"/${P}-docbuild.patch )
+
+src_prepare() {
+ base_src_prepare
+ cp -v makes/generic.mak sources/Makefile || die
+}
+
+src_compile() {
+ cd "${S}/sources" || die
+ export PREVIEWER="no_prev"
+ export EX_SRC=
+ export EX_OBJ=
+ export EX_DEFS=-DUNIX
+ export ALL_LIBS=-lm
+ use X && \
+ PREVIEWER="to_x11" \
+ EX_DEFS="-DHAS_UNIX_X11" \
+ ALL_LIBS="${ALL_LIBS} -lX11"
+ use jpeg && \
+ EX_SRC="${EX_SRC} to_jpg.c" \
+ EX_OBJ="${EX_OBJ} to_jpg.o" \
+ EX_DEFS="${EX_DEFS} -DJPG" \
+ ALL_LIBS="${ALL_LIBS} -ljpeg"
+ use png && \
+ EX_SRC="${EX_SRC} png.c to_png.c" \
+ EX_OBJ="${EX_OBJ} png.o to_png.o" \
+ EX_DEFS="${EX_DEFS} -DPNG" \
+ ALL_LIBS="${ALL_LIBS} -lpng"
+ use tiff && \
+ EX_SRC="${EX_SRC} to_tif.c" \
+ EX_OBJ="${EX_OBJ} to_tif.o" \
+ EX_DEFS="${EX_DEFS} -DTIF" \
+ ALL_LIBS="${ALL_LIBS} -ltiff"
+ emake all
+}
+
+src_install() {
+ dodir /usr/bin /usr/share/info /usr/share/man/man1
+
+ make prefix="${D}/usr" \
+ mandir="${D}/usr/share/man" \
+ infodir="${D}/usr/share/info" \
+ install || die
+}
diff --git a/media-gfx/hp2xx/hp2xx-3.4.4.ebuild b/media-gfx/hp2xx/hp2xx-3.4.4.ebuild
new file mode 100644
index 000000000000..6ce876f83a71
--- /dev/null
+++ b/media-gfx/hp2xx/hp2xx-3.4.4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils base
+
+DESCRIPTION="Versatile tool to convert Hewlett-Packard's HP-GL plotter language into other graphics formats"
+HOMEPAGE="http://www.gnu.org/software/hp2xx/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND="
+ media-libs/libpng
+ media-libs/tiff
+ sys-libs/zlib
+ virtual/jpeg
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-r1.patch" )
+
+src_prepare() {
+ base_src_prepare
+ cp -v makes/generic.mak sources/Makefile || die
+}
+
+src_compile() {
+ cd "${S}/sources" || die
+ emake all
+}
+
+src_install() {
+ dodir /usr/bin /usr/share/info /usr/share/man/man1
+
+ make prefix="${D}/usr" \
+ mandir="${D}/usr/share/man" \
+ infodir="${D}/usr/share/info" \
+ install || die
+}
diff --git a/media-gfx/hp2xx/metadata.xml b/media-gfx/hp2xx/metadata.xml
new file mode 100644
index 000000000000..6f8798ceede2
--- /dev/null
+++ b/media-gfx/hp2xx/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>konstantin@muenning.com</email>
+ <name>Konstantin Münning</name>
+ </maintainer>
+ <herd>printing</herd>
+ <herd>proxy-maintainers</herd>
+</pkgmetadata>
diff --git a/media-gfx/hugin/Manifest b/media-gfx/hugin/Manifest
new file mode 100644
index 000000000000..84eaf33f9630
--- /dev/null
+++ b/media-gfx/hugin/Manifest
@@ -0,0 +1,2 @@
+DIST hugin-2014.0.0.tar.bz2 10974274 SHA256 f098aa0ede44010d3bb2bb38693177533fd776c45063a338c4c483d7e471ec29 SHA512 f4dd7a59f96d4574d420691d221265309d1ff18b7df04df2c2f0946f3d669e78823e2a53f038ac7bddaaf2037e21c45bf54f19d2a90ce9d5d95a836331e34ca5 WHIRLPOOL e8915454fcc5d54037289b0e91b8c441288706874891b72541414cad83556f6587d15d18be38405917da6c69b590121bc74a2ffa130bb9f1abea223c6fb1375d
+DIST hugin-2015.0.0.tar.bz2 10611519 SHA256 2cd93c110be95d439f9e68653f3738d059a26f5c28973f75475ef59cbaa2cbbd SHA512 bb2acf4dea80d43280778f67594dd1ddb0c2e186bcbaafe460fe47e0bd464ae2191b9b25344245e7267316e602ac2179cc838a0dcecb0d408c2206890a5ab6a2 WHIRLPOOL f9d47da7962a19894f323b85084fc7fda925ed5041188ffb1fbcea09ce7719baa7b26c95c66ec22139d24b683d6b1cba8b821949c166814e435efc5fc0e0a11e
diff --git a/media-gfx/hugin/files/hugin-2014.0.0-ParseExp.patch b/media-gfx/hugin/files/hugin-2014.0.0-ParseExp.patch
new file mode 100644
index 000000000000..3ee0dee0bff7
--- /dev/null
+++ b/media-gfx/hugin/files/hugin-2014.0.0-ParseExp.patch
@@ -0,0 +1,527 @@
+Contains revisions 6407:917d117ba6b0 6597:5b768c308932 6688:dde84e96b755 6689:e237d6d1d873 of ParseExp.cpp/h
+
+diff -r 917d117ba6b0 -r e237d6d1d873 src/tools/ParseExp.cpp
+--- a/src/tools/ParseExp.cpp Sun Dec 15 18:20:14 2013 +0100
++++ b/src/tools/ParseExp.cpp Sat Sep 13 11:22:39 2014 +0200
+@@ -1,262 +1,246 @@
+-// -*- c-basic-offset: 4 -*-
+-
+-/** @file ParseExp.cpp
+- *
+- * @brief functions to parse expressions from strings
+- *
+- * @author T. Modes
+- *
+- */
+-
+-/* This program is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU General Public
+- * License as published by the Free Software Foundation; either
+- * version 2 of the License, or (at your option) any later version.
+- *
+- * This software is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public
+- * License along with this software; if not, write to the Free Software
+- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+- *
+- */
+-
+-// implementation is based on blog at
+-// http://agentzlerich.blogspot.de/2011/06/using-boost-spirit-21-to-evaluate.html
+-// modified to Hugins need
+-// added if statement
+-
+-#include "ParseExp.h"
+-
+-#include <limits>
+-#include <iterator>
+-
+-#include <boost/spirit/version.hpp>
+-#if !defined(SPIRIT_VERSION) || SPIRIT_VERSION < 0x2010
+-#error "At least Spirit version 2.1 required"
+-#endif
+-#include <boost/math/constants/constants.hpp>
+-#include <boost/spirit/include/phoenix.hpp>
+-#include <boost/spirit/include/qi.hpp>
+-
+-namespace Parser
+-{
+-
+-// helper classes to implement operators
+-
+-//power function
+-struct lazy_pow_
+-{
+- template <typename X, typename Y>
+- struct result { typedef X type; };
+-
+- template <typename X, typename Y>
+- X operator()(X x, Y y) const
+- {
+- return std::pow(x, y);
+- }
+-};
+-
+-// modulus for double values
+-struct lazy_mod_
+-{
+- template <typename X, typename Y>
+- struct result { typedef X type; };
+-
+- template <typename X, typename Y>
+- X operator()(X x, Y y) const
+- {
+- return std::fmod(x,y);
+- }
+-};
+-
+-// if statement
+-struct lazy_if_
+-{
+- template <typename X, typename Y, typename Z>
+- struct result { typedef Y type; };
+-
+- template <typename X, typename Y, typename Z>
+- X operator()(X x, Y y, Z z) const
+- {
+- return x ? y : z;
+- }
+-};
+-
+-// wrapper for unary function
+-struct lazy_ufunc_
+-{
+- template <typename F, typename A1>
+- struct result { typedef A1 type; };
+-
+- template <typename F, typename A1>
+- A1 operator()(F f, A1 a1) const
+- {
+- return f(a1);
+- }
+-};
+-
+-// convert rad into deg
+-double deg(const double d)
+-{
+- return d*180.0/boost::math::constants::pi<double>();
+-};
+-
+-// convert deg into rad
+-double rad(const double d)
+-{
+- return d*boost::math::constants::pi<double>()/180;
+-};
+-
+-// the main grammar class
+-struct grammar:boost::spirit::qi::grammar<std::string::const_iterator, double(), boost::spirit::ascii::space_type>
+-{
+-
+- // symbol table for constants like "pi", e.g. image number and value
+- struct constant_ : boost::spirit::qi::symbols<char, double>
+- {
+- constant_(const ConstantMap constMap)
+- {
+- this->add("pi", boost::math::constants::pi<double>());
+- if(constMap.size()>0)
+- {
+- for(ConstantMap::const_iterator it=constMap.begin(); it!=constMap.end(); it++)
+- {
+- this->add(it->first, it->second);
+- };
+- };
+- };
+- };
+-
+- // symbol table for unary functions like "abs"
+- struct ufunc_ : boost::spirit::qi::symbols<char, double(*)(double) >
+- {
+- ufunc_()
+- {
+- this->add
+- ("abs" , (double (*)(double)) std::abs )
+- ("acos" , (double (*)(double)) std::acos )
+- ("asin" , (double (*)(double)) std::asin )
+- ("atan" , (double (*)(double)) std::atan )
+- ("ceil" , (double (*)(double)) std::ceil )
+- ("sin" , (double (*)(double)) std::sin )
+- ("cos" , (double (*)(double)) std::cos )
+- ("tan" , (double (*)(double)) std::tan )
+- ("exp" , (double (*)(double)) std::exp )
+- ("floor" , (double (*)(double)) std::floor)
+- ("sqrt" , (double (*)(double)) std::sqrt )
+- ("deg" , (double (*)(double)) deg )
+- ("rad" , (double (*)(double)) rad )
+- ;
+- }
+- } ufunc;
+-
+- boost::spirit::qi::rule<std::string::const_iterator, double(), boost::spirit::ascii::space_type> expression, term, factor, primary, compExpression, compTerm, numExpression;
+-
+- grammar(const ConstantMap constMap) : grammar::base_type(expression)
+- {
+- using boost::spirit::qi::real_parser;
+- using boost::spirit::qi::real_policies;
+- real_parser<double,real_policies<double> > real;
+-
+- using boost::spirit::qi::_1;
+- using boost::spirit::qi::_2;
+- using boost::spirit::qi::_3;
+- using boost::spirit::qi::no_case;
+- using boost::spirit::qi::_val;
+- struct constant_ constant(constMap);
+-
+- boost::phoenix::function<lazy_pow_> lazy_pow;
+- boost::phoenix::function<lazy_mod_> lazy_mod;
+- boost::phoenix::function<lazy_if_> lazy_if;
+- boost::phoenix::function<lazy_ufunc_> lazy_ufunc;
+-
+- expression =
+- (compExpression >> '\?' >> compExpression >> ':' >> compExpression) [_val = lazy_if(_1, _2, _3)]
+- | compExpression [_val=_1]
+- ;
+-
+- compExpression=
+- compTerm [_val=_1]
+- >> * ( ("&&" >> compTerm [_val = _val && _1] )
+- |("||" >> compTerm [_val = _val || _1] )
+- )
+- ;
+-
+- compTerm =
+- numExpression [_val = _1 ]
+- >>*( ( '<' >> numExpression [_val = _val < _1])
+- |( '>' >> numExpression [_val = _val > _1])
+- |( "<=" >> numExpression [_val = _val <= _1])
+- |( ">=" >> numExpression [_val = _val >= _1])
+- |( "==" >> numExpression [_val = _val == _1])
+- |( "!=" >> numExpression [_val = _val != _1])
+- )
+- ;
+-
+- numExpression =
+- term [_val = _1]
+- >> *( ('+' >> term [_val += _1])
+- | ('-' >> term [_val -= _1])
+- )
+- ;
+-
+- term =
+- factor [_val = _1]
+- >> *( ('*' >> factor [_val *= _1])
+- | ('/' >> factor [_val /= _1])
+- | ('%' >> factor [_val = lazy_mod(_val, _1)])
+- )
+- ;
+-
+- factor =
+- primary [_val = _1]
+- >> *( ('^' >> factor [_val = lazy_pow(_val, _1)]) )
+- ;
+-
+- primary =
+- real [_val = _1]
+- | '(' >> expression [_val = _1] >> ')'
+- | ('-' >> primary [_val = -_1])
+- | ('+' >> primary [_val = _1])
+- | no_case[constant] [_val = _1]
+- | (no_case[ufunc] >> '(' >> expression >> ')') [_val = lazy_ufunc(_1, _2) ]
+- ;
+-
+- };
+-};
+-
+-//template <typename ParserType, typename Iterator>
+-bool parse(std::string::const_iterator &iter,
+- std::string::const_iterator end,
+- const grammar &g,
+- double& result)
+-{
+- if(!boost::spirit::qi::phrase_parse(iter, end, g, boost::spirit::ascii::space, result))
+- {
+- return false;
+- };
+- // we check if the full string could parsed
+- return iter==end;
+-}
+-
+-// the function which exposes the interface to external
+-// version without pre-defined constants
+-bool ParseExpression(const std::string& expression, double& result)
+-{
+- ConstantMap constants;
+- return ParseExpression(expression, result, constants);
+-};
+-
+-// version with pre-defined constants
+-bool ParseExpression(const std::string& expression, double& result, const ConstantMap& constants)
+-{
+- grammar g(constants);
+- std::string::const_iterator it=expression.begin();
+- return parse(it, expression.end(), g, result);
+-};
+-
+-} // namespace
++// -*- c-basic-offset: 4 -*-
++
++/** @file ParseExp.cpp
++ *
++ * @brief functions to parse expressions from strings
++ *
++ * @author T. Modes
++ *
++ */
++
++/* This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This software is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public
++ * License along with this software; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ */
++
++// implementation is based on blog at
++// http://agentzlerich.blogspot.de/2011/06/using-boost-spirit-21-to-evaluate.html
++// modified to Hugins need
++// added if statement
++
++#include "ParseExp.h"
++
++#include <limits>
++#include <iterator>
++
++#define BOOST_SPIRIT_USE_PHOENIX_V3 1
++#include <boost/spirit/version.hpp>
++#if !defined(SPIRIT_VERSION) || SPIRIT_VERSION < 0x2010
++#error "At least Spirit version 2.1 required"
++#endif
++#include <boost/math/constants/constants.hpp>
++#include <boost/spirit/include/phoenix.hpp>
++#include <boost/spirit/include/qi.hpp>
++
++namespace Parser
++{
++
++// helper classes to implement operators
++
++//power function
++struct lazy_pow_
++{
++ typedef double result_type;
++
++ double operator()(double x, double y) const
++ {
++ return std::pow(x, y);
++ }
++};
++
++// modulus for double values
++struct lazy_mod_
++{
++ typedef double result_type;
++
++ double operator()(double x, double y) const
++ {
++ return std::fmod(x,y);
++ }
++};
++
++// if statement
++struct lazy_if_
++{
++ typedef double result_type;
++
++ double operator()(double x, double y, double z) const
++ {
++ return (std::fabs(x)>1e-5) ? y : z;
++ }
++};
++
++// wrapper for unary function
++struct lazy_ufunc_
++{
++ typedef double result_type;
++
++ double operator()(double (*f)(double), double a1) const
++ {
++ return f(a1);
++ }
++};
++
++// convert rad into deg
++const double deg(const double d)
++{
++ return d*180.0/boost::math::constants::pi<double>();
++};
++
++// convert deg into rad
++const double rad(const double d)
++{
++ return d*boost::math::constants::pi<double>()/180;
++};
++
++// the main grammar class
++struct grammar:boost::spirit::qi::grammar<std::string::const_iterator, double(), boost::spirit::ascii::space_type>
++{
++
++ // symbol table for constants like "pi", e.g. image number and value
++ struct constant_ : boost::spirit::qi::symbols<char, double>
++ {
++ constant_(const ConstantMap constMap)
++ {
++ this->add("pi", boost::math::constants::pi<double>());
++ if (constMap.size()>0)
++ {
++ for (ConstantMap::const_iterator it = constMap.begin(); it != constMap.end(); it++)
++ {
++ this->add(it->first, it->second);
++ };
++ };
++ };
++ };
++
++ // symbol table for unary functions like "abs"
++ struct ufunc_ : boost::spirit::qi::symbols<char, double(*)(double) >
++ {
++ ufunc_()
++ {
++ this->add
++ ("abs", (double(*)(double)) std::abs)
++ ("acos", (double(*)(double)) std::acos)
++ ("asin", (double(*)(double)) std::asin)
++ ("atan", (double(*)(double)) std::atan)
++ ("ceil", (double(*)(double)) std::ceil)
++ ("sin", (double(*)(double)) std::sin)
++ ("cos", (double(*)(double)) std::cos)
++ ("tan", (double(*)(double)) std::tan)
++ ("exp", (double(*)(double)) std::exp)
++ ("floor", (double(*)(double)) std::floor)
++ ("sqrt", (double(*)(double)) std::sqrt)
++ ("deg", (double(*)(double)) deg)
++ ("rad", (double(*)(double)) rad)
++ ;
++ }
++ } ufunc;
++
++ boost::spirit::qi::rule<std::string::const_iterator, double(), boost::spirit::ascii::space_type> expression, term, factor, primary, compExpression, compTerm, numExpression;
++
++ grammar(const ConstantMap constMap) : grammar::base_type(expression)
++ {
++ using boost::spirit::qi::real_parser;
++ using boost::spirit::qi::real_policies;
++ real_parser<double, real_policies<double> > real;
++
++ using boost::spirit::qi::_1;
++ using boost::spirit::qi::_2;
++ using boost::spirit::qi::_3;
++ using boost::spirit::qi::no_case;
++ using boost::spirit::qi::_val;
++ struct constant_ constant(constMap);
++
++ boost::phoenix::function<lazy_pow_> lazy_pow;
++ boost::phoenix::function<lazy_mod_> lazy_mod;
++ boost::phoenix::function<lazy_if_> lazy_if;
++ boost::phoenix::function<lazy_ufunc_> lazy_ufunc;
++
++ expression =
++ (compExpression >> '\?' >> compExpression >> ':' >> compExpression)[_val = lazy_if(_1, _2, _3)]
++ | compExpression[_val = _1]
++ ;
++
++ compExpression =
++ compTerm[_val = _1]
++ >> *(("&&" >> compTerm[_val = _val && _1])
++ | ("||" >> compTerm[_val = _val || _1])
++ )
++ ;
++
++ compTerm =
++ numExpression[_val = _1]
++ >> *(('<' >> numExpression[_val = _val < _1])
++ | ('>' >> numExpression[_val = _val > _1])
++ | ("<=" >> numExpression[_val = _val <= _1])
++ | (">=" >> numExpression[_val = _val >= _1])
++ | ("==" >> numExpression[_val = _val == _1])
++ | ("!=" >> numExpression[_val = _val != _1])
++ )
++ ;
++
++ numExpression =
++ term[_val = _1]
++ >> *(('+' >> term[_val += _1])
++ | ('-' >> term[_val -= _1])
++ )
++ ;
++
++ term =
++ factor[_val = _1]
++ >> *(('*' >> factor[_val *= _1])
++ | ('/' >> factor[_val /= _1])
++ | ('%' >> factor[_val = lazy_mod(_val, _1)])
++ )
++ ;
++
++ factor =
++ primary[_val = _1]
++ >> *(('^' >> factor[_val = lazy_pow(_val, _1)]))
++ ;
++
++ primary =
++ real[_val = _1]
++ | '(' >> expression[_val = _1] >> ')'
++ | ('-' >> primary[_val = -_1])
++ | ('+' >> primary[_val = _1])
++ | no_case[constant][_val = _1]
++ | (no_case[ufunc] >> '(' >> expression >> ')')[_val = lazy_ufunc(_1, _2)]
++ ;
++
++ };
++};
++
++bool parse(std::string::const_iterator& iter,
++ std::string::const_iterator end,
++ const grammar& g,
++ double& result)
++{
++ if(!boost::spirit::qi::phrase_parse(iter, end, g, boost::spirit::ascii::space, result))
++ {
++ return false;
++ };
++ // we check if the full string could parsed
++ return iter==end;
++}
++
++// version with pre-defined constants
++bool ParseExpression(const std::string& expression, double& result, const ConstantMap& constants)
++{
++ grammar g(constants);
++ std::string::const_iterator it=expression.begin();
++ return parse(it, expression.end(), g, result);
++};
++
++} // namespace
+diff -r 917d117ba6b0 -r e237d6d1d873 src/tools/ParseExp.h
+--- a/src/tools/ParseExp.h Sun Dec 15 18:20:14 2013 +0100
++++ b/src/tools/ParseExp.h Sat Sep 13 11:22:39 2014 +0200
+@@ -33,8 +33,7 @@
+ {
+ typedef std::map<const char*, double> ConstantMap;
+
+-bool ParseExpression(const std::string& expression, double& result);
+-bool ParseExpression(const std::string& expression, double& result, const ConstantMap& constants);
++bool ParseExpression(const std::string& expression, double& result, const ConstantMap& constants=ConstantMap());
+
+ };
+
diff --git a/media-gfx/hugin/files/hugin-2014.0.0-lensfun-0.3.0.patch b/media-gfx/hugin/files/hugin-2014.0.0-lensfun-0.3.0.patch
new file mode 100644
index 000000000000..f60e68663484
--- /dev/null
+++ b/media-gfx/hugin/files/hugin-2014.0.0-lensfun-0.3.0.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=524700
+
+diff -Naur hugin-2014.0.0.orig/src/hugin_base/lensdb/LensDB.cpp hugin-2014.0.0/src/hugin_base/lensdb/LensDB.cpp
+--- hugin-2014.0.0.orig/src/hugin_base/lensdb/LensDB.cpp 2014-04-27 08:26:57.000000000 +0200
++++ hugin-2014.0.0/src/hugin_base/lensdb/LensDB.cpp 2014-10-08 10:44:29.445076647 +0200
+@@ -620,7 +620,9 @@
+ break;
+ case LF_DIST_MODEL_NONE:
+ case LF_DIST_MODEL_POLY5:
++#ifdef LF_DIST_MODEL_FOV1
+ case LF_DIST_MODEL_FOV1:
++#endif
+ default:
+ return false;
+ break;
diff --git a/media-gfx/hugin/hugin-2014.0.0-r1.ebuild b/media-gfx/hugin/hugin-2014.0.0-r1.ebuild
new file mode 100644
index 000000000000..965c600528fc
--- /dev/null
+++ b/media-gfx/hugin/hugin-2014.0.0-r1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit base python-single-r1 wxwidgets versionator cmake-utils
+
+DESCRIPTION="GUI for the creation & processing of panoramic images"
+HOMEPAGE="http://hugin.sf.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 SIFT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+LANGS=" cs da de en_GB es eu fi fr hu it ja nl pl pt_BR ro ru sk sv zh_CN zh_TW"
+IUSE="debug lapack python sift $(echo ${LANGS//\ /\ linguas_})"
+
+CDEPEND="
+ !!dev-util/cocom
+ app-arch/zip
+ dev-cpp/tclap
+ >=dev-libs/boost-1.49.0-r1:=
+ dev-libs/zthread
+ >=media-gfx/enblend-4.0
+ media-gfx/exiv2:=
+ media-libs/freeglut
+ media-libs/glew:=
+ media-libs/lensfun
+ >=media-libs/libpano13-2.9.19_beta1:0=
+ media-libs/libpng:0=
+ media-libs/openexr:=
+ media-libs/tiff
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/wxGTK:3.0=[X,opengl]
+ lapack? ( virtual/lapack )
+ sift? ( media-gfx/autopano-sift-C )"
+RDEPEND="${CDEPEND}
+ media-libs/exiftool"
+DEPEND="${CDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ python? ( ${PYTHON_DEPS} >=dev-lang/swig-2.0.4 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)
+
+PATCHES=(
+ "${FILESDIR}"/${P}-lensfun-0.3.0.patch
+ "${FILESDIR}"/${P}-ParseExp.patch
+)
+
+pkg_setup() {
+ DOCS="authors.txt README TODO"
+ mycmakeargs=(
+ $(cmake-utils_use_enable lapack LAPACK)
+ $(cmake-utils_use_build python HSI)
+ )
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ sed \
+ -e 's:-O3::g' \
+ -i src/celeste/CMakeLists.txt || die
+ rm CMakeModules/{FindLAPACK,FindPkgConfig}.cmake || die
+
+ cmake-utils_src_prepare
+}
+
+src_install() {
+ cmake-utils_src_install
+ use python && python_optimize
+
+ for lang in ${LANGS} ; do
+ case ${lang} in
+ ca) dir=ca_ES;;
+ cs) dir=cs_CZ;;
+ *) dir=${lang};;
+ esac
+ use linguas_${lang} || rm -r "${D}"/usr/share/locale/${dir}
+ done
+}
diff --git a/media-gfx/hugin/hugin-2014.0.0.ebuild b/media-gfx/hugin/hugin-2014.0.0.ebuild
new file mode 100644
index 000000000000..9a43a5bcd872
--- /dev/null
+++ b/media-gfx/hugin/hugin-2014.0.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit base python-single-r1 wxwidgets versionator cmake-utils
+
+DESCRIPTION="GUI for the creation & processing of panoramic images"
+HOMEPAGE="http://hugin.sf.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 SIFT"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+
+LANGS=" cs da de en_GB es eu fi fr hu it ja nl pl pt_BR ro ru sk sv zh_CN zh_TW"
+IUSE="debug lapack python sift $(echo ${LANGS//\ /\ linguas_})"
+
+CDEPEND="
+ !!dev-util/cocom
+ app-arch/zip
+ dev-cpp/tclap
+ >=dev-libs/boost-1.49.0-r1:=
+ dev-libs/zthread
+ >=media-gfx/enblend-4.0
+ media-gfx/exiv2:=
+ media-libs/freeglut
+ media-libs/glew:=
+ media-libs/lensfun
+ >=media-libs/libpano13-2.9.19_beta1:0=
+ media-libs/libpng:0=
+ media-libs/openexr:=
+ media-libs/tiff
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/wxGTK:2.8=[X,opengl,-odbc]
+ lapack? ( virtual/lapack )
+ sift? ( media-gfx/autopano-sift-C )"
+RDEPEND="${CDEPEND}
+ media-libs/exiftool"
+DEPEND="${CDEPEND}
+ sys-devel/gettext
+ virtual/pkgconfig
+ python? ( ${PYTHON_DEPS} >=dev-lang/swig-2.0.4 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)
+
+PATCHES=(
+ "${FILESDIR}"/${P}-lensfun-0.3.0.patch
+ "${FILESDIR}"/${P}-ParseExp.patch
+)
+
+pkg_setup() {
+ DOCS="authors.txt README TODO"
+ mycmakeargs=(
+ $(cmake-utils_use_enable lapack LAPACK)
+ $(cmake-utils_use_build python HSI)
+ )
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ sed \
+ -e 's:-O3::g' \
+ -i src/celeste/CMakeLists.txt || die
+ rm CMakeModules/{FindLAPACK,FindPkgConfig}.cmake || die
+
+ cmake-utils_src_prepare
+}
+
+src_install() {
+ cmake-utils_src_install
+ use python && python_optimize
+
+ for lang in ${LANGS} ; do
+ case ${lang} in
+ ca) dir=ca_ES;;
+ cs) dir=cs_CZ;;
+ *) dir=${lang};;
+ esac
+ use linguas_${lang} || rm -r "${D}"/usr/share/locale/${dir}
+ done
+}
diff --git a/media-gfx/hugin/hugin-2015.0.0-r1.ebuild b/media-gfx/hugin/hugin-2015.0.0-r1.ebuild
new file mode 100644
index 000000000000..b42262b77ba2
--- /dev/null
+++ b/media-gfx/hugin/hugin-2015.0.0-r1.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit base python-single-r1 wxwidgets versionator cmake-utils
+
+DESCRIPTION="GUI for the creation & processing of panoramic images"
+HOMEPAGE="http://hugin.sf.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 SIFT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+LANGS=" ca@valencia ca_ES cs_CZ da de en_GB es eu fi fr hu it ja nl pl pt_BR ro ru sk sv zh_CN zh_TW"
+IUSE="debug lapack python sift $(echo ${LANGS//\ /\ linguas_})"
+
+CDEPEND="
+ !!dev-util/cocom
+ dev-db/sqlite:3
+ >=dev-libs/boost-1.49.0-r1:=
+ dev-libs/zthread
+ >=media-gfx/enblend-4.0
+ media-gfx/exiv2:=
+ media-libs/freeglut
+ media-libs/glew:=
+ >=media-libs/libpano13-2.9.19_beta1:0=
+ media-libs/libpng:0=
+ media-libs/openexr:=
+ media-libs/tiff:0
+ >=media-libs/vigra-1.9.0[openexr]
+ sci-libs/fftw:=
+ sys-libs/zlib
+ virtual/glu
+ virtual/jpeg:0
+ virtual/opengl
+ x11-libs/wxGTK:3.0=[X,opengl]
+ lapack? ( virtual/blas virtual/lapack )
+ sift? ( media-gfx/autopano-sift-C )"
+RDEPEND="${CDEPEND}
+ media-libs/exiftool"
+DEPEND="${CDEPEND}
+ dev-cpp/tclap
+ sys-devel/gettext
+ virtual/pkgconfig
+ python? ( ${PYTHON_DEPS} >=dev-lang/swig-2.0.4 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)
+
+pkg_setup() {
+ DOCS="authors.txt README TODO"
+ mycmakeargs=(
+ $(cmake-utils_use_enable lapack LAPACK)
+ $(cmake-utils_use_build python HSI)
+ )
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ sed \
+ -e 's:-O3::g' \
+ -i src/celeste/CMakeLists.txt || die
+ rm CMakeModules/{FindLAPACK,FindPkgConfig}.cmake || die
+
+ cmake-utils_src_prepare
+}
+
+src_install() {
+ cmake-utils_src_install
+ use python && python_optimize
+
+ for lang in ${LANGS} ; do
+ case ${lang} in
+ ca@valencia) dir=ca_ES@valencia;;
+ *) dir=${lang};;
+ esac
+ use linguas_${lang} || rm -r "${D}"/usr/share/locale/${dir}
+ done
+}
diff --git a/media-gfx/hugin/hugin-2015.0.0.ebuild b/media-gfx/hugin/hugin-2015.0.0.ebuild
new file mode 100644
index 000000000000..0798df9b65d6
--- /dev/null
+++ b/media-gfx/hugin/hugin-2015.0.0.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="2.8"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit base python-single-r1 wxwidgets versionator cmake-utils
+
+DESCRIPTION="GUI for the creation & processing of panoramic images"
+HOMEPAGE="http://hugin.sf.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2 SIFT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+LANGS=" ca@valencia ca_ES cs_CZ da de en_GB es eu fi fr hu it ja nl pl pt_BR ro ru sk sv zh_CN zh_TW"
+IUSE="debug lapack python sift $(echo ${LANGS//\ /\ linguas_})"
+
+CDEPEND="
+ !!dev-util/cocom
+ dev-db/sqlite:3
+ >=dev-libs/boost-1.49.0-r1:=
+ dev-libs/zthread
+ >=media-gfx/enblend-4.0
+ media-gfx/exiv2:=
+ media-libs/freeglut
+ media-libs/glew:=
+ >=media-libs/libpano13-2.9.19_beta1:0=
+ media-libs/libpng:0=
+ media-libs/openexr:=
+ media-libs/tiff:0
+ >=media-libs/vigra-1.9.0[openexr]
+ sci-libs/fftw:=
+ sys-libs/zlib
+ virtual/glu
+ virtual/jpeg:0
+ virtual/opengl
+ x11-libs/wxGTK:2.8=[X,opengl,-odbc]
+ lapack? ( virtual/blas virtual/lapack )
+ sift? ( media-gfx/autopano-sift-C )"
+RDEPEND="${CDEPEND}
+ media-libs/exiftool"
+DEPEND="${CDEPEND}
+ dev-cpp/tclap
+ sys-devel/gettext
+ virtual/pkgconfig
+ python? ( ${PYTHON_DEPS} >=dev-lang/swig-2.0.4 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)
+
+pkg_setup() {
+ DOCS="authors.txt README TODO"
+ mycmakeargs=(
+ $(cmake-utils_use_enable lapack LAPACK)
+ $(cmake-utils_use_build python HSI)
+ )
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ sed \
+ -e 's:-O3::g' \
+ -i src/celeste/CMakeLists.txt || die
+ rm CMakeModules/{FindLAPACK,FindPkgConfig}.cmake || die
+
+ cmake-utils_src_prepare
+}
+
+src_install() {
+ cmake-utils_src_install
+ use python && python_optimize
+
+ for lang in ${LANGS} ; do
+ case ${lang} in
+ ca@valencia) dir=ca_ES@valencia;;
+ *) dir=${lang};;
+ esac
+ use linguas_${lang} || rm -r "${D}"/usr/share/locale/${dir}
+ done
+}
diff --git a/media-gfx/hugin/hugin-9999.ebuild b/media-gfx/hugin/hugin-9999.ebuild
new file mode 100644
index 000000000000..ae044a4ee1e9
--- /dev/null
+++ b/media-gfx/hugin/hugin-9999.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+WX_GTK_VER="3.0"
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit base mercurial python-single-r1 wxwidgets versionator cmake-utils
+
+DESCRIPTION="GUI for the creation & processing of panoramic images"
+HOMEPAGE="http://hugin.sf.net"
+SRC_URI=""
+EHG_REPO_URI="http://hg.code.sf.net/p/hugin/hugin"
+EHG_PROJECT="${PN}-${PN}"
+
+LICENSE="GPL-2 SIFT"
+SLOT="0"
+KEYWORDS=""
+
+LANGS=" ca@valencia ca_ES cs_CZ da de en_GB es eu fi fr hu it ja nl pl pt_BR ro ru sk sv zh_CN zh_TW"
+IUSE="debug lapack python sift $(echo ${LANGS//\ /\ linguas_})"
+
+CDEPEND="
+ !!dev-util/cocom
+ dev-db/sqlite:3
+ >=dev-libs/boost-1.49.0-r1:=
+ dev-libs/zthread
+ >=media-gfx/enblend-4.0
+ media-gfx/exiv2:=
+ media-libs/freeglut
+ media-libs/glew:=
+ >=media-libs/libpano13-2.9.19_beta1:0=
+ media-libs/libpng:0=
+ media-libs/openexr:=
+ media-libs/tiff:0
+ >=media-libs/vigra-1.9.0[openexr]
+ sci-libs/fftw:=
+ sys-libs/zlib
+ virtual/opengl
+ virtual/jpeg:0
+ virtual/opengl
+ x11-libs/wxGTK:3.0=[X,opengl]
+ lapack? ( virtual/blas virtual/lapack )
+ sift? ( media-gfx/autopano-sift-C )"
+RDEPEND="${CDEPEND}
+ media-libs/exiftool"
+DEPEND="${CDEPEND}
+ dev-cpp/tclap
+ sys-devel/gettext
+ virtual/pkgconfig
+ python? ( ${PYTHON_DEPS} >=dev-lang/swig-2.0.4 )"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)
+
+pkg_setup() {
+ DOCS="authors.txt README TODO"
+ mycmakeargs=(
+ $(cmake-utils_use_enable lapack LAPACK)
+ $(cmake-utils_use_build python HSI)
+ )
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ sed \
+ -e 's:-O3::g' \
+ -i src/celeste/CMakeLists.txt || die
+ rm CMakeModules/{FindLAPACK,FindPkgConfig}.cmake || die
+
+ cmake-utils_src_prepare
+}
+
+src_install() {
+ cmake-utils_src_install
+ use python && python_optimize
+
+ for lang in ${LANGS} ; do
+ case ${lang} in
+ ca@valencia) dir=ca_ES@valencia;;
+ *) dir=${lang};;
+ esac
+ use linguas_${lang} || rm -r "${D}"/usr/share/locale/${dir}
+ done
+}
diff --git a/media-gfx/hugin/metadata.xml b/media-gfx/hugin/metadata.xml
new file mode 100644
index 000000000000..abdaa4cbf3f5
--- /dev/null
+++ b/media-gfx/hugin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription>hugin is a panorama stitching program</longdescription>
+ <use>
+ <flag name="sift">automatically align images with
+ <pkg>media-gfx/autopano-sift</pkg> or
+ <pkg>media-gfx/autopano-sift-C</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/icc_examin/Manifest b/media-gfx/icc_examin/Manifest
new file mode 100644
index 000000000000..fc2e40cd8e09
--- /dev/null
+++ b/media-gfx/icc_examin/Manifest
@@ -0,0 +1,3 @@
+DIST icc_examin-0.54.tar.bz2 593684 SHA256 d5bb5c21ee0390b56b75865e3023e6465aa39daa3f22e26cf55d8cdd37638f64 SHA512 2704713088dde3735e84e4694a9a5d09127f3e03eea062a9018d6e357f3d64f980c75d16e5c92befa1eebd30d9964e9a55ad82df44ad244e9a0d2eddf5a800e5 WHIRLPOOL 1dc7e3ce9bb593c411d4388e3f76dbbdfd47c2f545fc172f83e478a932d834b487d53b9387142703cc2adf25132133b132161eb96a40dc597286ab457c35ce4d
+DIST icc_examin-0.55.tar.bz2 594646 SHA256 e44fe003e5aa7bd70a5b137c094a3047b356755be376977a1aa402c65d0ba2fc SHA512 8355411048c5fff5d7e9d08feb9c42cc4d4f4590897fd42c1e9e9e7507b5ed0cc9beb4ade7c57df40cbc1255dc806aea2f03a3aca16d0c1438a743abe7571920 WHIRLPOOL 56babbca717975192a831129a6071e1c48fc2a7621a691d4283bb0e2296a899aec2060f771848122ddaab9170dcd6b510986959a0537227dae31facf49d2ead1
+DIST icc_examin-0.55.tar.gz 692711 SHA256 6a6036e4724845368c2ade86c3d29e9cf0e09801f704d02f45ed2b2481924bab SHA512 503d932890c747b9111167df360e9deedd985a4cd434610a6c0de42d4d36ff22907c1441485731349661ddab85d39268fcfc69c035601c1066ec9b63566f491a WHIRLPOOL b6014338eb79e3ac2bdbbb7e4f817a49cca0d34e6dc3b10fe74f6bc4cc1c85d57d7b76d53574aebdcb7dff599a1f0ade1f809006ada01977361d59a64ca8d413
diff --git a/media-gfx/icc_examin/files/icc_examin-0.54-fix-xcm-test.patch b/media-gfx/icc_examin/files/icc_examin-0.54-fix-xcm-test.patch
new file mode 100644
index 000000000000..ae471d541b9d
--- /dev/null
+++ b/media-gfx/icc_examin/files/icc_examin-0.54-fix-xcm-test.patch
@@ -0,0 +1,15 @@
+Fix https://bugs.gentoo.org/492374
+
+Michael Weber
+
+--- icc_examin-0.54/configure_tests.sh
++++ icc_examin-0.54/configure_tests.sh
+@@ -543,7 +543,7 @@
+ if [ -z "$found" ]; then
+ pkg-config --atleast-version=0.2 $pc_package
+ if [ $? = 0 ]; then
+- found=`pkg-config --cflags $pc_package`
++ found=" "`pkg-config --cflags $pc_package`
+ version=`pkg-config --modversion $pc_package`
+ fi
+ fi
diff --git a/media-gfx/icc_examin/files/icc_examin-0.55-fix-xrandr-test.patch b/media-gfx/icc_examin/files/icc_examin-0.55-fix-xrandr-test.patch
new file mode 100644
index 000000000000..b9acf4c2d049
--- /dev/null
+++ b/media-gfx/icc_examin/files/icc_examin-0.55-fix-xrandr-test.patch
@@ -0,0 +1,25 @@
+Upstream as https://sourceforge.net/p/oyranos/patches/6/
+
+Michael Weber
+
+--- icc_examin-0.55/configure_tests.sh
++++ icc_examin-0.55/configure_tests.sh
+@@ -689,7 +689,8 @@
+ if [ -z "$found" ]; then
+ pkg-config --atleast-version=1.2 $pc_package
+ if [ $? = 0 ]; then
+- found=`pkg-config --cflags $pc_package`
++ found="yes"
++ cflags=`pkg-config --cflags $pc_package`
+ version=`pkg-config --modversion $pc_package`
+ fi
+ fi
+@@ -703,7 +704,7 @@
+ if [ -n "$MAKEFILE_DIR" ]; then
+ for i in $MAKEFILE_DIR; do
+ test -f "$ROOT_DIR/$i/makefile".in && echo "XRANDR = 1" >> "$i/makefile"
+- test -f "$ROOT_DIR/$i/makefile".in && echo "XRANDR_INC = $found" >> "$i/makefile"
++ test -f "$ROOT_DIR/$i/makefile".in && echo "XRANDR_INC = $cflags" >> "$i/makefile"
+ done
+ fi
+ elif [ $OSUNAME = "Linux" ]; then
diff --git a/media-gfx/icc_examin/icc_examin-0.54.ebuild b/media-gfx/icc_examin/icc_examin-0.54.ebuild
new file mode 100644
index 000000000000..62adad18b71f
--- /dev/null
+++ b/media-gfx/icc_examin/icc_examin-0.54.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="viewer for ICC and CGATS profiles, argylls gamut vrml visualisations and video card gamma tables"
+HOMEPAGE="http://www.oyranos.org/wiki/index.php?title=ICC_Examin"
+SRC_URI="mirror://sourceforge/oyranos/ICC%20Examin/ICC%20Examin%20${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-admin/elektra
+ media-libs/ftgl
+ media-libs/libXcm
+ <media-libs/oyranos-0.9.5
+ media-libs/tiff
+ x11-libs/fltk
+ x11-libs/libX11
+ x11-libs/libXinerama
+ x11-libs/libXpm
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.54-fix-xcm-test.patch
+
+ sed -e '/xdg-icon-resource\|xdg-desktop-menu/d' \
+ -i makefile.in
+}
+
+src_configure() {
+ tc-export CC CXX
+ econf --enable-verbose \
+ --disable-static
+}
diff --git a/media-gfx/icc_examin/icc_examin-0.55-r1.ebuild b/media-gfx/icc_examin/icc_examin-0.55-r1.ebuild
new file mode 100644
index 000000000000..a6e047b8804b
--- /dev/null
+++ b/media-gfx/icc_examin/icc_examin-0.55-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Viewer for ICC and CGATS profiles, argylls gamut vrml visualisations and GPU gamma tables"
+HOMEPAGE="http://www.oyranos.org/wiki/index.php?title=ICC_Examin"
+SRC_URI="https://github.com/oyranos-cms/${PN/_/-}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-admin/elektra
+ media-libs/ftgl
+ media-libs/libXcm
+ =media-libs/oyranos-0.9.5*
+ media-libs/tiff:0
+ x11-libs/fltk
+ x11-libs/libX11
+ x11-libs/libXinerama
+ x11-libs/libXpm
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${P/_/-}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.55-fix-xrandr-test.patch
+
+ sed -e '/xdg-icon-resource\|xdg-desktop-menu/d' \
+ -i makefile.in
+}
+
+src_configure() {
+ tc-export CC CXX
+ econf --enable-verbose \
+ --disable-static
+}
diff --git a/media-gfx/icc_examin/icc_examin-0.55.ebuild b/media-gfx/icc_examin/icc_examin-0.55.ebuild
new file mode 100644
index 000000000000..daf06160335c
--- /dev/null
+++ b/media-gfx/icc_examin/icc_examin-0.55.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="viewer for ICC and CGATS profiles, argylls gamut vrml visualisations and video card gamma tables"
+HOMEPAGE="http://www.oyranos.org/wiki/index.php?title=ICC_Examin"
+SRC_URI="mirror://sourceforge/oyranos/ICC%20Examin/ICC%20Examin%20${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-admin/elektra
+ media-libs/ftgl
+ media-libs/libXcm
+ >=media-libs/oyranos-0.9.5
+ media-libs/tiff
+ x11-libs/fltk
+ x11-libs/libX11
+ x11-libs/libXinerama
+ x11-libs/libXpm
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.55-fix-xrandr-test.patch
+
+ sed -e '/xdg-icon-resource\|xdg-desktop-menu/d' \
+ -i makefile.in
+}
+
+src_configure() {
+ tc-export CC CXX
+ econf --enable-verbose \
+ --disable-static
+}
diff --git a/media-gfx/icc_examin/icc_examin-9999.ebuild b/media-gfx/icc_examin/icc_examin-9999.ebuild
new file mode 100644
index 000000000000..4835639d9faa
--- /dev/null
+++ b/media-gfx/icc_examin/icc_examin-9999.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs git-r3
+
+DESCRIPTION="Viewer for ICC and CGATS profiles, argylls gamut vrml visualisations and GPU gamma tables"
+HOMEPAGE="http://www.oyranos.org/wiki/index.php?title=ICC_Examin"
+EGIT_REPO_URI="https://github.com/oyranos-cms/${PN/_/-}.git"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="app-admin/elektra
+ media-libs/ftgl
+ media-libs/libXcm
+ =media-libs/oyranos-9999
+ media-libs/tiff:0
+ x11-libs/fltk
+ x11-libs/libX11
+ x11-libs/libXinerama
+ x11-libs/libXpm
+ x11-libs/libXrandr
+ x11-libs/libXxf86vm"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.55-fix-xrandr-test.patch
+
+ sed -e '/xdg-icon-resource\|xdg-desktop-menu/d' \
+ -i makefile.in
+}
+
+src_configure() {
+ tc-export CC CXX
+ econf --enable-verbose \
+ --disable-static
+}
diff --git a/media-gfx/icc_examin/metadata.xml b/media-gfx/icc_examin/metadata.xml
new file mode 100644
index 000000000000..6a27d50de659
--- /dev/null
+++ b/media-gfx/icc_examin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">oyranos-cms/icc-examin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/icon-slicer/Manifest b/media-gfx/icon-slicer/Manifest
new file mode 100644
index 000000000000..7f3c8538a517
--- /dev/null
+++ b/media-gfx/icon-slicer/Manifest
@@ -0,0 +1 @@
+DIST icon-slicer-0.3.tar.gz 112429 RMD160 ca1157eabaf66eccdbc46d49392e54e6ad7102d4 SHA1 82284a87061ad9e1872e61963597c39ddcba53da SHA256 05f0216dd0c25a17859de66357f64da5033375b6fbf5f31ca54867311160b64d
diff --git a/media-gfx/icon-slicer/icon-slicer-0.3.ebuild b/media-gfx/icon-slicer/icon-slicer-0.3.ebuild
new file mode 100644
index 000000000000..fc8e793cf220
--- /dev/null
+++ b/media-gfx/icon-slicer/icon-slicer-0.3.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="utility for generating icon themes and libXcursor cursor themes"
+HOMEPAGE="http://www.freedesktop.org/software/icon-slicer/"
+SRC_URI="http://www.freedesktop.org/software/icon-slicer/releases/${P}.tar.gz"
+
+KEYWORDS="alpha amd64 ~hppa ia64 ppc sparc x86"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+
+RDEPEND="x11-apps/xcursorgen
+ x11-libs/gtk+:2
+ dev-libs/popt"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog README TODO
+}
diff --git a/media-gfx/icon-slicer/metadata.xml b/media-gfx/icon-slicer/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/icon-slicer/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/icoutils/Manifest b/media-gfx/icoutils/Manifest
new file mode 100644
index 000000000000..b478e85d634e
--- /dev/null
+++ b/media-gfx/icoutils/Manifest
@@ -0,0 +1 @@
+DIST icoutils-0.31.0.tar.bz2 559836 SHA256 a895d9d74a418d65d39a667e58ae38be79c9e726711384551d36531696f3af71 SHA512 f6ee954784abd9f6cf1f6a2424b89e917de2e3950a5411c6790f1a7a34522e067308677ab00bd34781d179fde1192ec91dcd400207edb09bdb20d503507b5cca WHIRLPOOL 92a3905315973ed016bb2000881d5c39f7306c792feaed302bf183d62056217a9aa76e90dc25a44ffb43434053f3c5ced90e100bd59c284a26fa14b7ffbe0b4a
diff --git a/media-gfx/icoutils/files/icoutils-0.29.1-gettext.patch b/media-gfx/icoutils/files/icoutils-0.29.1-gettext.patch
new file mode 100644
index 000000000000..4aa4c44cc3ce
--- /dev/null
+++ b/media-gfx/icoutils/files/icoutils-0.29.1-gettext.patch
@@ -0,0 +1,13 @@
+Index: icoutils-0.29.1/configure.ac
+===================================================================
+--- icoutils-0.29.1.orig/configure.ac
++++ icoutils-0.29.1/configure.ac
+@@ -26,7 +26,7 @@ gl_INIT
+
+ # Gettext
+ AM_GNU_GETTEXT([external])
+-# AM_GNU_GETTEXT_VERSION(0.14.1)
++AM_GNU_GETTEXT_VERSION(0.14.1)
+
+ # Checks for header files.
+ AC_HEADER_STDC
diff --git a/media-gfx/icoutils/files/icoutils-0.29.1-locale.patch b/media-gfx/icoutils/files/icoutils-0.29.1-locale.patch
new file mode 100644
index 000000000000..d73ae119ea5e
--- /dev/null
+++ b/media-gfx/icoutils/files/icoutils-0.29.1-locale.patch
@@ -0,0 +1,39 @@
+Fix compiling with -O0 (see <https://bugs.gentoo.org/show_bug.cgi?id=319559>)
+
+
+--- a/wrestool/main.c
++++ b/wrestool/main.c
+@@ -32,6 +32,10 @@
+ #include "common/string-utils.h"
+ #include "wrestool.h"
+
++#ifdef HAVE_LOCALE_H
++#include <locale.h>
++#endif
++
+ #define PROGRAM "wrestool"
+
+
+--- a/icotool/main.c
++++ b/icotool/main.c
+@@ -37,6 +37,10 @@
+ #include "common/io-utils.h"
+ #include "icotool.h"
+
++#ifdef HAVE_LOCALE_H
++#include <locale.h>
++#endif
++
+ #define PROGRAM "icotool"
+
+ static int32_t image_index = -1;
+--- a/configure.ac
++++ b/configure.ac
+@@ -34,6 +34,7 @@
+ AC_HEADER_SYS_WAIT
+ AC_HEADER_TIME
+ #AC_CHECK_HEADERS([byteswap.h errno.h fcntl.h getopt.h limits.h sys/stat.h sys/time.h sys/types.h unistd.h])
++AC_CHECK_HEADERS([locale.h])
+
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_C_INLINE
diff --git a/media-gfx/icoutils/icoutils-0.31.0.ebuild b/media-gfx/icoutils/icoutils-0.31.0.ebuild
new file mode 100644
index 000000000000..ffdd751dc4f8
--- /dev/null
+++ b/media-gfx/icoutils/icoutils-0.31.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="A set of programs for extracting and converting images in icon and cursor files (.ico, .cur)"
+HOMEPAGE="http://www.nongnu.org/icoutils/"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="nls"
+
+RDEPEND=">=dev-lang/perl-5.6
+ >=dev-perl/libwww-perl-5.64
+ media-libs/libpng:0
+ sys-libs/zlib
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.29.1-{locale,gettext}.patch
+ rm m4/po.m4* || die
+ cp /usr/share/aclocal/po.m4 m4/
+ AT_M4DIR=m4 eautoreconf
+}
+
+src_configure() {
+ [[ ${CHOST} != *-linux-gnu* ]] && use nls && append-libs -lintl
+ econf $(use_enable nls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" mkinstalldirs="mkdir -p" install
+ dodoc AUTHORS ChangeLog NEWS README TODO
+}
diff --git a/media-gfx/icoutils/metadata.xml b/media-gfx/icoutils/metadata.xml
new file mode 100644
index 000000000000..ea5470657aae
--- /dev/null
+++ b/media-gfx/icoutils/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>res@crystalspace3d.org</email>
+ <name>Frank Richter (upstream)</name>
+ </maintainer>
+ <maintainer>
+ <email>patrick@gentoo.org</email>
+ <name>Patrick Lauer (proxy)</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/igal/Manifest b/media-gfx/igal/Manifest
new file mode 100644
index 000000000000..5dd59db38047
--- /dev/null
+++ b/media-gfx/igal/Manifest
@@ -0,0 +1 @@
+DIST igal2-2.0.tar.gz 27206 RMD160 78c1fc0d4924b8e94494115d9c24c8f93e490f4c SHA1 a3986e0beb8e8ad630b8abd757fa8688b596eac1 SHA256 5f696d0c94c75082ddb0391d4bba96ec11d60710e0ba6996a9653aad75b81629
diff --git a/media-gfx/igal/igal-2.0.ebuild b/media-gfx/igal/igal-2.0.ebuild
new file mode 100644
index 000000000000..d7a22e14cf80
--- /dev/null
+++ b/media-gfx/igal/igal-2.0.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+MY_P=${PN}2-${PV}
+
+DESCRIPTION="Static HTML image gallery generator"
+HOMEPAGE="http://igal.trexler.at"
+SRC_URI="http://${PN}.trexler.at/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+RDEPEND="dev-lang/perl
+ virtual/jpeg
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )"
+DEPEND=""
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ sed -e "s:/usr/local/lib/igal2:/usr/share/igal2:g" \
+ -i igal2 -i igal2.1 || die
+ sed -i -e "s:/usr/local/bin/igal2:/usr/bin/igal2:" \
+ utilities/igal2.sh || die
+}
+
+src_compile() { :; }
+
+src_install() {
+ dobin igal2 utilities/igal2.sh || die
+ dosym igal2 /usr/bin/igal || die
+ doman igal2.1
+ dodoc ChangeLog README
+ insinto /usr/share/igal2
+ doins *.html tile.png igal2.css || die
+}
diff --git a/media-gfx/igal/metadata.xml b/media-gfx/igal/metadata.xml
new file mode 100644
index 000000000000..4f711930ce13
--- /dev/null
+++ b/media-gfx/igal/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription lang="en">
+ iGal is a Perl program that can generate and publish an entire online
+ picture show (static HTML slides, thumbnails and index page) with just
+ one command line invocation in a Linux or Unix environment.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/imagemagick/Manifest b/media-gfx/imagemagick/Manifest
new file mode 100644
index 000000000000..4ea14b61af81
--- /dev/null
+++ b/media-gfx/imagemagick/Manifest
@@ -0,0 +1,4 @@
+DIST ImageMagick-6.9.0-3.tar.xz 7898568 SHA256 f00452ba2c05c2df9624c62d7adb49ecf17140edd6e5f355cceca051dab1fb38 SHA512 0ff1ac91fa4330544cf6ba9ac8bfd48fce5a0a702b4578e1dcd23989c52c2287e1d6291c231591457a87652a59d908bade148e4e94676a887293671dfec99a4c WHIRLPOOL 0ca86ecb04a18aee95aa2990b73f0f87a7c800b028c45c6af5a906bc0b2f9a380b2ac52bf825cfda8396b4c8dc9b1768be7b46000b9bee9b6f4aaa1bf7d7dea8
+DIST ImageMagick-6.9.1-4.tar.xz 7978216 SHA256 74973478058069ce44040ff76b61df713d70adcadfd207836cc0622cadf1e4bf SHA512 b3c8cc0882d3941053dd7052048f6839c268a2969637ba39067422dca9a2b0f442303d5ec647c6f1372723da5b59c30ee014902ad338d2157b75b8741526c698 WHIRLPOOL 0b3473bcfa43ae4fca0c084ea5bdff8c533e138f58ba782d79dd22d46e55a82b4cd8565fe0be5928a148eb969507e7d4b05764a8db08d8f5e862f00952772792
+DIST ImageMagick-6.9.1-7.tar.xz 8284892 SHA256 b610e5261c01664e19c91e513e21b3c2d76d583b497ee3c7cf2f20876d742328 SHA512 6eeef09b0e0297347e95c25c94305439e32e3e95a6f1c2e476a84911e8ca036c52634693a63cd28832c5dd0df14ca0c3ff41bad577f07bfe86c4085576350434 WHIRLPOOL 1751ac644916389292c306998df1c1d635d8acbaac23666a18b216b1b9867be39e7c1300a0f5d465ea3f3990af2dfac77efd8f23efca3f6f18e0beca439ceee5
+DIST ImageMagick-6.9.1-8.tar.xz 8286604 SHA256 987b353058482b5ba15d42746eebc51c15eb05241ce94f22381b8aae0b841617 SHA512 feace56b4a409fa91b2827a3eae1a870541528a3f327e5d06a96ff4f97e8d94418c8f92e731b7276c41aef321584a75a4621fa2f361e9b20309a546d9a1f9fea WHIRLPOOL d2e3aa949a216829c5f2bea1149c31b0cd5ef83d0855863e6b0682afc0ee9fcc1f516893b9b0f612c5e64cb746225c3f9c2ab1c3f29332a6904ca53cb9117e7b
diff --git a/media-gfx/imagemagick/files/imagemagick-6.9.1.7-cflags.patch b/media-gfx/imagemagick/files/imagemagick-6.9.1.7-cflags.patch
new file mode 100644
index 000000000000..53609c0a61d8
--- /dev/null
+++ b/media-gfx/imagemagick/files/imagemagick-6.9.1.7-cflags.patch
@@ -0,0 +1,68 @@
+https://github.com/ImageMagick/ImageMagick/issues/15
+
+--- ImageMagick-6.9.1-7/configure
++++ ImageMagick-6.9.1-7/configure
+@@ -35563,30 +35563,6 @@
+ fi
+
+
+-#
+-# Sanitize output variables (asthetic).
+-#
+-for variable in CFLAGS CPPFLAGS CXXFLAGS LDFLAGS PCFLAGS X_CFLAGS; do
+- sanitize=''
+- eval value=$`echo $variable`
+- for component in $value
+- do
+- unique=yes
+- for test_component in $sanitize
+- do
+- if test $component = $test_component; then
+- unique=no
+- break
+- fi
+- done
+- if test $unique = yes; then
+- sanitize="$sanitize $component"
+- fi
+- done
+- sanitize=`echo $sanitize | sed -e 's/^ *//g'`
+- eval ${variable}=\${sanitize}
+-done
+-
+ # Pass only user-provided LIBS as "global" libraries
+ LIBS=$USER_LIBS
+
+--- ImageMagick-6.9.1-7/configure.ac
++++ ImageMagick-6.9.1-7/configure.ac
+@@ -3706,30 +3706,6 @@
+ fi
+ AC_SUBST(MAGICK_DEP_LIBS)
+
+-#
+-# Sanitize output variables (asthetic).
+-#
+-for variable in CFLAGS CPPFLAGS CXXFLAGS LDFLAGS PCFLAGS X_CFLAGS; do
+- sanitize=''
+- eval value=$`echo $variable`
+- for component in $value
+- do
+- unique=yes
+- for test_component in $sanitize
+- do
+- if test $component = $test_component; then
+- unique=no
+- break
+- fi
+- done
+- if test $unique = yes; then
+- sanitize="$sanitize $component"
+- fi
+- done
+- sanitize=`echo $sanitize | sed -e 's/^ *//g'`
+- eval ${variable}=\${sanitize}
+-done
+-
+ # Pass only user-provided LIBS as "global" libraries
+ LIBS=$USER_LIBS
+
diff --git a/media-gfx/imagemagick/imagemagick-6.9.0.3.ebuild b/media-gfx/imagemagick/imagemagick-6.9.0.3.ebuild
new file mode 100644
index 000000000000..53216a2c46c0
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-6.9.0.3.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic libtool multilib toolchain-funcs versionator
+
+MY_P=ImageMagick-$(replace_version_separator 3 '-')
+
+DESCRIPTION="A collection of tools and libraries for many image formats"
+HOMEPAGE="http://www.imagemagick.org/"
+SRC_URI="mirror://${PN}/${MY_P}.tar.xz"
+
+LICENSE="imagemagick"
+SLOT="0/${PV}"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="autotrace bzip2 corefonts cxx djvu fftw fontconfig fpx graphviz hdri jbig jpeg jpeg2k lcms lqr lzma opencl openexr openmp pango perl png postscript q32 q64 q8 raw static-libs svg test tiff truetype webp wmf X xml zlib"
+
+RESTRICT="perl? ( userpriv )"
+
+# Drop the libtool dep once libltdl goes stable.
+RDEPEND="
+ || ( dev-libs/libltdl:0 <sys-devel/libtool-2.4.3-r2:2 )
+ autotrace? ( >=media-gfx/autotrace-0.31.1 )
+ bzip2? ( app-arch/bzip2 )
+ corefonts? ( media-fonts/corefonts )
+ djvu? ( app-text/djvu )
+ fftw? ( sci-libs/fftw:3.0 )
+ fontconfig? ( media-libs/fontconfig )
+ fpx? ( >=media-libs/libfpx-1.3.0-r1 )
+ graphviz? ( media-gfx/graphviz )
+ jbig? ( >=media-libs/jbigkit-2:= )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 )
+ lcms? ( media-libs/lcms:2= )
+ lqr? ( media-libs/liblqr )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr:0= )
+ pango? ( x11-libs/pango )
+ perl? ( >=dev-lang/perl-5.8.8:0= )
+ png? ( media-libs/libpng:0= )
+ postscript? ( app-text/ghostscript-gpl )
+ raw? ( media-gfx/ufraw )
+ svg? ( gnome-base/librsvg )
+ tiff? ( media-libs/tiff:0= )
+ truetype? (
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2
+ )
+ webp? ( media-libs/libwebp:0= )
+ wmf? ( media-libs/libwmf )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXext
+ x11-libs/libXt
+ )
+ xml? ( dev-libs/libxml2:= )
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib:= )"
+DEPEND="${RDEPEND}
+ !media-gfx/graphicsmagick[imagemagick]
+ virtual/pkgconfig
+ X? ( x11-proto/xextproto )"
+
+REQUIRED_USE="corefonts? ( truetype )
+ test? ( corefonts )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch_user
+
+ elibtoolize # for Darwin modules
+
+ # For testsuite, see http://bugs.gentoo.org/show_bug.cgi?id=500580#c3
+ shopt -s nullglob
+ mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
+ if test -n "${mesa_cards}"; then
+ addpredict "${mesa_cards}"
+ fi
+ ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g')
+ if test -n "${ati_cards}"; then
+ addpredict "${ati_cards}"
+ fi
+ shopt -u nullglob
+ addpredict /dev/nvidiactl
+}
+
+src_configure() {
+ local depth=16
+ use q8 && depth=8
+ use q32 && depth=32
+ use q64 && depth=64
+
+ local openmp=disable
+ use openmp && { tc-has-openmp && openmp=enable; }
+
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket
+
+ CONFIG_SHELL=$(type -P bash) \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable hdri) \
+ $(use_enable opencl) \
+ --with-threads \
+ --with-modules \
+ --with-quantum-depth=${depth} \
+ $(use_with cxx magick-plus-plus) \
+ $(use_with perl) \
+ --with-perl-options='INSTALLDIRS=vendor' \
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts \
+ $(use_with bzip2 bzlib) \
+ $(use_with X x) \
+ $(use_with zlib) \
+ $(use_with autotrace) \
+ $(use_with postscript dps) \
+ $(use_with djvu) \
+ --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu \
+ $(use_with fftw) \
+ $(use_with fpx) \
+ $(use_with fontconfig) \
+ $(use_with truetype freetype) \
+ $(use_with postscript gslib) \
+ $(use_with graphviz gvc) \
+ $(use_with jbig) \
+ $(use_with jpeg) \
+ $(use_with jpeg2k openjp2) \
+ --without-lcms \
+ $(use_with lcms lcms2) \
+ $(use_with lqr) \
+ $(use_with lzma) \
+ $(use_with openexr) \
+ $(use_with pango) \
+ $(use_with png) \
+ $(use_with svg rsvg) \
+ $(use_with tiff) \
+ $(use_with webp) \
+ $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) \
+ $(use_with wmf) \
+ $(use_with xml) \
+ --${openmp}-openmp \
+ --with-gcc-arch=no-automagic
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}/coders/.libs:${S}/filters/.libs:${S}/Magick++/lib/.libs:${S}/magick/.libs:${S}/wand/.libs" \
+ emake -j1 check
+}
+
+src_install() {
+ # Ensure documentation installation files and paths with each release!
+ emake \
+ DESTDIR="${D}" \
+ DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \
+ install
+
+ rm -f "${ED}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt}
+ dodoc {AUTHORS,README}.txt ChangeLog
+
+ if use perl; then
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} +
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} +
+ fi
+
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+
+ if use opencl; then
+ cat <<-EOF > "${T}"/99${PN}
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/ati/card:/dev/dri/card"
+ EOF
+
+ insinto /etc/sandbox.d
+ doins "${T}"/99${PN} #472766
+ fi
+
+ insinto /usr/share/${PN}
+ doins config/*icm
+}
diff --git a/media-gfx/imagemagick/imagemagick-6.9.1.4.ebuild b/media-gfx/imagemagick/imagemagick-6.9.1.4.ebuild
new file mode 100644
index 000000000000..a7fb989f0c3e
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-6.9.1.4.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic libtool multilib toolchain-funcs versionator
+
+MY_P=ImageMagick-$(replace_version_separator 3 '-')
+
+DESCRIPTION="A collection of tools and libraries for many image formats"
+HOMEPAGE="http://www.imagemagick.org/"
+SRC_URI="mirror://${PN}/${MY_P}.tar.xz"
+
+LICENSE="imagemagick"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="autotrace bzip2 corefonts cxx djvu fftw fontconfig fpx graphviz hdri jbig jpeg jpeg2k lcms lqr lzma opencl openexr openmp pango perl png postscript q32 q64 q8 raw static-libs svg test tiff truetype webp wmf X xml zlib"
+
+RESTRICT="perl? ( userpriv )"
+
+# Drop the libtool dep once libltdl goes stable.
+RDEPEND="
+ || ( dev-libs/libltdl:0 <sys-devel/libtool-2.4.3-r2:2 )
+ autotrace? ( >=media-gfx/autotrace-0.31.1 )
+ bzip2? ( app-arch/bzip2 )
+ corefonts? ( media-fonts/corefonts )
+ djvu? ( app-text/djvu )
+ fftw? ( sci-libs/fftw:3.0 )
+ fontconfig? ( media-libs/fontconfig )
+ fpx? ( >=media-libs/libfpx-1.3.0-r1 )
+ graphviz? ( media-gfx/graphviz )
+ jbig? ( >=media-libs/jbigkit-2:= )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 )
+ lcms? ( media-libs/lcms:2= )
+ lqr? ( media-libs/liblqr )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr:0= )
+ pango? ( x11-libs/pango )
+ perl? ( >=dev-lang/perl-5.8.8:0= )
+ png? ( media-libs/libpng:0= )
+ postscript? ( app-text/ghostscript-gpl )
+ raw? ( media-gfx/ufraw )
+ svg? ( gnome-base/librsvg )
+ tiff? ( media-libs/tiff:0= )
+ truetype? (
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2
+ )
+ webp? ( media-libs/libwebp:0= )
+ wmf? ( media-libs/libwmf )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXext
+ x11-libs/libXt
+ )
+ xml? ( dev-libs/libxml2:= )
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib:= )"
+DEPEND="${RDEPEND}
+ !media-gfx/graphicsmagick[imagemagick]
+ virtual/pkgconfig
+ X? ( x11-proto/xextproto )"
+
+REQUIRED_USE="corefonts? ( truetype )
+ test? ( corefonts )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch_user
+
+ elibtoolize # for Darwin modules
+
+ # For testsuite, see http://bugs.gentoo.org/show_bug.cgi?id=500580#c3
+ shopt -s nullglob
+ mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
+ if test -n "${mesa_cards}"; then
+ addpredict "${mesa_cards}"
+ fi
+ ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g')
+ if test -n "${ati_cards}"; then
+ addpredict "${ati_cards}"
+ fi
+ shopt -u nullglob
+ addpredict /dev/nvidiactl
+}
+
+src_configure() {
+ local depth=16
+ use q8 && depth=8
+ use q32 && depth=32
+ use q64 && depth=64
+
+ local openmp=disable
+ use openmp && { tc-has-openmp && openmp=enable; }
+
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket
+
+ CONFIG_SHELL=$(type -P bash) \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable hdri) \
+ $(use_enable opencl) \
+ --with-threads \
+ --with-modules \
+ --with-quantum-depth=${depth} \
+ $(use_with cxx magick-plus-plus) \
+ $(use_with perl) \
+ --with-perl-options='INSTALLDIRS=vendor' \
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts \
+ $(use_with bzip2 bzlib) \
+ $(use_with X x) \
+ $(use_with zlib) \
+ $(use_with autotrace) \
+ $(use_with postscript dps) \
+ $(use_with djvu) \
+ --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu \
+ $(use_with fftw) \
+ $(use_with fpx) \
+ $(use_with fontconfig) \
+ $(use_with truetype freetype) \
+ $(use_with postscript gslib) \
+ $(use_with graphviz gvc) \
+ $(use_with jbig) \
+ $(use_with jpeg) \
+ $(use_with jpeg2k openjp2) \
+ --without-lcms \
+ $(use_with lcms lcms2) \
+ $(use_with lqr) \
+ $(use_with lzma) \
+ $(use_with openexr) \
+ $(use_with pango) \
+ $(use_with png) \
+ $(use_with svg rsvg) \
+ $(use_with tiff) \
+ $(use_with webp) \
+ $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) \
+ $(use_with wmf) \
+ $(use_with xml) \
+ --${openmp}-openmp \
+ --with-gcc-arch=no-automagic
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}/coders/.libs:${S}/filters/.libs:${S}/Magick++/lib/.libs:${S}/magick/.libs:${S}/wand/.libs" \
+ emake -j1 check
+}
+
+src_install() {
+ # Ensure documentation installation files and paths with each release!
+ emake \
+ DESTDIR="${D}" \
+ DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \
+ install
+
+ rm -f "${ED}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt}
+ dodoc {AUTHORS,README}.txt ChangeLog
+
+ if use perl; then
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} +
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} +
+ fi
+
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+
+ if use opencl; then
+ cat <<-EOF > "${T}"/99${PN}
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/ati/card:/dev/dri/card"
+ EOF
+
+ insinto /etc/sandbox.d
+ doins "${T}"/99${PN} #472766
+ fi
+
+ insinto /usr/share/${PN}
+ doins config/*icm
+}
diff --git a/media-gfx/imagemagick/imagemagick-6.9.1.7.ebuild b/media-gfx/imagemagick/imagemagick-6.9.1.7.ebuild
new file mode 100644
index 000000000000..82db3678f6d9
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-6.9.1.7.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic libtool multilib toolchain-funcs versionator
+
+MY_P=ImageMagick-$(replace_version_separator 3 '-')
+
+DESCRIPTION="A collection of tools and libraries for many image formats"
+HOMEPAGE="http://www.imagemagick.org/"
+SRC_URI="mirror://${PN}/${MY_P}.tar.xz"
+
+LICENSE="imagemagick"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="autotrace bzip2 corefonts cxx djvu fftw fontconfig fpx graphviz hdri jbig jpeg jpeg2k lcms lqr lzma opencl openexr openmp pango perl png postscript q32 q64 q8 raw static-libs svg test tiff truetype webp wmf X xml zlib"
+
+RESTRICT="perl? ( userpriv )"
+
+# Drop the libtool dep once libltdl goes stable.
+RDEPEND="
+ || ( dev-libs/libltdl:0 <sys-devel/libtool-2.4.3-r2:2 )
+ autotrace? ( >=media-gfx/autotrace-0.31.1 )
+ bzip2? ( app-arch/bzip2 )
+ corefonts? ( media-fonts/corefonts )
+ djvu? ( app-text/djvu )
+ fftw? ( sci-libs/fftw:3.0 )
+ fontconfig? ( media-libs/fontconfig )
+ fpx? ( >=media-libs/libfpx-1.3.0-r1 )
+ graphviz? ( media-gfx/graphviz )
+ jbig? ( >=media-libs/jbigkit-2:= )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 )
+ lcms? ( media-libs/lcms:2= )
+ lqr? ( media-libs/liblqr )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr:0= )
+ pango? ( x11-libs/pango )
+ perl? ( >=dev-lang/perl-5.8.8:0= )
+ png? ( media-libs/libpng:0= )
+ postscript? ( app-text/ghostscript-gpl )
+ raw? ( media-gfx/ufraw )
+ svg? ( gnome-base/librsvg )
+ tiff? ( media-libs/tiff:0= )
+ truetype? (
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2
+ )
+ webp? ( media-libs/libwebp:0= )
+ wmf? ( media-libs/libwmf )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXext
+ x11-libs/libXt
+ )
+ xml? ( dev-libs/libxml2:= )
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib:= )"
+DEPEND="${RDEPEND}
+ !media-gfx/graphicsmagick[imagemagick]
+ virtual/pkgconfig
+ X? ( x11-proto/xextproto )"
+
+REQUIRED_USE="corefonts? ( truetype )
+ test? ( corefonts )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-6.9.1.7-cflags.patch
+
+ epatch_user
+
+ elibtoolize # for Darwin modules
+
+ # For testsuite, see http://bugs.gentoo.org/show_bug.cgi?id=500580#c3
+ shopt -s nullglob
+ mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
+ if test -n "${mesa_cards}"; then
+ addpredict "${mesa_cards}"
+ fi
+ ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g')
+ if test -n "${ati_cards}"; then
+ addpredict "${ati_cards}"
+ fi
+ shopt -u nullglob
+ addpredict /dev/nvidiactl
+}
+
+src_configure() {
+ local depth=16
+ use q8 && depth=8
+ use q32 && depth=32
+ use q64 && depth=64
+
+ local openmp=disable
+ use openmp && { tc-has-openmp && openmp=enable; }
+
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket
+
+ CONFIG_SHELL=$(type -P bash) \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable hdri) \
+ $(use_enable opencl) \
+ --with-threads \
+ --with-modules \
+ --with-quantum-depth=${depth} \
+ $(use_with cxx magick-plus-plus) \
+ $(use_with perl) \
+ --with-perl-options='INSTALLDIRS=vendor' \
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts \
+ $(use_with bzip2 bzlib) \
+ $(use_with X x) \
+ $(use_with zlib) \
+ $(use_with autotrace) \
+ $(use_with postscript dps) \
+ $(use_with djvu) \
+ --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu \
+ $(use_with fftw) \
+ $(use_with fpx) \
+ $(use_with fontconfig) \
+ $(use_with truetype freetype) \
+ $(use_with postscript gslib) \
+ $(use_with graphviz gvc) \
+ $(use_with jbig) \
+ $(use_with jpeg) \
+ $(use_with jpeg2k openjp2) \
+ $(use_with lcms) \
+ $(use_with lqr) \
+ $(use_with lzma) \
+ $(use_with openexr) \
+ $(use_with pango) \
+ $(use_with png) \
+ $(use_with svg rsvg) \
+ $(use_with tiff) \
+ $(use_with webp) \
+ $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) \
+ $(use_with wmf) \
+ $(use_with xml) \
+ --${openmp}-openmp \
+ --with-gcc-arch=no-automagic
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}/coders/.libs:${S}/filters/.libs:${S}/Magick++/lib/.libs:${S}/magick/.libs:${S}/wand/.libs" \
+ emake -j1 check
+}
+
+src_install() {
+ # Ensure documentation installation files and paths with each release!
+ emake \
+ DESTDIR="${D}" \
+ DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \
+ install
+
+ rm -f "${ED}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt}
+ dodoc {AUTHORS,README}.txt ChangeLog
+
+ if use perl; then
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} +
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} +
+ fi
+
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+
+ if use opencl; then
+ cat <<-EOF > "${T}"/99${PN}
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/ati/card:/dev/dri/card"
+ EOF
+
+ insinto /etc/sandbox.d
+ doins "${T}"/99${PN} #472766
+ fi
+
+ insinto /usr/share/${PN}
+ doins config/*icm
+}
diff --git a/media-gfx/imagemagick/imagemagick-6.9.1.8.ebuild b/media-gfx/imagemagick/imagemagick-6.9.1.8.ebuild
new file mode 100644
index 000000000000..81d0483a68f7
--- /dev/null
+++ b/media-gfx/imagemagick/imagemagick-6.9.1.8.ebuild
@@ -0,0 +1,179 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic libtool multilib toolchain-funcs versionator
+
+MY_P=ImageMagick-$(replace_version_separator 3 '-')
+
+DESCRIPTION="A collection of tools and libraries for many image formats"
+HOMEPAGE="http://www.imagemagick.org/"
+SRC_URI="mirror://${PN}/${MY_P}.tar.xz"
+
+LICENSE="imagemagick"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="autotrace bzip2 corefonts cxx djvu fftw fontconfig fpx graphviz hdri jbig jpeg jpeg2k lcms lqr lzma opencl openexr openmp pango perl png postscript q32 q64 q8 raw static-libs svg test tiff truetype webp wmf X xml zlib"
+
+RESTRICT="perl? ( userpriv )"
+
+# Drop the libtool dep once libltdl goes stable.
+RDEPEND="
+ || ( dev-libs/libltdl:0 <sys-devel/libtool-2.4.3-r2:2 )
+ autotrace? ( >=media-gfx/autotrace-0.31.1 )
+ bzip2? ( app-arch/bzip2 )
+ corefonts? ( media-fonts/corefonts )
+ djvu? ( app-text/djvu )
+ fftw? ( sci-libs/fftw:3.0 )
+ fontconfig? ( media-libs/fontconfig )
+ fpx? ( >=media-libs/libfpx-1.3.0-r1 )
+ graphviz? ( media-gfx/graphviz )
+ jbig? ( >=media-libs/jbigkit-2:= )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( >=media-libs/openjpeg-2.1.0:2 )
+ lcms? ( media-libs/lcms:2= )
+ lqr? ( media-libs/liblqr )
+ opencl? ( virtual/opencl )
+ openexr? ( media-libs/openexr:0= )
+ pango? ( x11-libs/pango )
+ perl? ( >=dev-lang/perl-5.8.8:0= )
+ png? ( media-libs/libpng:0= )
+ postscript? ( app-text/ghostscript-gpl )
+ raw? ( media-gfx/ufraw )
+ svg? ( gnome-base/librsvg )
+ tiff? ( media-libs/tiff:0= )
+ truetype? (
+ media-fonts/urw-fonts
+ >=media-libs/freetype-2
+ )
+ webp? ( media-libs/libwebp:0= )
+ wmf? ( media-libs/libwmf )
+ X? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXext
+ x11-libs/libXt
+ )
+ xml? ( dev-libs/libxml2:= )
+ lzma? ( app-arch/xz-utils )
+ zlib? ( sys-libs/zlib:= )"
+DEPEND="${RDEPEND}
+ !media-gfx/graphicsmagick[imagemagick]
+ virtual/pkgconfig
+ X? ( x11-proto/xextproto )"
+
+REQUIRED_USE="corefonts? ( truetype )
+ test? ( corefonts )"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch_user
+
+ elibtoolize # for Darwin modules
+
+ # For testsuite, see http://bugs.gentoo.org/show_bug.cgi?id=500580#c3
+ shopt -s nullglob
+ mesa_cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
+ if test -n "${mesa_cards}"; then
+ addpredict "${mesa_cards}"
+ fi
+ ati_cards=$(echo -n /dev/ati/card* | sed 's/ /:/g')
+ if test -n "${ati_cards}"; then
+ addpredict "${ati_cards}"
+ fi
+ shopt -u nullglob
+ addpredict /dev/nvidiactl
+}
+
+src_configure() {
+ local depth=16
+ use q8 && depth=8
+ use q32 && depth=32
+ use q64 && depth=64
+
+ local openmp=disable
+ use openmp && { tc-has-openmp && openmp=enable; }
+
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags -lnsl -lsocket
+
+ CONFIG_SHELL=$(type -P bash) \
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable hdri) \
+ $(use_enable opencl) \
+ --with-threads \
+ --with-modules \
+ --with-quantum-depth=${depth} \
+ $(use_with cxx magick-plus-plus) \
+ $(use_with perl) \
+ --with-perl-options='INSTALLDIRS=vendor' \
+ --with-gs-font-dir="${EPREFIX}"/usr/share/fonts/urw-fonts \
+ $(use_with bzip2 bzlib) \
+ $(use_with X x) \
+ $(use_with zlib) \
+ $(use_with autotrace) \
+ $(use_with postscript dps) \
+ $(use_with djvu) \
+ --with-dejavu-font-dir="${EPREFIX}"/usr/share/fonts/dejavu \
+ $(use_with fftw) \
+ $(use_with fpx) \
+ $(use_with fontconfig) \
+ $(use_with truetype freetype) \
+ $(use_with postscript gslib) \
+ $(use_with graphviz gvc) \
+ $(use_with jbig) \
+ $(use_with jpeg) \
+ $(use_with jpeg2k openjp2) \
+ $(use_with lcms) \
+ $(use_with lqr) \
+ $(use_with lzma) \
+ $(use_with openexr) \
+ $(use_with pango) \
+ $(use_with png) \
+ $(use_with svg rsvg) \
+ $(use_with tiff) \
+ $(use_with webp) \
+ $(use_with corefonts windows-font-dir "${EPREFIX}"/usr/share/fonts/corefonts) \
+ $(use_with wmf) \
+ $(use_with xml) \
+ --${openmp}-openmp \
+ --with-gcc-arch=no-automagic
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}/coders/.libs:${S}/filters/.libs:${S}/Magick++/lib/.libs:${S}/magick/.libs:${S}/wand/.libs" \
+ emake -j1 check
+}
+
+src_install() {
+ # Ensure documentation installation files and paths with each release!
+ emake -j1 \
+ DESTDIR="${D}" \
+ DOCUMENTATION_PATH="${EPREFIX}"/usr/share/doc/${PF}/html \
+ install
+
+ rm -f "${ED}"/usr/share/doc/${PF}/html/{ChangeLog,LICENSE,NEWS.txt}
+ dodoc {AUTHORS,README}.txt ChangeLog
+
+ if use perl; then
+ find "${ED}" -type f -name perllocal.pod -exec rm -f {} +
+ find "${ED}" -depth -mindepth 1 -type d -empty -exec rm -rf {} +
+ fi
+
+ find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
+
+ if use opencl; then
+ cat <<-EOF > "${T}"/99${PN}
+ SANDBOX_PREDICT="/dev/nvidiactl:/dev/ati/card:/dev/dri/card"
+ EOF
+
+ insinto /etc/sandbox.d
+ doins "${T}"/99${PN} #472766
+ fi
+
+ insinto /usr/share/${PN}
+ doins config/*icm
+}
diff --git a/media-gfx/imagemagick/metadata.xml b/media-gfx/imagemagick/metadata.xml
new file mode 100644
index 000000000000..aef99b918509
--- /dev/null
+++ b/media-gfx/imagemagick/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="autotrace">Use <pkg>media-gfx/autotrace</pkg> to convert bitmaps into vector graphics</flag>
+ <flag name="corefonts">Use <pkg>media-fonts/corefonts</pkg> which is required by some commands</flag>
+ <flag name="fpx">Enable <pkg>media-libs/libfpx</pkg> support</flag>
+ <flag name="hdri">enable High Dynamic Range Images formats</flag>
+ <flag name="lqr">Enable experimental liquid rescale support using <pkg>media-libs/liblqr</pkg></flag>
+ <flag name="opencl">Enable OpenCL support</flag>
+ <flag name="pango">Enable Pango support using <pkg>x11-libs/pango</pkg></flag>
+ <flag name="q32">Set quantum depth value to 32</flag>
+ <flag name="q64">Set quantum depth value to 64</flag>
+ <flag name="q8">Set quantum depth value to 8</flag>
+ <flag name="webp">Enable webp image format support using <pkg>media-libs/libwebp</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/imageworsener/Manifest b/media-gfx/imageworsener/Manifest
new file mode 100644
index 000000000000..827ba8c18eef
--- /dev/null
+++ b/media-gfx/imageworsener/Manifest
@@ -0,0 +1,3 @@
+DIST imageworsener-1.2.0.tar.gz 635509 SHA256 97fdb1aafac7bc2339b2ce813071f0900de0b093b96ab1a99a43f9647afdfe35 SHA512 0f46bb4823048f96904fbd2387adbc48a95289d28869e5b48cb5bf5279499417f77e41a8f5408ca0c644b33113a1f8b708040b7d782205479c99314fe6352f60 WHIRLPOOL 83bcfb535068357bb154656ee6b65e80e03dadefa555044934228a078304a6e5e0e39db8505c1e88e92698b0170baa81064d8d605c9d811001842a669785a4f1
+DIST imageworsener-src-0.9.2.tar.gz 211670 SHA256 f9fa780841d9019817a9bcdccecf6652b2900c3ae7e96b63a60420cd3ac27248
+DIST imageworsener-src-1.0.0.tar.gz 609807 SHA256 ccab084b4e3ef4dc2130d34804446e4b7d8eb5e17544122b7e239c60aa45e5cf SHA512 94e01937872bd312d6e0c8c52440099766e3fadd8b8e514fa2915c7f9d08c277c43d1ba51341c4a0df3cd84a73383702bb461ad9d371f1f231ec23d3633da8a6 WHIRLPOOL 518c37c7936fbb0f23d1c304b541758e0a2f88a0de36deeac0fa80d0aff31648c2fb515bd4da5205c2f8a512fb126fb792f6c661fa9ccd6bfe6f46048edf4455
diff --git a/media-gfx/imageworsener/imageworsener-0.9.2.ebuild b/media-gfx/imageworsener/imageworsener-0.9.2.ebuild
new file mode 100644
index 000000000000..fa478129fa0a
--- /dev/null
+++ b/media-gfx/imageworsener/imageworsener-0.9.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit toolchain-funcs
+
+MY_P="${PN}-src-${PV}"
+MY_PN="imagew"
+
+DESCRIPTION="Utility for image scaling and processing"
+HOMEPAGE="http://entropymine.com/imageworsener/"
+SRC_URI="http://entropymine.com/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="media-libs/libpng:0
+ virtual/jpeg"
+RDEPEND="${DEPEND}"
+
+src_compile() {
+ $(tc-getCC) ${LDFLAGS} ${CFLAGS} "${S}/src/"*.c -lpng -ljpeg -lm -lz -o ${MY_PN} \
+ || die "Compile failed."
+}
+
+src_install() {
+ dobin ${MY_PN} || die "dobin failed."
+ dodoc readme.txt technical.txt changelog.txt || die
+}
+
+src_test() {
+ cd "${S}/tests" || die
+ ./runtest "${S}/${MY_PN}"
+}
diff --git a/media-gfx/imageworsener/imageworsener-1.0.0.ebuild b/media-gfx/imageworsener/imageworsener-1.0.0.ebuild
new file mode 100644
index 000000000000..7734ca891428
--- /dev/null
+++ b/media-gfx/imageworsener/imageworsener-1.0.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+MY_P=${PN}-src-${PV}
+MY_PN=imagew
+
+DESCRIPTION="Utility for image scaling and processing"
+HOMEPAGE="http://entropymine.com/imageworsener/"
+SRC_URI="http://entropymine.com/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="jpeg png static-libs test webp zlib"
+
+DEPEND="png? ( media-libs/libpng:0 )
+ jpeg? ( virtual/jpeg:0 )
+ webp? ( >=media-libs/libwebp-0.1.3 )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="test? ( jpeg png webp zlib )"
+
+src_configure() {
+ local switch=''
+ use test && switch=test
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with ${switch} jpeg) \
+ $(use_with ${switch} png) \
+ $(use_with ${switch} webp) \
+ $(use_with ${switch} zlib)
+}
+
+src_install() {
+ default
+ dodoc {changelog,readme,technical}.txt
+ prune_libtool_files
+}
+
+src_test() {
+ cd "${S}"/tests || die
+ ./runtest "${S}"/${MY_PN}
+}
diff --git a/media-gfx/imageworsener/imageworsener-1.2.0.ebuild b/media-gfx/imageworsener/imageworsener-1.2.0.ebuild
new file mode 100644
index 000000000000..bc35e4bff171
--- /dev/null
+++ b/media-gfx/imageworsener/imageworsener-1.2.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+MY_P=${PN}-src-${PV}
+MY_PN=imagew
+
+DESCRIPTION="Utility for image scaling and processing"
+HOMEPAGE="http://entropymine.com/imageworsener/"
+SRC_URI="http://entropymine.com/${PN}/${P}.tar.gz"
+
+LICENSE="MIT-with-advertising"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="jpeg png static-libs test webp zlib"
+
+DEPEND="png? ( media-libs/libpng:0 )
+ jpeg? ( virtual/jpeg:0 )
+ webp? ( >=media-libs/libwebp-0.1.3 )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="test? ( jpeg png webp zlib )"
+
+src_configure() {
+ local switch=''
+ use test && switch=test
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with ${switch} jpeg) \
+ $(use_with ${switch} png) \
+ $(use_with ${switch} webp) \
+ $(use_with ${switch} zlib)
+}
+
+src_install() {
+ default
+ dodoc {changelog,readme,technical}.txt
+ prune_libtool_files
+}
+
+src_test() {
+ cd "${S}"/tests || die
+ ./runtest "${S}"/${MY_PN}
+}
diff --git a/media-gfx/imageworsener/metadata.xml b/media-gfx/imageworsener/metadata.xml
new file mode 100644
index 000000000000..8cd6f48767b0
--- /dev/null
+++ b/media-gfx/imageworsener/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</name>
+</maintainer>
+<use>
+ <flag name='webp'>enable webp image format support</flag>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/inkscape/Manifest b/media-gfx/inkscape/Manifest
new file mode 100644
index 000000000000..8712c76e8bc1
--- /dev/null
+++ b/media-gfx/inkscape/Manifest
@@ -0,0 +1,2 @@
+DIST inkscape-0.48.5.tar.bz2 19719332 SHA256 2b6ce684f9f2a0691ab454656424555cbda131db78e13973360684bc833ad969 SHA512 97f08d9d31e2ad84e15b9f37be3a3039aabb5b15061919e1500a01ecf56398abb3ab06a4fe557bd379dcf7acd95166637be2f4d3ef1a17c3cc76a79a7868b418 WHIRLPOOL 8147f8328212e8951f026db92b0c6d475e293aa8bff8964b90c1a3d1e85395fab400758954a2e73501b4974d644bd44c0e572aababaec809b3c73f777a13c284
+DIST inkscape-0.91.tar.bz2 25858909 SHA256 4d901f8a9e1924404e797ad23b8b0c495a9d155448816d95a55974314e1f141b SHA512 3778ef7d4a1c759a7afc093e55eefb69a78dcb60332655cc8ab8c481f54a3e6550df6070178390eb08588245531906b8bef33301f0765a4d28d6c7506fcf3bc7 WHIRLPOOL ff538bd47dbea3bc461f24b09f2d26e3b6141053e8289bac1ac973b65b6957257c5aede30e782201c2813919643bf23989c7ce6a8492fa259b3d506e427e4126
diff --git a/media-gfx/inkscape/files/inkscape-0.48.0-spell.patch b/media-gfx/inkscape/files/inkscape-0.48.0-spell.patch
new file mode 100644
index 000000000000..946222276b72
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.48.0-spell.patch
@@ -0,0 +1,45 @@
+--- inkscape-0.48.0/configure.ac.orig 2010-10-26 21:22:06.000000000 +0200
++++ inkscape-0.48.0/configure.ac 2010-10-26 21:33:39.000000000 +0200
+@@ -433,10 +433,15 @@
+ fi
+ AM_CONDITIONAL(INKJAR, test "$with_ij" = "yes")
+
++AC_ARG_WITH([gtkspell],
++ AS_HELP_STRING([--without-gtkspell], [disable gtk spelling widget]),[with_gtkspell=$withval], [with_gtkspell=yes])
++
+ ink_spell_pkg=
+-if pkg-config --exists gtkspell-2.0; then
+- ink_spell_pkg=gtkspell-2.0
+- AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
++if test "x$with_gtkspell" = "xyes"; then
++ if pkg-config --exists gtkspell-2.0; then
++ ink_spell_pkg=gtkspell-2.0
++ AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
++ fi
+ fi
+
+ dnl ******************************
+@@ -758,12 +763,17 @@
+ dnl **************************
+ dnl Check for aspell
+ dnl ******************************
+-AC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
+-if test "x$aspell_ok" = "xyes"; then
+- AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
+- INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
+-else
+- AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
++AC_ARG_WITH([aspell],
++ AS_HELP_STRING([--without-aspell], [disable aspell spell checker]),[with_aspell=$withval], [with_aspell=yes])
++
++if test "x$with_aspell" = "xyes"; then
++ AC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
++ if test "x$aspell_ok" = "xyes"; then
++ AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
++ INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
++ else
++ AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
++ fi
+ fi
+
+ dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
diff --git a/media-gfx/inkscape/files/inkscape-0.48.2-libwpg.patch b/media-gfx/inkscape/files/inkscape-0.48.2-libwpg.patch
new file mode 100644
index 000000000000..998ce41ab3ab
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.48.2-libwpg.patch
@@ -0,0 +1,25 @@
+--- inkscape-0.48.2/configure.ac.orig
++++ inkscape-0.48.2/configure.ac
+@@ -713,14 +713,14 @@
+
+ with_libwpg=no
+
+-PKG_CHECK_MODULES(LIBWPG01, libwpg-0.1 libwpg-stream-0.1, with_libwpg01=yes, with_libwpg01=no)
+-if test "x$with_libwpg01" = "xyes"; then
+- AC_DEFINE(WITH_LIBWPG01,1,[Build in libwpg 0.1.x])
+- with_libwpg=yes
+- AC_SUBST(LIBWPG_LIBS, $LIBWPG01_LIBS)
+- AC_SUBST(LIBWPG_CFLAGS, $LIBWPG01_CFLAGS)
+-fi
+-AM_CONDITIONAL(WITH_LIBWPG01, test "x$with_libwpg01" = "xyes")
++#PKG_CHECK_MODULES(LIBWPG01, libwpg-0.1 libwpg-stream-0.1, with_libwpg01=yes, with_libwpg01=no)
++#if test "x$with_libwpg01" = "xyes"; then
++# AC_DEFINE(WITH_LIBWPG01,1,[Build in libwpg 0.1.x])
++# with_libwpg=yes
++# AC_SUBST(LIBWPG_LIBS, $LIBWPG01_LIBS)
++# AC_SUBST(LIBWPG_CFLAGS, $LIBWPG01_CFLAGS)
++#fi
++#AM_CONDITIONAL(WITH_LIBWPG01, test "x$with_libwpg01" = "xyes")
+
+ PKG_CHECK_MODULES(LIBWPG02, libwpg-0.2 libwpd-0.9 libwpd-stream-0.9, with_libwpg02=yes, with_libwpg02=no)
+ if test "x$with_libwpg02" = "xyes"; then
diff --git a/media-gfx/inkscape/files/inkscape-0.48.3.1-desktop.patch b/media-gfx/inkscape/files/inkscape-0.48.3.1-desktop.patch
new file mode 100644
index 000000000000..ea5f214cafc4
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.48.3.1-desktop.patch
@@ -0,0 +1,11 @@
+--- inkscape-0.48.3.1/inkscape.desktop.in
++++ inkscape-0.48.3.1/inkscape.desktop.in
+@@ -5,7 +5,7 @@
+ _X-GNOME-FullName=Inkscape Vector Graphics Editor
+ _Comment=Create and edit Scalable Vector Graphics images
+ Type=Application
+-Categories=Graphics;VectorGraphics;GTK;
++Categories=Graphics;2DGraphics;VectorGraphics;GTK;
+ MimeType=image/svg+xml;image/svg+xml-compressed;application/vnd.corel-draw;application/pdf;application/postscript;image/x-eps;application/illustrator;
+ Exec=inkscape %F
+ TryExec=inkscape
diff --git a/media-gfx/inkscape/files/inkscape-0.48.4-automake-1.13.patch b/media-gfx/inkscape/files/inkscape-0.48.4-automake-1.13.patch
new file mode 100644
index 000000000000..6d649da99dea
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.48.4-automake-1.13.patch
@@ -0,0 +1,21 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Thu Apr 25 15:06:01 UTC 2013
+Subject: fix building with automake-1.3
+
+--- inkscape-0.48.4/configure.ac
++++ inkscape-0.48.4/configure.ac
+@@ -21,12 +21,12 @@
+ export CC CXX
+ ])
+
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+
+ AC_LANG(C++)
+ AC_ISC_POSIX
+ AC_PROG_CXX
+-AM_PROG_CC_STDC
++AC_PROG_CC
+ AM_PROG_AS
+ AC_PROG_RANLIB
+ AC_PROG_INTLTOOL(0.22)
diff --git a/media-gfx/inkscape/files/inkscape-0.48.4-epython.patch b/media-gfx/inkscape/files/inkscape-0.48.4-epython.patch
new file mode 100644
index 000000000000..2e2483c1b1e3
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.48.4-epython.patch
@@ -0,0 +1,11 @@
+--- inkscape-0.48.4/src/extension/implementation/script.cpp
++++ inkscape-0.48.4/src/extension/implementation/script.cpp
+@@ -89,7 +89,7 @@
+ #ifdef WIN32
+ {"python", "python-interpreter", "pythonw" },
+ #else
+- {"python", "python-interpreter", "python" },
++ {"python", "python-interpreter", "@EPYTHON@" },
+ #endif
+ {"ruby", "ruby-interpreter", "ruby" },
+ {"shell", "shell-interpreter", "sh" },
diff --git a/media-gfx/inkscape/files/inkscape-0.48.4-gc74-configure.patch b/media-gfx/inkscape/files/inkscape-0.48.4-gc74-configure.patch
new file mode 100644
index 000000000000..3ef7ce2c98b6
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.48.4-gc74-configure.patch
@@ -0,0 +1,15 @@
+--- inkscape-0.48.4/configure.ac 2013-12-31 00:38:18.592732496 +0400
++++ inkscape-0.48.4/configure.ac 2013-12-31 00:39:13.558730872 +0400
+@@ -263,7 +263,11 @@
+ # include <gc.h>
+ #endif
+ #include <stdio.h>
+- extern unsigned GC_version;
++ #if (GC_VERSION_MAJOR >= 7 && GC_VERSION_MINOR >= 4)
++ unsigned GC_version = GC_get_version();
++ #else
++ extern unsigned GC_version;
++ #endif
+ int main(void){
+ unsigned min = ((6 << 16) | (4 << 8) | 0);
+ printf("%d.%d.%d ",GC_version >> 16, (GC_version >> 8) & 0xFF, GC_version & 0xFF);
diff --git a/media-gfx/inkscape/files/inkscape-0.48.4-poppler-0.29.0.patch b/media-gfx/inkscape/files/inkscape-0.48.4-poppler-0.29.0.patch
new file mode 100644
index 000000000000..bcfea9b77adb
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.48.4-poppler-0.29.0.patch
@@ -0,0 +1,98 @@
+ configure.ac | 5 ++++
+ src/extension/internal/pdfinput/pdf-parser.cpp | 32 +++++++++++++++++++++-----
+ 2 files changed, 31 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c8e1ae2..d62c989 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -593,6 +593,11 @@ if test "x$popplernewercolorspaceapi" = "xyes"; then
+ AC_DEFINE(POPPLER_EVEN_NEWER_COLOR_SPACE_API, 1, [Use even newer color space API from Poppler >= 0.26.0])
+ fi
+
++PKG_CHECK_MODULES(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, poppler >= 0.29.0, popplernewernewcolorspaceapi=yes, popplernewernewcolorspaceapi=no)
++if test "x$popplernewernewcolorspaceapi" = "xyes"; then
++ AC_DEFINE(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, 1, [Use even newer new color space API from Poppler >= 0.29.0])
++fi
++
+ # Poppler's b604a008 commit changes this
+ AC_MSG_CHECKING([whether Poppler's GfxPatch no longer uses GfxColor])
+ popplergfxcolor="no"
+diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
+index b6edbfb..3fbf237 100644
+--- a/src/extension/internal/pdfinput/pdf-parser.cpp
++++ b/src/extension/internal/pdfinput/pdf-parser.cpp
+@@ -860,7 +860,9 @@ void PdfParser::opSetExtGState(Object args[], int numArgs) {
+ blendingColorSpace = NULL;
+ isolated = knockout = gFalse;
+ if (!obj4.dictLookup(const_cast<char*>("CS"), &obj5)->isNull()) {
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ blendingColorSpace = GfxColorSpace::parse(NULL, &obj5, NULL, NULL);
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+ blendingColorSpace = GfxColorSpace::parse(&obj5, NULL, NULL);
+ #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
+ blendingColorSpace = GfxColorSpace::parse(&obj5, NULL);
+@@ -1085,7 +1087,13 @@ void PdfParser::opSetFillColorSpace(Object args[], int numArgs) {
+
+ state->setFillPattern(NULL);
+ res->lookupColorSpace(args[0].getName(), &obj);
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ if (obj.isNull()) {
++ colorSpace = GfxColorSpace::parse(NULL, &args[0], NULL, NULL);
++ } else {
++ colorSpace = GfxColorSpace::parse(NULL, &obj, NULL, NULL);
++ }
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+ if (obj.isNull()) {
+ colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL);
+ } else {
+@@ -1126,7 +1134,13 @@ void PdfParser::opSetStrokeColorSpace(Object args[], int numArgs) {
+
+ state->setStrokePattern(NULL);
+ res->lookupColorSpace(args[0].getName(), &obj);
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ if (obj.isNull()) {
++ colorSpace = GfxColorSpace::parse(NULL, &args[0], NULL, NULL);
++ } else {
++ colorSpace = GfxColorSpace::parse(NULL, &obj, NULL, NULL);
++ }
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+ if (obj.isNull()) {
+ colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL);
+ } else {
+@@ -2756,7 +2770,9 @@ void PdfParser::doImage(Object *ref, Stream *str, GBool inlineImg) {
+ }
+ }
+ if (!obj1.isNull()) {
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ colorSpace = GfxColorSpace::parse(NULL, &obj1, NULL, NULL);
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+ colorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
+ #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
+ colorSpace = GfxColorSpace::parse(&obj1, NULL);
+@@ -2847,7 +2863,9 @@ void PdfParser::doImage(Object *ref, Stream *str, GBool inlineImg) {
+ obj2.free();
+ }
+ }
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ GfxColorSpace *maskColorSpace = GfxColorSpace::parse(NULL, &obj1, NULL, NULL);
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+ GfxColorSpace *maskColorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
+ #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
+ maskColorSpace = GfxColorSpace::parse(&obj1, NULL);
+@@ -3040,7 +3058,9 @@ void PdfParser::doForm(Object *str) {
+ if (obj1.dictLookup(const_cast<char*>("S"), &obj2)->isName(const_cast<char*>("Transparency"))) {
+ transpGroup = gTrue;
+ if (!obj1.dictLookup(const_cast<char*>("CS"), &obj3)->isNull()) {
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ blendingColorSpace = GfxColorSpace::parse(NULL, &obj3, NULL, NULL);
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+ blendingColorSpace = GfxColorSpace::parse(&obj3, NULL, NULL);
+ #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
+ blendingColorSpace = GfxColorSpace::parse(&obj3, NULL);
diff --git a/media-gfx/inkscape/files/inkscape-0.91_pre3-automagic.patch b/media-gfx/inkscape/files/inkscape-0.91_pre3-automagic.patch
new file mode 100644
index 000000000000..e29b7e9f787e
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.91_pre3-automagic.patch
@@ -0,0 +1,154 @@
+Respect configure option for openmp and add configure options for aspell,
+gtkspell, imagemagick, jpeg, and exif.
+
+--- inkscape-0.91pre3/configure.ac
++++ inkscape-0.91pre3/configure.ac
+@@ -233,19 +233,28 @@
+ dnl Check for OpenMP
+ dnl ******************************
+ AC_OPENMP
+-if test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
+- openmp_ok=yes
+- dnl We have it, now set up the flags
+- CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
+- AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
++openmp_ok="no"
++if test "x$enable_openmp" = "xyes"; then
++ if test "x$ac_cv_prog_cxx_openmp" != "xunsupported"; then
++ openmp_ok=yes
++ dnl We have it, now set up the flags
++ CXXFLAGS="$CXXFLAGS $OPENMP_CXXFLAGS"
++ AC_DEFINE(HAVE_OPENMP, 1, [Use OpenMP])
++ fi
+ fi
+
+ dnl ******************************
+ dnl Check for libexif
+ dnl ******************************
+-PKG_CHECK_MODULES(EXIF, libexif, exif_ok=yes, exif_ok=no)
+-if test "x$exif_ok" = "xyes"; then
+- AC_DEFINE(HAVE_EXIF, 1, [Use libexif])
++AC_ARG_ENABLE(exif,
++ AS_HELP_STRING([--enable-exif], [compile with EXIF support]),
++ enable_exif=$enableval,enable_exif=no)
++
++if test "x$enable_exif" = "xyes"; then
++ PKG_CHECK_MODULES(EXIF, libexif, exif_ok=yes, exif_ok=no)
++ if test "x$exif_ok" = "xyes"; then
++ AC_DEFINE(HAVE_EXIF, 1, [Use libexif])
++ fi
+ fi
+ AC_SUBST(EXIF_LIBS)
+ AC_SUBST(EXIF_CFLAGS)
+@@ -253,10 +262,16 @@
+ dnl ******************************
+ dnl Check for libjpeg
+ dnl ******************************
+-AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [AC_CHECK_HEADER(jpeglib.h, jpeg_ok=yes, jpeg_ok=no)], jpeg_ok=no)
+-if test "x$jpeg_ok" = "xyes"; then
+- LIBS="-ljpeg $LIBS"
+- AC_DEFINE(HAVE_JPEG, 1, [Use libjpeg])
++AC_ARG_ENABLE(jpeg,
++ AS_HELP_STRING([--enable-jpeg], [compile with JPEG support]),
++ enable_jpeg=$enableval,enable_jpeg=no)
++
++if test "x$enable_jpeg" = "xyes"; then
++ AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [AC_CHECK_HEADER(jpeglib.h, jpeg_ok=yes, jpeg_ok=no)], jpeg_ok=no)
++ if test "x$jpeg_ok" = "xyes"; then
++ LIBS="-ljpeg $LIBS"
++ AC_DEFINE(HAVE_JPEG, 1, [Use libjpeg])
++ fi
+ fi
+
+ dnl This check is to get a FIONREAD definition on Solaris 8
+@@ -675,9 +690,16 @@
+ dnl Check for ImageMagick Magick++
+ dnl ******************************
+
+-PKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick++, magick_ok=yes, magick_ok=no)
+-if test "x$magick_ok" = "xyes"; then
+- AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
++AC_ARG_ENABLE(magick,
++ AS_HELP_STRING([--enable-magick], [compile with Image Magick++ support for bitmap effects]),
++ enable_magick=$enableval,enable_magick=no)
++
++magick_ok="no"
++if test "x$enable_magick" = "xyes"; then
++ PKG_CHECK_MODULES(IMAGEMAGICK, ImageMagick++, magick_ok=yes, magick_ok=no)
++ if test "x$magick_ok" = "xyes"; then
++ AC_DEFINE(WITH_IMAGE_MAGICK,1,[Image Magick++ support for bitmap effects])
++ fi
+ fi
+ AM_CONDITIONAL(USE_IMAGE_MAGICK, test "x$magick_ok" = "xyes")
+
+@@ -712,6 +734,10 @@
+ AC_DEFINE(WITH_GLIBMM_2_32,1,[Build with Glibmm 2.32 or higher])
+ fi
+
++
++AC_ARG_WITH([gtkspell],
++ AS_HELP_STRING([--without-gtkspell], [disable gtk spelling widget]),[with_gtkspell=$withval], [with_gtkspell=yes])
++
+ dnl *********************************
+ dnl Allow experimental GTK+3 build
+ dnl *********************************
+@@ -723,11 +749,13 @@
+ if test "x$enable_gtk3" = "xyes"; then
+
+ ink_spell_pkg=
+- if pkg-config --exists gtkspell-3.0; then
+- ink_spell_pkg=gtkspell-3.0
+- AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
++ if test "x$with_gtkspell" = "xyes"; then
++ if pkg-config --exists gtkspell-3.0; then
++ ink_spell_pkg=gtkspell-3.0
++ AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
++ fi
+ fi
+-
++
+ PKG_CHECK_MODULES(GTK,
+ gtkmm-3.0 >= 3.2
+ gdkmm-3.0 >= 3.2
+@@ -800,11 +828,13 @@
+ else
+
+ ink_spell_pkg=
+- if pkg-config --exists gtkspell-2.0; then
+- ink_spell_pkg=gtkspell-2.0
+- AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
++ if test "x$with_gtkspell" = "xyes"; then
++ if pkg-config --exists gtkspell-2.0; then
++ ink_spell_pkg=gtkspell-2.0
++ AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget])
++ fi
+ fi
+-
++
+ PKG_CHECK_MODULES(GTK,
+ gtk+-2.0 >= 2.24
+ $ink_spell_pkg
+@@ -928,12 +958,17 @@
+ dnl **************************
+ dnl Check for aspell
+ dnl ******************************
+-AC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
+-if test "x$aspell_ok" = "xyes"; then
+- AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
+- INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
+-else
+- AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
++AC_ARG_WITH([aspell],
++ AS_HELP_STRING([--without-aspell], [disable aspell spell checker]),[with_aspell=$withval], [with_aspell=yes])
++
++if test "x$with_aspell" = "xyes"; then
++ AC_CHECK_LIB(aspell, new_aspell_config, [AC_CHECK_HEADER(aspell.h, aspell_ok=yes, aspell_ok=no)], aspell_ok=no, -lz -lm)
++ if test "x$aspell_ok" = "xyes"; then
++ AC_DEFINE(HAVE_ASPELL, 1, [Use aspell for built-in spellchecker])
++ INKSCAPE_LIBS="$INKSCAPE_LIBS -laspell"
++ else
++ AC_MSG_CHECKING([Aspell not found, spell checker will be disabled])
++ fi
+ fi
+
+ dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
diff --git a/media-gfx/inkscape/files/inkscape-0.91_pre3-cppflags.patch b/media-gfx/inkscape/files/inkscape-0.91_pre3-cppflags.patch
new file mode 100644
index 000000000000..94dbf881de0c
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.91_pre3-cppflags.patch
@@ -0,0 +1,14 @@
+Gentoo enables _FORTIFY_SOURCE by default so this avoids redefined warnings.
+
+--- inkscape-0.91pre3/configure.ac
++++ inkscape-0.91pre3/configure.ac
+@@ -72,9 +72,6 @@
+ ####
+ # Generic cpp flags...
+
+- # What is just plain "-W" ?
+- # Fortify source requires -O2 or higher, which is handled with newer autoconf
+- CPPFLAGS="-W -D_FORTIFY_SOURCE=2 $CPPFLAGS"
+ # Enable format and format security warnings
+ CPPFLAGS="-Wformat -Wformat-security $CPPFLAGS"
+ # Enable all default warnings
diff --git a/media-gfx/inkscape/files/inkscape-0.91_pre3-desktop.patch b/media-gfx/inkscape/files/inkscape-0.91_pre3-desktop.patch
new file mode 100644
index 000000000000..f02fa1a8aca5
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.91_pre3-desktop.patch
@@ -0,0 +1,20 @@
+--- inkscape-0.91pre3/inkscape.desktop.in
++++ inkscape-0.91pre3/inkscape.desktop.in
+@@ -5,7 +5,7 @@
+ _X-GNOME-FullName=Inkscape Vector Graphics Editor
+ _Comment=Create and edit Scalable Vector Graphics images
+ Type=Application
+-Categories=Graphics;VectorGraphics;GTK;
++Categories=Graphics;2DGraphics;VectorGraphics;GTK;
+ MimeType=image/svg+xml;image/svg+xml-compressed;application/vnd.corel-draw;application/pdf;application/postscript;image/x-eps;application/illustrator;
+ Exec=inkscape %F
+ TryExec=inkscape
+@@ -14,7 +14,7 @@
+ Icon=inkscape
+ X-Ayatana-Desktop-Shortcuts=Drawing
+
+-[Drawing Shortcut Group]
++[X-Drawing Shortcut Group]
+ _Name=New Drawing
+ Exec=inkscape
+ TargetEnvironment=Unity
diff --git a/media-gfx/inkscape/files/inkscape-0.91_pre3-exif.patch b/media-gfx/inkscape/files/inkscape-0.91_pre3-exif.patch
new file mode 100644
index 000000000000..4180fd4d2ef0
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.91_pre3-exif.patch
@@ -0,0 +1,12 @@
+Actually try to use EXIF support if it's enabled.
+
+--- inkscape-0.91pre3/src/extension/internal/image-resolution.cpp
++++ inkscape-0.91pre3/src/extension/internal/image-resolution.cpp
+@@ -18,6 +18,7 @@
+ #include <png.h>
+
+ #ifdef HAVE_EXIF
++#define IR_TRY_EXIF 1
+ #include <math.h>
+ #include <libexif/exif-data.h>
+ #endif
diff --git a/media-gfx/inkscape/files/inkscape-0.91_pre3-sk-man.patch b/media-gfx/inkscape/files/inkscape-0.91_pre3-sk-man.patch
new file mode 100644
index 000000000000..f14e7d152e19
--- /dev/null
+++ b/media-gfx/inkscape/files/inkscape-0.91_pre3-sk-man.patch
@@ -0,0 +1,15 @@
+Install sk man page to the right directory.
+
+https://bugs.gentoo.org/show_bug.cgi?id=481276
+
+--- inkscape-0.91pre3/Makefile.am
++++ inkscape-0.91pre3/Makefile.am
+@@ -561,7 +561,7 @@
+ manja_DATA = inkscape.ja.1
+ manjadir = $(mandir)/ja/man1
+
+-mansk_DATA = inkscape.ja.1
++mansk_DATA = inkscape.sk.1
+ manskdir = $(mandir)/sk/man1
+
+ manzhtw_DATA = inkscape.zh_TW.1
diff --git a/media-gfx/inkscape/inkscape-0.48.5-r1.ebuild b/media-gfx/inkscape/inkscape-0.48.5-r1.ebuild
new file mode 100644
index 000000000000..3a82bb3cd20f
--- /dev/null
+++ b/media-gfx/inkscape/inkscape-0.48.5-r1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="xml"
+GCONF_DEBUG=no
+
+inherit autotools eutils flag-o-matic gnome2 toolchain-funcs python-single-r1
+
+MY_P=${P/_/}
+
+DESCRIPTION="A SVG based generic vector-drawing program"
+HOMEPAGE="http://www.inkscape.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
+IUSE="dia gnome postscript inkjar lcms nls spell wmf"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ app-text/libwpd:0.9
+ app-text/libwpg:0.2
+ >=app-text/poppler-0.12.3-r3:=[cairo,xpdf-headers(+)]
+ dev-cpp/glibmm
+ >=dev-cpp/gtkmm-2.18.0:2.4
+ >=dev-libs/boehm-gc-6.4
+ >=dev-libs/glib-2.6.5
+ >=dev-libs/libsigc++-2.0.12
+ >=dev-libs/libxml2-2.6.20
+ >=dev-libs/libxslt-1.0.15
+ dev-libs/popt
+ dev-python/lxml[${PYTHON_USEDEP}]
+ media-gfx/imagemagick[cxx]
+ media-libs/fontconfig
+ media-libs/freetype:2
+ media-libs/libpng:0
+ sci-libs/gsl
+ x11-libs/libX11
+ >=x11-libs/gtk+-2.10.7:2
+ >=x11-libs/pango-1.4.0
+ gnome? ( >=gnome-base/gnome-vfs-2.0 )
+ lcms? ( media-libs/lcms:2 )
+ spell? (
+ app-text/aspell
+ app-text/gtkspell:2
+ )"
+
+# These only use executables provided by these packages
+# See share/extensions for more details. inkscape can tell you to
+# install these so we could of course just not depend on those and rely
+# on that.
+RDEPEND="${COMMON_DEPEND}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ media-gfx/uniconvertor
+ dia? ( app-office/dia )
+ postscript? ( app-text/ghostscript-gpl )
+ wmf? ( media-libs/libwmf )"
+
+DEPEND="${COMMON_DEPEND}
+ dev-libs/boost
+ >=dev-util/intltool-0.29
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+RESTRICT="test"
+
+src_prepare() {
+ gnome2_src_prepare
+ epatch \
+ "${FILESDIR}"/${PN}-0.48.0-spell.patch \
+ "${FILESDIR}"/${PN}-0.48.2-libwpg.patch \
+ "${FILESDIR}"/${PN}-0.48.3.1-desktop.patch \
+ "${FILESDIR}"/${PN}-0.48.4-epython.patch \
+ "${FILESDIR}"/${PN}-0.48.4-automake-1.13.patch \
+ "${FILESDIR}"/${PN}-0.48.4-gc74-configure.patch \
+ "${FILESDIR}"/${PN}-0.48.4-poppler-0.29.0.patch
+
+ sed -i \
+ -e "s#@EPYTHON@#${EPYTHON}#" \
+ src/extension/implementation/script.cpp || die
+
+ eautoreconf
+
+ # bug 421111
+ python_fix_shebang share/extensions
+}
+
+src_configure() {
+ G2CONF="${G2CONF}
+ --without-perl
+ --enable-poppler-cairo
+ $(use_with gnome gnome-vfs)
+ $(use_with inkjar)
+ $(use_enable lcms)
+ $(use_enable nls)
+ $(use_with spell aspell)
+ $(use_with spell gtkspell)"
+
+ # aliasing unsafe wrt #310393
+ append-flags -fno-strict-aliasing
+ gnome2_src_configure
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ gnome2_src_install
+ python_optimize "${ED}"/usr/share/${PN}/extensions
+}
diff --git a/media-gfx/inkscape/inkscape-0.91.ebuild b/media-gfx/inkscape/inkscape-0.91.ebuild
new file mode 100644
index 000000000000..f8f1af2de918
--- /dev/null
+++ b/media-gfx/inkscape/inkscape-0.91.ebuild
@@ -0,0 +1,162 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="xml"
+
+inherit autotools eutils flag-o-matic gnome2-utils fdo-mime toolchain-funcs python-single-r1
+
+MY_P=${P/_/}
+
+DESCRIPTION="A SVG based generic vector-drawing program"
+HOMEPAGE="http://www.inkscape.org/"
+SRC_URI="https://inkscape.global.ssl.fastly.net/media/resources/file/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
+IUSE="cdr dia dbus exif gnome imagemagick openmp postscript inkjar jpeg lcms nls spell static-libs visio wpg"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+WPG_DEPS="
+ || (
+ ( app-text/libwpg:0.3 dev-libs/librevenge )
+ ( app-text/libwpd:0.9 app-text/libwpg:0.2 )
+ )
+"
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ >=app-text/poppler-0.26.0:=[cairo]
+ >=dev-cpp/glibmm-2.28
+ >=dev-cpp/gtkmm-2.18.0:2.4
+ >=dev-cpp/cairomm-1.9.8
+ >=dev-cpp/glibmm-2.32
+ >=dev-libs/boehm-gc-6.4
+ >=dev-libs/glib-2.28
+ >=dev-libs/libsigc++-2.0.12
+ >=dev-libs/libxml2-2.6.20
+ >=dev-libs/libxslt-1.0.15
+ dev-libs/popt
+ dev-python/lxml[${PYTHON_USEDEP}]
+ media-libs/fontconfig
+ media-libs/freetype:2
+ media-libs/libpng:0
+ sci-libs/gsl
+ x11-libs/libX11
+ >=x11-libs/gtk+-2.10.7:2
+ >=x11-libs/pango-1.24
+ cdr? (
+ media-libs/libcdr
+ ${WPG_DEPS}
+ )
+ dbus? ( dev-libs/dbus-glib )
+ exif? ( media-libs/libexif )
+ gnome? ( >=gnome-base/gnome-vfs-2.0 )
+ imagemagick? ( media-gfx/imagemagick:=[cxx] )
+ jpeg? ( virtual/jpeg:0 )
+ lcms? ( media-libs/lcms:2 )
+ spell? (
+ app-text/aspell
+ app-text/gtkspell:2
+ )
+ visio? (
+ media-libs/libvisio
+ ${WPG_DEPS}
+ )
+ wpg? ( ${WPG_DEPS} )
+"
+
+# These only use executables provided by these packages
+# See share/extensions for more details. inkscape can tell you to
+# install these so we could of course just not depend on those and rely
+# on that.
+RDEPEND="${COMMON_DEPEND}
+ dev-python/numpy[${PYTHON_USEDEP}]
+ media-gfx/uniconvertor
+ dia? ( app-office/dia )
+ postscript? ( app-text/ghostscript-gpl )
+"
+
+DEPEND="${COMMON_DEPEND}
+ >=dev-libs/boost-1.36
+ >=dev-util/intltool-0.40
+ >=sys-devel/gettext-0.17
+ virtual/pkgconfig
+"
+
+S=${WORKDIR}/${MY_P}
+
+RESTRICT="test"
+
+pkg_pretend() {
+ if use openmp; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-0.91_pre3-automagic.patch \
+ "${FILESDIR}"/${PN}-0.91_pre3-cppflags.patch \
+ "${FILESDIR}"/${PN}-0.91_pre3-desktop.patch \
+ "${FILESDIR}"/${PN}-0.91_pre3-exif.patch \
+ "${FILESDIR}"/${PN}-0.91_pre3-sk-man.patch \
+ "${FILESDIR}"/${PN}-0.48.4-epython.patch
+
+ sed -i "s#@EPYTHON@#${EPYTHON}#" src/extension/implementation/script.cpp || die
+
+ eautoreconf
+
+ # bug 421111
+ python_fix_shebang share/extensions
+}
+
+src_configure() {
+ # aliasing unsafe wrt #310393
+ append-flags -fno-strict-aliasing
+
+ econf \
+ $(use_enable static-libs static) \
+ $(use_enable nls) \
+ $(use_enable openmp) \
+ $(use_enable exif) \
+ $(use_enable jpeg) \
+ $(use_enable lcms) \
+ --enable-poppler-cairo \
+ $(use_enable wpg) \
+ $(use_enable visio) \
+ $(use_enable cdr) \
+ $(use_enable dbus dbusapi) \
+ $(use_enable imagemagick magick) \
+ $(use_with gnome gnome-vfs) \
+ $(use_with inkjar) \
+ $(use_with spell gtkspell) \
+ $(use_with spell aspell)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ default
+
+ prune_libtool_files
+ python_optimize "${ED}"/usr/share/${PN}/extensions
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/inkscape/metadata.xml b/media-gfx/inkscape/metadata.xml
new file mode 100644
index 000000000000..100672a8684b
--- /dev/null
+++ b/media-gfx/inkscape/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="cdr">Enable support for CorelDRAW Diagrams</flag>
+ <flag name="dia">pull in <pkg>app-office/dia</pkg> for dia import extension</flag>
+ <flag name="inkjar">Enable support for OpenOffice.org SVG jar files</flag>
+ <flag name="visio">Enable support for Microsoft Visio Diagrams</flag>
+ <flag name="wpg">Enable support for WordPerfect Graphics</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/ipe/Manifest b/media-gfx/ipe/Manifest
new file mode 100644
index 000000000000..fefdd9f11fd5
--- /dev/null
+++ b/media-gfx/ipe/Manifest
@@ -0,0 +1,2 @@
+DIST ipe-7.1.2-src.tar.gz 1416404 SHA256 3390de67ee22b2de74acfab2e9fb29bcfd6fe180688086febb758dc8a82eda11 SHA512 9d49c5f116a6271fce5a5a6c77cad64e348b17b9b02d1be8bece341231ebc15f642d6af49e73958e4d26814eafc52be38855e4d24e8cf44488da6a752151a189 WHIRLPOOL 80770369cf07fa9bdf2f3d40fe88e2e312d65c9b075f3eae44822ede2e38cc5f378c8078ab21e14a25a604977578b3be71978dd71844c7877abc50ba0f7f8f4c
+DIST ipe-7.1.3-src.tar.gz 1497624 SHA256 4b3c537aeb9720e74ee5e63d50e1ec1f760f90b3896ffb9acc8c20353f60b8e9 SHA512 eea85ed6f4bc23e746222e01f4cdfd101c9c18aeb19fcba9abff565a65614a2a5e6630ddf9f7b024cac225582a34238a22f6fc5cf7dcc3733b8281ce844ef23d WHIRLPOOL a1b46452fb3b2d5da72a411eca48a2e24331416727b4013cecebad962817d3029c63a972ae7ee743b35cfe9adc4dc3c59d04572e9b472fdf774ad67202b0b264
diff --git a/media-gfx/ipe/files/ipe-7.1.3-gold.patch b/media-gfx/ipe/files/ipe-7.1.3-gold.patch
new file mode 100644
index 000000000000..a28fafa15c43
--- /dev/null
+++ b/media-gfx/ipe/files/ipe-7.1.3-gold.patch
@@ -0,0 +1,30 @@
+ src/ipe/Makefile | 2 +-
+ src/ipescript/Makefile | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ipe/Makefile b/src/ipe/Makefile
+index 21ac500..5a7a1ad 100644
+--- a/src/ipe/Makefile
++++ b/src/ipe/Makefile
+@@ -10,7 +10,7 @@ TARGET = $(call exe_target,ipe)
+ CPPFLAGS += -I../include -I../ipecanvas -I../ipecairo -I../ipelua \
+ $(LUA_CFLAGS) $(UI_CFLAGS) $(CAIRO_CFLAGS) $(ZLIB_CFLAGS)
+ LIBS += -L$(buildlib) -lipecanvas -lipecairo -lipelua -lipe -lipeui \
+- $(LUA_LIBS) $(UI_LIBS) $(CAIRO_LIBS) $(ZLIB_LIBS)
++ $(LUA_LIBS) $(UI_LIBS) $(CAIRO_LIBS) $(ZLIB_LIBS) -ldl
+
+ CPPFLAGS += -DIPELETDIR=\"$(IPELETDIR)\"
+ CPPFLAGS += -DIPELUADIR=\"$(IPELUADIR)\"
+diff --git a/src/ipescript/Makefile b/src/ipescript/Makefile
+index ff35fd9..2315f1f 100644
+--- a/src/ipescript/Makefile
++++ b/src/ipescript/Makefile
+@@ -8,7 +8,7 @@ include ../common.mak
+ TARGET = $(call exe_target,ipescript)
+
+ CPPFLAGS += -I../include -I../ipelua $(LUA_CFLAGS)
+-LIBS += -L$(buildlib) -lipelua -lipe $(LUA_LIBS)
++LIBS += -L$(buildlib) -lipelua -lipe $(LUA_LIBS) -ldl
+
+ CPPFLAGS += -DIPELETDIR=\"$(IPELETDIR)\"
+ CPPFLAGS += -DIPESTYLEDIR=\"$(IPESTYLEDIR)\"
diff --git a/media-gfx/ipe/ipe-7.1.2.ebuild b/media-gfx/ipe/ipe-7.1.2.ebuild
new file mode 100644
index 000000000000..d77a93f3ba2b
--- /dev/null
+++ b/media-gfx/ipe/ipe-7.1.2.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs qt4-r2
+
+DESCRIPTION="Drawing editor for creating figures in PDF or PS formats"
+HOMEPAGE="http://ipe7.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ipe7/${PN}/7.1.0/${P}-src.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-text/texlive-core
+ dev-lang/lua
+ media-libs/freetype:2
+ x11-libs/cairo
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${P}/src"
+
+search_urw_fonts() {
+ # colon-separated list of paths
+ local texmfdist="$(kpsewhich -var-value=TEXMFDIST)"
+ # according to TeX directory structure
+ local urwdir=fonts/type1/urw
+ # add colon as field separator
+ local IFS="${IFS}:" dir
+ for dir in ${texmfdist}; do
+ if [[ -d ${dir}/${urwdir} ]]; then
+ URWFONTDIR="${dir}/${urwdir}"
+ return 0
+ fi
+ done
+ return 1
+}
+
+pkg_setup() {
+ if search_urw_fonts; then
+ einfo "URW fonts found in ${URWFONTDIR}"
+ else
+ ewarn "Could not find directory containing URW fonts"
+ ewarn "Ipe will not function properly without them."
+ fi
+}
+
+src_prepare() {
+ sed -i \
+ -e 's/fpic/fPIC/' \
+ -e 's/moc-qt4/moc/' \
+ -e "s:\$(IPEPREFIX)/lib:\$(IPEPREFIX)/$(get_libdir):g" \
+ config.mak || die
+ sed -i -e 's/install -s/install/' common.mak || die
+
+}
+
+src_compile() {
+ emake \
+ CXX=$(tc-getCXX) \
+ IPEPREFIX="${EPREFIX}/usr" \
+ IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html"
+}
+
+src_install() {
+ emake install \
+ IPEPREFIX="${EPREFIX}/usr" \
+ IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \
+ INSTALL_ROOT="${ED}"
+ dodoc ../{news,readme}.txt
+ doicon ipe/icons/ipe.png
+ make_desktop_entry ipe Ipe ipe
+}
diff --git a/media-gfx/ipe/ipe-7.1.3.ebuild b/media-gfx/ipe/ipe-7.1.3.ebuild
new file mode 100644
index 000000000000..526bb3ef62c3
--- /dev/null
+++ b/media-gfx/ipe/ipe-7.1.3.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-r2 toolchain-funcs
+
+DESCRIPTION="Drawing editor for creating figures in PDF or PS formats"
+HOMEPAGE="http://ipe7.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ipe7/${PN}/7.1.0/${P}-src.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="
+ app-text/texlive-core
+ dev-lang/lua
+ media-libs/freetype:2
+ x11-libs/cairo
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${P}/src"
+
+search_urw_fonts() {
+ # colon-separated list of paths
+ local texmfdist="$(kpsewhich -var-value=TEXMFDIST)"
+ # according to TeX directory structure
+ local urwdir=fonts/type1/urw
+ # add colon as field separator
+ local IFS="${IFS}:" dir
+ for dir in ${texmfdist}; do
+ if [[ -d ${dir}/${urwdir} ]]; then
+ URWFONTDIR="${dir}/${urwdir}"
+ return 0
+ fi
+ done
+ return 1
+}
+
+pkg_setup() {
+ if search_urw_fonts; then
+ einfo "URW fonts found in ${URWFONTDIR}"
+ else
+ ewarn "Could not find directory containing URW fonts"
+ ewarn "Ipe will not function properly without them."
+ fi
+}
+
+src_prepare() {
+ sed -i \
+ -e 's/fpic/fPIC/' \
+ -e 's/moc-qt4/moc/' \
+ -e "s:\$(IPEPREFIX)/lib:\$(IPEPREFIX)/$(get_libdir):g" \
+ config.mak || die
+ sed -i -e 's/install -s/install/' common.mak || die
+
+ epatch "${FILESDIR}"/${P}-gold.patch
+}
+
+src_compile() {
+ emake \
+ CXX=$(tc-getCXX) \
+ IPEPREFIX="${EPREFIX}/usr" \
+ IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html"
+}
+
+src_install() {
+ emake install \
+ IPEPREFIX="${EPREFIX}/usr" \
+ IPEDOCDIR="${EPREFIX}/usr/share/doc/${PF}/html" \
+ INSTALL_ROOT="${ED}"
+ dodoc ../{news,readme}.txt
+ doicon ipe/icons/ipe.png
+ make_desktop_entry ipe Ipe ipe
+}
diff --git a/media-gfx/ipe/metadata.xml b/media-gfx/ipe/metadata.xml
new file mode 100644
index 000000000000..a92043c8c104
--- /dev/null
+++ b/media-gfx/ipe/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <longdescription lang="en">
+ Ipe is a drawing editor for creating figures in PDF or
+ (encapsulated) Postscript format. Ipe supports making small figures
+ for inclusion into LaTeX documents as well as making multi-page PDF
+ presentations.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">ipe7</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/iscan-data/Manifest b/media-gfx/iscan-data/Manifest
new file mode 100644
index 000000000000..ec4f92ad79ce
--- /dev/null
+++ b/media-gfx/iscan-data/Manifest
@@ -0,0 +1,2 @@
+DIST iscan-data_1.22.0-1.tar.gz 96626 SHA256 e6ef1c275488d907869f48eb7889d9a01e564ea4b39e291e90843feb59e92ef8 SHA512 2adc6c125045803ffd269abab4f58d6d1c87ebd4c959985e6689d0b2e7f5a84fb1956d0e559c35b1704a1e330bc639e668c37f718c871e076a7ccf6c35562e6f WHIRLPOOL f4b7aaf68396c54295b40999653b4f1f8777d154e38ff1612a2458c2449570a6213fd41abeb13d6d06cba09828f8f35d485a6cce7303e8657a7ce87887657cc2
+DIST iscan-data_1.36.0-1.tar.gz 100218 SHA256 3a0a0075d0f7fcb0f482cbde2e74c9f6bee64268db32a4e6f470f1a6069117ba SHA512 a9711264c852dd4bdcdb10c1153f725a111bd74b03705c99265b6692bf47236c6e4f5e7e4813991eb5991deb198adeee272c8c3eb53da641ba189d923916d3cb WHIRLPOOL 5fc6bc042c7ee587e00b47f46f7b3ae3eba8646ac8c66ea5a1641d616f54fe75e7a1285b7146a4bba0e75bb88dae8c4478cefc270f6bf07e89f67b6ec3141f02
diff --git a/media-gfx/iscan-data/iscan-data-1.22.0.1.ebuild b/media-gfx/iscan-data/iscan-data-1.22.0.1.ebuild
new file mode 100644
index 000000000000..9bf1319e1e62
--- /dev/null
+++ b/media-gfx/iscan-data/iscan-data-1.22.0.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils versionator udev multilib
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_PVR="$(replace_version_separator 3 -)"
+
+DESCRIPTION="Image Scan! for Linux data files"
+HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+SRC_URI="http://dev.gentoo.org/~flameeyes/avasys/${PN}_${MY_PVR}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="amd64 x86"
+IUSE="udev"
+
+DEPEND="udev? (
+ dev-libs/libxslt
+ media-gfx/sane-backends
+ )"
+RDEPEND=""
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+DOCS=( NEWS SUPPORTED-DEVICES KNOWN-PROBLEMS )
+
+src_install() {
+ default
+
+ if use udev; then
+ # create udev rules
+ local rulesdir=$(get_udevdir)/rules.d
+ dodir ${rulesdir}
+ "${D}usr/$(get_libdir)/iscan-data/make-policy-file" \
+ --force --quiet --mode udev \
+ -d "${D}usr/share/iscan-data/epkowa.desc" \
+ -o "${D}${rulesdir}/99-iscan.rules" || die
+ fi
+}
diff --git a/media-gfx/iscan-data/iscan-data-1.36.0.1.ebuild b/media-gfx/iscan-data/iscan-data-1.36.0.1.ebuild
new file mode 100644
index 000000000000..5653548c69d3
--- /dev/null
+++ b/media-gfx/iscan-data/iscan-data-1.36.0.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils versionator udev multilib
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_PVR="$(replace_version_separator 3 -)"
+
+DESCRIPTION="Image Scan! for Linux data files"
+HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+# Use a gentoo hosted url since upstream uses a session based url that causes the
+# files to no longer be available after the session expires.
+SRC_URI="http://dev.gentoo.org/~idella4/tarballs//${PN}_${MY_PVR}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="amd64 x86"
+IUSE="udev"
+
+DEPEND="udev? (
+ dev-libs/libxslt
+ media-gfx/sane-backends
+ )"
+RDEPEND=""
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+DOCS=( NEWS SUPPORTED-DEVICES KNOWN-PROBLEMS )
+
+src_install() {
+ ewarn ""; ewarn "Some profiles automatically enable udev which will cause install to fail"
+ ewarn "if media-gfx/sane-backends is not already installed."; ewarn ""
+ default
+
+ if use udev; then
+ # create udev rules
+ local rulesdir=$(get_udevdir)/rules.d
+ dodir ${rulesdir}
+ "${D}usr/$(get_libdir)/iscan-data/make-policy-file" \
+ --force --mode udev \
+ -d "${D}usr/share/iscan-data/epkowa.desc" \
+ -o "${D}${rulesdir}/99-iscan.rules" || die
+ fi
+}
diff --git a/media-gfx/iscan-data/metadata.xml b/media-gfx/iscan-data/metadata.xml
new file mode 100644
index 000000000000..ef34db7e8ac3
--- /dev/null
+++ b/media-gfx/iscan-data/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>mattsch@gmail.com</email>
+ <name>Matthew Schultz</name>
+ </maintainer>
+ <longdescription lang="en">
+ Provides the necessary support files for Image Scan! for Linux,
+ including device information and policy file generation logic.
+ Image Scan! for Linux will not function without this package.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/iscan-plugin-esdip/Manifest b/media-gfx/iscan-plugin-esdip/Manifest
new file mode 100644
index 000000000000..0b67deb84c66
--- /dev/null
+++ b/media-gfx/iscan-plugin-esdip/Manifest
@@ -0,0 +1,2 @@
+DIST iscan-plugin-esdip-1.0.0-5.ltdl7.i386.rpm 1311240 SHA256 2f30cd6b30193c5eda0f94ee1cd9204fe8427507802bd095a790f33a5a0a1bec SHA512 cff826ad66e1718a9b59f09849522af70789f782e36d5ed979ef4296eee7be5e4e02375c939300b94d6ac555f1db2441bee59758a8a0d040770d25b47ba8dbab WHIRLPOOL 5326584ff96e4c779d611db15913f43176484067b03d3cd2b59e615ac85fb777198b15150a338f1abf7009178d6c16d624d572f1fa8efda3db1c5a95d4567cac
+DIST iscan-plugin-esdip-1.0.0-5.ltdl7.x86_64.rpm 1359799 SHA256 fb17948a12f34e943613484ca9d05c80806cab34bd28dbcfe3ff593363b2ddd4 SHA512 3d5f9721eb9d8b56d16800a4a4a25c4b887d593e08d1d0c3709f10b92c52b906000e84c99f41eec13b9ccdbaf53d2621f6f1582d69a1e5e291239a47987776a7 WHIRLPOOL 88d747fcbe29a859326029584bb25c630217a1159aaca8ca9e7bdfc9e6782e758040b0da2a0e8b9c6fa73677eb11516ed9f21865bc13ce656362044dd814803a
diff --git a/media-gfx/iscan-plugin-esdip/iscan-plugin-esdip-1.0.0.5-r1.ebuild b/media-gfx/iscan-plugin-esdip/iscan-plugin-esdip-1.0.0.5-r1.ebuild
new file mode 100644
index 000000000000..bac88e3b78c1
--- /dev/null
+++ b/media-gfx/iscan-plugin-esdip/iscan-plugin-esdip-1.0.0.5-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit rpm versionator multilib
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_PVR="$(replace_version_separator 3 -)"
+
+DESCRIPTION="Plugin for 'epkowa' backend for image manipulation"
+HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=L"
+SRC_URI="amd64? ( http://dev.gentoo.org/~flameeyes/avasys/${PN}-${MY_PVR}.ltdl7.x86_64.rpm )
+ x86? ( http://dev.gentoo.org/~flameeyes/avasys/${PN}-${MY_PVR}.ltdl7.i386.rpm )"
+
+LICENSE="AVASYS"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+
+IUSE=""
+
+DEPEND=">=media-gfx/iscan-2.28.0"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/usr/lib64/iscan/libesdtr.so.0*
+ /usr/lib64/iscan/libesdtr2.so.0*"
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ dodoc usr/share/doc/*/*
+
+ exeinto /usr/$(get_libdir)/iscan
+ doexe usr/$(get_libdir)/iscan/*
+
+ insinto /usr/share/iscan
+ doins usr/share/iscan/*
+}
diff --git a/media-gfx/iscan-plugin-esdip/metadata.xml b/media-gfx/iscan-plugin-esdip/metadata.xml
new file mode 100644
index 000000000000..d036a9eed73b
--- /dev/null
+++ b/media-gfx/iscan-plugin-esdip/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Proprietary plugin for several EPSON scanner models, to be used
+ with the epkowa SANE backend (provided by
+ <pkg>media-gfx/iscan</pkg>). 32-bit and 64-bit.
+
+ Provides support for image manipulation (deskew and autocrop).
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/iscan-plugin-gt-f500/Manifest b/media-gfx/iscan-plugin-gt-f500/Manifest
new file mode 100644
index 000000000000..9fbaceed7d4e
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-f500/Manifest
@@ -0,0 +1 @@
+DIST iscan-plugin-gt-f500-1.0.0-1.c2.i386.rpm 126130 SHA256 fe87d16ce22c28e2c320286758bea32ea4cad75c83debd6fe95670b704701464 SHA512 efecbb6e3f4fe3f498ebf9bb68a1755405c675d67c52042dcfc2e4e7f98903a870f969b4453d110c9f774452c6ae44042482ee954762c5f5a559e2d3e52a98d0 WHIRLPOOL 11ac8ac1e40b95a2a6128fc3c7fca8c27483c8305f87c989d4102b3d26acd655d7436c7a11547e8c08dac2a488c98b16699e801a5e794f6122935e91116b9bce
diff --git a/media-gfx/iscan-plugin-gt-f500/iscan-plugin-gt-f500-1.0.0.1-r1.ebuild b/media-gfx/iscan-plugin-gt-f500/iscan-plugin-gt-f500-1.0.0.1-r1.ebuild
new file mode 100644
index 000000000000..d6fae4f83946
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-f500/iscan-plugin-gt-f500-1.0.0.1-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit multilib rpm versionator
+
+MY_P="${PN}-$(replace_version_separator 3 -)"
+
+DESCRIPTION="Epson Perfection 2480/2580 PHOTO scanner plugin for SANE 'epkowa' backend"
+HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+SRC_URI="http://dev.gentoo.org/~flameeyes/avasys/${MY_P}.c2.i386.rpm"
+
+LICENSE="EPSON EAPL"
+SLOT="0"
+KEYWORDS="-* ~amd64"
+
+IUSE="minimal"
+
+DEPEND="minimal? ( >=media-gfx/iscan-2.21.0 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # install scanner firmware
+ insinto /usr/share/iscan
+ doins "${WORKDIR}/usr/share/iscan/"*
+
+ dodoc usr/share/doc/*/*
+
+ use minimal && return
+ # install scanner plugins
+ exeinto /opt/iscan/esci
+ doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"*
+}
+
+pkg_setup() {
+ basecmds=(
+ "iscan-registry --COMMAND interpreter usb 0x04b8 0x0121 '/opt/iscan/esci/libesint41.so.2 /usr/share/iscan/esfw41.bin'"
+ )
+}
+
+pkg_postinst() {
+ elog
+ elog "Firmware file esfw41.bin for Epson Perfection 2480/2580 PHOTO"
+ elog "has been installed in /usr/share/iscan."
+ elog
+ use minimal && return
+ [[ -n ${REPLACING_VERSIONS} ]] && return
+
+ # Needed for scanner to work properly.
+ if [[ ${ROOT} == "/" ]]; then
+ for basecmd in "${basecmds[@]}"; do
+ eval ${basecmd/COMMAND/add}
+ done
+ else
+ ewarn "Unable to register the plugin and firmware when installing outside of /."
+ ewarn "execute the following command yourself:"
+ for basecmd in "${basecmds[@]}"; do
+ ewarn "${basecmd/COMMAND/add}"
+ done
+ fi
+}
+
+pkg_prerm() {
+ use minimal && return
+ [[ -n ${REPLACED_BY_VERSION} ]] && return
+
+ if [[ ${ROOT} == "/" ]]; then
+ for basecmd in "${basecmds[@]}"; do
+ eval ${basecmd/COMMAND/remove}
+ done
+ else
+ ewarn "Unable to de-register the plugin and firmware when installing outside of /."
+ ewarn "execute the following command yourself:"
+ for basecmd in "${basecmds[@]}"; do
+ ewarn "${basecmd/COMMAND/remove}"
+ done
+ fi
+}
diff --git a/media-gfx/iscan-plugin-gt-f500/metadata.xml b/media-gfx/iscan-plugin-gt-f500/metadata.xml
new file mode 100644
index 000000000000..2f94838d7dff
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-f500/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Proprietary plugin for several EPSON scanner models, to be used
+ with the epkowa SANE backend (provided by
+ <pkg>media-gfx/iscan</pkg>). 32-bit only.
+
+ Also includes the firmware for them, to be used with the snapscan
+ SANE backend (provided by <pkg>media-gfx/sane-backends</pkg>).
+
+ Supports the following models:
+
+ EPSON Perfection 2480 PHOTO / GT-F500
+ EPSON Perfection 2580 PHOTO / GT-F550
+ </longdescription>
+
+ <use>
+ <flag name='minimal'>
+ Install the firmware only, and not the plugin.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/iscan-plugin-gt-f720/Manifest b/media-gfx/iscan-plugin-gt-f720/Manifest
new file mode 100644
index 000000000000..0d1416e72435
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-f720/Manifest
@@ -0,0 +1,2 @@
+DIST esci-interpreter-gt-f720-0.0.1-2.i386.rpm 381387 SHA256 c47d2acfb6de4d9c300e2f26df5b8a7c250e07195245d638457b8a4ea61f0903 SHA512 6ccc6f48d8c00614346a0faee798b876497ba5ac1b35e3fd558a6e01711b944dc713e654d53fff09daff00b91251150665932564fea4fc60ec1a0a7ec95fa1f5 WHIRLPOOL 2edd2338e00d05a017e68bdae4ca791dd409e8138adfff7cc45557ec612a209b1cb01f2ce823fbc2de4afead23019c1962a013885886bafe838ed51b018635e7
+DIST esci-interpreter-gt-f720-0.0.1-2.x86_64.rpm 170040 SHA256 9e82fc5110b4f2b08402ac4e0a4391665b7edccaba43df4299f5c48b60faaabb SHA512 457fcfa3ae8291336a127e95dc81e24a2125ae8f861bf74d2006e4d019c54bd351c2480254b9173e52dfe489962dffea2819963596f280e1dc05c527fbf6b625 WHIRLPOOL 362e8030b9c55f12ff56c9883689b8d0d9e5387c55fdcd9b0fbb5ca418b479a081b3bdd845f59ad3381ff52c96fd25d879746786d1b129cc5d1d27f6c358cd65
diff --git a/media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.2.ebuild b/media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.2.ebuild
new file mode 100644
index 000000000000..4b94f9ebce93
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit multilib versionator rpm
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_PVR="$(replace_version_separator 3 -)"
+MY_P="esci-interpreter-gt-f720-${MY_PVR}"
+
+DESCRIPTION="Epson Perfection V300 PHOTO scanner plugin for SANE 'epkowa' backend"
+HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+SRC_URI="amd64? ( http://dev.gentoo.org/~flameeyes/avasys/${MY_P}.x86_64.rpm )
+ x86? ( http://dev.gentoo.org/~flameeyes/avasys/${MY_P}.i386.rpm )"
+
+LICENSE="AVASYS"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+
+IUSE=""
+IUSE_LINGUAS="ja"
+
+for X in ${IUSE_LINGUAS}; do IUSE="${IUSE} linguas_${X}"; done
+
+DEPEND=">=media-gfx/iscan-2.21.0"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="usr/lib64/esci/libesci-interpreter-gt-f720.so*"
+
+src_install() {
+ local MY_LIB="/usr/$(get_libdir)"
+
+ # install scanner firmware
+ insinto /usr/share/esci
+ doins "${WORKDIR}/usr/share/esci/"*
+
+ # install docs
+ if use linguas_ja; then
+ dodoc usr/share/doc/*/AVASYSPL.ja.txt
+ else
+ dodoc usr/share/doc/*/AVASYSPL.en.txt
+ fi
+
+ # install scanner plugins
+ insinto "${MY_LIB}/esci"
+ INSOPTIONS="-m0755"
+ doins "${WORKDIR}/usr/$(get_libdir)/esci/"*
+}
+
+pkg_postinst() {
+ local MY_LIB="/usr/$(get_libdir)"
+
+ # Needed for scaner to work properly.
+ iscan-registry --add interpreter usb 0x04b8 0x0131 "${MY_LIB}/esci/libesci-interpreter-gt-f720 /usr/share/esci/esfw8b.bin"
+ elog
+ elog "Firmware file esfw8b.bin for Epson Perfection V300 PHOTO"
+ elog "has been installed in /usr/share/esci and registered for use."
+ elog
+}
+
+pkg_prerm() {
+ local MY_LIB="/usr/$(get_libdir)"
+
+ iscan-registry --remove interpreter usb 0x04b8 0x0131 "${MY_LIB}/esci/libesci-interpreter-gt-f720 /usr/share/esci/esfw8b.bin"
+}
diff --git a/media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.ebuild b/media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.ebuild
new file mode 100644
index 000000000000..8bdb39746103
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-f720/iscan-plugin-gt-f720-0.0.1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit multilib rpm
+
+# Revision used by upstream
+SRC_REV="2"
+
+MY_P="esci-interpreter-gt-f720-${PV}"
+
+DESCRIPTION="Epson Perfection V300 PHOTO scanner plugin for SANE 'epkowa' backend"
+HOMEPAGE="http://www.avasys.jp/english/linux_e/dl_scan.html"
+SRC_URI="
+ x86? ( http://linux.avasys.jp/drivers/scanner-plugins/GT-F720/${MY_P}-${SRC_REV}.i386.rpm )
+ amd64? ( http://linux.avasys.jp/drivers/scanner-plugins/GT-F720/${MY_P}-${SRC_REV}.x86_64.rpm )"
+
+LICENSE="AVASYS"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE=""
+IUSE_LINGUAS="ja"
+
+for X in ${IUSE_LINGUAS}; do IUSE="${IUSE} linguas_${X}"; done
+
+DEPEND=">=media-gfx/iscan-2.21.0"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ local MY_LIB="/usr/$(get_libdir)"
+
+ # install scanner firmware
+ insinto /usr/share/esci
+ doins "${WORKDIR}/usr/share/esci/"*
+
+ # install docs
+ if use linguas_ja; then
+ dodoc "usr/share/doc/${MY_P}/AVASYSPL.ja.txt"
+ else
+ dodoc "usr/share/doc/${MY_P}/AVASYSPL.en.txt"
+ fi
+
+ # install scanner plugins
+ insinto "${MY_LIB}/esci"
+ INSOPTIONS="-m0755"
+ doins "${WORKDIR}/usr/$(get_libdir)/esci/"*
+}
+
+pkg_postinst() {
+ local MY_LIB="/usr/$(get_libdir)"
+
+ # Needed for scaner to work properly.
+ iscan-registry --add interpreter usb 0x04b8 0x0131 "${MY_LIB}/esci/libesci-interpreter-gt-f720 /usr/share/esci/esfw8b.bin"
+ elog
+ elog "Firmware file esfw8b.bin for Epson Perfection V300 PHOTO"
+ elog "has been installed in /usr/share/esci and registered for use."
+ elog
+}
+
+pkg_prerm() {
+ local MY_LIB="/usr/$(get_libdir)"
+
+ iscan-registry --remove interpreter usb 0x04b8 0x0131 "${MY_LIB}/esci/libesci-interpreter-gt-f720 /usr/share/esci/esfw8b.bin"
+}
diff --git a/media-gfx/iscan-plugin-gt-f720/metadata.xml b/media-gfx/iscan-plugin-gt-f720/metadata.xml
new file mode 100644
index 000000000000..7e0ae1481634
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-f720/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Proprietary plugin for several EPSON scanner models with the epkowa SANE backend (provided by media-gfx/iscan).
+ This particular plugin (f720) seems to be required for:
+ Epson GT-F720
+ Epson GT-S620
+ Epson Perfection V30
+ Epson Perfection V300 Photo
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/iscan-plugin-gt-x770/Manifest b/media-gfx/iscan-plugin-gt-x770/Manifest
new file mode 100644
index 000000000000..b4f0ca92dd58
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-x770/Manifest
@@ -0,0 +1,2 @@
+DIST iscan-plugin-gt-x770-2.1.2-1.i386.rpm 462166 SHA256 8ce99f42e302d6686f71c3e697f75ca1eb608af72d5986d785c9cf8bc4bd93fc SHA512 b8c16dd1c3d2d8f01956a72a170fa9b51520c78ab9d2d0cd581ee1b18760a28693d364e3bc3ac50a4f1c794fb4da777d452fe12ae3cf513a06eb5bedd2543b30 WHIRLPOOL 696dfe85f2d0cb49525e310f76adb73a68406b6a66e531b49ddadef9d0d696b7d9623aae481834279a4840bd0c63c72183acaccba4dda397d04ec9528255f8f7
+DIST iscan-plugin-gt-x770-2.1.2-1.x86_64.rpm 196426 SHA256 87db6217232e0ce6ee2f50183f831fd923aaa76b34e0da7445f4cd7bcad5b902 SHA512 a69830fb35b2732351b35ef39a6863886bf6bc992242188e57d273444ea17e55294b5b9331c5e770b8af179e4f346e5be74c5fd79e1e6cefd2a1e975c3e68a43 WHIRLPOOL 1c79c49c9d31f37f061a8e314e53f1d8846a64d448b73c1c503ea8dc1c90d11b1142c26ee4618117041de9e78c395643506d9d7e8821cef3cd84b0ba0b3457b6
diff --git a/media-gfx/iscan-plugin-gt-x770/iscan-plugin-gt-x770-2.1.2.1-r3.ebuild b/media-gfx/iscan-plugin-gt-x770/iscan-plugin-gt-x770-2.1.2.1-r3.ebuild
new file mode 100644
index 000000000000..48594a07938e
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-x770/iscan-plugin-gt-x770-2.1.2.1-r3.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit rpm versionator multilib
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_PVR="$(replace_version_separator 3 -)"
+
+DESCRIPTION="Epson Perfection V500 scanner plugin for SANE 'epkowa' backend"
+HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+SRC_URI="
+ x86? ( http://dev.gentoo.org/~flameeyes/avasys/${PN}/${MY_PV}/${PN}-${MY_PVR}.i386.rpm )
+ amd64? ( http://dev.gentoo.org/~flameeyes/avasys/${PN}/${MY_PV}/${PN}-${MY_PVR}.x86_64.rpm )
+"
+
+LICENSE="AVASYS"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+
+IUSE=""
+
+DEPEND=">=media-gfx/iscan-2.21.0
+ !!<media-gfx/iscan-plugin-gt-x770-2.1.2.1-r2"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/opt/iscan/esci/libesint7C.so*"
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # install scanner firmware
+ insinto /usr/share/iscan
+ doins "${WORKDIR}/usr/share/iscan/"*
+
+ dodoc usr/share/doc/*/*
+
+ # install scanner plugins
+ exeinto /opt/iscan/esci
+ doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"*
+}
+
+pkg_setup() {
+ basecmds=(
+ "iscan-registry --COMMAND interpreter usb 0x04b8 0x0130 /opt/iscan/esci/libesint7C /usr/share/iscan/esfw7C.bin"
+ )
+}
+
+pkg_postinst() {
+ elog
+ elog "Firmware file esfw41.bin for Epson Perfection V500"
+ elog "has been installed in /usr/share/iscan."
+ elog
+
+ [[ -n ${REPLACING_VERSIONS} ]] && return
+
+ # Needed for scanner to work properly.
+ if [[ ${ROOT} == "/" ]]; then
+ for basecmd in "${basecmds[@]}"; do
+ eval ${basecmd/COMMAND/add}
+ done
+ else
+ ewarn "Unable to register the plugin and firmware when installing outside of /."
+ ewarn "execute the following command yourself:"
+ for basecmd in "${basecmds[@]}"; do
+ ewarn "${basecmd/COMMAND/add}"
+ done
+ fi
+}
+
+pkg_prerm() {
+ [[ -n ${REPLACED_BY_VERSION} ]] && return
+
+ if [[ ${ROOT} == "/" ]]; then
+ for basecmd in "${basecmds[@]}"; do
+ eval ${basecmd/COMMAND/remove}
+ done
+ else
+ ewarn "Unable to de-register the plugin and firmware when installing outside of /."
+ ewarn "execute the following command yourself:"
+ for basecmd in "${basecmds[@]}"; do
+ ewarn "${basecmd/COMMAND/remove}"
+ done
+ fi
+}
diff --git a/media-gfx/iscan-plugin-gt-x770/metadata.xml b/media-gfx/iscan-plugin-gt-x770/metadata.xml
new file mode 100644
index 000000000000..2b67f8ab7eb6
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-x770/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>mattsch@gmail.com</email>
+ </maintainer>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Proprietary plugin for several EPSON scanner models, to be used
+ with the epkowa SANE backend (provided by
+ <pkg>media-gfx/iscan</pkg>). 32-bit and 64-bit.
+
+ Supports the following models:
+
+ EPSON Perfection V500 (GT-X770)
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/iscan-plugin-gt-x820/Manifest b/media-gfx/iscan-plugin-gt-x820/Manifest
new file mode 100644
index 000000000000..5726da499ca9
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-x820/Manifest
@@ -0,0 +1,2 @@
+DIST iscan-plugin-gt-x820-2.2.0-1.i386.rpm 490641 SHA256 aef57fde9829bb888dd091cd7423778a88511e4d580f519d06f43d097db80c84 SHA512 37f72ce8d71d315f51f45cd08c8865a2e613b8a6c6a27e7f4671bd5a796d10f3f9cffb954dd5f3875395f49244b090f5a2a4f2749d6c5d080ce4766faf7ccdf1 WHIRLPOOL fd5de9365d0ade03958e86e8f015a209abe47f3dea58550c057067c4a1986404c0d7b171958774ac0acb533d6c08ccf60e195baa64f1466bce7d30ff1c6f780e
+DIST iscan-plugin-gt-x820-2.2.0-1.x86_64.rpm 206774 SHA256 4be3bed1d6292822f7e963de183683a987db1f59a911688985b00af3d231b317 SHA512 342b034ae7cf1f2b346ffce8719a025e55df2295daaad896acb072e3e36b916f0503106293dc88340d4b1b732b8daa6f4d0681f843754824b757667940b5b545 WHIRLPOOL 726de2d88a2bfd16f2ad34318cfe90ea89f1a46091a7aaf97e232256f61f795caf271131414a7eb3fca3e2ded4963e068752774c351cd1c9f38bccf5619bcf1a
diff --git a/media-gfx/iscan-plugin-gt-x820/iscan-plugin-gt-x820-2.2.0.1.ebuild b/media-gfx/iscan-plugin-gt-x820/iscan-plugin-gt-x820-2.2.0.1.ebuild
new file mode 100644
index 000000000000..aa98f2e8f907
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-x820/iscan-plugin-gt-x820-2.2.0.1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit rpm versionator multilib
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_PVR="$(replace_version_separator 3 -)"
+
+DESCRIPTION="Epson Perfection V600 scanner plugin for SANE 'epkowa' backend"
+HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+SRC_URI="amd64? ( http://dev.gentoo.org/~flameeyes/avasys/${PN}-${MY_PVR}.x86_64.rpm )
+ x86? ( http://dev.gentoo.org/~flameeyes/avasys/${PN}-${MY_PVR}.i386.rpm )"
+
+LICENSE="AVASYS"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+
+IUSE=""
+
+DEPEND=">=media-gfx/iscan-2.21.0"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/opt/iscan/lib/libesintA1.so*"
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # install scanner firmware
+ insinto /usr/share/iscan
+ doins "${WORKDIR}"/usr/share/iscan/*
+
+ dodoc usr/share/doc/*/*
+
+ # install scanner plugins
+ exeinto /opt/iscan/lib
+ doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"*
+}
+
+pkg_setup() {
+ basecmds=(
+ "iscan-registry --COMMAND interpreter usb 0x04b8 0x013a /opt/iscan/lib/libesintA1 /usr/share/iscan/esfwA1.bin"
+ )
+}
+
+pkg_postinst() {
+ elog
+ elog "Firmware file esfwA1.bin for Epson Perfection V600"
+ elog "has been installed in /usr/share/iscan."
+ elog
+
+ # Only register scanner on new installs
+ [[ -n ${REPLACING_VERSIONS} ]] && return
+
+ # Needed for scanner to work properly.
+ if [[ ${ROOT} == "/" ]]; then
+ for basecmd in "${basecmds[@]}"; do
+ eval ${basecmd/COMMAND/add}
+ done
+ elog "New firmware has been registered automatically."
+ elog
+ else
+ ewarn "Unable to register the plugin and firmware when installing outside of /."
+ ewarn "execute the following command yourself:"
+ for basecmd in "${basecmds[@]}"; do
+ ewarn "${basecmd/COMMAND/add}"
+ done
+ fi
+}
+
+pkg_prerm() {
+ # Only unregister on on uninstall
+ [[ -n ${REPLACED_BY_VERSION} ]] && return
+
+ if [[ ${ROOT} == "/" ]]; then
+ for basecmd in "${basecmds[@]}"; do
+ eval ${basecmd/COMMAND/remove}
+ done
+ else
+ ewarn "Unable to register the plugin and firmware when installing outside of /."
+ ewarn "execute the following command yourself:"
+ for basecmd in "${basecmds[@]}"; do
+ ewarn "${basecmd/COMMAND/remove}"
+ done
+ fi
+}
diff --git a/media-gfx/iscan-plugin-gt-x820/metadata.xml b/media-gfx/iscan-plugin-gt-x820/metadata.xml
new file mode 100644
index 000000000000..16393b245a9d
--- /dev/null
+++ b/media-gfx/iscan-plugin-gt-x820/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>nitro@legroom.net</email>
+ </maintainer>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Proprietary plugin for several EPSON scanner models, to be used
+ with the epkowa SANE backend (provided by
+ <pkg>media-gfx/iscan</pkg>). 32-bit and 64-bit.
+
+ Supports the following models:
+
+ EPSON Perfection V600 Photo (GT-X820)
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/iscan-plugin-perfection-v370/Manifest b/media-gfx/iscan-plugin-perfection-v370/Manifest
new file mode 100644
index 000000000000..34236beb08c4
--- /dev/null
+++ b/media-gfx/iscan-plugin-perfection-v370/Manifest
@@ -0,0 +1,2 @@
+DIST iscan-plugin-perfection-v370-1.0.0-2.i386.rpm 383681 SHA256 0fcd95b3c7fb5c1b26fc482513c8220d44a1cde174169e831eea9d5b04ad8537 SHA512 ca0d77e614b826529b23e7ccb6f8546143c471757fb9648c30830055764442c44c811d12c61b04e14d6d435c5de67eb20d24653aee23022ed7104ce89074fdf1 WHIRLPOOL 3b46c6b03e4a03c84348c1f6fb1ed6cdce5d8427017785d66f29f5e96d602f4ab3bc117caabe1fe309a4f8c032a3e1e7fe0091b7b008dd9b08a3b51714e03fac
+DIST iscan-plugin-perfection-v370-1.0.0-2.x86_64.rpm 172082 SHA256 072ddd22e627ee4ed8736bb8726905349bc3879c4127fcbc3b3b90f252ffd823 SHA512 d0a942f4dbf51edf773e3bd83749ffc5dc9b1b67daec042fb49b4050ead34c604ce0183b138dd0719c2fe1ba2d610034b8d2d16ba12df4cd8617d1182b66466f WHIRLPOOL f7e2a21a51589b2907ca4626cbc8dd47af338cd286c383f43ed150c3ae1871543b04faf4a6f7a3431deb767c0d5d3d18889065b353f6eef58cbcfbdad860bab1
diff --git a/media-gfx/iscan-plugin-perfection-v370/iscan-plugin-perfection-v370-1.0.0.2.ebuild b/media-gfx/iscan-plugin-perfection-v370/iscan-plugin-perfection-v370-1.0.0.2.ebuild
new file mode 100644
index 000000000000..ba6803d81669
--- /dev/null
+++ b/media-gfx/iscan-plugin-perfection-v370/iscan-plugin-perfection-v370-1.0.0.2.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit rpm versionator multilib
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_PVR="$(replace_version_separator 3 -)"
+
+SCANNER="Perfection V370"
+FIRMWARE="esfwdd.bin"
+
+DESCRIPTION="Epson ${SCANNER} and similar scanner plugin for SANE 'epkowa' backend"
+HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+SRC_URI="amd64? ( http://dev.gentoo.org/~flameeyes/avasys/${PN}-${MY_PVR}.x86_64.rpm )
+ x86? ( http://dev.gentoo.org/~flameeyes/avasys/${PN}-${MY_PVR}.i386.rpm )"
+
+LICENSE="AVASYS"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+
+IUSE=""
+
+DEPEND=">=media-gfx/iscan-2.21.0"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+QA_PREBUILT="/opt/iscan/lib/*"
+
+src_configure() { :; }
+src_compile() { :; }
+
+src_install() {
+ # install scanner firmware
+ insinto /usr/share/iscan
+ doins "${WORKDIR}"/usr/share/iscan/*
+
+ dodoc usr/share/doc/*/*
+
+ # install scanner plugins
+ exeinto /opt/iscan/lib
+ doexe "${WORKDIR}/usr/$(get_libdir)/iscan/"*
+}
+
+pkg_setup() {
+ basecmds=(
+ "iscan-registry --COMMAND interpreter usb 0x04b8 0x014a /opt/iscan/lib/libiscan-plugin-perfection-v370 /usr/share/iscan/${FIRMWARE}"
+ )
+}
+
+pkg_postinst() {
+ elog
+ elog "Firmware file ${FIRMWARE} for ${SCANNER}"
+ elog "has been installed in /usr/share/iscan."
+ elog
+
+ # Only register scanner on new installs
+ [[ -n ${REPLACING_VERSIONS} ]] && return
+
+ # Needed for scanner to work properly.
+ if [[ ${ROOT} == "/" ]]; then
+ for basecmd in "${basecmds[@]}"; do
+ eval ${basecmd/COMMAND/add}
+ done
+ elog "New firmware has been registered automatically."
+ elog
+ else
+ ewarn "Unable to register the plugin and firmware when installing outside of /."
+ ewarn "execute the following command yourself:"
+ for basecmd in "${basecmds[@]}"; do
+ ewarn "${basecmd/COMMAND/add}"
+ done
+ fi
+}
+
+pkg_prerm() {
+ # Only unregister on on uninstall
+ [[ -n ${REPLACED_BY_VERSION} ]] && return
+
+ if [[ ${ROOT} == "/" ]]; then
+ for basecmd in "${basecmds[@]}"; do
+ eval ${basecmd/COMMAND/remove}
+ done
+ else
+ ewarn "Unable to register the plugin and firmware when installing outside of /."
+ ewarn "execute the following command yourself:"
+ for basecmd in "${basecmds[@]}"; do
+ ewarn "${basecmd/COMMAND/remove}"
+ done
+ fi
+}
diff --git a/media-gfx/iscan-plugin-perfection-v370/metadata.xml b/media-gfx/iscan-plugin-perfection-v370/metadata.xml
new file mode 100644
index 000000000000..93e07c910e9e
--- /dev/null
+++ b/media-gfx/iscan-plugin-perfection-v370/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Proprietary plugin for several EPSON scanner models, to be used
+ with the epkowa SANE backend (provided by
+ <pkg>media-gfx/iscan</pkg>). 32-bit and 64-bit.
+
+ Supports the following models:
+
+ Epson GT-F740
+ Epson GT-S640
+ Epson Perfection V37
+ Epson Perfection V370 Photo
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/iscan/Manifest b/media-gfx/iscan/Manifest
new file mode 100644
index 000000000000..20af742cb44a
--- /dev/null
+++ b/media-gfx/iscan/Manifest
@@ -0,0 +1,6 @@
+DIST iscan_2.26.2-1.tar.gz 1106921 SHA256 e528070f588fe6166c321610dcdeed6c7cf8110152303fdbf03240e68a593659 SHA512 82655969a8c0a7006d03d570158219f036cf5fb3fd645088177cedf52c2e30325e85c888c254d8342997ac3ac70b943402a4922cc95f66820a640ed572fd55fb WHIRLPOOL ad905f9cd8ff497f0821fa60d6b44e23e9010f7c5bdccb2fd13f7be50dd7853461da21dd515490d75914c3153e81764f244909411aa227e2df29c389a1910897
+DIST iscan_2.29.1-5.tar.gz 1217266 SHA256 7198b5fb081bd1b6dd3747ca645c9d36ab1fef03970803145ea3d31d2c1fffb4 SHA512 945dbe0e55670b9172a455f8c067e3175aae88eff79a900fc1d5221c2246f06daadae16673e6a7bd6a0e00f6fc810ed16d5d1f6c7e93237d64dbd1f81416e20e WHIRLPOOL ea9cd332fbbe1f20a843dc45fb1b7edca617b127440f78938c399f763f70d32951a61069b5313c1d9e5fc6e534d9c7b32e15b9fa9638c2521a0bcfe9851d145a
+DIST iscan_2.30.1-1.tar.gz 1217985 SHA256 79aa9a9f81a7146beb22a382bbaf840fbce61b1bdb82660e541946a471e48426 SHA512 0562be739b637ee78a5bf2612e7b148de60709c32550742383b76750688d48e42834acbe050c5f2fad26bd9063c9faff425bf906dcebc3e4160d17cd5481850a WHIRLPOOL f3492bff532779987aa8b47f8bb4a1a16164c3d77386d7906dc6b2c6a606b25bcdb4d15766971f8e9bb5b23c4522a3b601e4198212e8fddd54f75f046dda85ef
+DIST userg_revL_e.pdf 574224 SHA256 e68a45d600f702311d10a0e13d42c5b32036df172e8f07728604291b823ec876 SHA512 59cb65ed90913669a4f69fffbdd8dcd1965eabad482f08302c384e9aa75252acfe68470f66ae8ac29cc2b4d109d9395115b9723fbd9cbcb31d2847c55fcc4c18 WHIRLPOOL 082cbf872e43604c4359ed7388aa2cd2519aead961187230a1232592b3952161c850fb4c060a787aefbd4bc58c2853a1489c0144687afadd45e65affcad04289
+DIST userg_revQ_e.pdf 627189 SHA256 7f40dfb94bf747a5059c17cba21e72e2485226ea41655453d010b46ed96e8a1c SHA512 b09d5143855a759e0fa3e74794762566b6fbf734642f9d7f712e5f2f20e3dce6b830465fd65f83f9cc368292ce7a2c0cec709b0eba6356d95e1ba5114b3348fc WHIRLPOOL f1497a87ad9b991a05a7a93ff5603944b1cadf00b5162498ff4c0ff1d85615de922324ee5574d0f8540e2d44fc2dede2a25157e562633f51b75eb8e4d4e56dc2
+DIST userg_revQ_j.pdf 734920 SHA256 22d29bd17fe8c5772cdcdfb5201eff54eeaadebe3c94563ee4fcfc04579a1c4d SHA512 d5cb0cebaae0ac36951379cad516f0575e85e0bb509cf88549239e300c7d6c6a4996497145acaa9e9783de6b08c6e352c7ffbedb23ed04c15eefbe9c3cf0bc90 WHIRLPOOL 0f567a4d3543ea0df1d49e92211ba3811a03f200f828d4348eb00bb695df915ae75001faec52d616ff98d4da617ef6cfe95795ece33eeb114b0378892294647e
diff --git a/media-gfx/iscan/files/iscan-2.25.0-drop-ltdl.patch b/media-gfx/iscan/files/iscan-2.25.0-drop-ltdl.patch
new file mode 100644
index 000000000000..8ac18defc007
--- /dev/null
+++ b/media-gfx/iscan/files/iscan-2.25.0-drop-ltdl.patch
@@ -0,0 +1,64 @@
+diff -Naur iscan-2.25.0.orig//backend/Makefile.am iscan-2.25.0/backend/Makefile.am
+--- iscan-2.25.0.orig//backend/Makefile.am 2010-05-19 07:51:55.000000000 +0200
++++ iscan-2.25.0/backend/Makefile.am 2010-07-21 22:49:08.579705272 +0200
+@@ -56,7 +56,6 @@
+
+ libepkowa_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+- $(LTDLINCL) \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/non-free \
+ $(XML_CFLAGS) \
+@@ -66,7 +65,7 @@
+ libepkowa_la_LIBADD = \
+ -lm \
+ $(XML_LIBS) \
+- $(LIBLTDL)
++ -lltdl
+ libepkowa_la_SOURCES = \
+ $(sane_backends_files) \
+ marshal.c \
+diff -Naur iscan-2.25.0.orig//configure.ac iscan-2.25.0/configure.ac
+--- iscan-2.25.0.orig//configure.ac 2010-07-21 22:48:11.411332268 +0200
++++ iscan-2.25.0/configure.ac 2010-07-21 22:49:58.918332411 +0200
+@@ -261,13 +261,10 @@
+ dnl The somewhat obscure LT_AC_PROG_SED is here to make sure that the
+ dnl SED environment variable gets set before it's used by the libtool
+ dnl machinery. This works around buggy libtool versions.
+-LT_AC_PROG_SED
+-AC_LIBLTDL_INSTALLABLE
+-AC_LIBTOOL_DLOPEN
+ AC_PROG_LIBTOOL
+-AC_LIB_LTDL
+-AC_SUBST(LTDLINCL)
+-AC_SUBST(LIBLTDL)
++AC_LTDL_SHLIBPATH
++AC_LTDL_SHLIBEXT
++AC_LTDL_SYSSEARCHPATH
+
+
+ dnl Graphic file format options
+diff -Naur iscan-2.25.0.orig//frontend/Makefile.am iscan-2.25.0/frontend/Makefile.am
+--- iscan-2.25.0.orig//frontend/Makefile.am 2010-05-19 07:51:54.000000000 +0200
++++ iscan-2.25.0/frontend/Makefile.am 2010-07-21 22:50:53.965581385 +0200
+@@ -34,7 +34,7 @@
+ iscan_LDADD = \
+ $(top_builddir)/lib/libimage-stream.la \
+ -lsane \
+- @LIBLTDL@ \
++ -lltdl \
+ @GTK_LIBS@ \
+ @GDK_IMLIB_LIBS@ \
+ $(top_builddir)/non-free/libesmod.so
+diff -Naur iscan-2.25.0.orig//lib/Makefile.am iscan-2.25.0/lib/Makefile.am
+--- iscan-2.25.0.orig//lib/Makefile.am 2010-05-19 07:51:56.000000000 +0200
++++ iscan-2.25.0/lib/Makefile.am 2010-07-21 22:51:29.794329919 +0200
+@@ -29,7 +29,7 @@
+ libimage_stream_la_CPPFLAGS = -I$(top_srcdir)/include
+ libimage_stream_la_LDFLAGS = -static
+ libimage_stream_la_LIBADD = \
+- $(LIBLTDL) \
++ -lltdl \
+ $(top_builddir)/lib/pdf/libpdf.la
+ libimage_stream_la_SOURCES = \
+ $(libimage_stream_la_files)
diff --git a/media-gfx/iscan/files/iscan-2.25.0-fix-g++-test.patch b/media-gfx/iscan/files/iscan-2.25.0-fix-g++-test.patch
new file mode 100644
index 000000000000..23fa6edd76b4
--- /dev/null
+++ b/media-gfx/iscan/files/iscan-2.25.0-fix-g++-test.patch
@@ -0,0 +1,13 @@
+Index: iscan-2.21.0/configure.ac
+===================================================================
+--- iscan-2.21.0.orig/configure.ac
++++ iscan-2.21.0/configure.ac
+@@ -68,7 +68,7 @@ AC_PROG_CXX
+ # to be larger than that for the gcc-3.[23] packages (as long as both
+ # are distributed) for smooth upgrade paths.
+
+-if test x"$CXX" = xg++; then
++if test "$GXX" = "yes"; then
+ AC_MSG_CHECKING([C++ ABI version])
+ CXX_ABI="`$CXX -E -dM - < /dev/null | $AWK '/GXX_ABI/ { print $3 }'`"
+ AC_MSG_RESULT([$CXX_ABI])
diff --git a/media-gfx/iscan/files/iscan-2.26.2-libpng15.patch b/media-gfx/iscan/files/iscan-2.26.2-libpng15.patch
new file mode 100644
index 000000000000..1b89b735c23f
--- /dev/null
+++ b/media-gfx/iscan/files/iscan-2.26.2-libpng15.patch
@@ -0,0 +1,51 @@
+http://bugs.gentoo.org/show_bug.cgi?id=383799#c13
+Upstream: http://www.avasys.jp/cgi-bin/lx/bbs/en/scanner-bbs/hyperbbs.cgi?mode=view;Code=5197
+
+--- lib/pngstream.cc
++++ lib/pngstream.cc
+@@ -76,7 +76,12 @@
+ set_error_handler (_png, _info);
+
+ lib->write_flush (_png);
++/* when not interlacing (ie, only one pass), number of rows is image height: _v_sz */
++#if PNG_LIBPNG_VER > 10499
++ if (!_footer && _v_sz == lib->get_current_row_number(_png))
++#else
+ if (!_footer && _png->num_rows == _png->flush_rows)
++#endif
+ {
+ lib->write_end (_png, _info);
+ _footer = true;
+@@ -161,6 +166,9 @@
+ funcsym (write_row);
+ funcsym (write_flush);
+ funcsym (write_end);
++#if PNG_LIBPNG_VER > 10499
++ funcsym (get_current_row_number);
++#endif
+
+ if (lib->access_version_number
+ && lib->create_write_struct
+@@ -170,6 +178,9 @@
+ && lib->set_IHDR
+ && lib->set_pHYs
+ && lib->set_invert_mono
++#if PNG_LIBPNG_VER > 10499
++ && lib->get_current_row_number
++#endif
+ && lib->write_info
+ && lib->write_row
+ && lib->write_flush
+--- lib/pngstream.hh
++++ lib/pngstream.hh
+@@ -108,6 +108,10 @@
+ png_structp);
+ fundecl (void, write_end,
+ png_structp, png_infop);
++#if PNG_LIBPNG_VER > 10499
++ fundecl (png_uint_32, get_current_row_number,
++ png_structp);
++#endif
+ #endif /* HAVE_PNG_H */
+ };
+ static png_lib_handle *lib;
diff --git a/media-gfx/iscan/files/iscan-2.26.2-png-libs.patch b/media-gfx/iscan/files/iscan-2.26.2-png-libs.patch
new file mode 100644
index 000000000000..0866e604915a
--- /dev/null
+++ b/media-gfx/iscan/files/iscan-2.26.2-png-libs.patch
@@ -0,0 +1,37 @@
+diff -ur iscan-2.26.2/configure.ac iscan-2.26.2.new/configure.ac
+--- iscan-2.26.2/configure.ac 2014-01-27 13:37:26.782024452 -0500
++++ iscan-2.26.2.new/configure.ac 2014-01-27 13:36:47.738024120 -0500
+@@ -274,6 +274,9 @@
+ AC_HELP_STRING([--enable-$1],
+ [ensure support for the $3 file format]),
+ [if test "x$enable_$1" != xno; then
++ if test "x$4" != xno; then
++ PKG_CHECK_MODULES($3,[$4])
++ fi
+ iff_header="`echo $2 | $as_tr_sh`"
+ AC_CHECK_HEADERS([$2])
+ if test `eval echo '$ac_cv_header_'$iff_header` \
+@@ -284,9 +287,9 @@
+ [AC_CHECK_HEADERS([$2])])
+ ])
+
+-ISCAN_FILE_FORMAT(jpeg,jpeglib.h,JPEG)
+-ISCAN_FILE_FORMAT(png,png.h,PNG)
+-ISCAN_FILE_FORMAT(tiff,tiffio.h,TIFF)
++ISCAN_FILE_FORMAT(jpeg,jpeglib.h,JPEG,no)
++ISCAN_FILE_FORMAT(png,png.h,PNG,libpng)
++ISCAN_FILE_FORMAT(tiff,tiffio.h,TIFF,no)
+
+
+ dnl Support for performance measurements.
+diff -ur iscan-2.26.2/frontend/Makefile.am iscan-2.26.2.new/frontend/Makefile.am
+--- iscan-2.26.2/frontend/Makefile.am 2014-01-27 13:31:09.488021241 -0500
++++ iscan-2.26.2.new/frontend/Makefile.am 2014-01-27 13:37:50.065024650 -0500
+@@ -37,6 +37,7 @@
+ -lltdl \
+ @GTK_LIBS@ \
+ @GDK_IMLIB_LIBS@ \
++ @PNG_LIBS@ \
+ $(top_builddir)/non-free/libesmod.so
+ iscan_SOURCES = \
+ $(iscan_source_files)
diff --git a/media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch b/media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch
new file mode 100644
index 000000000000..7205028d8248
--- /dev/null
+++ b/media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch
@@ -0,0 +1,48 @@
+--- lib/pngstream.cc 2011-12-01 02:30:53.000000000 +0100
++++ lib/pngstream.cc 2012-02-06 03:06:22.000000000 +0100
+@@ -83,7 +83,12 @@
+ #if HAVE_PNG_H
+ set_error_handler (_png, _info);
+
++/* when not interlacing (ie, only one pass), number of rows is image height: _v_sz */
++#if PNG_LIBPNG_VER > 10499
++ if (!_footer && _v_sz == lib->get_current_row_number(_png))
++#else
+ if (_header && !_footer && _png->num_rows == _png->flush_rows)
++#endif
+ {
+ lib->write_end (_png, _info);
+ _footer = true;
+@@ -167,6 +172,9 @@
+ funcsym (write_row);
+ funcsym (write_flush);
+ funcsym (write_end);
++#if PNG_LIBPNG_VER > 10499
++ funcsym (get_current_row_number);
++#endif
+
+ if (lib->access_version_number
+ && lib->create_write_struct
+@@ -176,6 +184,9 @@
+ && lib->set_IHDR
+ && lib->set_pHYs
+ && lib->set_invert_mono
++#if PNG_LIBPNG_VER > 10499
++ && lib->get_current_row_number
++#endif
+ && lib->write_info
+ && lib->write_row
+ && lib->write_flush
+--- lib/pngstream.hh 2011-12-01 02:30:53.000000000 +0100
++++ lib/pngstream.hh 2012-02-06 03:09:09.000000000 +0100
+@@ -108,6 +108,10 @@
+ png_structp);
+ fundecl (void, write_end,
+ png_structp, png_infop);
++#if PNG_LIBPNG_VER > 10499
++ fundecl (png_uint_32, get_current_row_number,
++ png_structp);
++#endif
+ #endif /* HAVE_PNG_H */
+ };
+ static png_lib_handle *lib;
diff --git a/media-gfx/iscan/files/iscan-2.29.1-drop-ltdl.patch b/media-gfx/iscan/files/iscan-2.29.1-drop-ltdl.patch
new file mode 100644
index 000000000000..489f0c5cd71e
--- /dev/null
+++ b/media-gfx/iscan/files/iscan-2.29.1-drop-ltdl.patch
@@ -0,0 +1,64 @@
+diff -Naur iscan-2.29.1.orig/backend/Makefile.am iscan-2.29.1/backend/Makefile.am
+--- iscan-2.29.1.orig/backend/Makefile.am 2012-06-11 23:33:33.000000000 -0500
++++ iscan-2.29.1/backend/Makefile.am 2013-02-18 20:29:05.091814060 -0600
+@@ -58,7 +58,6 @@
+
+ libepkowa_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+- $(LTDLINCL) \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/non-free \
+ $(XML_CFLAGS) \
+@@ -70,7 +69,7 @@
+ -lm \
+ $(XML_LIBS) \
+ $(LIBUSB_1_0_LIBS) \
+- $(LIBLTDL)
++ -lltdl
+ libepkowa_la_SOURCES = \
+ $(sane_backends_files) \
+ ipc.c \
+diff -Naur iscan-2.29.1.orig/configure.ac iscan-2.29.1/configure.ac
+--- iscan-2.29.1.orig/configure.ac 2012-06-11 23:33:34.000000000 -0500
++++ iscan-2.29.1/configure.ac 2013-02-18 20:30:10.413311997 -0600
+@@ -266,13 +266,10 @@
+ dnl The somewhat obscure LT_AC_PROG_SED is here to make sure that the
+ dnl SED environment variable gets set before it's used by the libtool
+ dnl machinery. This works around buggy libtool versions.
+-LT_AC_PROG_SED
+-AC_LIBLTDL_INSTALLABLE
+-AC_LIBTOOL_DLOPEN
+ AC_PROG_LIBTOOL
+-AC_LIB_LTDL
+-AC_SUBST(LTDLINCL)
+-AC_SUBST(LIBLTDL)
++AC_LTDL_SHLIBPATH
++AC_LTDL_SHLIBEXT
++AC_LTDL_SYSSEARCHPATH
+
+
+ dnl Graphic file format options
+diff -Naur iscan-2.29.1.orig/frontend/Makefile.am iscan-2.29.1/frontend/Makefile.am
+--- iscan-2.29.1.orig/frontend/Makefile.am 2012-06-11 23:33:33.000000000 -0500
++++ iscan-2.29.1/frontend/Makefile.am 2013-02-18 20:30:38.764092975 -0600
+@@ -34,7 +34,7 @@
+ iscan_LDADD = \
+ $(top_builddir)/lib/libimage-stream.la \
+ -lsane \
+- @LIBLTDL@ \
++ -lltdl \
+ @GTK_LIBS@ \
+ @GDK_IMLIB_LIBS@ \
+ $(top_builddir)/non-free/libesmod.so
+diff -Naur iscan-2.29.1.orig/lib/Makefile.am iscan-2.29.1/lib/Makefile.am
+--- iscan-2.29.1.orig/lib/Makefile.am 2012-06-11 23:33:34.000000000 -0500
++++ iscan-2.29.1/lib/Makefile.am 2013-02-18 20:30:58.852936051 -0600
+@@ -30,7 +30,7 @@
+ libimage_stream_la_CPPFLAGS = -I$(top_srcdir)/include
+ libimage_stream_la_LDFLAGS = -static
+ libimage_stream_la_LIBADD = \
+- $(LIBLTDL) \
++ -lltdl \
+ $(top_builddir)/lib/pdf/libpdf.la
+ libimage_stream_la_SOURCES = \
+ $(libimage_stream_la_files)
diff --git a/media-gfx/iscan/files/iscan-2.29.1-png-libs.patch b/media-gfx/iscan/files/iscan-2.29.1-png-libs.patch
new file mode 100644
index 000000000000..32de60a83899
--- /dev/null
+++ b/media-gfx/iscan/files/iscan-2.29.1-png-libs.patch
@@ -0,0 +1,37 @@
+diff -ur iscan-2.29.1/configure.ac iscan-2.29.1.new/configure.ac
+--- iscan-2.29.1/configure.ac 2014-01-27 14:15:28.139043864 -0500
++++ iscan-2.29.1.new/configure.ac 2014-01-27 14:17:10.608044736 -0500
+@@ -279,6 +279,9 @@
+ AC_HELP_STRING([--enable-$1],
+ [ensure support for the $3 file format]),
+ [if test "x$enable_$1" != xno; then
++ if test "x$4" != xno; then
++ PKG_CHECK_MODULES($3,[$4])
++ fi
+ iff_header="`echo $2 | $as_tr_sh`"
+ AC_CHECK_HEADERS([$2])
+ if test `eval echo '$ac_cv_header_'$iff_header` \
+@@ -289,9 +292,9 @@
+ [AC_CHECK_HEADERS([$2])])
+ ])
+
+-ISCAN_FILE_FORMAT(jpeg,jpeglib.h,JPEG)
+-ISCAN_FILE_FORMAT(png,png.h,PNG)
+-ISCAN_FILE_FORMAT(tiff,tiffio.h,TIFF)
++ISCAN_FILE_FORMAT(jpeg,jpeglib.h,JPEG,no)
++ISCAN_FILE_FORMAT(png,png.h,PNG,libpng)
++ISCAN_FILE_FORMAT(tiff,tiffio.h,TIFF,no)
+
+
+ dnl Support for performance measurements.
+diff -ur iscan-2.29.1/frontend/Makefile.am iscan-2.29.1.new/frontend/Makefile.am
+--- iscan-2.29.1/frontend/Makefile.am 2014-01-27 14:15:28.123043864 -0500
++++ iscan-2.29.1.new/frontend/Makefile.am 2014-01-27 14:17:43.628045017 -0500
+@@ -37,6 +37,7 @@
+ -lltdl \
+ @GTK_LIBS@ \
+ @GDK_IMLIB_LIBS@ \
++ @PNG_LIBS@ \
+ $(top_builddir)/non-free/libesmod.so
+ iscan_SOURCES = \
+ $(iscan_source_files)
diff --git a/media-gfx/iscan/files/iscan-2.30.1-fix-g++-test.patch b/media-gfx/iscan/files/iscan-2.30.1-fix-g++-test.patch
new file mode 100644
index 000000000000..5a7f26eb4ca5
--- /dev/null
+++ b/media-gfx/iscan/files/iscan-2.30.1-fix-g++-test.patch
@@ -0,0 +1,45 @@
+Drop obsolete C++ ABI transistion code.
+https://bugs.gentoo.org/549866
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -62,27 +62,6 @@ dnl checks for programs
+
+ AC_PROG_CXX
+
+-# Transitionary check for the C++ ABI while we are switching provided
+-# binaries from gcc-3.[23] to gcc-3.4 or later. Currently gcc-3.[23]
+-# is still the official compiler version to use, but experimental bi-
+-# naries are released with a ".c2" suffix.
+-# The CXX_ABI for gcc-3.[23] is 102, btw.
+-# Note that the PACKAGE_RELEASE for the gcc-3.4 or later packages has
+-# to be larger than that for the gcc-3.[23] packages (as long as both
+-# are distributed) for smooth upgrade paths.
+-
+-if test x"$CXX" = xg++; then
+- AC_MSG_CHECKING([C++ ABI version])
+- CXX_ABI="`$CXX -E -dM - < /dev/null | $AWK '/GXX_ABI/ { print $3 }'`"
+- AC_MSG_RESULT([$CXX_ABI])
+- if test x"$CXX_ABI" = x1002; then
+- PACKAGE_CXX_ABI=".c2"
+- else
+- PACKAGE_CXX_ABI=""
+- fi
+- AC_SUBST(PACKAGE_CXX_ABI)
+-fi
+-
+ AC_PROG_CC
+ AC_PROG_CPP
+ AC_PROG_INSTALL
+--- a/non-free/Makefile.am
++++ b/non-free/Makefile.am
+@@ -65,7 +65,7 @@ $(NON_FREE_SOLIBS):
+ *) echo "unsupported architecture" 1>&2; \
+ exit 1;; \
+ esac; \
+- $(LN_S) $(srcdir)/libesmod-$${arch}$(PACKAGE_CXX_ABI).so $@
++ $(LN_S) $(srcdir)/libesmod-$${arch}.c2.so $@
+
+ install-exec-local: $(NON_FREE_SOLIBS)
+ $(mkinstalldirs) $(DESTDIR)$(libdir)
diff --git a/media-gfx/iscan/files/iscan-usb.sh b/media-gfx/iscan/files/iscan-usb.sh
new file mode 100644
index 000000000000..e71bea4715c3
--- /dev/null
+++ b/media-gfx/iscan/files/iscan-usb.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# This file is part of media-gfx/iscan
+#
+# This script changes the permissions and ownership of a USB device under
+# /proc/bus/usb to grant access to this device to users in the scanner group.
+#
+# Ownership is set to root:scanner, permissions are set to 0660.
+#
+# Arguments :
+# -----------
+# ACTION=[add|remove]
+# DEVNAME=/dev/bus/usb/BBB/DDD
+# SUBSYSTEM=usb_device
+
+OWNER="root"
+GROUP="scanner"
+PERMS="0660"
+
+DEVICE="${DEVNAME/dev/proc}"
+
+if [ "${ACTION}" = "add" -a "${SUBSYSTEM}" = "usb_device" -a -f "${DEVICE}" ]; then
+ chmod ${PERMS} "${DEVICE}" && chown ${OWNER}:${GROUP} "${DEVICE}"
+fi
diff --git a/media-gfx/iscan/iscan-2.26.2.ebuild b/media-gfx/iscan/iscan-2.26.2.ebuild
new file mode 100644
index 000000000000..4bab8ffd1a23
--- /dev/null
+++ b/media-gfx/iscan/iscan-2.26.2.ebuild
@@ -0,0 +1,164 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils flag-o-matic autotools
+
+SRC_REV="1" # revision used by upstream
+
+# HINTS:
+# -> non-free modules are x86 and amd64 only
+# -> iscan frontend needs non-free modules
+# -> sane-epkowa should be usable on every arch
+# -> ${P}-${SRC_REV}.tar.gz (for gcc 3.2/3.3)
+# -> ${P}-${SRC_REV}.c2.tar.gz (for gcc 3.4 or later)
+
+# FIXME:
+# Make jpeg/png optional. The problem is, that the configure script ignores --disable-*,
+# if the corresponding lib is found on the system.
+# Furthermore, iscan doesn't compile w/o libusb, this should be fixed somehow.
+
+# TODO:
+# (re)add closed-source binary modules which are needed for some scanners.
+
+KEYWORDS="amd64 x86"
+
+DESCRIPTION="EPSON Image Scan! for Linux (including sane-epkowa backend)"
+HOMEPAGE="http://www.avasys.jp/english/linux_e/dl_scan.html"
+SRC_URI="http://linux.avasys.jp/drivers/iscan/${PV}/${PN}_${PV}-${SRC_REV}.tar.gz
+ doc? ( http://linux.avasys.jp/drivers/iscan/doc/userg_revL_e.pdf )"
+LICENSE="GPL-2 AVASYS"
+SLOT="0"
+
+IUSE="X gimp jpeg png tiff doc"
+IUSE_LINGUAS="ar de es fr it ja ko nl pt zh_CN zh_TW"
+
+for X in ${IUSE_LINGUAS}; do IUSE="${IUSE} linguas_${X}"; done
+
+QA_PRESTRIPPED="usr/$(get_libdir)/libesmod.so.*"
+QA_TEXTRELS="${QA_PRESTRIPPED}"
+QA_FLAGS_IGNORED="${QA_PRESTRIPPED}"
+
+# Upstream ships broken sanity test
+RESTRICT="test"
+
+RDEPEND="media-gfx/iscan-data
+ media-gfx/sane-backends
+ virtual/udev
+ virtual/libusb:0
+ X? (
+ x11-libs/gtk+:2
+ gimp? ( media-gfx/gimp )
+ png? ( media-libs/libpng )
+ jpeg? ( virtual/jpeg )
+ tiff? ( media-libs/tiff )
+ )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ X? ( sys-devel/gettext )"
+
+src_prepare() {
+ local i
+
+ # convert japanese docs to UTF-8
+ if use linguas_ja; then
+ for i in {NEWS,README}.ja non-free/*.ja.txt; do
+ if [ -f "${i}" ]; then
+ echo ">>> Converting ${i} to UTF-8"
+ iconv -f eucjp -t utf8 -o "${i}~" "${i}" && mv -f "${i}~" "${i}" || rm -f "${i}~"
+ fi
+ done
+ fi
+
+ # disable checks for gtk+
+ if ! use X; then
+ sed -i -e "s:PKG_CHECK_MODULES(GTK,.*):AC_DEFINE([HAVE_GTK_2], 0):g" \
+ -e "s:\(PKG_CHECK_MODULES(GDK_IMLIB,.*)\):#\1:g" configure.ac
+ fi
+
+ epatch "${FILESDIR}"/iscan-2.25.0-drop-ltdl.patch
+ epatch "${FILESDIR}"/iscan-2.25.0-fix-g++-test.patch
+ epatch "${FILESDIR}"/iscan-2.26.2-libpng15.patch
+ epatch "${FILESDIR}"/iscan-2.26.2-png-libs.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -D_GNU_SOURCE # needed for 'strndup'
+ local myconf="--enable-dependency-reduction"
+
+ if use X; then
+ myconf="${myconf}
+ --enable-frontend
+ $(use_enable gimp)
+ $(use_enable jpeg)
+ $(use_enable png)
+ $(use_enable tiff)"
+ else
+ myconf="${myconf}
+ --disable-frontend --disable-gimp
+ --disable-jpeg --disable-png --disable-tiff"
+ fi
+
+ econf --disable-static ${myconf}
+}
+
+src_install() {
+ local MY_LIB="/usr/$(get_libdir)"
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # install docs
+ dodoc AUTHORS NEWS README
+ use linguas_ja && dodoc NEWS.ja README.ja
+
+ # install sane config
+ insinto /etc/sane.d
+ doins backend/epkowa.conf
+
+ # install extra docs
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins "${DISTDIR}/userg_revL_e.pdf"
+ fi
+
+ # link iscan so it is seen as a plugin in gimp
+ if use X && use gimp; then
+ local plugindir
+ if [ -x /usr/bin/gimptool ]; then
+ plugindir="$(gimptool --gimpplugindir)/plug-ins"
+ elif [ -x /usr/bin/gimptool-2.0 ]; then
+ plugindir="$(gimptool-2.0 --gimpplugindir)/plug-ins"
+ else
+ die "Can't find GIMP plugin directory."
+ fi
+ dodir "${plugindir}"
+ dosym /usr/bin/iscan "${plugindir}"
+ fi
+
+ # install desktop entry
+ if use X; then
+ make_desktop_entry iscan "Image Scan! for Linux ${PV}" scanner
+ fi
+}
+
+pkg_postinst() {
+ local i
+ local DLL_CONF="/etc/sane.d/dll.conf"
+ local EPKOWA_CONF="/etc/sane.d/epkowa.conf"
+
+ elog
+ if grep -q "^[ \t]*\<epkowa\>" ${DLL_CONF}; then
+ elog "Please edit ${EPKOWA_CONF} to suit your needs."
+ elif grep -q "\<epkowa\>" ${DLL_CONF}; then
+ elog "Hint: to enable the backend, add 'epkowa' to ${DLL_CONF}"
+ elog "Then edit ${EPKOWA_CONF} to suit your needs."
+ else
+ echo "epkowa" >> ${DLL_CONF}
+ elog "A new entry 'epkowa' was added to ${DLL_CONF}"
+ elog "Please edit ${EPKOWA_CONF} to suit your needs."
+ fi
+}
diff --git a/media-gfx/iscan/iscan-2.29.1.5.ebuild b/media-gfx/iscan/iscan-2.29.1.5.ebuild
new file mode 100644
index 000000000000..bcbfdf0c4a44
--- /dev/null
+++ b/media-gfx/iscan/iscan-2.29.1.5.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic autotools versionator
+
+# HINTS:
+# -> non-free modules are x86 and amd64 only
+# -> iscan frontend needs non-free modules
+# -> sane-epkowa should be usable on every arch
+# -> ${P}-${SRC_REV}.tar.gz (for gcc 3.2/3.3)
+# -> ${P}-${SRC_REV}.c2.tar.gz (for gcc 3.4 or later)
+
+# FIXME:
+# Make jpeg/png optional. The problem is, that the configure script ignores --disable-*,
+# if the corresponding lib is found on the system.
+# Furthermore, iscan doesn't compile w/o libusb, this should be fixed somehow.
+
+# TODO:
+# (re)add closed-source binary modules which are needed for some scanners.
+
+KEYWORDS="~amd64 ~x86"
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_PVR="$(replace_version_separator 3 -)"
+MY_DOC="userg_revQ"
+
+DESCRIPTION="EPSON Image Scan! for Linux (including sane-epkowa backend)"
+HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+SRC_URI="http://dev.gentoo.org/~flameeyes/avasys/${PN}_${MY_PVR}.tar.gz
+ doc? ( http://dev.gentoo.org/~flameeyes/avasys/${MY_DOC}_e.pdf
+ linguas_ja? ( http://dev.gentoo.org/~flameeyes/avasys/${MY_DOC}_j.pdf )
+ )"
+LICENSE="GPL-2 AVASYS"
+SLOT="0"
+
+IUSE="X gimp jpeg png tiff doc"
+IUSE_LINGUAS="ar de es fr it ja ko nl pt zh_CN zh_TW"
+
+for X in ${IUSE_LINGUAS}; do IUSE="${IUSE} linguas_${X}"; done
+
+QA_PRESTRIPPED="usr/$(get_libdir)/libesmod.so.*"
+QA_TEXTRELS="${QA_PRESTRIPPED}"
+QA_FLAGS_IGNORED="${QA_PRESTRIPPED}"
+
+# Upstream ships broken sanity test
+RESTRICT="test"
+
+RDEPEND="media-gfx/iscan-data
+ media-gfx/sane-backends
+ virtual/udev
+ virtual/libusb:0
+ X? (
+ x11-libs/gtk+:2
+ gimp? ( media-gfx/gimp )
+ png? ( media-libs/libpng )
+ jpeg? ( virtual/jpeg )
+ tiff? ( media-libs/tiff )
+ )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ X? ( sys-devel/gettext )"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_prepare() {
+ local i
+
+ # convert japanese docs to UTF-8
+ if use linguas_ja; then
+ for i in {NEWS,README}.ja non-free/*.ja.txt; do
+ if [ -f "${i}" ]; then
+ echo ">>> Converting ${i} to UTF-8"
+ iconv -f eucjp -t utf8 -o "${i}~" "${i}" && mv -f "${i}~" "${i}" || rm -f "${i}~"
+ fi
+ done
+ fi
+
+ # disable checks for gtk+
+ if ! use X; then
+ sed -i -e "s:PKG_CHECK_MODULES(GTK,.*):AC_DEFINE([HAVE_GTK_2], 0):g" \
+ -e "s:\(PKG_CHECK_MODULES(GDK_IMLIB,.*)\):#\1:g" configure.ac
+ fi
+
+ epatch "${FILESDIR}"/iscan-2.29.1-drop-ltdl.patch
+ epatch "${FILESDIR}"/iscan-2.25.0-fix-g++-test.patch
+ epatch "${FILESDIR}"/iscan-2.28.1.3+libpng-1.5.patch
+ epatch "${FILESDIR}"/iscan-2.29.1-png-libs.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -D_GNU_SOURCE # needed for 'strndup'
+ local myconf="--enable-dependency-reduction"
+
+ if use X; then
+ myconf="${myconf}
+ --enable-frontend
+ $(use_enable gimp)
+ $(use_enable jpeg)
+ $(use_enable png)
+ $(use_enable tiff)"
+ else
+ myconf="${myconf}
+ --disable-frontend --disable-gimp
+ --disable-jpeg --disable-png --disable-tiff"
+ fi
+
+ econf --disable-static ${myconf}
+}
+
+src_install() {
+ local MY_LIB="/usr/$(get_libdir)"
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # install docs
+ dodoc AUTHORS NEWS README
+ use linguas_ja && dodoc NEWS.ja README.ja
+
+ # install sane config
+ insinto /etc/sane.d
+ doins backend/epkowa.conf
+
+ # install extra docs
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ if use linguas_ja; then
+ doins "${DISTDIR}/${MY_DOC}_j.pdf"
+ else
+ doins "${DISTDIR}/${MY_DOC}_e.pdf"
+ fi
+ fi
+
+ # link iscan so it is seen as a plugin in gimp
+ if use X && use gimp; then
+ local plugindir
+ if [ -x /usr/bin/gimptool ]; then
+ plugindir="$(gimptool --gimpplugindir)/plug-ins"
+ elif [ -x /usr/bin/gimptool-2.0 ]; then
+ plugindir="$(gimptool-2.0 --gimpplugindir)/plug-ins"
+ else
+ die "Can't find GIMP plugin directory."
+ fi
+ dodir "${plugindir}"
+ dosym /usr/bin/iscan "${plugindir}"/iscan
+ fi
+
+ # install desktop entry
+ if use X; then
+ make_desktop_entry iscan "Image Scan! for Linux ${PV}" scanner
+ fi
+}
+
+pkg_postinst() {
+ local i
+ local DLL_CONF="/etc/sane.d/dll.conf"
+ local EPKOWA_CONF="/etc/sane.d/epkowa.conf"
+
+ elog
+ if grep -q "^[ \t]*\<epkowa\>" ${DLL_CONF}; then
+ elog "Please edit ${EPKOWA_CONF} to suit your needs."
+ elif grep -q "\<epkowa\>" ${DLL_CONF}; then
+ elog "Hint: to enable the backend, add 'epkowa' to ${DLL_CONF}"
+ elog "Then edit ${EPKOWA_CONF} to suit your needs."
+ else
+ echo "epkowa" >> ${DLL_CONF}
+ elog "A new entry 'epkowa' was added to ${DLL_CONF}"
+ elog "Please edit ${EPKOWA_CONF} to suit your needs."
+ fi
+}
diff --git a/media-gfx/iscan/iscan-2.30.1.1.ebuild b/media-gfx/iscan/iscan-2.30.1.1.ebuild
new file mode 100644
index 000000000000..bcd4154f350e
--- /dev/null
+++ b/media-gfx/iscan/iscan-2.30.1.1.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic autotools versionator
+
+# HINTS:
+# -> non-free modules are x86 and amd64 only
+# -> iscan frontend needs non-free modules
+# -> sane-epkowa should be usable on every arch
+# -> ${P}-${SRC_REV}.tar.gz (for gcc 3.2/3.3)
+# -> ${P}-${SRC_REV}.c2.tar.gz (for gcc 3.4 or later)
+
+# FIXME:
+# Make jpeg/png optional. The problem is, that the configure script ignores --disable-*,
+# if the corresponding lib is found on the system.
+# Furthermore, iscan doesn't compile w/o libusb, this should be fixed somehow.
+
+# TODO:
+# (re)add closed-source binary modules which are needed for some scanners.
+
+KEYWORDS="amd64 x86"
+
+MY_PV="$(get_version_component_range 1-3)"
+MY_PVR="$(replace_version_separator 3 -)"
+MY_DOC="userg_revQ"
+
+DESCRIPTION="EPSON Image Scan! for Linux (including sane-epkowa backend)"
+HOMEPAGE="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+# Use a gentoo hosted url since upstream uses a session based url that causes the
+# files to no longer be available after the session expires.
+SRC_URI="
+ http://dev.gentoo.org/~idella4/tarballs/${PN}_${MY_PVR}.tar.gz
+ http://dev.gentoo.org/~flameeyes/avasys/${PN}_${MY_PVR}.tar.gz
+ doc? (
+ http://dev.gentoo.org/~flameeyes/avasys/${MY_DOC}_e.pdf
+ linguas_ja? ( http://dev.gentoo.org/~flameeyes/avasys/${MY_DOC}_j.pdf )
+ )"
+LICENSE="GPL-2 AVASYS"
+SLOT="0"
+
+IUSE="X doc gimp jpeg png tiff"
+IUSE_LINGUAS="ar de es fr it ja ko nl pt zh_CN zh_TW"
+
+for X in ${IUSE_LINGUAS}; do IUSE="${IUSE} linguas_${X}"; done
+
+REQUIRED_USE="gimp? ( X )
+ jpeg? ( X )
+ png? ( X )
+ tiff? ( X )"
+
+QA_PRESTRIPPED="usr/$(get_libdir)/libesmod.so.*"
+QA_TEXTRELS="${QA_PRESTRIPPED}"
+QA_FLAGS_IGNORED="${QA_PRESTRIPPED}"
+
+# Upstream ships broken sanity test
+RESTRICT="test"
+
+RDEPEND="dev-libs/libxml2
+ media-gfx/iscan-data
+ media-gfx/sane-backends
+ virtual/udev
+ virtual/libusb:1
+ X? ( x11-libs/gtk+:2 )
+ gimp? ( media-gfx/gimp )
+ jpeg? ( virtual/jpeg:= )
+ png? ( media-libs/libpng:= )
+ tiff? ( media-libs/tiff:= )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ X? ( sys-devel/gettext )"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_prepare() {
+ local i
+
+ # convert japanese docs to UTF-8
+ if use linguas_ja; then
+ for i in {NEWS,README}.ja non-free/*.ja.txt; do
+ if [ -f "${i}" ]; then
+ echo ">>> Converting ${i} to UTF-8"
+ iconv -f eucjp -t utf8 -o "${i}~" "${i}" && mv -f "${i}~" "${i}" || rm -f "${i}~"
+ fi
+ done
+ fi
+
+ # disable checks for gtk+
+ if ! use X; then
+ sed -i -e "s:PKG_CHECK_MODULES(GTK,.*):AC_DEFINE([HAVE_GTK_2], 0):g" \
+ -e "s:\(PKG_CHECK_MODULES(GDK_IMLIB,.*)\):#\1:g" configure.ac || die
+ fi
+
+ epatch "${FILESDIR}"/iscan-2.29.1-drop-ltdl.patch
+ epatch "${FILESDIR}"/iscan-2.28.1.3+libpng-1.5.patch
+ epatch "${FILESDIR}"/iscan-2.29.1-png-libs.patch
+ epatch "${FILESDIR}"/iscan-2.30.1-fix-g++-test.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -D_GNU_SOURCE # needed for 'strndup'
+ # Fix selector box bug 388073
+ replace-flags "-O[0-9s]" "-O1"
+
+ local myconf=(
+ --enable-dependency-reduction
+ --disable-static
+ $(use_enable X frontend)
+ $(use_enable gimp)
+ $(use_enable jpeg)
+ $(use_enable png)
+ $(use_enable tiff)
+ )
+ econf ${myconf[@]}
+}
+
+src_install() {
+ local MY_LIB="/usr/$(get_libdir)"
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # install docs
+ dodoc AUTHORS NEWS README
+ use linguas_ja && dodoc NEWS.ja README.ja
+
+ # install sane config
+ insinto /etc/sane.d
+ doins backend/epkowa.conf
+
+ # install extra docs
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ if use linguas_ja; then
+ doins "${DISTDIR}/${MY_DOC}_j.pdf"
+ else
+ doins "${DISTDIR}/${MY_DOC}_e.pdf"
+ fi
+ fi
+
+ # link iscan so it is seen as a plugin in gimp
+ if use X && use gimp; then
+ local plugindir
+ if [ -x /usr/bin/gimptool ]; then
+ plugindir="$(gimptool --gimpplugindir)/plug-ins" || die "Failed to get gimpplugindir"
+ elif [ -x /usr/bin/gimptool-2.0 ]; then
+ plugindir="$(gimptool-2.0 --gimpplugindir)/plug-ins" || die "Failed to get gimpplugindir"
+ else
+ die "Can't find GIMP plugin directory."
+ fi
+ dodir "${plugindir}"
+ dosym /usr/bin/iscan "${plugindir}"/iscan
+ fi
+
+ # install desktop entry
+ if use X; then
+ make_desktop_entry iscan "Image Scan! for Linux ${PV}" scanner
+ fi
+}
+
+pkg_postinst() {
+ local i
+ local DLL_CONF="/etc/sane.d/dll.conf"
+ local EPKOWA_CONF="/etc/sane.d/epkowa.conf"
+
+ elog
+ if grep -q "^[ \t]*\<epkowa\>" ${DLL_CONF}; then
+ elog "Please edit ${EPKOWA_CONF} to suit your needs."
+ elif grep -q "\<epkowa\>" ${DLL_CONF}; then
+ elog "Hint: to enable the backend, add 'epkowa' to ${DLL_CONF}"
+ elog "Then edit ${EPKOWA_CONF} to suit your needs."
+ else
+ echo "epkowa" >> ${DLL_CONF}
+ elog "A new entry 'epkowa' was added to ${DLL_CONF}"
+ elog "Please edit ${EPKOWA_CONF} to suit your needs."
+ fi
+}
diff --git a/media-gfx/iscan/metadata.xml b/media-gfx/iscan/metadata.xml
new file mode 100644
index 000000000000..c36e6d4286c6
--- /dev/null
+++ b/media-gfx/iscan/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>mattsch@gmail.com</email>
+ <name>Matthew Schultz</name>
+ </maintainer>
+ <longdescription lang="en">
+ Image Scan! is a graphical scanner utility for people that do not need all
+ the bells and whistles provided by several of the other utilities out there
+ (xsane, QuiteInsane, Kooka). At the moment it only supports SEIKO EPSON
+ scanners and all-in-ones. However, the scanner driver it provides can
+ be used by any other SANE standard compliant scanner utility.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/jhead/Manifest b/media-gfx/jhead/Manifest
new file mode 100644
index 000000000000..cccaf8ec004c
--- /dev/null
+++ b/media-gfx/jhead/Manifest
@@ -0,0 +1,3 @@
+DIST jhead-2.96.tar.gz 66235 SHA256 9fadfe6ad285cac29f328eaa7bc646d7f713eef22a7e9a9fb5b098da0b7b37c4 SHA512 819d78d15b9024a3b03af07ac282ff050c0e817d9f3d79afb0c8ecb1a2003045ad01397e8e84ce84139bd470619d28d66293a395f80bb929a9e6863f2f7d4f25 WHIRLPOOL e9dfc8dc2401199c83b17f0aed0ed13ccdbf4feae7341553623bf714898758e6633c541d2fa2216dcbfcb26a7aad02dfaf7246f5013a015cae08c1c8d76fa5f6
+DIST jhead-2.97.tar.gz 68361 SHA256 04b55c5cd27882f631c2b25316803d8ac81c6d2408e6129ca47019c018324f17 SHA512 9b33451546e5ad3b82fe6001515fd572925a1e2c11af763ae32d71ad2cb056ffa8d97abe14bd48ae5f6144da9d8322965387537d61e22d22b02624ebf351c230 WHIRLPOOL 094f6ef96332c0b207f270295a2ef5595644a1dd305dc940920c868719d73f10efdf08a34a141838f61bb70cb7bed94b5d5e0ab302dee2546e2252aefffa8b85
+DIST jhead-3.00.tar.gz 69151 SHA256 88cc01da018e242fe2e05db73f91b6288106858dd70f27506c4989a575d2895e SHA512 daedfe7ea6be051f769e9a1e0946ea0fa741f387bbc5ba55eec394fb3f37b18a66aa8826190c790eb50a5b9d445ee0d5a28a08d181db3be469686b0675540fbe WHIRLPOOL 7c17ab30dc379a9642f55f1b05e0ad83b77ac967cc8c1f0994e204e5701d56c803ee7dd154866cb8398106bf514c87ed351f97cd01914015bbc6e1e21a4ad975
diff --git a/media-gfx/jhead/files/jhead-2.90-mkstemp_respect_flags.patch b/media-gfx/jhead/files/jhead-2.90-mkstemp_respect_flags.patch
new file mode 100644
index 000000000000..f09214b9f3d6
--- /dev/null
+++ b/media-gfx/jhead/files/jhead-2.90-mkstemp_respect_flags.patch
@@ -0,0 +1,26 @@
+diff --exclude='*~' -Naur -Naur jhead-2.90.orig/jhead.c jhead-2.90/jhead.c
+--- jhead-2.90.orig/jhead.c 2011-02-12 14:36:47.000000000 -0200
++++ jhead-2.90/jhead.c 2011-02-12 14:39:28.000000000 -0200
+@@ -358,7 +358,7 @@
+ // as mktemp - that is, that between getting the random name, and making the file
+ // some other program could snatch that exact same name!
+ // also, not all pltforms support mkstemp.
+- mktemp(TempName);
++ mkstemp(TempName);
+
+
+ if(!TempName[0]) {
+diff --exclude='*~' -Naur -Naur jhead-2.90.orig/makefile jhead-2.90/makefile
+--- jhead-2.90.orig/makefile 2011-02-12 14:36:47.000000000 -0200
++++ jhead-2.90/makefile 2011-02-12 14:40:50.000000000 -0200
+@@ -13,8 +13,9 @@
+ $(OBJ)/%.o:$(SRC)/%.c
+ ${CC} $(CFLAGS) -c $< -o $@
+
++
+ jhead: $(objs) jhead.h
+- ${CC} -o jhead $(objs) -lm
++ ${CC} ${LDFLAGS} -o jhead $(objs) -lm
+
+ clean:
+ rm -f $(objs) jhead
diff --git a/media-gfx/jhead/jhead-2.96.ebuild b/media-gfx/jhead/jhead-2.96.ebuild
new file mode 100644
index 000000000000..b8a89770d5d8
--- /dev/null
+++ b/media-gfx/jhead/jhead-2.96.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Exif Jpeg camera setting parser and thumbnail remover"
+HOMEPAGE="http://www.sentex.net/~mwandel/jhead"
+SRC_URI="http://www.sentex.net/~mwandel/${PN}/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+src_prepare() {
+ # bug 275200 - respect flags and use mktemp instead of mkstemp
+ epatch "${FILESDIR}"/${PN}-2.90-mkstemp_respect_flags.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc *.txt
+ dohtml *.html
+ doman ${PN}.1
+}
diff --git a/media-gfx/jhead/jhead-2.97.ebuild b/media-gfx/jhead/jhead-2.97.ebuild
new file mode 100644
index 000000000000..8f8714f859c6
--- /dev/null
+++ b/media-gfx/jhead/jhead-2.97.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Exif Jpeg camera setting parser and thumbnail remover"
+HOMEPAGE="http://www.sentex.net/~mwandel/jhead"
+SRC_URI="http://www.sentex.net/~mwandel/${PN}/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+src_prepare() {
+ # bug 275200 - respect flags and use mktemp instead of mkstemp
+ epatch "${FILESDIR}"/${PN}-2.90-mkstemp_respect_flags.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc *.txt
+ dohtml *.html
+ doman ${PN}.1
+}
diff --git a/media-gfx/jhead/jhead-3.00.ebuild b/media-gfx/jhead/jhead-3.00.ebuild
new file mode 100644
index 000000000000..1772f1f18caa
--- /dev/null
+++ b/media-gfx/jhead/jhead-3.00.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Exif Jpeg camera setting parser and thumbnail remover"
+HOMEPAGE="http://www.sentex.net/~mwandel/jhead"
+SRC_URI="http://www.sentex.net/~mwandel/${PN}/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+src_prepare() {
+ # bug 275200 - respect flags and use mktemp instead of mkstemp
+ epatch "${FILESDIR}"/${PN}-2.90-mkstemp_respect_flags.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc *.txt
+ dohtml *.html
+ doman ${PN}.1
+}
diff --git a/media-gfx/jhead/metadata.xml b/media-gfx/jhead/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/jhead/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/jigl/Manifest b/media-gfx/jigl/Manifest
new file mode 100644
index 000000000000..2e3f72095a6d
--- /dev/null
+++ b/media-gfx/jigl/Manifest
@@ -0,0 +1 @@
+DIST jigl-2.0.1.tar.gz 35423 SHA256 52641395bf1fa91cb3e6d4771db51507284890250937dd8c1f3b58ce558170e8 SHA512 648d00d5c6b57ade66da388dc6168289260006f08f971b9a353529191c06357604a341df371c9638762ad3232efc275cd685c2c3c258472c8503742113c41e77 WHIRLPOOL a5b2c691327b4dcf3cc0baab8ddaea5557630982fae488d095ac74e374a4856b9a762846a02972dfd25a7ca18e28fa01edbca62cab3fa8ca468578d5f4f392bf
diff --git a/media-gfx/jigl/jigl-2.0.1.ebuild b/media-gfx/jigl/jigl-2.0.1.ebuild
new file mode 100644
index 000000000000..d03b1b2101ec
--- /dev/null
+++ b/media-gfx/jigl/jigl-2.0.1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Jason's Image Gallery"
+HOMEPAGE="http://xome.net/projects/jigl/"
+SRC_URI="http://xome.net/projects/jigl/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl
+ media-gfx/jhead
+ media-gfx/imagemagick"
+DEPEND=""
+
+src_install() {
+ newbin jigl.pl jigl || die
+ dodoc ChangeLog Themes Todo
+}
diff --git a/media-gfx/jigl/metadata.xml b/media-gfx/jigl/metadata.xml
new file mode 100644
index 000000000000..9be90a258970
--- /dev/null
+++ b/media-gfx/jigl/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/jp2a/Manifest b/media-gfx/jp2a/Manifest
new file mode 100644
index 000000000000..bbc05b37c3a9
--- /dev/null
+++ b/media-gfx/jp2a/Manifest
@@ -0,0 +1 @@
+DIST jp2a-1.0.6.tar.bz2 306975 SHA256 7869c13744b0e15c250cae88b55f0dfade17e6c2b0a03b309dbe89bd34b342d4 SHA512 00c7f7b62a3d1f4238d7513167eebd6ead9447ac90b66fd3f9529f6e99dd1a021385ff970aabd005a88db1614636be57547494dfe00c7e687a11953066a6ecce WHIRLPOOL 1ab6226faea0988faabd765dff36f30977584e6f20a448a79fd3d975dba4cf06bfe9564638551aa8614b02b72a9c6190e3824fd8fe910eed3177e15c627ffb12
diff --git a/media-gfx/jp2a/jp2a-1.0.6-r1.ebuild b/media-gfx/jp2a/jp2a-1.0.6-r1.ebuild
new file mode 100644
index 000000000000..0acbcbd4d344
--- /dev/null
+++ b/media-gfx/jp2a/jp2a-1.0.6-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="JPEG image to ASCII art converter"
+HOMEPAGE="http://csl.sublevel3.org/jp2a/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ia64 ppc ppc64 ~sparc x86 ~x64-macos ~x86-macos ~x64-solaris"
+IUSE="curl"
+
+RDEPEND="sys-libs/ncurses
+ virtual/jpeg
+ curl? ( net-misc/curl )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ econf \
+ $(use_enable curl)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README
+ dohtml man/jp2a.html
+}
diff --git a/media-gfx/jp2a/metadata.xml b/media-gfx/jp2a/metadata.xml
new file mode 100644
index 000000000000..bef7cab95650
--- /dev/null
+++ b/media-gfx/jp2a/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">jp2a</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/jpeg2ps/Manifest b/media-gfx/jpeg2ps/Manifest
new file mode 100644
index 000000000000..561ca8228c00
--- /dev/null
+++ b/media-gfx/jpeg2ps/Manifest
@@ -0,0 +1 @@
+DIST jpeg2ps-1.9.tar.gz 67105 RMD160 076c59aeded1615bdb65db138a8448e9146f7ed3 SHA1 2fc2701c7c00ba17b051ebcc7b9c8059eb6614f9 SHA256 e09919ff55bb1fd26299adfe92e5ea0e7daaa3bfa0277a0483cac9764eac25a2
diff --git a/media-gfx/jpeg2ps/files/jpeg2ps-1.9-include.diff b/media-gfx/jpeg2ps/files/jpeg2ps-1.9-include.diff
new file mode 100644
index 000000000000..f07b69c5bc6a
--- /dev/null
+++ b/media-gfx/jpeg2ps/files/jpeg2ps-1.9-include.diff
@@ -0,0 +1,11 @@
+diff --exclude='*~' -Naur jpeg2ps-1.9.orig/asc85ec.c jpeg2ps-1.9/asc85ec.c
+--- jpeg2ps-1.9.orig/asc85ec.c 2005-09-10 23:02:15.000000000 -0300
++++ jpeg2ps-1.9/asc85ec.c 2005-09-10 23:08:08.000000000 -0300
+@@ -3,6 +3,7 @@
+
+ #include <stdio.h>
+ #include <fcntl.h>
++#include <stdlib.h>
+
+ /* try to identify Mac compilers */
+ #ifdef __MWERKS__
diff --git a/media-gfx/jpeg2ps/jpeg2ps-1.9-r1.ebuild b/media-gfx/jpeg2ps/jpeg2ps-1.9-r1.ebuild
new file mode 100644
index 000000000000..08f37b3c2e22
--- /dev/null
+++ b/media-gfx/jpeg2ps/jpeg2ps-1.9-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Converts JPEG images to Postscript using a wrapper"
+HOMEPAGE="http://www.pdflib.com/download/free-software/jpeg2ps/"
+SRC_URI="http://www.pdflib.com/products/more/jpeg2ps/${P}.tar.gz"
+
+LICENSE="free-noncomm"
+SLOT="0"
+KEYWORDS="amd64 ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="metric"
+
+DEPEND="sys-apps/sed"
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+
+ #bug 105561
+ epatch "${FILESDIR}"/${P}-include.diff
+}
+
+src_compile() {
+ pagesize=""
+ use metric && pagesize="-DA4"
+ emake CFLAGS="-c ${CFLAGS} ${pagesize}" CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ # The Makefile is hard-coded to install to /usr/local/ so we
+ # simply copy the files manually
+ dobin jpeg2ps || die "dobin failed"
+ doman jpeg2ps.1 || die "doman failed"
+ dodoc jpeg2ps.txt || die "dodoc failed"
+}
+
+pkg_postinst() {
+ elog
+ if [ -z ${pagesize} ]; then
+ elog "By default, this installation of jpeg2ps will generate"
+ elog "letter size output. You can force A4 output with"
+ elog " jpeg2ps -p a4 file.jpg > file.ps"
+ else
+ elog "By default, this installation of jpeg2ps will generate"
+ elog "A4 size output. You can force letter output with"
+ elog " jpeg2ps -p letter file.jpg > file.ps"
+ fi
+ elog
+}
diff --git a/media-gfx/jpeg2ps/metadata.xml b/media-gfx/jpeg2ps/metadata.xml
new file mode 100644
index 000000000000..19f4dfa8ed88
--- /dev/null
+++ b/media-gfx/jpeg2ps/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+<use>
+ <flag name='metric'>
+ Default to A4 paper size
+ </flag>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/jpeginfo/Manifest b/media-gfx/jpeginfo/Manifest
new file mode 100644
index 000000000000..c169a77457aa
--- /dev/null
+++ b/media-gfx/jpeginfo/Manifest
@@ -0,0 +1 @@
+DIST jpeginfo-1.6.1.tar.gz 64856 SHA256 629e31cf1da0fa1efe4a7cc54c67123a68f5024f3d8e864a30457aeaed1d7653
diff --git a/media-gfx/jpeginfo/files/jpeginfo-1.6.0-parallel_install.patch b/media-gfx/jpeginfo/files/jpeginfo-1.6.0-parallel_install.patch
new file mode 100644
index 000000000000..379e200fd90f
--- /dev/null
+++ b/media-gfx/jpeginfo/files/jpeginfo-1.6.0-parallel_install.patch
@@ -0,0 +1,11 @@
+--- Makefile.in
++++ Makefile.in
+@@ -79,7 +79,7 @@
+ groff -Tps -mandoc ./$(PKGNAME).1 >$(PKGNAME).ps
+ groff -Tascii -mandoc ./$(PKGNAME).1 | tee $(PKGNAME).prn | sed 's/.//g' >$(PKGNAME).txt
+
+-install.man:
++install.man: install.dirs
+ $(INSTALL) -m 644 $(PKGNAME).1 $(INSTALL_ROOT)/$(mandir)/man1/$(PKGNAME).1
+
+ install.dirs:
diff --git a/media-gfx/jpeginfo/jpeginfo-1.6.1.ebuild b/media-gfx/jpeginfo/jpeginfo-1.6.1.ebuild
new file mode 100644
index 000000000000..5b15a30aeede
--- /dev/null
+++ b/media-gfx/jpeginfo/jpeginfo-1.6.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Prints information and tests integrity of JPEG/JFIF files"
+HOMEPAGE="http://www.kokkonen.net/tjko/projects.html"
+SRC_URI="http://www.kokkonen.net/tjko/src/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+RDEPEND="virtual/jpeg"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.6.0-parallel_install.patch
+}
+
+src_configure() {
+ tc-export CC
+ econf
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install
+ dodoc README
+}
diff --git a/media-gfx/jpeginfo/metadata.xml b/media-gfx/jpeginfo/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/jpeginfo/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/jpegoptim/Manifest b/media-gfx/jpegoptim/Manifest
new file mode 100644
index 000000000000..6a2a6958f30f
--- /dev/null
+++ b/media-gfx/jpegoptim/Manifest
@@ -0,0 +1,3 @@
+DIST jpegoptim-1.3.1.tar.gz 94173 SHA256 4cf898848d70cae04165259a53ac5e67ddcc5a59f3ecac7f57a8fc4f58a253ef SHA512 2ad42ab038bb6e01f9d34b062fb346934938acdc54a8962a93533cd8c6ddc01444b1c1b65bc61f40e05138230758b57ea026aee86f17d69ae35c86e36d5304f5 WHIRLPOOL 4ec11ca184f6b133966de749fe3eb8c9b4ab07e6d03311210299fd7d68e0a7afd4570b39cb772d84f03da4f9cffe5d1201993bbb7795ae067b16cd2744e36c42
+DIST jpegoptim-1.4.0.tar.gz 96981 SHA256 bf76bedd12ed112bef48f8e7f09c234e3ea7a22c2d4168dbc1423fa41901e891 SHA512 141dc7e3a159cb7eb75e2e3de60f600820ab9f70f45fcbeda5bd0bcda30d62c9266c97254f2913f9d5b6e08532c0a765bca5a0493cd6f7e37269c8790f0c4f85 WHIRLPOOL 47fe629b088142d37ceaad3a05c882dc6376c9803805560e81f551d3af3385a0ed411987b44bad400a8f78c17550647e8bcf6ec4ec4df62adf134e0ecbb216b9
+DIST jpegoptim-1.4.2.tar.gz 98028 SHA256 4887409021a664465ac268ca09b4f92868908b9af57e86fa30622998311206c4 SHA512 79483078ca57fe78e381fc10361d5cccaee36a15ddf9fae60d7887135d376405b6e66c0f253c39d62d35ac79261d736f7224757919b051a001aa554950b90a15 WHIRLPOOL e1c87ad9ce9aaa8232de278db2081547eb11151b4f491c6fefa6619869402ec9b432d42ca9c943c64152bbee344e69126516b7c06b5cba372fc12e3448c45abd
diff --git a/media-gfx/jpegoptim/jpegoptim-1.3.1.ebuild b/media-gfx/jpegoptim/jpegoptim-1.3.1.ebuild
new file mode 100644
index 000000000000..007586b22a7a
--- /dev/null
+++ b/media-gfx/jpegoptim/jpegoptim-1.3.1.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Utility to optimize JPEG files"
+HOMEPAGE="http://www.kokkonen.net/tjko/projects.html"
+SRC_URI="http://www.kokkonen.net/tjko/src/${P}.tar.gz"
+
+LICENSE="GPL-2+" # While COPYING is plain GPL-2, COPYRIGHT is clarifying it to be 'any later version'
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
+RDEPEND="virtual/jpeg:0"
+DEPEND="${RDEPEND}"
diff --git a/media-gfx/jpegoptim/jpegoptim-1.4.0.ebuild b/media-gfx/jpegoptim/jpegoptim-1.4.0.ebuild
new file mode 100644
index 000000000000..70a9509b4ec6
--- /dev/null
+++ b/media-gfx/jpegoptim/jpegoptim-1.4.0.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Utility to optimize JPEG files"
+HOMEPAGE="http://www.kokkonen.net/tjko/projects.html"
+SRC_URI="http://www.kokkonen.net/tjko/src/${P}.tar.gz"
+
+LICENSE="GPL-2+" # While COPYING is plain GPL-2, COPYRIGHT is clarifying it to be 'any later version'
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
+RDEPEND="virtual/jpeg:0"
+DEPEND="${RDEPEND}"
diff --git a/media-gfx/jpegoptim/jpegoptim-1.4.2.ebuild b/media-gfx/jpegoptim/jpegoptim-1.4.2.ebuild
new file mode 100644
index 000000000000..183fa3082c34
--- /dev/null
+++ b/media-gfx/jpegoptim/jpegoptim-1.4.2.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Utility to optimize JPEG files"
+HOMEPAGE="http://www.kokkonen.net/tjko/projects.html"
+SRC_URI="http://www.kokkonen.net/tjko/src/${P}.tar.gz"
+
+LICENSE="GPL-2+" # While COPYING is plain GPL-2, COPYRIGHT is clarifying it to be 'any later version'
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+
+RDEPEND="virtual/jpeg:0"
+DEPEND="${RDEPEND}"
diff --git a/media-gfx/jpegoptim/metadata.xml b/media-gfx/jpegoptim/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/jpegoptim/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/jpegpixi/Manifest b/media-gfx/jpegpixi/Manifest
new file mode 100644
index 000000000000..297a6dc097ca
--- /dev/null
+++ b/media-gfx/jpegpixi/Manifest
@@ -0,0 +1 @@
+DIST jpegpixi-1.1.1.tar.gz 155045 SHA256 e8507e07383d7b30b8ea9a7958f307b7a4ef38c80e6e2615460b07afd3407bed
diff --git a/media-gfx/jpegpixi/jpegpixi-1.1.1.ebuild b/media-gfx/jpegpixi/jpegpixi-1.1.1.ebuild
new file mode 100644
index 000000000000..757441834107
--- /dev/null
+++ b/media-gfx/jpegpixi/jpegpixi-1.1.1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="almost lossless JPEG pixel interpolator, for correcting digital camera defects"
+HOMEPAGE="http://www.zero-based.org/software/jpegpixi/"
+SRC_URI="http://www.zero-based.org/software/jpegpixi/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+DEPEND="virtual/jpeg"
+
+src_install() {
+ dobin jpegpixi jpeghotp || die
+ doman man/jpegpixi.1 man/jpeghotp.1
+ dodoc AUTHORS NEWS README README.jpeglib ChangeLog
+}
diff --git a/media-gfx/jpegpixi/metadata.xml b/media-gfx/jpegpixi/metadata.xml
new file mode 100644
index 000000000000..3dc83742cd89
--- /dev/null
+++ b/media-gfx/jpegpixi/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription>
+ Almost lossless JPEG pixel interpolator, for correcting digital camera
+ defects.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/jpegtoavi/Manifest b/media-gfx/jpegtoavi/Manifest
new file mode 100644
index 000000000000..401c724c169c
--- /dev/null
+++ b/media-gfx/jpegtoavi/Manifest
@@ -0,0 +1 @@
+DIST jpegtoavi-1.5.tar.gz 14882 SHA256 6ddedb9a82d5a4b4b57bac2750a73c59584d38adad98b199e485c6c99328fc93
diff --git a/media-gfx/jpegtoavi/files/jpegtoavi-1.5-Makefile.patch b/media-gfx/jpegtoavi/files/jpegtoavi-1.5-Makefile.patch
new file mode 100644
index 000000000000..9f562f293b31
--- /dev/null
+++ b/media-gfx/jpegtoavi/files/jpegtoavi-1.5-Makefile.patch
@@ -0,0 +1,31 @@
+--- Makefile.orig 2010-03-02 23:06:07.000000000 +0200
++++ Makefile 2010-03-02 23:11:59.000000000 +0200
+@@ -1,4 +1,4 @@
+-CC=gcc
++CC ?= gcc
+ INCLUDE=
+ LIBS=-L.
+ SOURCES=jpegtoavi.c avifmt.h byteswap.h llist.h llist.c
+@@ -10,7 +10,8 @@
+ PACKAGE_VERSION_MIN=5
+ PACKAGE_VERSION=$(PACKAGE_VERSION_MAJ).$(PACKAGE_VERSION_MIN)
+ VERBOSE=0
+-CCFLAGS=$(INCLUDE) -O3 -Wall -ansi -g -DLINUX -D__UNIX__ \
++CFLAGS += -Wall -ansi
++CPPFLAGS += $(INCLUDE) -DLINUX -D__UNIX__ \
+ -DVERSION_MIN=$(PACKAGE_VERSION_MIN) \
+ -DVERSION_MAJ=$(PACKAGE_VERSION_MAJ) \
+ -DVERBOSE=$(VERBOSE)
+@@ -27,10 +28,10 @@
+ all: jpegtoavi
+
+ %.o: %.c
+- $(CC) $(CCFLAGS) -c $< -o $@
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
+ jpegtoavi: jpegtoavi.o llist.o
+- $(CC) $(CCFLAGS) jpegtoavi.o llist.o $(LIBS) -o $@
++ $(CC) $(LDFLAGS) jpegtoavi.o llist.o $(LIBS) -o $@
+
+ distdir: $(DISTFILES)
+ $(am__remove_distdir)
diff --git a/media-gfx/jpegtoavi/jpegtoavi-1.5.ebuild b/media-gfx/jpegtoavi/jpegtoavi-1.5.ebuild
new file mode 100644
index 000000000000..105845b2ea4a
--- /dev/null
+++ b/media-gfx/jpegtoavi/jpegtoavi-1.5.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils toolchain-funcs
+
+DESCRIPTION="JPEG to AVI/MJPEG animation command-line conversion tool"
+HOMEPAGE="http://sourceforge.net/projects/jpegtoavi/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-Makefile.patch
+}
+
+src_compile() {
+ tc-export CC
+ emake || die
+}
+
+src_install() {
+ dobin ${PN} || die
+ doman ${PN}.1
+ dodoc CHANGELOG README
+}
diff --git a/media-gfx/jpegtoavi/metadata.xml b/media-gfx/jpegtoavi/metadata.xml
new file mode 100644
index 000000000000..69de869b54a4
--- /dev/null
+++ b/media-gfx/jpegtoavi/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">jpegtoavi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/k3d/Manifest b/media-gfx/k3d/Manifest
new file mode 100644
index 000000000000..fb885419a277
--- /dev/null
+++ b/media-gfx/k3d/Manifest
@@ -0,0 +1 @@
+DIST k3d-source-0.7.11.0.tar.gz 7692200 SHA256 c6364cb9e989f2ac2412541c2a4368279b23e728822ab7e6b5390d579dd49008 SHA512 023dcdfd4e35c4444b07e2d674824fdc31842847a0f8393641359b25fc3f3a127adf2279606d0322e24c3e66d59709624dcf128eda4260296da2c3dc42d0ac43 WHIRLPOOL e50b07d93b7689454999ec125990871c72f803ba75ae6373f1a201f2393b4fcbd90e3f2b49eca610bbb26a3cf4c4934a0108ed250b2830d58a9d98b92883a99b
diff --git a/media-gfx/k3d/files/k3d-0.7.11.0-cuda.patch b/media-gfx/k3d/files/k3d-0.7.11.0-cuda.patch
new file mode 100644
index 000000000000..56beb0badfc9
--- /dev/null
+++ b/media-gfx/k3d/files/k3d-0.7.11.0-cuda.patch
@@ -0,0 +1,52 @@
+http://k3d.svn.sourceforge.net/viewvc/k3d/trunk/modules/cuda/cuda_mesh_subdivide_edges.cpp?view=patch&r1=1782&r2=1820
+
+--- trunk/modules/cuda/cuda_mesh_subdivide_edges.cpp 2009/03/14 19:27:16 1782
++++ trunk/modules/cuda/cuda_mesh_subdivide_edges.cpp 2009/03/22 22:32:10 1820
+@@ -23,6 +23,7 @@
+ \author Evan Lezar (evanlezar@gmail.com)
+ */
+
++#include <k3dsdk/attribute_array_copier.h>
+ #include <k3dsdk/basic_math.h>
+ #include <k3dsdk/document_plugin_factory.h>
+ #include <k3dsdk/imaterial.h>
+@@ -30,8 +31,8 @@
+ #include <k3dsdk/measurement.h>
+ #include <k3dsdk/mesh_modifier.h>
+ #include <k3dsdk/mesh_selection_sink.h>
+-#include <k3dsdk/attribute_array_copier.h>
+ #include <k3dsdk/node.h>
++#include <k3dsdk/polyhedron.h>
+ #include <k3dsdk/selection.h>
+ #include <k3dsdk/utility.h>
+ #include <k3dsdk/vectors.h>
+@@ -41,6 +42,8 @@
+ #include "cuda_device_mesh.h"
+ #include "cuda_mesh_topology_data.h"
+
++#include <boost/scoped_ptr.hpp>
++
+ namespace module
+ {
+
+@@ -159,7 +162,8 @@
+
+ // If there are no valid polyhedra, we give up
+ document().pipeline_profiler().start_execution(*this, "Create:Validate input");
+- if(!k3d::validate_polyhedra(Input))
++ boost::scoped_ptr<k3d::polyhedron::const_primitive> polyhedron(k3d::polyhedron::validate(Input));
++ if(!polyhedron)
+ {
+ document().pipeline_profiler().finish_execution(*this, "Create:Validate input");
+ return;
+@@ -297,7 +301,8 @@
+ {
+ document().pipeline_profiler().start_execution(*this, "Update:Validate input");
+
+- if(!k3d::validate_polyhedra(Input))
++ boost::scoped_ptr<k3d::polyhedron::const_primitive> polyhedron(k3d::polyhedron::validate(Input));
++ if(!polyhedron)
+ {
+ document().pipeline_profiler().finish_execution(*this, "Update:Validate input");
+ return;
+
diff --git a/media-gfx/k3d/files/k3d-0.7.11.0-fix-potfiles.patch b/media-gfx/k3d/files/k3d-0.7.11.0-fix-potfiles.patch
new file mode 100644
index 000000000000..fcba656da5cb
--- /dev/null
+++ b/media-gfx/k3d/files/k3d-0.7.11.0-fix-potfiles.patch
@@ -0,0 +1,19 @@
+--- a/po/POTFILES.in 2009-03-20 05:29:03.000000000 +0900
++++ b/po/POTFILES.in 2009-03-21 16:58:26.811108311 +0900
+@@ -217,7 +217,6 @@
+ modules/mesh/merge_collinear_edges.cpp
+ modules/mesh/merge_coplanar_faces.cpp
+ modules/mesh/merge_mesh.cpp
+-modules/mesh/mesh_stats.cpp
+ modules/mesh/move_first_edge.cpp
+ modules/mesh/sds_corner.cpp
+ modules/mesh/sds_crease.cpp
+@@ -531,3 +530,7 @@
+ uimodules/qtui/user_interface.cpp
+ k3dsdk/mesh_writer.h
+ modules/ply_io/mesh_writer.cpp
++modules/lipsync/papagayo_lipsync_reader.cpp
++modules/named_arrays/named_text_array.cpp
++modules/ngui_python_shell/dialog.cpp
++modules/xtrackcad/document_importer.cpp
+
diff --git a/media-gfx/k3d/files/k3d-0.7.11.0-gcc44.patch b/media-gfx/k3d/files/k3d-0.7.11.0-gcc44.patch
new file mode 100644
index 000000000000..6917170b8cbc
--- /dev/null
+++ b/media-gfx/k3d/files/k3d-0.7.11.0-gcc44.patch
@@ -0,0 +1,60 @@
+--- k3d-source-0.7.11.0/k3dsdk/gzstream.cpp~ 2009-03-19 21:28:50.000000000 +0100
++++ k3d-source-0.7.11.0/k3dsdk/gzstream.cpp 2009-03-22 22:19:03.000000000 +0100
+@@ -29,6 +29,7 @@
+ #include "gzstream.h"
+ #include "path.h"
+
++#include <stdio.h>
+ #include <zlib.h>
+ #include <string.h>
+
+--- k3d-source-0.7.11.0/k3dsdk/gil/boost/gil/color_base_algorithm.hpp~ 2009-03-19 21:28:53.000000000 +0100
++++ k3d-source-0.7.11.0/k3dsdk/gil/boost/gil/color_base_algorithm.hpp 2009-03-22 22:33:45.000000000 +0100
+@@ -70,7 +70,7 @@
+ template <typename ColorBase, int K> struct kth_semantic_element_reference_type {
+ BOOST_STATIC_CONSTANT(int, semantic_index = (mpl::at_c<typename ColorBase::layout_t::channel_mapping_t,K>::type::value));
+ typedef typename ColorBase::template kth_element_reference_type<semantic_index>::type type;
+- static type get(ColorBase& cb) { return at_c<semantic_index>(cb); }
++ static type get(ColorBase& cb) { return boost::gil::at_c<semantic_index>(cb); }
+ };
+
+ /// \brief Specifies the return type of the constant semantic_at_c<K>(color_base);
+@@ -78,7 +78,7 @@
+ template <typename ColorBase, int K> struct kth_semantic_element_const_reference_type {
+ BOOST_STATIC_CONSTANT(int, semantic_index = (mpl::at_c<typename ColorBase::layout_t::channel_mapping_t,K>::type::value));
+ typedef typename ColorBase::template kth_element_const_reference_type<semantic_index>::type type;
+- static type get(const ColorBase& cb) { return at_c<semantic_index>(cb); }
++ static type get(const ColorBase& cb) { return boost::gil::at_c<semantic_index>(cb); }
+ };
+
+ /// \brief A mutable accessor to the K-th semantic element of a color base
+--- k3d-source-0.7.11.0/k3dsdk/path.cpp~ 2009-03-19 21:28:55.000000000 +0100
++++ k3d-source-0.7.11.0/k3dsdk/path.cpp 2009-03-22 22:48:31.000000000 +0100
+@@ -24,6 +24,7 @@
+ #include "result.h"
+ #include "system.h"
+
++#include <stdio.h>
+ #include <glibmm/convert.h>
+
+ #ifdef K3D_API_WIN32
+--- k3d-source-0.7.11.0/modules/inotify/inotify-cxx.cpp~ 2009-03-19 21:29:01.000000000 +0100
++++ k3d-source-0.7.11.0/modules/inotify/inotify-cxx.cpp 2009-03-22 23:16:31.000000000 +0100
+@@ -20,6 +20,7 @@
+ */
+
+
++#include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+--- k3d-source-0.7.11.0/modules/pdiff/Metric.cpp~ 2009-03-19 21:29:02.000000000 +0100
++++ k3d-source-0.7.11.0/modules/pdiff/Metric.cpp 2009-03-22 23:34:09.000000000 +0100
+@@ -19,6 +19,7 @@
+ #include "RGBAImage.h"
+ #include "LPyramid.h"
+ #include <math.h>
++#include <stdio.h>
+
+ #ifndef M_PI
+ #define M_PI 3.14159265f
diff --git a/media-gfx/k3d/files/k3d-0.7.11.0-gcc47.patch b/media-gfx/k3d/files/k3d-0.7.11.0-gcc47.patch
new file mode 100644
index 000000000000..56603d2d2b1b
--- /dev/null
+++ b/media-gfx/k3d/files/k3d-0.7.11.0-gcc47.patch
@@ -0,0 +1,87 @@
+--- k3d-source-0.8.0.2/k3dsdk/gil/boost/gil/extension/dynamic_image/apply_operation_base.hpp 2010-07-02 23:27:47.000000000 -0300
++++ k3d-source-0.8.0.2_patched/k3dsdk/gil/boost/gil/extension/dynamic_image/apply_operation_base.hpp 2012-09-14 15:48:20.000000000 -0300
+@@ -114,7 +114,7 @@
+ template <typename T2, typename Op>
+ struct reduce_bind1 {
+ const T2& _t2;
+- mutable Op& _op;
++ Op& _op;
+
+ typedef typename Op::result_type result_type;
+
+@@ -127,7 +127,7 @@
+ struct reduce_bind2 {
+ const Bits1& _bits1;
+ std::size_t _index1;
+- mutable Op& _op;
++ Op& _op;
+
+ typedef typename Op::result_type result_type;
+
+--- k3d-source-0.8.0.2/k3dsdk/data.h 2010-07-02 23:27:46.000000000 -0300
++++ k3d-source-0.8.0.2_patched/k3dsdk/data.h 2012-09-14 16:50:20.000000000 -0300
+@@ -580,7 +580,7 @@
+
+ try
+ {
+- set_value(boost::lexical_cast<value_t>(*new_value), Hint);
++ this->set_value(boost::lexical_cast<value_t>(*new_value), Hint);
+ return true;
+ }
+ catch(...)
+@@ -865,7 +865,7 @@
+
+ try
+ {
+- set_value(boost::lexical_cast<value_t>(*new_value), Hint);
++ this->set_value(boost::lexical_cast<value_t>(*new_value), Hint);
+ return true;
+ }
+ catch(...)
+@@ -1011,7 +1011,7 @@
+
+ try
+ {
+- set_value(boost::lexical_cast<value_t>(*new_value), Hint);
++ this->set_value(boost::lexical_cast<value_t>(*new_value), Hint);
+ return true;
+ }
+ catch(...)
+@@ -1146,7 +1146,7 @@
+ if(!new_value)
+ return false;
+
+- set_value(*new_value, Hint);
++ this->set_value(*new_value, Hint);
+ return true;
+ }
+
+@@ -1671,7 +1671,7 @@
+ /// This little bit of magic makes it possible for base classes (such as node_storage) to update their own values while observing the correct undo policy
+ void internal_set_value(const value_t& Value, ihint* const Hint)
+ {
+- set_value(Value, Hint);
++ this->set_value(Value, Hint);
+ }
+ };
+
+--- k3d-source-0.8.0.2/modules/animation/interpolator.h 2010-07-02 23:27:55.000000000 -0300
++++ k3d-source-0.8.0.2_patched/modules/animation/interpolator.h 2012-09-14 16:45:16.000000000 -0300
+@@ -92,7 +92,7 @@
+ {
+ time_t t_lower, t_upper;
+ value_t v_lower, v_upper;
+- get_surrounding_keys(Time, Keyframes, t_lower, t_upper, v_lower, v_upper);
++ this->get_surrounding_keys(Time, Keyframes, t_lower, t_upper, v_lower, v_upper);
+ return lerp(t_lower, t_upper, v_lower, v_upper, Time);
+ }
+ protected:
+@@ -116,7 +116,7 @@
+ {
+ time_t t_lower, t_upper;
+ value_t v_lower, v_upper;
+- get_surrounding_keys(Time, Keyframes, t_lower, t_upper, v_lower, v_upper);
++ this->get_surrounding_keys(Time, Keyframes, t_lower, t_upper, v_lower, v_upper);
+ return lerp(t_lower, t_upper, v_lower, v_upper, Time);
+ }
+ protected:
diff --git a/media-gfx/k3d/files/k3d-0.7.11.0-gtk-liststore-vs-treemodel.patch b/media-gfx/k3d/files/k3d-0.7.11.0-gtk-liststore-vs-treemodel.patch
new file mode 100644
index 000000000000..b0c5d8a738e5
--- /dev/null
+++ b/media-gfx/k3d/files/k3d-0.7.11.0-gtk-liststore-vs-treemodel.patch
@@ -0,0 +1,40 @@
+--- a/k3dsdk/ngui/main_document_window.cpp 2009-03-19 16:28:51.000000000 -0400
++++ b/k3dsdk/ngui/main_document_window.cpp 2012-06-01 12:26:53.000000000 -0400
+@@ -1569,7 +1569,7 @@
+ Gtk::HBox import_box(false, 5);
+ Gtk::Label import_label(_("Choose import plugin:"));
+
+- Gtk::ComboBox import_combo(model);
++ Gtk::ComboBox import_combo((Glib::RefPtr<Gtk::TreeModel> &)model);
+ import_combo.pack_start(columns.icon, false);
+ import_combo.pack_start(columns.label);
+ import_combo.set_active(0);
+@@ -1659,7 +1659,7 @@
+ Gtk::HBox export_box(false, 5);
+ Gtk::Label export_label(_("Choose export plugin:"));
+
+- Gtk::ComboBox export_combo(model);
++ Gtk::ComboBox export_combo((Glib::RefPtr<Gtk::TreeModel> &)model);
+ export_combo.pack_start(columns.icon, false);
+ export_combo.pack_start(columns.label);
+ export_combo.set_active(0);
+--- a/k3dsdk/ngui/render.cpp 2009-03-19 16:28:51.000000000 -0400
++++ b/k3dsdk/ngui/render.cpp 2012-06-01 12:38:09.000000000 -0400
+@@ -162,7 +162,7 @@
+ row[columns.separator] = false;
+ }
+
+- Gtk::ComboBox combo(model);
++ Gtk::ComboBox combo((Glib::RefPtr<Gtk::TreeModel> &)model);
+
+ combo.pack_start(columns.icon, false);
+
+@@ -286,7 +286,7 @@
+ row[columns.separator] = false;
+ }
+
+- Gtk::ComboBox combo(model);
++ Gtk::ComboBox combo((Glib::RefPtr<Gtk::TreeModel> &)model);
+
+ combo.pack_start(columns.icon, false);
+
diff --git a/media-gfx/k3d/files/k3d-0.7.11.0-libpng14.patch b/media-gfx/k3d/files/k3d-0.7.11.0-libpng14.patch
new file mode 100644
index 000000000000..6396ffc156ee
--- /dev/null
+++ b/media-gfx/k3d/files/k3d-0.7.11.0-libpng14.patch
@@ -0,0 +1,54 @@
+diff -ur k3d-source-0.7.11.0.orig/k3dsdk/gil/boost/gil/extension/io/png_io_private.hpp k3d-source-0.7.11.0/k3dsdk/gil/boost/gil/extension/io/png_io_private.hpp
+--- k3d-source-0.7.11.0.orig/k3dsdk/gil/boost/gil/extension/io/png_io_private.hpp 2009-03-19 22:28:53.000000000 +0200
++++ k3d-source-0.7.11.0/k3dsdk/gil/boost/gil/extension/io/png_io_private.hpp 2010-05-12 12:21:50.000000000 +0300
+@@ -148,12 +148,12 @@
+ // allocate/initialize the image information data
+ _info_ptr = png_create_info_struct(_png_ptr);
+ if (_info_ptr == NULL) {
+- png_destroy_read_struct(&_png_ptr,png_infopp_NULL,png_infopp_NULL);
++ png_destroy_read_struct(&_png_ptr,NULL,NULL);
+ io_error("png_get_file_size: fail to call png_create_info_struct()");
+ }
+ if (setjmp(png_jmpbuf(_png_ptr))) {
+ //free all of the memory associated with the png_ptr and info_ptr
+- png_destroy_read_struct(&_png_ptr, &_info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&_png_ptr, &_info_ptr, NULL);
+ io_error("png_get_file_size: fail to call setjmp()");
+ }
+ png_init_io(_png_ptr, get());
+@@ -165,7 +165,7 @@
+ png_reader(const char* filename) : file_mgr(filename, "rb") { init(); }
+
+ ~png_reader() {
+- png_destroy_read_struct(&_png_ptr,&_info_ptr,png_infopp_NULL);
++ png_destroy_read_struct(&_png_ptr,&_info_ptr,NULL);
+ }
+ point2<std::ptrdiff_t> get_dimensions() {
+ return point2<std::ptrdiff_t>(png_get_image_width(_png_ptr,_info_ptr),
+@@ -177,7 +177,7 @@
+ int bit_depth, color_type, interlace_type;
+ png_get_IHDR(_png_ptr, _info_ptr,
+ &width, &height,&bit_depth,&color_type,&interlace_type,
+- int_p_NULL, int_p_NULL);
++ (int *) NULL, (int *) NULL);
+ io_error_if(((png_uint_32)view.width()!=width || (png_uint_32)view.height()!= height),
+ "png_read_view: input view size does not match PNG file size");
+
+@@ -219,7 +219,7 @@
+ int bit_depth, color_type, interlace_type;
+ png_get_IHDR(_png_ptr, _info_ptr,
+ &width, &height,&bit_depth,&color_type,&interlace_type,
+- int_p_NULL, int_p_NULL);
++ (int *) NULL, (int *) NULL);
+ io_error_if(((png_uint_32)view.width()!=width || (png_uint_32)view.height()!= height),
+ "png_reader_color_convert::apply(): input view size does not match PNG file size");
+ switch (color_type) {
+@@ -308,7 +308,7 @@
+ io_error_if(!_png_ptr,"png_write_initialize: fail to call png_create_write_struct()");
+ _info_ptr = png_create_info_struct(_png_ptr);
+ if (!_info_ptr) {
+- png_destroy_write_struct(&_png_ptr,png_infopp_NULL);
++ png_destroy_write_struct(&_png_ptr,NULL);
+ io_error("png_write_initialize: fail to call png_create_info_struct()");
+ }
+ if (setjmp(png_jmpbuf(_png_ptr))) {
diff --git a/media-gfx/k3d/k3d-0.7.11.0-r1.ebuild b/media-gfx/k3d/k3d-0.7.11.0-r1.ebuild
new file mode 100644
index 000000000000..3973ccbcde34
--- /dev/null
+++ b/media-gfx/k3d/k3d-0.7.11.0-r1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils cmake-utils flag-o-matic
+
+MY_P="${PN}-source-${PV}"
+
+DESCRIPTION="A free 3D modeling, animation, and rendering system"
+HOMEPAGE="http://www.k-3d.org/"
+SRC_URI="mirror://sourceforge/k3d/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="3ds cuda gnome graphviz gts imagemagick jpeg nls openexr png python tiff truetype" #TODO cgal tbb
+
+RDEPEND="
+ dev-libs/boost[python]
+ >=dev-cpp/glibmm-2.6:2
+ >=dev-cpp/gtkmm-2.6:2.4
+ dev-libs/expat
+ >=dev-libs/libsigc++-2.2:2
+ media-libs/mesa
+ virtual/glu
+ virtual/opengl
+ >=x11-libs/gtkglext-1.0.6-r3
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXmu
+ x11-libs/libXt
+ 3ds? ( media-libs/lib3ds )
+ cuda? ( dev-util/nvidia-cuda-toolkit )
+ gnome? ( gnome-base/libgnome )
+ graphviz? ( media-gfx/graphviz )
+ gts? ( sci-libs/gts )
+ imagemagick? ( media-gfx/imagemagick )
+ jpeg? ( virtual/jpeg )
+ openexr? ( media-libs/openexr )
+ png? ( >=media-libs/libpng-1.2.43-r2 )
+ python? ( >=dev-lang/python-2.3 dev-python/cgkit )
+ tiff? ( media-libs/tiff )
+ truetype? ( >=media-libs/freetype-2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS="AUTHORS README"
+
+# k3d_use_enable()
+#
+# $1: use flag. ON|OFF is determined by this.
+# $2: part of cmake variable name which appended to the base variable name
+# that is -DK3D_BUILD_$2
+#
+# e.g.) k3d_use_enable gnome GNOME_MODULE #=> -DK3D_BUILD_GNOME_MODULE=ON
+#
+k3d_use_enable() {
+ echo "-DK3D_BUILD_$2=$(use $1 && echo ON || echo OFF)"
+}
+
+k3d_use_module() {
+ echo "-DK3D_BUILD_$2_MODULE=$(use $1 && echo ON || echo OFF)"
+}
+
+src_prepare() {
+ sed -i \
+ -e '/PKG_CHECK_MODULES/s:libpng12:libpng:' \
+ cmake/modules/K3DFindPNG.cmake || die
+
+ epatch "${FILESDIR}"/${P}-libpng14.patch
+
+ epatch "${FILESDIR}"/${P}-fix-potfiles.patch \
+ "${FILESDIR}"/${P}-cuda.patch \
+ "${FILESDIR}"/${P}-gcc44.patch \
+ "${FILESDIR}"/${P}-gtk-liststore-vs-treemodel.patch \
+ "${FILESDIR}"/${P}-gcc47.patch
+
+ [[ -f CMakeCache.txt ]] && rm CMakeCache.txt
+}
+
+src_configure() {
+ if [[ $(gcc-major-version) -lt 4 ]]; then
+ append-cxxflags -fno-stack-protector
+ fi
+
+ mycmakeargs="
+ -DK3D_BUILD_SVG_IO_MODULE=ON
+ -DK3D_BUILD_CGAL_MODULE=OFF
+ $(k3d_use_module 3ds 3DS_IO)
+ $(k3d_use_module cuda CUDA)
+ $(k3d_use_module gnome GNOME)
+ $(k3d_use_module graphviz GRAPHVIZ)
+ $(k3d_use_module gts GTS)
+ $(k3d_use_module gts GTS_IO)
+ $(k3d_use_module imagemagick IMAGEMAGICK_IO)
+ $(k3d_use_module jpeg JPEG_IO)
+ $(k3d_use_enable nls NLS)
+ $(k3d_use_module openexr OPENEXR_IO)
+ $(k3d_use_module png PNG_IO)
+ $(k3d_use_module python PYTHON)
+ $(k3d_use_module python PYUI)
+ $(k3d_use_module python NGUI_PYTHON_SHELL)
+ $(k3d_use_module tiff TIFF_IO)
+ $(k3d_use_module truetype FREETYPE2)"
+
+ cmake-utils_src_configure
+}
diff --git a/media-gfx/k3d/metadata.xml b/media-gfx/k3d/metadata.xml
new file mode 100644
index 000000000000..87f8ff1d8484
--- /dev/null
+++ b/media-gfx/k3d/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="3ds">Enable support for 3D Studio models</flag>
+ <flag name="cuda">Use nvidia cuda toolkit for speeding up
+ computations</flag>
+ <flag name="gts">Add Support for the GNU Triangulated Surface Library
+ <pkg>sci-libs/gts</pkg></flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">k3d</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/kcoloredit/Manifest b/media-gfx/kcoloredit/Manifest
new file mode 100644
index 000000000000..66f60667d6cb
--- /dev/null
+++ b/media-gfx/kcoloredit/Manifest
@@ -0,0 +1 @@
+DIST kcoloredit-2.0.0-kde4.4.0.tar.bz2 156462 SHA256 37712000c5c6990deb3a43e55b463704dc736a06450df9dafa1a030afcf79e6e SHA512 93a418e475bb8f494a90c409c60573d3d7936921b7dac5b1dd669d0934123b234df013c0b1a594f211c33200b62d3b8edef80a826f6f75da110ec8a1af99a140 WHIRLPOOL b812867b5c02eae2ef4fbbd2eb29f1dd83ae08c135faf96998e56b56192b632d2dc8992f5ced922d93ba0ad36e8d21b4eeec6239433f96fb69453fbb1777d0a8
diff --git a/media-gfx/kcoloredit/files/kcoloredit-2.0.0-underlinking.patch b/media-gfx/kcoloredit/files/kcoloredit-2.0.0-underlinking.patch
new file mode 100644
index 000000000000..588b673c5622
--- /dev/null
+++ b/media-gfx/kcoloredit/files/kcoloredit-2.0.0-underlinking.patch
@@ -0,0 +1,11 @@
+diff -ruN kcoloredit-2.0.0-kde4.4.0.orig/src/CMakeLists.txt kcoloredit-2.0.0-kde4.4.0/src/CMakeLists.txt
+--- kcoloredit-2.0.0-kde4.4.0.orig/src/CMakeLists.txt 2010-02-11 21:40:05.000000000 +0100
++++ kcoloredit-2.0.0-kde4.4.0/src/CMakeLists.txt 2011-08-11 22:25:09.747295562 +0200
+@@ -56,6 +56,6 @@
+
+ kde4_add_executable ( kcoloredit ${kcoloredit_SRCS} )
+
+-target_link_libraries ( kcoloredit ${KDE4_KFILE_LIBS} )
++target_link_libraries ( kcoloredit ${KDE4_KFILE_LIBS} ${X11_LIBRARIES} )
+
+ install (TARGETS kcoloredit ${INSTALL_TARGETS_DEFAULT_ARGS} )
diff --git a/media-gfx/kcoloredit/kcoloredit-2.0.0-r1.ebuild b/media-gfx/kcoloredit/kcoloredit-2.0.0-r1.ebuild
new file mode 100644
index 000000000000..65ab179ca0f7
--- /dev/null
+++ b/media-gfx/kcoloredit/kcoloredit-2.0.0-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="af ar be bg br ca ca@valencia cs cy da de el en_GB eo es et eu fa
+fi fr ga gl he hi hne hr hu is it ja km ku lt lv mai mk ms nb nds ne nl nn oc
+pa pl pt pt_BR ro ru se sk sl sv ta tg th tr uk vi xh zh_CN zh_HK zh_TW"
+KDE_DOC_DIRS="doc doc-translations/%lingua_${PN}"
+KDE_HANDBOOK="optional"
+inherit kde4-base
+
+KDE_VERSION=4.4.0
+MY_P=${P}-kde${KDE_VERSION}
+
+DESCRIPTION="Tool for editing color palettes"
+HOMEPAGE="http://www.kde.org/"
+SRC_URI="mirror://kde/stable/${KDE_VERSION}/src/extragear/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=( "${FILESDIR}/${P}-underlinking.patch" )
diff --git a/media-gfx/kcoloredit/metadata.xml b/media-gfx/kcoloredit/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/media-gfx/kcoloredit/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>kde</herd>
+</pkgmetadata>
diff --git a/media-gfx/kfax/Manifest b/media-gfx/kfax/Manifest
new file mode 100644
index 000000000000..cce433421c9d
--- /dev/null
+++ b/media-gfx/kfax/Manifest
@@ -0,0 +1 @@
+DIST kfax-3.3.6-kde4.4.0.tar.bz2 311468 SHA256 6897b25f72a49c9bc0f99bf03fced5023c6d76e8746b23fd7ddf73b8a16c6d1d
diff --git a/media-gfx/kfax/files/kfax-3.3.6-kde45.patch b/media-gfx/kfax/files/kfax-3.3.6-kde45.patch
new file mode 100644
index 000000000000..60bedf093eeb
--- /dev/null
+++ b/media-gfx/kfax/files/kfax-3.3.6-kde45.patch
@@ -0,0 +1,12 @@
+diff -ru kfax-3.3.6-kde4.4.0.orig/kfax.cpp kfax-3.3.6-kde4.4.0/kfax.cpp
+--- kfax-3.3.6-kde4.4.0.orig/kfax.cpp 2010-02-11 21:52:12.000000000 +0100
++++ kfax-3.3.6-kde4.4.0/kfax.cpp 2010-11-14 00:13:21.386377691 +0100
+@@ -829,7 +829,7 @@
+ statusbar->showMessage( i18n( "Saving..." ) );
+
+ KUrl source(thispage->pathname);
+- KIO::FileCopyJob *job = KIO::file_copy(source, dest,KIO::Overwrite | KIO::HideProgressInfo);
++ KIO::FileCopyJob *job = KIO::file_copy(source, dest, -1, KIO::Overwrite | KIO::HideProgressInfo);
+ bool ok = job->exec();
+ statusbar->clearMessage();
+
diff --git a/media-gfx/kfax/files/kfax-3.3.6-underlinking.patch b/media-gfx/kfax/files/kfax-3.3.6-underlinking.patch
new file mode 100644
index 000000000000..701308951b63
--- /dev/null
+++ b/media-gfx/kfax/files/kfax-3.3.6-underlinking.patch
@@ -0,0 +1,12 @@
+diff -ruN kfax-3.3.6-kde4.4.0.orig/CMakeLists.txt kfax-3.3.6-kde4.4.0/CMakeLists.txt
+--- kfax-3.3.6-kde4.4.0.orig/CMakeLists.txt 2010-02-11 21:59:47.000000000 +0100
++++ kfax-3.3.6-kde4.4.0/CMakeLists.txt 2011-08-11 21:33:15.262295828 +0200
+@@ -12,7 +12,7 @@
+
+ kde4_add_executable(kfax ${kfax_SRCS})
+
+-target_link_libraries(kfax ${KDE4_KIO_LIBS} ${QT_QT3SUPPORT_LIBRARY} )
++target_link_libraries(kfax ${KDE4_KIO_LIBS} ${QT_QT3SUPPORT_LIBRARY} ${X11_LIBRARIES})
+
+ install(TARGETS kfax ${INSTALL_TARGETS_DEFAULT_ARGS} )
+
diff --git a/media-gfx/kfax/kfax-3.3.6-r1.ebuild b/media-gfx/kfax/kfax-3.3.6-r1.ebuild
new file mode 100644
index 000000000000..1141b2629697
--- /dev/null
+++ b/media-gfx/kfax/kfax-3.3.6-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="af ar be bg br ca ca@valencia cs cy da de el en_GB eo es et eu fa
+fi fr ga gl he hi hne hr hu is it ja km ko lt lv mai mk ms nb nds ne nl nn oc
+pa pl pt pt_BR ro ru se sk sl sv ta tg th tr uk vi wa xh zh_CN zh_HK zh_TW"
+KDE_DOC_DIRS="doc-translations/%lingua_${PN}"
+KDE_HANDBOOK="optional"
+inherit kde4-base
+
+KDE_VERSION=4.4.0
+MY_P=${P}-kde${KDE_VERSION}
+
+DESCRIPTION="A fax file viewer"
+HOMEPAGE="http://www.kde.org/"
+SRC_URI="mirror://kde/stable/${KDE_VERSION}/src/extragear/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ x11-libs/libX11
+"
+DEPEND="${RDEPEND}
+ x11-proto/xproto
+"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}/${P}-kde45.patch"
+ "${FILESDIR}/${P}-underlinking.patch"
+)
diff --git a/media-gfx/kfax/metadata.xml b/media-gfx/kfax/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/media-gfx/kfax/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>kde</herd>
+</pkgmetadata>
diff --git a/media-gfx/kflickr/Manifest b/media-gfx/kflickr/Manifest
new file mode 100644
index 000000000000..50534d3b7883
--- /dev/null
+++ b/media-gfx/kflickr/Manifest
@@ -0,0 +1 @@
+DIST kflickr-0.9.1_p1.tar.bz2 192625 SHA256 8a5e63eb9fbc06b089f0aa8b309167f88b0c7283bb1bb1c7c6e5ca363db33929
diff --git a/media-gfx/kflickr/kflickr-0.9.1_p1.ebuild b/media-gfx/kflickr/kflickr-0.9.1_p1.ebuild
new file mode 100644
index 000000000000..6ab57deffa9f
--- /dev/null
+++ b/media-gfx/kflickr/kflickr-0.9.1_p1.ebuild
@@ -0,0 +1,18 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit kde4-base
+
+DESCRIPTION="KDE flickr.com image uploading program"
+HOMEPAGE="http://kflickr.sourceforge.net/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2 FDL-1.2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+DOCS=( AUTHORS README )
diff --git a/media-gfx/kflickr/metadata.xml b/media-gfx/kflickr/metadata.xml
new file mode 100644
index 000000000000..e5404a42a16b
--- /dev/null
+++ b/media-gfx/kflickr/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>kde</herd>
+<longdescription>KDE App for easy upload of your favourite photos to your Flickr.com account</longdescription>
+</pkgmetadata>
diff --git a/media-gfx/kgrab/Manifest b/media-gfx/kgrab/Manifest
new file mode 100644
index 000000000000..32387ebc559a
--- /dev/null
+++ b/media-gfx/kgrab/Manifest
@@ -0,0 +1 @@
+DIST kgrab-0.1.1-kde4.4.0.tar.bz2 99258 SHA256 babd40fabb53b629384db0a05055c517ddfeb5c37d63b6b6abfeae9f234bec50
diff --git a/media-gfx/kgrab/kgrab-0.1.1.ebuild b/media-gfx/kgrab/kgrab-0.1.1.ebuild
new file mode 100644
index 000000000000..c7be94f98c1e
--- /dev/null
+++ b/media-gfx/kgrab/kgrab-0.1.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="ar be bg ca cs da de el en_GB eo es et fi fr ga gl he hi hne hr hu
+is it ja km lt lv mai nb nds nl nn pa pl pt pt_BR ro se sk sv th tr uk vi zh_CN
+zh_TW"
+inherit kde4-base
+
+KDE_VERSION=4.4.0
+MY_P=${P}-kde${KDE_VERSION}
+
+DESCRIPTION="KDE screen grabbing utility"
+HOMEPAGE="http://www.kde.org/"
+SRC_URI="mirror://kde/stable/${KDE_VERSION}/src/extragear/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1 FDL-1.2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ x11-libs/libX11
+"
+DEPEND="${RDEPEND}
+ x11-proto/xproto
+"
+
+S=${WORKDIR}/${MY_P}
diff --git a/media-gfx/kgrab/metadata.xml b/media-gfx/kgrab/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/media-gfx/kgrab/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>kde</herd>
+</pkgmetadata>
diff --git a/media-gfx/kgraphviewer/Manifest b/media-gfx/kgraphviewer/Manifest
new file mode 100644
index 000000000000..75b695050de7
--- /dev/null
+++ b/media-gfx/kgraphviewer/Manifest
@@ -0,0 +1,3 @@
+DIST kgraphviewer-2.1.1.tar.gz 1409604 SHA256 5840e9dc0cc813c18c0b64aaf4346aeb95eefcc95d2c5068ff81a8f39c81f4b8 SHA512 b1d3b493351ebbc0875861e9ba764e7e8157a37bf1500cacd51fc15605f8ff202ecc07325c2fef89dfc92ccbdcf82c826962879e547cc32db01bf8af208827e8 WHIRLPOOL 7c5fea85bd499c9cd6535d6735c6ad99fba577b9d81a32bbe4166ddeb5328204e1328f459da2138434b874584c8f3f292082b95840732874781a625d67b44f77
+DIST kgraphviewer-2.1.1_p20140331.tar.xz 1000816 SHA256 71455b44e92c4d6107ccb50224ec8ff97c9546f77341763175d41de18fefab6a SHA512 945a90c60b75d741dea445ff38bf2ada7125be02c117b15b796277cc2e45d6c7eb963112bfacb84e5bd9331c9a9fe40c15b247e6294a53010dff10c666190fd4 WHIRLPOOL 9e6e963ac28819324a49342ab9559b296cecd246c9b13d26df0f68e129a57cfa893729096de19b93bc1a2973361165923e156ac9f3d3b38377dd9e67c1b7bf97
+DIST kgraphviewer-2.2.0.tar.xz 806100 SHA256 85ca4778d428e807a94d9587c5086f7ee8239780f373491bee46f49a46e945ef SHA512 2b3ba671256e4a7d30915dd5d498e2e760729c0783c5c609c50e48b94e985fff86c4cbfb91dd571ab899e4b0db1c4af3604b97c0954db1acde2780b48803c7f7 WHIRLPOOL b9a2b9db63edaaeef308441736db4fdd46cd1a3f70acff3c35a6fd1404394bd5bc3d59f1ed20e57fccc966e5b8562fbd671a169b975e89fbacdd39e833838660
diff --git a/media-gfx/kgraphviewer/files/kgraphviewer-2.1.1-boost-1.50.patch b/media-gfx/kgraphviewer/files/kgraphviewer-2.1.1-boost-1.50.patch
new file mode 100644
index 000000000000..46c9490629cf
--- /dev/null
+++ b/media-gfx/kgraphviewer/files/kgraphviewer-2.1.1-boost-1.50.patch
@@ -0,0 +1,32 @@
+From 470bf0a4774a600dbd958b781342589a337d8898 Mon Sep 17 00:00:00 2001
+From: Michael Palimaka <kensington@gentoo.org>
+Date: Wed, 11 Jul 2012 01:58:00 +1000
+Subject: [PATCH] Fix build with boost-1.50
+
+REVIEW: 105494
+---
+ src/part/DotGraphParsingHelper.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/part/DotGraphParsingHelper.cpp b/src/part/DotGraphParsingHelper.cpp
+index 69cac49..7d46837 100644
+--- a/src/part/DotGraphParsingHelper.cpp
++++ b/src/part/DotGraphParsingHelper.cpp
+@@ -26,10 +26,10 @@
+ #include "graphedge.h"
+
+ #include <boost/throw_exception.hpp>
+-#include <boost/spirit/core.hpp>
+-#include <boost/spirit/utility/distinct.hpp>
+-#include <boost/spirit/utility/loops.hpp>
+-#include <boost/spirit/utility/confix.hpp>
++#include <boost/spirit/include/classic_core.hpp>
++#include <boost/spirit/include/classic_distinct.hpp>
++#include <boost/spirit/include/classic_loops.hpp>
++#include <boost/spirit/include/classic_confix.hpp>
+
+
+ #include <iostream>
+--
+1.7.11.1
+
diff --git a/media-gfx/kgraphviewer/kgraphviewer-2.1.1.ebuild b/media-gfx/kgraphviewer/kgraphviewer-2.1.1.ebuild
new file mode 100644
index 000000000000..007497754da6
--- /dev/null
+++ b/media-gfx/kgraphviewer/kgraphviewer-2.1.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="ar be bg ca ca@valencia cs da de el en_GB eo es et eu fr ga gl hi hne
+hr is it ja km ku lt mai nb nds nl nn pa pl pt pt_BR ro ru se sk sv th tr uk vi
+zh_CN zh_TW"
+KDE_HANDBOOK="optional"
+inherit kde4-base
+
+DESCRIPTION="KDE graphviz dot graph file viewer"
+HOMEPAGE="http://www.kde.org/applications/graphics/kgraphviewer/
+http://extragear.kde.org/apps/kgraphviewer/"
+SRC_URI="https://api.opensuse.org/public/source/home:milianw:kdeapps/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 FDL-1.2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ media-gfx/graphviz
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.38
+"
+
+PATCHES=( "${FILESDIR}/${P}-boost-1.50.patch" )
diff --git a/media-gfx/kgraphviewer/kgraphviewer-2.1.1_p20140331.ebuild b/media-gfx/kgraphviewer/kgraphviewer-2.1.1_p20140331.ebuild
new file mode 100644
index 000000000000..3c3100b9c411
--- /dev/null
+++ b/media-gfx/kgraphviewer/kgraphviewer-2.1.1_p20140331.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="ar be bg bs ca ca@valencia cs da de el en_GB eo es et eu fi fr ga
+gl hi hne hr hu is it ja km ku lt mai mr nb nds nl nn pa pl pt pt_BR ro ru se sk sv
+th tr ug uk vi zh_CN zh_TW"
+KDE_HANDBOOK="optional"
+inherit kde4-base
+
+DESCRIPTION="KDE graphviz dot graph file viewer"
+HOMEPAGE="http://www.kde.org/applications/graphics/kgraphviewer/
+http://extragear.kde.org/apps/kgraphviewer/"
+SRC_URI="http://dev.gentoo.org/~kensington/distfiles/${P}.tar.xz"
+
+LICENSE="GPL-2 FDL-1.2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ >=media-gfx/graphviz-2.30
+"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.38
+"
diff --git a/media-gfx/kgraphviewer/kgraphviewer-2.2.0.ebuild b/media-gfx/kgraphviewer/kgraphviewer-2.2.0.ebuild
new file mode 100644
index 000000000000..345a8a19d9ee
--- /dev/null
+++ b/media-gfx/kgraphviewer/kgraphviewer-2.2.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="bs ca ca@valencia cs da de el en_GB es et eu fi fr gl hu it km nb
+nds nl pl pt pt_BR ro ru sk sv tr uk zh_CN zh_TW"
+KDE_HANDBOOK="optional"
+inherit kde4-base
+
+DESCRIPTION="KDE graphviz dot graph file viewer"
+HOMEPAGE="http://www.kde.org/applications/graphics/kgraphviewer/
+http://extragear.kde.org/apps/kgraphviewer/"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="GPL-2 FDL-1.2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND="
+ >=media-gfx/graphviz-2.30
+"
+DEPEND="${RDEPEND}
+ >=dev-libs/boost-1.38
+"
diff --git a/media-gfx/kgraphviewer/metadata.xml b/media-gfx/kgraphviewer/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/media-gfx/kgraphviewer/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>kde</herd>
+</pkgmetadata>
diff --git a/media-gfx/kiconedit/Manifest b/media-gfx/kiconedit/Manifest
new file mode 100644
index 000000000000..f31932c7473d
--- /dev/null
+++ b/media-gfx/kiconedit/Manifest
@@ -0,0 +1 @@
+DIST kiconedit-4.4.0.tar.bz2 374284 SHA256 2bc42efa3c89bdd14f996ccfedcc11c97e907bb7c97657b93e19e52f464ee50c
diff --git a/media-gfx/kiconedit/kiconedit-4.4.0.ebuild b/media-gfx/kiconedit/kiconedit-4.4.0.ebuild
new file mode 100644
index 000000000000..ae93eba210ef
--- /dev/null
+++ b/media-gfx/kiconedit/kiconedit-4.4.0.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="af ar be bg br ca ca@valencia cs cy da de el en_GB eo es et eu fa
+fi fr ga gl he hi hne hr hu is it ja km ko lt lv mai mk ms nb nds ne nl nn oc pa
+pl pt pt_BR ro ru se sk sl sv ta tg th tr uk vi wa xh zh_CN zh_HK zh_TW"
+KDE_DOC_DIRS="doc doc-translations/%lingua_${PN}"
+KDE_HANDBOOK="optional"
+inherit kde4-base
+
+DESCRIPTION="KDE Icon Editor"
+HOMEPAGE="http://www.kde.org/"
+SRC_URI="mirror://kde/stable/${PV}/src/extragear/${P}.tar.bz2"
+
+LICENSE="GPL-2 FDL-1.2"
+KEYWORDS="~amd64 ~x86"
+SLOT="4"
+IUSE="debug"
diff --git a/media-gfx/kiconedit/metadata.xml b/media-gfx/kiconedit/metadata.xml
new file mode 100644
index 000000000000..6222792776c2
--- /dev/null
+++ b/media-gfx/kiconedit/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>kde</herd>
+</pkgmetadata>
+
diff --git a/media-gfx/kphotoalbum/Manifest b/media-gfx/kphotoalbum/Manifest
new file mode 100644
index 000000000000..d2209e1b3736
--- /dev/null
+++ b/media-gfx/kphotoalbum/Manifest
@@ -0,0 +1,2 @@
+DIST kphotoalbum-4.5.tar.xz 9415984 SHA256 0cdd4e02e9e4f840550a20cc8dca8a017777e4a55db19f0f8b15e903d2c342cd SHA512 57fe89ec55098312ed53b3ba934d42b84de6e5efcb7e30860deaa0162971ba9e2e9eb573268e2918492c79c2b739b5cf7e16bcb0c9a619c189b3b7ccadb9642d WHIRLPOOL 77f2a4c40b84c5e3406f16757d631aaf8968129d99506bed7528cc27216d34980aba246714629a1969a6625a72291596cf115f275d6fdb39ba4bd84cf93d74fe
+DIST kphotoalbum-4.6.2.tar.xz 9503920 SHA256 54c256a1943a632f7ff68126dc985e7f434e7b18c762ae40a49181b9d85f34fb SHA512 437fb05a3e2f9f6f2ca97ba3ee17a125185ffe1603f3a37ad1b1bf837c49ee983e7ccf6858ad7243a7cae00eb2175f5a280bfd31cd5ed109ca46fa1ae8170a57 WHIRLPOOL aaab45d3d5f2115206d98cd7db4953df21c3189ffc8f57f3291321f744cdf69fb138ec08f4af0b6b3f2db2b2281e8f468259cf0846784528e6fba64906b93459
diff --git a/media-gfx/kphotoalbum/kphotoalbum-4.5.ebuild b/media-gfx/kphotoalbum/kphotoalbum-4.5.ebuild
new file mode 100644
index 000000000000..d0b7ba0d320c
--- /dev/null
+++ b/media-gfx/kphotoalbum/kphotoalbum-4.5.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="ar be bg bs ca ca@valencia cs da de el en_GB eo es et eu fi fr ga
+gl hi hne hr hu is it ja km lt mai mr nb nds nl nn pa pl pt pt_BR ro ru se sk
+sv tr ug uk vi zh_CN zh_TW"
+KDE_HANDBOOK="optional"
+inherit kde4-base
+
+DESCRIPTION="KDE Photo Album is a tool for indexing, searching, and viewing images"
+HOMEPAGE="http://www.kphotoalbum.org/"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="GPL-2 FDL-1.2"
+SLOT="4"
+KEYWORDS="amd64 x86"
+IUSE="debug +exif +geolocation +kipi +raw"
+
+DEPEND="
+ >=dev-qt/qtsql-4.4:4[sqlite]
+ media-libs/phonon[qt4]
+ virtual/jpeg:0
+ exif? ( >=media-gfx/exiv2-0.17 )
+ geolocation? ( $(add_kdeapps_dep marble) )
+ kipi? ( $(add_kdeapps_dep libkipi '' 4.9.58) )
+ raw? ( $(add_kdeapps_dep libkdcraw '' 4.9.58) )
+"
+RDEPEND="${DEPEND}
+ media-video/mplayer
+"
+
+DOCS=( ChangeLog README )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with exif Exiv2)
+ $(cmake-utils_use_with geolocation Marble)
+ $(cmake-utils_use_with kipi)
+ $(cmake-utils_use_with raw Kdcraw)
+ )
+
+ kde4-base_src_configure
+}
diff --git a/media-gfx/kphotoalbum/kphotoalbum-4.6.2.ebuild b/media-gfx/kphotoalbum/kphotoalbum-4.6.2.ebuild
new file mode 100644
index 000000000000..d152debe26bf
--- /dev/null
+++ b/media-gfx/kphotoalbum/kphotoalbum-4.6.2.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="ar be bg bs ca ca@valencia cs da de el en_GB eo es et eu fi fr ga
+gl hi hne hr hu is it ja km lt mai mr nb nds nl nn pa pl pt pt_BR ro ru se sk
+sv tr ug uk vi zh_CN zh_TW"
+KDE_HANDBOOK="optional"
+inherit kde4-base
+
+DESCRIPTION="KDE Photo Album is a tool for indexing, searching, and viewing images"
+HOMEPAGE="http://www.kphotoalbum.org/"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz"
+
+LICENSE="GPL-2 FDL-1.2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +exif +face +geolocation +kipi +map +raw"
+
+REQUIRED_USE="map? ( exif )"
+
+COMMON_DEPEND="
+ >=dev-qt/qtsql-4.4:4[sqlite]
+ media-libs/phonon[qt4]
+ virtual/jpeg:0
+ exif? ( >=media-gfx/exiv2-0.17 )
+ face? ( >=media-libs/libkface-4.7.0 )
+ geolocation? ( $(add_kdeapps_dep marble) )
+ kipi? ( $(add_kdeapps_dep libkipi '' 4.9.58) )
+ map? ( >=media-libs/libkgeomap-4.7.0 )
+ raw? ( $(add_kdeapps_dep libkdcraw '' 4.9.58) )
+"
+DEPEND="${COMMON_DEPEND}
+ sys-devel/gettext
+"
+RDEPEND="${COMMON_DEPEND}
+ media-video/mplayer
+ kipi? ( >=media-plugins/kipi-plugins-4.7.0 )
+"
+
+DOCS=( ChangeLog README )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_with exif Exiv2)
+ $(cmake-utils_use_with face Kface)
+ $(cmake-utils_use_with geolocation Marble)
+ $(cmake-utils_use_with kipi)
+ $(cmake-utils_use_with map KGeoMap)
+ $(cmake-utils_use_with raw Kdcraw)
+ )
+
+ kde4-base_src_configure
+}
diff --git a/media-gfx/kphotoalbum/metadata.xml b/media-gfx/kphotoalbum/metadata.xml
new file mode 100644
index 000000000000..9c48c8d664a7
--- /dev/null
+++ b/media-gfx/kphotoalbum/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>kde</herd>
+ <use>
+ <flag name="face">Enable face detection and recognition using <pkg>media-libs/libkface</pkg></flag>
+ <flag name="geolocation">Add support for <pkg>kde-apps/marble</pkg></flag>
+ <flag name="kipi">Support for the KDE Image Plugin Interface</flag>
+ <flag name="map">Enable map display support using <pkg>media-libs/libkgeomap</pkg></flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/kpovmodeler/Manifest b/media-gfx/kpovmodeler/Manifest
new file mode 100644
index 000000000000..a728b9c347ef
--- /dev/null
+++ b/media-gfx/kpovmodeler/Manifest
@@ -0,0 +1 @@
+DIST kpovmodeler-1.1.3-kde4.1.1.tar.bz2 1875515 SHA256 3cef42828234500452275542b84c9c077a12ec8640df68c0952f7706fde13867 SHA512 8cfdde653ec93bc044d049ecf61b4d106d7415874668f6f56e9f59fb88f023e78717592e5e3a0aff071d0d4a84ac51f8457bedb5b1fa48e92f06c6d1d08385f6 WHIRLPOOL cfa950f200bda32eb6d42e0d200fd40afd4d8c36548f97929a04f383e324d0f6c6ff84e818d12ebfd8f88c0522f5058030e6ca3912e955a3dc3e0ab23e70e03f
diff --git a/media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-desktop.patch b/media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-desktop.patch
new file mode 100644
index 000000000000..04013e22dad0
--- /dev/null
+++ b/media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-desktop.patch
@@ -0,0 +1,17 @@
+Remove deprecated/useless entries causing validation warnings.
+
+--- kpovmodeler.desktop
++++ kpovmodeler.desktop
+@@ -49,12 +49,8 @@
+ GenericName[tr]=Povray Modelleyici
+ GenericName[x-test]=xxPovray Modelerxx
+ GenericName[zh_HK]=Povray 建模器
+-Path=
+ ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart,Browser/View,KPovModeler/Document
+-SwallowExec=
+-SwallowTitle=
+ Terminal=false
+ Type=Application
+ X-KDE-Library=libkpovmodelerpart
+ Categories=Qt;KDE;Graphics;
+-Encoding=UTF-8
diff --git a/media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-freetype-include.patch b/media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-freetype-include.patch
new file mode 100644
index 000000000000..9939780a4250
--- /dev/null
+++ b/media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-freetype-include.patch
@@ -0,0 +1,15 @@
+Use the correct freetype include directory to avoid a build failure.
+
+Gentoo bug #467998.
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -11,7 +11,7 @@
+
+ configure_file(config-kpovmodeler.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kpovmodeler.h )
+
+-include_directories(${FREETYPE_INCLUDE_DIR})
++include_directories(${FREETYPE_INCLUDE_DIRS})
+ add_definitions (-DQT3_SUPPORT -DQT3_SUPPORT_WARNINGS)
+
+ ########### next target ###############
diff --git a/media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-underlinking.patch b/media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-underlinking.patch
new file mode 100644
index 000000000000..9f70e5c06b82
--- /dev/null
+++ b/media-gfx/kpovmodeler/files/kpovmodeler-1.1.3-underlinking.patch
@@ -0,0 +1,12 @@
+diff -ruN kpovmodeler-1.1.3-kde4.1.1.orig/CMakeLists.txt kpovmodeler-1.1.3-kde4.1.1/CMakeLists.txt
+--- kpovmodeler-1.1.3-kde4.1.1.orig/CMakeLists.txt 2008-08-28 20:05:05.000000000 +0200
++++ kpovmodeler-1.1.3-kde4.1.1/CMakeLists.txt 2011-08-06 22:37:50.471609939 +0200
+@@ -306,7 +306,7 @@
+
+ kde4_add_executable(kpovmodeler ${kpovmodeler_SRCS})
+
+-target_link_libraries(kpovmodeler ${KDE4_KDECORE_LIBS} lkpovmodeler )
++target_link_libraries(kpovmodeler ${QT_QTGUI_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} lkpovmodeler )
+
+ install(TARGETS kpovmodeler ${INSTALL_TARGETS_DEFAULT_ARGS} )
+
diff --git a/media-gfx/kpovmodeler/kpovmodeler-1.1.3-r1.ebuild b/media-gfx/kpovmodeler/kpovmodeler-1.1.3-r1.ebuild
new file mode 100644
index 000000000000..8fc9b843615f
--- /dev/null
+++ b/media-gfx/kpovmodeler/kpovmodeler-1.1.3-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+KDE_LINGUAS="af ar be bg br ca cs cy da de el en_GB es et eu fa fi fr ga gl he
+hi hr hu is it ja km lt mk ms nb nds ne nl nn oc pl pt pt_BR ro ru se sk sl sv
+ta tg tr uk vi xh zh_CN zh_TW"
+OPENGL_REQUIRED="always"
+inherit kde4-base
+
+MY_P=${P}-kde4.1.1
+
+DESCRIPTION="A modeling and composition program for creating POV-Ray(TM) scenes"
+HOMEPAGE="http://www.kpovmodeler.org/"
+SRC_URI="http://www.kpovmodeler.org/files/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1 FDL-1.2"
+SLOT="4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+DEPEND="media-libs/freetype
+ virtual/glu
+ x11-libs/libX11
+"
+RDEPEND="${DEPEND}
+ media-gfx/povray
+"
+
+S=${WORKDIR}/${MY_P}
+
+DOCS=( AUTHORS BUGS ChangeLog README StyleConvention TODO )
+
+PATCHES=(
+ "${FILESDIR}/${P}-desktop.patch"
+ "${FILESDIR}/${P}-freetype-include.patch"
+ "${FILESDIR}/${P}-underlinking.patch"
+)
diff --git a/media-gfx/kpovmodeler/metadata.xml b/media-gfx/kpovmodeler/metadata.xml
new file mode 100644
index 000000000000..7604ac25a82a
--- /dev/null
+++ b/media-gfx/kpovmodeler/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+<herd>kde</herd>
+</pkgmetadata>
diff --git a/media-gfx/kuickshow/Manifest b/media-gfx/kuickshow/Manifest
new file mode 100644
index 000000000000..ce449bb66362
--- /dev/null
+++ b/media-gfx/kuickshow/Manifest
@@ -0,0 +1 @@
+DIST kuickshow-0.9.1-kde4.4.0.tar.bz2 915108 SHA256 fa849380e8c5b628551510f6bf3d6c59e7d68bf437f80d0414ef2b73c826a40e SHA512 394b95c6b7c3b655a96729559271cd837ff5995aefc7e229f3bc7905f7e64f3fb05d34a67c9a9ba584c1cdbc459b7349d0e134a16afe9e0505b5a494e85ab87e WHIRLPOOL 3b2766833d86acd861d424054e73124287d3c2ceddeff0c9b5165d2aacae9cccb2e9c51d9092bf70bc4f3c979855ae3ee34c1e38e0928dc364b37045c59d773f
diff --git a/media-gfx/kuickshow/kuickshow-0.9.1-r2.ebuild b/media-gfx/kuickshow/kuickshow-0.9.1-r2.ebuild
new file mode 100644
index 000000000000..11c6d95abb83
--- /dev/null
+++ b/media-gfx/kuickshow/kuickshow-0.9.1-r2.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_LINGUAS="af ar be bg bn br ca ca@valencia cs cy da de el en_GB eo es et eu
+fa fi fr ga gl he hi hne hr hu is it ja km lt lv mai mk ms nb nds ne nl nn oc
+pa pl pt pt_BR ro ru se sk sl sv ta tg th tr uk uz uz@cyrillic vi xh zh_CN
+zh_TW"
+KDE_DOC_DIRS="doc doc-translations/%lingua_${PN}"
+inherit kde4-base
+
+KDE_VERSION=4.4.0
+MY_P=${P}-kde${KDE_VERSION}
+
+DESCRIPTION="KDE program to view images"
+HOMEPAGE="http://userbase.kde.org/KuickShow"
+SRC_URI="mirror://kde/stable/${KDE_VERSION}/src/extragear/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="debug +handbook"
+
+DEPEND="media-libs/imlib
+ !${CATEGORY}/${PN}:0"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS BUGS ChangeLog README TODO )
+
+S=${WORKDIR}/${MY_P}
diff --git a/media-gfx/kuickshow/metadata.xml b/media-gfx/kuickshow/metadata.xml
new file mode 100644
index 000000000000..8d1e86a9cefb
--- /dev/null
+++ b/media-gfx/kuickshow/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>kde</herd>
+</pkgmetadata>
diff --git a/media-gfx/kxstitch/Manifest b/media-gfx/kxstitch/Manifest
new file mode 100644
index 000000000000..0c19aefc525c
--- /dev/null
+++ b/media-gfx/kxstitch/Manifest
@@ -0,0 +1 @@
+DIST kxstitch-1.2.0.tar.bz2 1995295 SHA256 12946cdba1278bc68d3ca11c0db1963dbe3363d0f6aa814cb9e8d6e49f5132da SHA512 bd1bf32cb1cf188e03c17ddc3f3aa9e19e5551f0f3c58afa7951975b9a149f164b6d19f6c9011770c8d40724b9056c8d42202a4bd8712dda995439159c84c5f5 WHIRLPOOL b19a595f4a1fe08707d8ce122beae169ed8607ca81286d0d63359ff79aef10f446f3b23a3fb9f40dfaa455f879011f78138c516704e961c3901c76eb88b56992
diff --git a/media-gfx/kxstitch/kxstitch-1.2.0.ebuild b/media-gfx/kxstitch/kxstitch-1.2.0.ebuild
new file mode 100644
index 000000000000..eabe27688ec8
--- /dev/null
+++ b/media-gfx/kxstitch/kxstitch-1.2.0.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_DOC_DIRS="doc-translations/%lingua_${PN}"
+KDE_HANDBOOK="optional"
+KDE_LINGUAS="ca cs da de en_GB es et fr hu it lt nl pl pt pt_BR sk sv uk"
+inherit kde4-base
+
+DESCRIPTION="Program to create cross stitch patterns"
+HOMEPAGE="http://userbase.kde.org/KXStitch"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="~amd64"
+IUSE="debug"
+
+RDEPEND="
+ media-gfx/imagemagick[cxx]
+ x11-libs/libX11
+"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+"
diff --git a/media-gfx/kxstitch/metadata.xml b/media-gfx/kxstitch/metadata.xml
new file mode 100644
index 000000000000..a23f444b67d6
--- /dev/null
+++ b/media-gfx/kxstitch/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>kde</herd>
+</pkgmetadata>
diff --git a/media-gfx/librecad/Manifest b/media-gfx/librecad/Manifest
new file mode 100644
index 000000000000..4ad4b45ac4a3
--- /dev/null
+++ b/media-gfx/librecad/Manifest
@@ -0,0 +1,4 @@
+DIST librecad-2.0.3.zip 16590256 SHA256 4221348541c46c6e9698c1fa3471a14a81376e022a009a164a7f0d0035da4643 SHA512 c40952ae967d83197645bef65dac6e050ddeacf536401b2b99cd18d753462af086ac2a410c6746a92c094ad76fd9177a900c21531ed7b7fcdf1e4b0f7f070e00 WHIRLPOOL c2e1d33b17b7a47ffd9b3795ad292b22cb1225aceacf052494745243630b0537e21701930b9433ea235c462d65581efc2b5ccda3b37712d4ab639ab9bcc6a97d
+DIST librecad-2.0.4.zip 16658203 SHA256 3a3252ec978cf6001f9e7686955d45f413359ed2963ae01f113d6839720e3e19 SHA512 bd68738167a121e63c9d7738155b6b74e5faee910839b70a49619c62f1f8b3c1c3eab43cf8d89a538b1952c7f327dbc284a0a246d45597dae64e332ddb8fe077 WHIRLPOOL 6d201862426d52f3a89473add5ba8172f4f5b3dd82e89609eb98d5f1e013c9ef64a66d18141ad2c9d67a6354eec4637c0cdf3450cfcedae89237d79484aae96d
+DIST librecad-2.0.5.zip 16743868 SHA256 00fba891ccf90328f122c081e9a55f5cf6a908932b92b4414f4ee3b186b48f87 SHA512 afacc5dd833d8a9daba0e9a93f9578f066ada6dff3de4676d8604bbfbce6fba5615c75f498b9ee242b3a7bfcb2746b97a3fbd6b97526990b4ad39757344e3cc5 WHIRLPOOL 5b79ebecec469083a5b13b3e71b76fd116baf935d09c04e979efd583ec58fd17a3bef9e707b3603bba3256527a845f9be4a10271daeaec3fee09ce7fe82fca36
+DIST librecad-2.0.6.zip 17401781 SHA256 09a58f9a4b578eb7381f299414344f82c6e320156c20b3ff1e9e1ae5f2770a30 SHA512 0f8452674659adc943d87aa3d70763682b3e5e7c82530afee98d50dfa4977e8f2e0efcd224087eed68a51727a234d58b8740b00ed0941b6af78dc2938ed15241 WHIRLPOOL 6bb40ae33f28b5ad6adfc91334741d3fe50c6a7f42b0e253554bfacd8f4e7152a495b9e62b8760f28de8c69c77aed73750e094db96d2757fad7cd58ed3200897
diff --git a/media-gfx/librecad/files/gcc_cpp0x.patch b/media-gfx/librecad/files/gcc_cpp0x.patch
new file mode 100644
index 000000000000..1d145a5ba65e
--- /dev/null
+++ b/media-gfx/librecad/files/gcc_cpp0x.patch
@@ -0,0 +1,13 @@
+--- LibreCAD-2.0.2/common.pri 2014-01-09 18:31:10.000000000 +0000
++++ LibreCAD-2.0.2/common.pri.gcc46 2014-01-24 09:27:48.886665241 +0000
+@@ -59,8 +59,8 @@
+
+ # c++11 is now obligatory for LibreCAD
+ message(We will be using CPP11 features)
+-QMAKE_CXXFLAGS_DEBUG += -std=c++11 -g
+-QMAKE_CXXFLAGS += -std=c++11 -g
++QMAKE_CXXFLAGS_DEBUG += -std=c++0x -g
++QMAKE_CXXFLAGS += -std=c++0x -g
+
+ # svg support
+ QT += svg
diff --git a/media-gfx/librecad/librecad-2.0.3.ebuild b/media-gfx/librecad/librecad-2.0.3.ebuild
new file mode 100644
index 000000000000..85a61fbbf52e
--- /dev/null
+++ b/media-gfx/librecad/librecad-2.0.3.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-r2
+
+DESCRIPTION="Generic 2D CAD program"
+HOMEPAGE="http://www.librecad.org/"
+SRC_URI="https://github.com/LibreCAD/LibreCAD/archive/${PV/_/}.zip -> ${P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug doc tools"
+
+DEPEND="
+ dev-cpp/muParser
+ dev-qt/qtgui:4
+ dev-qt/qthelp:4
+ dev-qt/qtsvg:4
+ dev-libs/boost
+ media-libs/freetype
+ "
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/LibreCAD-${PV}"
+
+src_install() {
+ dobin unix/librecad
+ use tools && dobin unix/ttf2lff
+ insinto /usr/share/${PN}
+ doins -r unix/resources/*
+ use doc && dohtml -r librecad/support/doc/*
+ doicon librecad/res/main/${PN}.png
+ make_desktop_entry ${PN} LibreCAD ${PN} Graphics
+}
diff --git a/media-gfx/librecad/librecad-2.0.4.ebuild b/media-gfx/librecad/librecad-2.0.4.ebuild
new file mode 100644
index 000000000000..55dcce597545
--- /dev/null
+++ b/media-gfx/librecad/librecad-2.0.4.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-r2
+
+DESCRIPTION="Generic 2D CAD program"
+HOMEPAGE="http://www.librecad.org/"
+SRC_URI="https://github.com/LibreCAD/LibreCAD/archive/${PV/_/}.zip -> ${P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc tools"
+
+DEPEND="
+ dev-cpp/muParser
+ dev-qt/qtgui:4
+ dev-qt/qthelp:4
+ dev-qt/qtsvg:4
+ dev-libs/boost
+ media-libs/freetype
+ "
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/LibreCAD-${PV}"
+
+src_install() {
+ dobin unix/librecad
+ use tools && dobin unix/ttf2lff
+ insinto /usr/share/${PN}
+ doins -r unix/resources/*
+ use doc && dohtml -r librecad/support/doc/*
+ doicon librecad/res/main/${PN}.png
+ make_desktop_entry ${PN} LibreCAD ${PN} Graphics
+}
diff --git a/media-gfx/librecad/librecad-2.0.5.ebuild b/media-gfx/librecad/librecad-2.0.5.ebuild
new file mode 100644
index 000000000000..55dcce597545
--- /dev/null
+++ b/media-gfx/librecad/librecad-2.0.5.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-r2
+
+DESCRIPTION="Generic 2D CAD program"
+HOMEPAGE="http://www.librecad.org/"
+SRC_URI="https://github.com/LibreCAD/LibreCAD/archive/${PV/_/}.zip -> ${P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc tools"
+
+DEPEND="
+ dev-cpp/muParser
+ dev-qt/qtgui:4
+ dev-qt/qthelp:4
+ dev-qt/qtsvg:4
+ dev-libs/boost
+ media-libs/freetype
+ "
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/LibreCAD-${PV}"
+
+src_install() {
+ dobin unix/librecad
+ use tools && dobin unix/ttf2lff
+ insinto /usr/share/${PN}
+ doins -r unix/resources/*
+ use doc && dohtml -r librecad/support/doc/*
+ doicon librecad/res/main/${PN}.png
+ make_desktop_entry ${PN} LibreCAD ${PN} Graphics
+}
diff --git a/media-gfx/librecad/librecad-2.0.6.ebuild b/media-gfx/librecad/librecad-2.0.6.ebuild
new file mode 100644
index 000000000000..55dcce597545
--- /dev/null
+++ b/media-gfx/librecad/librecad-2.0.6.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils qt4-r2
+
+DESCRIPTION="Generic 2D CAD program"
+HOMEPAGE="http://www.librecad.org/"
+SRC_URI="https://github.com/LibreCAD/LibreCAD/archive/${PV/_/}.zip -> ${P}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc tools"
+
+DEPEND="
+ dev-cpp/muParser
+ dev-qt/qtgui:4
+ dev-qt/qthelp:4
+ dev-qt/qtsvg:4
+ dev-libs/boost
+ media-libs/freetype
+ "
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/LibreCAD-${PV}"
+
+src_install() {
+ dobin unix/librecad
+ use tools && dobin unix/ttf2lff
+ insinto /usr/share/${PN}
+ doins -r unix/resources/*
+ use doc && dohtml -r librecad/support/doc/*
+ doicon librecad/res/main/${PN}.png
+ make_desktop_entry ${PN} LibreCAD ${PN} Graphics
+}
diff --git a/media-gfx/librecad/metadata.xml b/media-gfx/librecad/metadata.xml
new file mode 100644
index 000000000000..ab2b883492bc
--- /dev/null
+++ b/media-gfx/librecad/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>slis@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="tools">Build additional tool programs</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">LibreCAD/LibreCAD</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/llgal/Manifest b/media-gfx/llgal/Manifest
new file mode 100644
index 000000000000..ce4a99a9a53d
--- /dev/null
+++ b/media-gfx/llgal/Manifest
@@ -0,0 +1 @@
+DIST llgal-0.13.17.tar.bz2 81365 SHA256 86c8a35ec3387ecfb69d3695611f384ce6cf4189ded02668c59c9e35e00390ce SHA512 2b100053a804985e7f59674e6a0886bffe5231cf3735a8dbbf7c8db56285a5a4ca88880299aac25d5cecb6a4f0cc024dc87fdf084eb281f7cb578f0d7cba5293 WHIRLPOOL 216b7dc933f72a0419579b71884f5e9e7084e0f5e1427d5d66b432adad108eb648c0d4a61c62d8ab5dbba0aa7ca0b3b4b3df4814f99aaec0271276c32b62f109
diff --git a/media-gfx/llgal/llgal-0.13.17-r1.ebuild b/media-gfx/llgal/llgal-0.13.17-r1.ebuild
new file mode 100644
index 000000000000..a36320d7a6c5
--- /dev/null
+++ b/media-gfx/llgal/llgal-0.13.17-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit perl-module
+
+DESCRIPTION="Command-line static web gallery generator"
+HOMEPAGE="http://home.gna.org/llgal"
+SRC_URI="http://download.gna.org/llgal/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+# Package warrants IUSE doc and possibly examples
+IUSE="exif"
+
+LINS="de en it fr"
+for i in ${LINS}; do
+ IUSE="${IUSE} linguas_${i}"
+done
+
+RDEPEND="media-gfx/imagemagick
+ dev-perl/ImageSize
+ dev-perl/URI
+ dev-perl/Locale-gettext
+ exif? ( media-libs/exiftool )"
+
+src_compile() {
+ emake PREFIX=/usr SYSCONFDIR=/etc MANDIR=/usr/share/man PERL_INSTALLDIRS=vendor
+ mv doc/llgalrc . || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" LOCALES="${LINGUAS}" PREFIX=/usr SYSCONFDIR=/etc \
+ PERL_INSTALLDIRS=vendor MANDIR=/usr/share/man \
+ install install-doc install-man DOCDIR=/usr/share/doc/${PF}/html/
+ perl_delete_localpod
+ dodoc README llgalrc llgalrc.5
+}
diff --git a/media-gfx/llgal/metadata.xml b/media-gfx/llgal/metadata.xml
new file mode 100644
index 000000000000..83d1a5939755
--- /dev/null
+++ b/media-gfx/llgal/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+<maintainer>
+ <email>aballier@gentoo.org</email>
+ <name>Alexis Ballier</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/luminance-hdr/Manifest b/media-gfx/luminance-hdr/Manifest
new file mode 100644
index 000000000000..4abf41495ad2
--- /dev/null
+++ b/media-gfx/luminance-hdr/Manifest
@@ -0,0 +1,3 @@
+DIST luminance-hdr-2.3.0.tar.bz2 5398576 SHA256 dada0795b58843912bcb57ce61dcd615bcb9f9437b610a37ff813ad2c899c676 SHA512 6806782bec25cde92eeafc1e6a6aeb801226c0db27bd9163829b4556209267a9f5f0ecaae934fbb42a25a780cd131bc34880bc48d6d68867fe1ab117bb4cde08 WHIRLPOOL 8f1430b0e46d53e79e7ba565b73e190b0ad6efb9f2937f8612b0ddda4d442fbc4c31b055a4904c48338e00dc8719cefb94b7f43fff040255f403ebeb4e8aac95
+DIST luminance-hdr-2.3.1.tar.bz2 10323806 SHA256 c2a4764986bf8860d448530f3c8d76143d7504cebb07b3e58e37eb0db5347722 SHA512 d42bcb0cc43594f2ac7d97efd658cfb5a3d34d485ed62822682592a69550c2c00fddbdc202e75fe1617cf1354d44c2f9a83122958d5f4f950380ff5d533191ee WHIRLPOOL 74728c214f9c1d333c2b0afa782cb567d5d6051edfbc875fad9c40c5f33ff2bcdc49ea6d0ea7e37850b62790673cf70dc6b99a2ecca8a0ba8b9b29e64ff9f85a
+DIST luminance-hdr-2.4.0.tar.bz2 10507522 SHA256 14014eadab099944f051dd99447f6f47d455ffb0e4e0272d93a8e71fd96ad401 SHA512 aa14a13d12ba382f5f8dcb79a57aa68864678db62f036ac2d8b8959da76f20b938481932a6fff3861eb6dbc5a1d4f06bc1f3e3ca9a6ce4f7a27a9db736aa8702 WHIRLPOOL 24c377d8f0b420fde96b1e9055d631668c8285068cec7d5763e94ac91ad24bae2d1cd74ee55b25a28142aaa6ddf3761159ccf28044b690ce817251699234eb8f
diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.2.1-docs.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.2.1-docs.patch
new file mode 100644
index 000000000000..d44e635dd1b7
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.2.1-docs.patch
@@ -0,0 +1,15 @@
+--- luminance-hdr-2.2.1/CMakeLists.txt
++++ luminance-hdr-2.2.1/CMakeLists.txt
+@@ -245,12 +245,6 @@
+ INSTALL(FILES ${LUMINANCE_QM} DESTINATION share/luminance-hdr/i18n) # i18n
+ INSTALL(FILES ${CMAKE_SOURCE_DIR}/images/luminance-hdr.png DESTINATION share/icons/hicolor/48x48/apps) # icon
+ INSTALL(FILES ${CMAKE_SOURCE_DIR}/luminance-hdr.desktop DESTINATION share/applications) #desktop entry
+- INSTALL(FILES
+- ${CMAKE_SOURCE_DIR}/AUTHORS
+- ${CMAKE_SOURCE_DIR}/README
+- ${CMAKE_SOURCE_DIR}/LICENSE
+- ${CMAKE_SOURCE_DIR}/Changelog
+- DESTINATION share/luminance-hdr) #info files
+ INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/help DESTINATION share/luminance-hdr) # help directory
+ # Microsoft Windows
+ ELSEIF(WIN32)
diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.2.1-openmp-automagic.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.2.1-openmp-automagic.patch
new file mode 100644
index 000000000000..a4fbb13fec7e
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.2.1-openmp-automagic.patch
@@ -0,0 +1,41 @@
+--- luminance-hdr-2.2.1/CMakeLists.txt
++++ luminance-hdr-2.2.1/CMakeLists.txt
+@@ -1,6 +1,8 @@
+ PROJECT(luminance-hdr)
+ CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)
+
++OPTION(USE_OPENMP "Use openmp threading support." ON)
++
+ # set include path for FindXXX.cmake files
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
+
+@@ -149,18 +151,20 @@
+ SET(LIBS ${LIBS} ${EXIV2_LIBRARIES})
+
+ #OpenMP Support under Linux, Windows with MSVC & MacOS X with GCC >= 4.3
+-IF(MSVC)
+- FIND_PACKAGE(OpenMP REQUIRED)
+- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+-ELSEIF(CMAKE_COMPILER_IS_GNUCC AND UNIX)
+- EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+- #MESSAGE(STATUS ${GCC_VERSION})
+- IF(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3)
+- MESSAGE(STATUS "GCC >= 4.3")
++IF(USE_OPENMP)
++ IF(MSVC)
+ FIND_PACKAGE(OpenMP REQUIRED)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
++ ELSEIF(CMAKE_COMPILER_IS_GNUCC AND UNIX)
++ EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
++ #MESSAGE(STATUS ${GCC_VERSION})
++ IF(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3)
++ MESSAGE(STATUS "GCC >= 4.3")
++ FIND_PACKAGE(OpenMP REQUIRED)
++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
++ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
++ ENDIF()
+ ENDIF()
+ ENDIF()
+ # END OpenMP Support
diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.3.0_beta1-no-git.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.3.0_beta1-no-git.patch
new file mode 100644
index 000000000000..040cc8d82a76
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.3.0_beta1-no-git.patch
@@ -0,0 +1,65 @@
+--- luminance-hdr-2.3.0.beta1/CMakeLists.txt
++++ luminance-hdr-2.3.0.beta1/CMakeLists.txt
+@@ -36,26 +36,6 @@
+
+ set(LIBS ${LIBS} ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QT_QTWEBKIT_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES})
+
+-FIND_PACKAGE(Git)
+-#FIND_PACKAGE(Git QUIET)
+-IF(NOT GIT_FOUND)
+- FIND_FILE(GIT_EXECUTABLE git.exe
+- $ENV{CYGWIN_DIR}\\bin
+- $ENV{CYGWIN_DIR}
+- )
+- IF (EXISTS ${GIT_EXECUTABLE})
+- SET(GIT_FOUND 1)
+- ENDIF()
+-ENDIF()
+-
+-IF(GIT_FOUND)
+- include(GetGitRevisionDescription)
+- get_git_head_revision(GIT_REFSPEC GIT_SHA1)
+- message(STATUS "Git found")
+-ELSE()
+- message(STATUS "Git not found")
+-ENDIF()
+-
+ IF(WIN32)
+ # Windows Section
+
+--- luminance-hdr-2.3.0.beta1/src/Common/CMakeLists.txt
++++ luminance-hdr-2.3.0.beta1/src/Common/CMakeLists.txt
+@@ -1,4 +1,3 @@
+-CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/GitSHA1.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp @ONLY)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/global.hxx.in ${CMAKE_CURRENT_BINARY_DIR}/global.hxx @ONLY)
+
+ SET(FILES_UI
+@@ -25,8 +24,7 @@
+ QT4_WRAP_UI(FILES_UI_H ${FILES_UI})
+
+ ADD_LIBRARY(common ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX} ${FILES_UI_H}
+-${CMAKE_CURRENT_BINARY_DIR}/global.hxx
+-${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp)
++${CMAKE_CURRENT_BINARY_DIR}/global.hxx)
+
+ SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} ${FILES_HXX} PARENT_SCOPE)
+ SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} common PARENT_SCOPE)
+--- luminance-hdr-2.3.0.beta1/src/UI/UMessageBox.cpp
++++ luminance-hdr-2.3.0.beta1/src/UI/UMessageBox.cpp
+@@ -28,7 +28,6 @@
+
+ #include "UI/UMessageBox.h"
+
+-#include "Common/GitSHA1.h"
+ #include "Common/config.h"
+ #include "Common/archs.h"
+ #include "ui_about.h"
+@@ -78,7 +77,7 @@
+ ui.authorsBox->setOpenExternalLinks(true);
+ ui.thanksToBox->setOpenExternalLinks(true);
+ ui.GPLbox->setTextInteractionFlags(Qt::TextSelectableByMouse);
+- ui.label_version->setText(ui.label_version->text().append(QString(LUMINANCEVERSION)).append(" [Build ").append(QString(g_GIT_SHA1).left(6)).append("]"));
++ ui.label_version->setText(ui.label_version->text().append(QString(LUMINANCEVERSION)));
+
+ bool license_file_not_found=true;
+ QString docDir = QCoreApplication::applicationDirPath();
diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-docs.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-docs.patch
new file mode 100644
index 000000000000..514ded782204
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-docs.patch
@@ -0,0 +1,17 @@
+Don't install extra docs and fix install dir.
+
+--- luminance-hdr-2.3.1/CMakeLists.txt
++++ luminance-hdr-2.3.1/CMakeLists.txt
+@@ -250,12 +250,6 @@
+
+ INSTALL(FILES ${CMAKE_SOURCE_DIR}/images/luminance-hdr.png DESTINATION share/icons/hicolor/48x48/apps) # icon
+ INSTALL(FILES ${CMAKE_SOURCE_DIR}/luminance-hdr.desktop DESTINATION share/applications) #desktop entry
+- INSTALL(FILES
+- ${CMAKE_SOURCE_DIR}/AUTHORS
+- ${CMAKE_SOURCE_DIR}/README
+- ${CMAKE_SOURCE_DIR}/LICENSE
+- ${CMAKE_SOURCE_DIR}/Changelog
+- DESTINATION share/luminance-hdr) #info files
+ INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/help DESTINATION share/luminance-hdr) # help directory
+ # Microsoft Windows
+ ELSEIF(WIN32)
diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-no-git.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-no-git.patch
new file mode 100644
index 000000000000..fe95265a6849
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-no-git.patch
@@ -0,0 +1,54 @@
+Don't try to define the git version of the release.
+
+--- luminance-hdr-2.3.1/CMakeLists.txt
++++ luminance-hdr-2.3.1/CMakeLists.txt
+@@ -32,12 +32,6 @@
+ ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES} ${QT_QTNETWORK_LIBRARIES}
+ ${QT_QTWEBKIT_LIBRARIES} ${QT_QTXML_LIBRARIES} ${QT_QTSQL_LIBRARIES})
+
+-FIND_PACKAGE(Git)
+-IF(GIT_FOUND)
+- include(GetGitRevisionDescription)
+- get_git_head_revision(GIT_REFSPEC GIT_SHA1)
+-ENDIF()
+-
+ IF(WIN32)
+ # Windows Section
+
+--- luminance-hdr-2.3.1.orig/src/Common/CMakeLists.txt
++++ luminance-hdr-2.3.1/src/Common/CMakeLists.txt
+@@ -1,5 +1,3 @@
+-CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/GitSHA1.cpp.in
+- ${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp @ONLY)
+ CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/global.hxx.in
+ ${CMAKE_CURRENT_BINARY_DIR}/global.hxx @ONLY)
+ CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
+@@ -32,8 +30,7 @@
+
+ ADD_LIBRARY(common ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_HXX} ${FILES_UI_H}
+ ${CMAKE_CURRENT_BINARY_DIR}/global.hxx
+- ${CMAKE_CURRENT_BINARY_DIR}/config.h
+- ${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp)
++ ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+
+ SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} ${FILES_HXX} PARENT_SCOPE)
+ SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} common PARENT_SCOPE)
+--- luminance-hdr-2.3.1.orig/src/UI/UMessageBox.cpp
++++ luminance-hdr-2.3.1/src/UI/UMessageBox.cpp
+@@ -28,7 +28,6 @@
+
+ #include "UI/UMessageBox.h"
+
+-#include "Common/GitSHA1.h"
+ #include "Common/config.h"
+ #include "Common/archs.h"
+ #include "ui_about.h"
+@@ -92,7 +91,7 @@
+ ui.authorsBox->setOpenExternalLinks(true);
+ ui.thanksToBox->setOpenExternalLinks(true);
+ ui.GPLbox->setTextInteractionFlags(Qt::TextSelectableByMouse);
+- ui.label_version->setText(ui.label_version->text().append(QString(LUMINANCEVERSION)).append(" [Build ").append(QString(g_GIT_SHA1).left(6)).append("]"));
++ ui.label_version->setText(ui.label_version->text().append(QString(LUMINANCEVERSION)));
+
+ bool license_file_not_found=true;
+ QString docDir = QCoreApplication::applicationDirPath();
diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-openmp-automagic.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-openmp-automagic.patch
new file mode 100644
index 000000000000..69fa0324c6ad
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.3.1-openmp-automagic.patch
@@ -0,0 +1,40 @@
+Only use openmp support if explicitly enabled.
+
+--- luminance-hdr-2.3.1/cmake/CompilerSettings.cmake
++++ luminance-hdr-2.3.1/cmake/CompilerSettings.cmake
+@@ -8,6 +8,8 @@
+ ENDIF()
+ ENDIF()
+
++OPTION(USE_OPENMP "Use openmp threading support." ON)
++
+ #Activate C++11 support, when available
+ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+ execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+@@ -39,16 +41,18 @@
+ endif()
+
+ #OpenMP Support under Linux, Windows with MSVC & MacOS X with GCC >= 4.3
+-IF(MSVC)
+- FIND_PACKAGE(OpenMP REQUIRED)
+- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+-ELSEIF(CMAKE_COMPILER_IS_GNUCC AND UNIX)
+- EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+- IF(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3)
+- MESSAGE(STATUS "GCC >= 4.3")
++IF(USE_OPENMP)
++ IF(MSVC)
+ FIND_PACKAGE(OpenMP REQUIRED)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
++ ELSEIF(CMAKE_COMPILER_IS_GNUCC AND UNIX)
++ EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
++ IF(GCC_VERSION VERSION_GREATER 4.3 OR GCC_VERSION VERSION_EQUAL 4.3)
++ MESSAGE(STATUS "GCC >= 4.3")
++ FIND_PACKAGE(OpenMP REQUIRED)
++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
++ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
++ ENDIF()
+ ENDIF()
+ ENDIF()
diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-fits-automagic.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-fits-automagic.patch
new file mode 100644
index 000000000000..e586c400e42e
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-fits-automagic.patch
@@ -0,0 +1,36 @@
+Only use FITS support if explicitly enabled.
+
+--- luminance-hdr-2.4.0/CMakeLists.txt
++++ luminance-hdr-2.4.0/CMakeLists.txt
+@@ -10,6 +10,8 @@
+ include(cmake/CompilerSettings.cmake)
+ include(cmake/Internationalization.cmake)
+
++OPTION(USE_FITS "Enable FITS support." ON)
++
+ # find and setup Qt5 for this project
+
+ # Tell CMake to run moc when necessary:
+@@ -122,13 +124,15 @@
+ INCLUDE_DIRECTORIES(${JPEGLIB_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${LCMS2_INCLUDE_DIR})
+
+-FIND_PACKAGE(CCfits)
+-IF(CCFITS_FOUND)
+- INCLUDE_DIRECTORIES(${CCFITS_INCLUDE_DIRS})
+- SET(LIBS ${LIBS} ${CCFITS_LIBRARIES})
+- ADD_DEFINITIONS(-DHAVE_CCFITS)
+-ELSE()
+- message(WARNING "CCfits not found! Building without FITS support!")
++IF(USE_FITS)
++ FIND_PACKAGE(CCfits REQUIRED)
++ IF(CCFITS_FOUND)
++ INCLUDE_DIRECTORIES(${CCFITS_INCLUDE_DIRS})
++ SET(LIBS ${LIBS} ${CCFITS_LIBRARIES})
++ ADD_DEFINITIONS(-DHAVE_CCFITS)
++ ELSE()
++ MESSAGE(FATAL_ERROR "CCfits not found!")
++ ENDIF()
+ ENDIF()
+
+ SET(LIBS ${LIBS} ${OPENEXR_LIBRARIES})
diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-qtprinter.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-qtprinter.patch
new file mode 100644
index 000000000000..c619308f8134
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-qtprinter.patch
@@ -0,0 +1,99 @@
+From 07e36ef892343b01bf13545866823e6a55044382 Mon Sep 17 00:00:00 2001
+From: Davide Anastasia <davide.anastasia@gmail.com>
+Date: Mon, 29 Sep 2014 08:06:15 +0100
+Subject: [PATCH] Fix QPrinter support
+
+---
+ CMakeLists.txt | 25 +++++++++++++------------
+ src/HelpBrowser/CMakeLists.txt | 3 +--
+ src/HelpBrowser/helpbrowser.cpp | 8 +++++---
+ 3 files changed, 19 insertions(+), 17 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1b07692..8a60ad4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -18,19 +18,20 @@ include(cmake/Internationalization.cmake)
+ # to always look for includes there:
+ #set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+-find_package(Qt5Core)
+-find_package(Qt5Concurrent)
+-find_package(Qt5Widgets)
+-find_package(Qt5Gui)
+-find_package(Qt5Declarative)
+-find_package(Qt5WebKit)
+-find_package(Qt5WebKitWidgets)
+-find_package(Qt5Xml)
+-find_package(Qt5Sql)
+-find_package(Qt5Network)
+-find_package(Qt5LinguistTools)
++find_package(Qt5Core REQUIRED)
++find_package(Qt5Concurrent REQUIRED)
++find_package(Qt5Widgets REQUIRED)
++find_package(Qt5Gui REQUIRED)
++find_package(Qt5Declarative REQUIRED)
++find_package(Qt5WebKit REQUIRED)
++find_package(Qt5WebKitWidgets REQUIRED)
++find_package(Qt5Xml REQUIRED)
++find_package(Qt5Sql REQUIRED)
++find_package(Qt5Network REQUIRED)
++find_package(Qt5LinguistTools REQUIRED)
++find_package(Qt5PrintSupport REQUIRED)
+ IF(WIN32)
+- find_package(Qt5WinExtras)
++ find_package(Qt5WinExtras)
+ ENDIF()
+
+ # Include the qtmain lib if we are on the windows platform
+diff --git a/src/HelpBrowser/CMakeLists.txt b/src/HelpBrowser/CMakeLists.txt
+index 04319a8..2f4916a 100644
+--- a/src/HelpBrowser/CMakeLists.txt
++++ b/src/HelpBrowser/CMakeLists.txt
+@@ -27,9 +27,8 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+ QT5_WRAP_CPP(FILES_MOC ${FILES_H})
+ QT5_WRAP_UI(FILES_UI_H ${FILES_UI})
+
+-
+ ADD_LIBRARY(helpbrowser ${FILES_H} ${FILES_CPP} ${FILES_MOC} ${FILES_UI_H} ${FILES_HXX})
+-qt5_use_modules(helpbrowser Core Concurrent Gui Widgets Xml WebKit WebKitWidgets)
++qt5_use_modules(helpbrowser Core Concurrent Gui Widgets Xml WebKit WebKitWidgets PrintSupport)
+
+ SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE} ${FILES_CPP} ${FILES_H} ${FILES_UI} ${FILES_HXX} PARENT_SCOPE)
+ SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} helpbrowser PARENT_SCOPE)
+diff --git a/src/HelpBrowser/helpbrowser.cpp b/src/HelpBrowser/helpbrowser.cpp
+index bfd2820..ce7f984 100644
+--- a/src/HelpBrowser/helpbrowser.cpp
++++ b/src/HelpBrowser/helpbrowser.cpp
+@@ -30,6 +30,7 @@ for which a new license (GPL+exception) is in place.
+ #include "ui_HelpBrowser.h"
+ #include "ui_HelpSideBar.h"
+
++#include <QDebug>
+ #include <QAction>
+ #include <QBuffer>
+ #include <QDir>
+@@ -45,8 +46,6 @@ for which a new license (GPL+exception) is in place.
+ #include <QModelIndex>
+ #include <QModelIndexList>
+ #include <QPainter>
+-#include <QPrinter>
+-#include <QPrintDialog>
+ #include <QProcess>
+ #include <QPushButton>
+ #include <QString>
+@@ -56,7 +55,10 @@ for which a new license (GPL+exception) is in place.
+ #include <QXmlDefaultHandler>
+ #include <QDesktopServices>
+
+-#include <QDebug>
++#include <QtPrintSupport/QPrinter>
++#include <QtPrintSupport/QPrintDialog>
++
++
+
+ #include "Common/global.h"
+ #include "HelpBrowser/schelptreemodel.h"
+--
+2.2.2
+
diff --git a/media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-qtquick.patch b/media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-qtquick.patch
new file mode 100644
index 000000000000..6e1fc2f16ea0
--- /dev/null
+++ b/media-gfx/luminance-hdr/files/luminance-hdr-2.4.0-qtquick.patch
@@ -0,0 +1,13 @@
+Gentoo has a Qt5Quick cmake module instead of a Qt5Declarative one.
+
+--- luminance-hdr-2.4.0/CMakeLists.txt
++++ luminance-hdr-2.4.0/CMakeLists.txt
+@@ -22,7 +22,7 @@
+ find_package(Qt5Concurrent REQUIRED)
+ find_package(Qt5Widgets REQUIRED)
+ find_package(Qt5Gui REQUIRED)
+-find_package(Qt5Declarative REQUIRED)
++find_package(Qt5Quick REQUIRED)
+ find_package(Qt5WebKit REQUIRED)
+ find_package(Qt5WebKitWidgets REQUIRED)
+ find_package(Qt5Xml REQUIRED)
diff --git a/media-gfx/luminance-hdr/luminance-hdr-2.3.0.ebuild b/media-gfx/luminance-hdr/luminance-hdr-2.3.0.ebuild
new file mode 100644
index 000000000000..77a843a5616e
--- /dev/null
+++ b/media-gfx/luminance-hdr/luminance-hdr-2.3.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit cmake-utils toolchain-funcs eutils flag-o-matic
+
+MY_P=${P/_/.}
+DESCRIPTION="Luminance HDR is a graphical user interface that provides a workflow for HDR imaging"
+HOMEPAGE="http://qtpfsgui.sourceforge.net"
+SRC_URI="mirror://sourceforge/qtpfsgui/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+LANGS=" cs de es fi fr hi hu id it pl ro ru sk tr zh"
+IUSE="cpu_flags_x86_sse2 ${LANGS// / linguas_} openmp"
+
+DEPEND="
+ >=media-gfx/exiv2-0.14
+ media-libs/lcms:2
+ media-libs/libpng
+ >=media-libs/libraw-0.13.4
+ >=media-libs/openexr-1.2.2-r2
+ >=media-libs/tiff-3.8.2-r2
+ sci-libs/fftw:3.0[threads]
+ sci-libs/gsl
+ virtual/jpeg
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtsql:4
+ dev-qt/qtwebkit:4"
+RDEPEND="${DEPEND}"
+
+DOCS=( AUTHORS BUGS Changelog README TODO )
+
+S=${WORKDIR}/${MY_P}
+
+pkg_pretend() {
+ if use cpu_flags_x86_sse2 ; then
+ append-flags -msse2
+ else
+ eerror "This package requires a CPU supporting the SSE2 instruction set."
+ die "SSE2 support missing"
+ fi
+
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_prepare() {
+ # Don't try to define the git version of the release
+ epatch "${FILESDIR}"/${PN}-2.3.0_beta1-no-git.patch
+
+ # Don't install extra docs and fix install dir
+ epatch "${FILESDIR}"/${PN}-2.2.1-docs.patch
+
+ # Fix openmp automagic support
+ epatch "${FILESDIR}"/${PN}-2.2.1-openmp-automagic.patch
+}
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_use openmp OPENMP)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ for lang in ${LANGS} ; do
+ if ! use linguas_${lang} ; then
+ rm -f "${D}"/usr/share/${PN}/i18n/{lang,qt}_${lang}.qm || die
+ fi
+ done
+}
diff --git a/media-gfx/luminance-hdr/luminance-hdr-2.3.1.ebuild b/media-gfx/luminance-hdr/luminance-hdr-2.3.1.ebuild
new file mode 100644
index 000000000000..20b421461f0c
--- /dev/null
+++ b/media-gfx/luminance-hdr/luminance-hdr-2.3.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils toolchain-funcs eutils flag-o-matic
+
+MY_P=${P/_/.}
+DESCRIPTION="Luminance HDR is a graphical user interface that provides a workflow for HDR imaging"
+HOMEPAGE="http://qtpfsgui.sourceforge.net"
+SRC_URI="mirror://sourceforge/qtpfsgui/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LANGS=" cs de es fi fr hi hu id it pl ro ru sk tr zh"
+IUSE="openmp cpu_flags_x86_sse2 test ${LANGS// / linguas_}"
+
+RDEPEND="
+ dev-libs/boost:0=
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtsql:4
+ dev-qt/qtwebkit:4
+ >=media-gfx/exiv2-0.14:0=
+ media-libs/lcms:2
+ media-libs/libpng:0=
+ >=media-libs/libraw-0.13.4:=
+ >=media-libs/openexr-1.2.2-r2:=
+ >=media-libs/tiff-3.8.2-r2:0
+ sci-libs/fftw:3.0[threads]
+ sci-libs/gsl
+ virtual/jpeg:0"
+DEPEND="${RDEPEND}
+ test? ( dev-cpp/gtest )"
+
+DOCS=( AUTHORS BUGS Changelog README TODO )
+
+pkg_pretend() {
+ if use cpu_flags_x86_sse2 ; then
+ append-flags -msse2
+ else
+ eerror "This package requires a CPU supporting the SSE2 instruction set."
+ die "SSE2 support missing"
+ fi
+
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_prepare() {
+ # don't try to define the git version of the release
+ epatch "${FILESDIR}"/${P}-no-git.patch
+
+ # don't install extra docs and fix install dir
+ epatch "${FILESDIR}"/${P}-docs.patch
+
+ # fix openmp automagic support
+ epatch "${FILESDIR}"/${P}-openmp-automagic.patch
+}
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_use openmp OPENMP)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ for lang in ${LANGS} ; do
+ if ! use linguas_${lang} ; then
+ rm -f "${D}"/usr/share/${PN}/i18n/{lang,qt}_${lang}.qm || die
+ fi
+ done
+}
diff --git a/media-gfx/luminance-hdr/luminance-hdr-2.4.0.ebuild b/media-gfx/luminance-hdr/luminance-hdr-2.4.0.ebuild
new file mode 100644
index 000000000000..845280760a8a
--- /dev/null
+++ b/media-gfx/luminance-hdr/luminance-hdr-2.4.0.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils toolchain-funcs eutils flag-o-matic
+
+MY_P=${P/_/.}
+DESCRIPTION="Luminance HDR is a graphical user interface that provides a workflow for HDR imaging"
+HOMEPAGE="http://qtpfsgui.sourceforge.net https://github.com/LuminanceHDR/LuminanceHDR"
+SRC_URI="mirror://sourceforge/qtpfsgui/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LANGS=" cs de es fi fr hi hu id it pl ro ru sk tr zh"
+IUSE="cpu_flags_x86_sse2 fits openmp test ${LANGS// / linguas_}"
+
+RDEPEND="
+ dev-libs/boost:0=
+ dev-qt/linguist-tools:5
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtdeclarative:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtsql:5
+ dev-qt/qtwebkit:5
+ >=media-gfx/exiv2-0.14:0=
+ media-libs/lcms:2
+ media-libs/libpng:0=
+ >=media-libs/libraw-0.13.4:=
+ media-libs/ilmbase:=
+ >=media-libs/openexr-1.2.2-r2:=
+ >=media-libs/tiff-3.8.2-r2:0
+ sci-libs/fftw:3.0[threads]
+ fits? ( sci-libs/ccfits )
+ sci-libs/gsl
+ virtual/jpeg:0
+"
+DEPEND="${RDEPEND}
+ test? ( dev-cpp/gtest )
+"
+
+DOCS=( AUTHORS BUGS Changelog README TODO )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.1-no-git.patch
+ "${FILESDIR}"/${PN}-2.3.1-docs.patch
+ "${FILESDIR}"/${PN}-2.3.1-openmp-automagic.patch
+ "${FILESDIR}"/${P}-fits-automagic.patch
+ "${FILESDIR}"/${P}-qtprinter.patch
+ "${FILESDIR}"/${P}-qtquick.patch
+)
+
+pkg_pretend() {
+ if use cpu_flags_x86_sse2 ; then
+ append-flags -msse2
+ else
+ eerror "This package requires a CPU supporting the SSE2 instruction set."
+ die "SSE2 support missing"
+ fi
+
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_use openmp OPENMP)
+ $(cmake-utils_use_use fits FITS)
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ for lang in ${LANGS} ; do
+ if ! use linguas_${lang} ; then
+ rm -f "${D}"/usr/share/${PN}/i18n/{lang,qt}_${lang}.qm || die
+ fi
+ done
+}
diff --git a/media-gfx/luminance-hdr/metadata.xml b/media-gfx/luminance-hdr/metadata.xml
new file mode 100644
index 000000000000..8496ad6a2fad
--- /dev/null
+++ b/media-gfx/luminance-hdr/metadata.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription lang="en">
+ Qtpfsgui is an open source graphical user interface application that aims
+ to provide a workflow for HDR imaging.
+
+ Supported HDR formats:
+ * OpenEXR (extension: exr)
+ * Radiance RGBE (extension: hdr)
+ * Tiff formats: 16bit, 32bit (float) and LogLuv (extension: tiff)
+ * Raw image formats (extension: various)
+ * PFS native format (extension: pfs)
+
+ Supported LDR formats:
+ * JPEG, PNG, PPM, PBM, TIFF(8 bit)
+
+ Supported features:
+ * Create an HDR file from a set of images (formats: JPEG, TIFF 8bit and
+ 16bit, RAW) of the same scene taken at different exposure setting.
+ * Save and load HDR images.
+ * Rotate and resize HDR images.
+ * Tonemap HDR images.
+ * Copy exif data between sets of images.
+ * Supports internationalization.
+ </longdescription>
+ <use>
+ <flag name="fits">Enable support for the FITS format</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">LuminanceHDR/LuminanceHDR</remote-id>
+ <remote-id type="sourceforge">qtpfsgui</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/lximage-qt/Manifest b/media-gfx/lximage-qt/Manifest
new file mode 100644
index 000000000000..108898546a87
--- /dev/null
+++ b/media-gfx/lximage-qt/Manifest
@@ -0,0 +1,3 @@
+DIST lximage-qt-0.2.0.tar.xz 41240 SHA256 4750981bbf1a1a36fd581addd8d6acecb608f9660442b6831eb05639151524fb SHA512 238e1fb7795fb2b5d73132fc61942b0277d1c2b7c880f3022e4fabee754a17da013af1907ada001762271ac7ded42efbf4470990bb574d26215ff0276f4a7c16 WHIRLPOOL a09053cfb944518a3879dcf28786ad70a2b7a67cc04d4f2a737d1dadaad846c883b322aa906135f01726cf2266d78d70a94e5e619699b91718faa914787afc37
+DIST lximage-qt-0.3.0.tar.xz 41660 SHA256 0a5a5114eb1014a4e24af17d4a5d77676bac6a5d25458082e8e2eb45c87f2984 SHA512 d5af86b32cb416378f30413c65cd576d7a7f6d88f551e4749b161d64e08984254f4e1eb8f7b897bb5a334eb72b2af1c5de47109f5dd462d66b3b7fe9febc4902 WHIRLPOOL 80aea4cbb37d41a1ec2793de7a0343cd5464d197ad748b0031ac55526d311a9c753b4542428d19fd9e84263e4a1b0716b89d03ba8a86435af063d93643bd4ee1
+DIST lximage-qt-0.4.0.tar.xz 43716 SHA256 11abc99b0946e6254aad42cb3e29349dc6199879be0728418e7bc81200d59730 SHA512 6b07e16534b835da60f5845c801cad0bdd381b6deb79ad99fc44afb9b776deb3cf76c85c9e4b59ba4148d71e894f659743c002ea4baf5589e8d261eb1a19b1fa WHIRLPOOL 7db84a9fe83057ec05a9b363f7c64c0302f9fc9c1f5e62aec84520bd6a481dce709f671fdcfef46f64a89143c34457f8955d05df2641b7b29487eb3056c825ef
diff --git a/media-gfx/lximage-qt/lximage-qt-0.2.0.ebuild b/media-gfx/lximage-qt/lximage-qt-0.2.0.ebuild
new file mode 100644
index 000000000000..57ceb65029d8
--- /dev/null
+++ b/media-gfx/lximage-qt/lximage-qt-0.2.0.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="LXImage Image Viewer - GPicView replacement"
+HOMEPAGE="http://lxqt.org/"
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.lxde.org/git/lxde/${PN}.git"
+else
+ SRC_URI="http://lxqt.org/downloads/${PN}/${PV}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+ S=${WORKDIR}
+fi
+
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="0"
+
+RDEPEND="dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ dev-libs/glib:2
+ media-libs/libexif
+ >=x11-libs/libfm-1.2
+ x11-libs/libX11
+ x11-libs/libXfixes
+ x11-misc/pcmanfm-qt"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
diff --git a/media-gfx/lximage-qt/lximage-qt-0.3.0.ebuild b/media-gfx/lximage-qt/lximage-qt-0.3.0.ebuild
new file mode 100644
index 000000000000..da8dfcac34a2
--- /dev/null
+++ b/media-gfx/lximage-qt/lximage-qt-0.3.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="LXImage Image Viewer - GPicView replacement"
+HOMEPAGE="http://lxqt.org/"
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.lxde.org/git/lxde/${PN}.git"
+else
+ SRC_URI="http://lxqt.org/downloads/${PN}/${PV}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="0"
+
+RDEPEND="
+ dev-libs/glib:2
+ dev-qt/linguist-tools:5
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ media-libs/libexif
+ >=x11-libs/libfm-1.2
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-misc/pcmanfm-qt"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ local mycmakeargs=(
+ -DUSE_QT5=ON
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-gfx/lximage-qt/lximage-qt-0.4.0.ebuild b/media-gfx/lximage-qt/lximage-qt-0.4.0.ebuild
new file mode 100644
index 000000000000..63cab0c590df
--- /dev/null
+++ b/media-gfx/lximage-qt/lximage-qt-0.4.0.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="LXImage Image Viewer - GPicView replacement"
+HOMEPAGE="http://lxqt.org/"
+
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="git://git.lxde.org/git/lxde/${PN}.git"
+else
+ SRC_URI="http://downloads.lxqt.org/${PN}/${PV}/${P}.tar.xz"
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+fi
+
+LICENSE="GPL-2 LGPL-2.1+"
+SLOT="0"
+
+RDEPEND="
+ dev-libs/glib:2
+ dev-qt/linguist-tools:5
+ dev-qt/qtcore:5
+ dev-qt/qtdbus:5
+ dev-qt/qtgui:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ dev-qt/qtx11extras:5
+ media-libs/libexif
+ >=x11-libs/libfm-1.2
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-misc/pcmanfm-qt"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_configure() {
+ local mycmakeargs=(
+ -DUSE_QT5=ON
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-gfx/lximage-qt/metadata.xml b/media-gfx/lximage-qt/metadata.xml
new file mode 100644
index 000000000000..d89dead0ed86
--- /dev/null
+++ b/media-gfx/lximage-qt/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>lxqt</herd>
+ <maintainer>
+ <email>jauhien@gentoo.org</email>
+ <name>Jauhien Piatlicki</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/mandelbulber/Manifest b/media-gfx/mandelbulber/Manifest
new file mode 100644
index 000000000000..252acc328fa4
--- /dev/null
+++ b/media-gfx/mandelbulber/Manifest
@@ -0,0 +1,3 @@
+DIST mandelbulber1.11.tar.gz 1176248 SHA256 3f57a23f91c3d88f1e28cba29e4f076e03c9bcb97ce7ecdd0cd713687cab714e
+DIST mandelbulber1.12-1.tar.gz 1179684 SHA256 75376616b52cb8dac7c7f358f4eb26f9d2fb171b9b0a54dbb25eeb57e494d382 SHA512 c198c71648ad4d674dac980c77fe2573617e122bdddb7775fccf74e1a929900691a421561f8717e4df741db65421cbdb8e464fd031ff5c38a56f63f5259b5512 WHIRLPOOL 7b5113bc81913607a544d19e9d16f53ec8888f97584110d0b8ad545b4603582f88fdfab4260d9fc74feaaae815739ac14f4b42e045fa1d6ae86d0e72e52f77fa
+DIST mandelbulber1.21-1.orig.tar.gz 1076836 SHA256 d9d95be4e21311fa2b2b7883a659d2c173940499a7c5f8436aa62cdf543b6eca SHA512 caaa27a4aa67e83045e9cfc84593770d26d0b12d44e6f37f1f37e04eb62f7d2038c07d82541eca2ef8c64c787bae2fac9c487f69c98936310946f27c07760ce3 WHIRLPOOL 204ebc870e9d6a80dbbff210424bcef333dafc24b8b6010d10f7eda833b3e6342154182d171e0960d02531ebc812b727197f8dfe2aa4aa641e5160b0256993c8
diff --git a/media-gfx/mandelbulber/files/mandelbulber-1.11-qa.patch b/media-gfx/mandelbulber/files/mandelbulber-1.11-qa.patch
new file mode 100644
index 000000000000..f457c1902c8f
--- /dev/null
+++ b/media-gfx/mandelbulber/files/mandelbulber-1.11-qa.patch
@@ -0,0 +1,37 @@
+--- a/makefiles/makefile
++++ b/makefiles/makefile
+@@ -5,6 +5,7 @@
+ -include ../makefile.init
+
+ RM := rm -rf
++CXX ?= g++
+
+ # All of the sources participating in the build are defined here
+ -include sources.mk
+@@ -44,7 +45,7 @@
+ mandelbulber: $(OBJS) $(USER_OBJS)
+ @echo 'Building target: $@'
+ @echo 'Invoking: GCC C++ Linker'
+- g++ -o"mandelbulber" -L/usr/lib/x86_64-linux-gnu/ $(OBJS) $(USER_OBJS) $(LIBS) `pkg-config --libs gtk+-2.0 gthread-2.0`
++ $(CXX) $(LDFLAGS) -o"mandelbulber" -L/usr/lib/x86_64-linux-gnu/ $(OBJS) $(USER_OBJS) $(LIBS) `pkg-config --libs gtk+-2.0 gthread-2.0`
+ @echo 'Finished building target: $@'
+ @echo ' '
+
+--- a/makefiles/src/subdir.mk
++++ b/makefiles/src/subdir.mk
+@@ -63,12 +63,14 @@
+ ./src/undo.d \
+ ./src/cl_support.d
+
++CXX ?= g++
++CXXFLAGS ?= -O2 -fast-math
+
+ # Each subdirectory must supply rules for building sources it contributes
+ src/%.o: ../src/%.cpp
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C++ Compiler'
+- g++ -O2 -ffast-math -Wall -c -fmessage-length=0 `pkg-config --cflags gtk+-2.0 gthread-2.0;` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"
++ $(CXX) $(CXXFLAGS) -Wall -c -fmessage-length=0 `pkg-config --cflags gtk+-2.0 gthread-2.0;` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o"$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
diff --git a/media-gfx/mandelbulber/files/mandelbulber-1.12.1-memcpy_and_memset.patch b/media-gfx/mandelbulber/files/mandelbulber-1.12.1-memcpy_and_memset.patch
new file mode 100644
index 000000000000..43fb0b982dbd
--- /dev/null
+++ b/media-gfx/mandelbulber/files/mandelbulber-1.12.1-memcpy_and_memset.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/464972
+
+--- src/texture.cpp
++++ src/texture.cpp
+@@ -5,6 +5,7 @@
+ * Author: krzysztof
+ */
+ #include <stdio.h>
++#include <string.h>
+ #include "texture.hpp"
+ #include "files.h"
+
+--- src/timeline.cpp
++++ src/timeline.cpp
+@@ -6,6 +6,7 @@
+ */
+
+ #include <cstdlib>
++#include <cstring>
+
+ #include "timeline.hpp"
+ #include "files.h"
diff --git a/media-gfx/mandelbulber/files/mandelbulber-1.21.1-qa.patch b/media-gfx/mandelbulber/files/mandelbulber-1.21.1-qa.patch
new file mode 100644
index 000000000000..6fea9525cfe1
--- /dev/null
+++ b/media-gfx/mandelbulber/files/mandelbulber-1.21.1-qa.patch
@@ -0,0 +1,30 @@
+--- mandelbulber1.21-1.orig/makefiles/makefile
++++ mandelbulber1.21-1.orig/makefiles/makefile
+@@ -5,6 +5,7 @@
+ -include ../makefile.init
+
+ RM := rm -rf
++CXX ?= g++
+
+ # All of the sources participating in the build are defined here
+ -include sources.mk
+@@ -44,7 +45,7 @@
+ mandelbulber: $(OBJS) $(USER_OBJS)
+ @echo 'Building target: $@'
+ @echo 'Invoking: GCC C++ Linker'
+- g++ -o"mandelbulber" -L/usr/lib/x86_64-linux-gnu/ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(OBJS) $(USER_OBJS) $(LIBS)
++ $(CXX) -o"mandelbulber" -L/usr/lib/x86_64-linux-gnu/ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(OBJS) $(USER_OBJS) $(LIBS)
+ @echo 'Finished building target: $@'
+ @echo ' '
+
+--- mandelbulber1.21-1.orig/makefiles/src/subdir.mk
++++ mandelbulber1.21-1.orig/makefiles/src/subdir.mk
+@@ -71,7 +71,7 @@
+ src/%.o: ../src/%.cpp
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C++ Compiler'
+- g++ -O3 -ffast-math -Wall -c -fmessage-length=0 `pkg-config --cflags gtk+-2.0 gthread-2.0;` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" $(CXXFLAGS) $(CPPFLAGS) -o"$@" "$<"
++ $(CXX) -Wall -c -fmessage-length=0 `pkg-config --cflags gtk+-2.0 gthread-2.0;` -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" $(CXXFLAGS) $(CPPFLAGS) -o"$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
diff --git a/media-gfx/mandelbulber/mandelbulber-1.11.ebuild b/media-gfx/mandelbulber/mandelbulber-1.11.ebuild
new file mode 100644
index 000000000000..7bae8d3e6163
--- /dev/null
+++ b/media-gfx/mandelbulber/mandelbulber-1.11.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+MY_P=${PN}${PV}
+
+DESCRIPTION="Tool to render 3D fractals"
+HOMEPAGE="http://sites.google.com/site/mandelbulber/home"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2
+ >=media-libs/libsndfile-1
+ >=media-libs/libpng-1.4
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-qa.patch
+}
+
+src_compile() {
+ emake CXX="$(tc-getCXX)" -C makefiles all
+}
+
+src_install() {
+ dobin makefiles/${PN}
+ dodoc README NEWS
+ insinto /usr/share/${PN}
+ doins -r usr/share/*
+}
+
+pkg_postinst() {
+ elog "Before you run ${PN} please copy /usr/share/${PN}/* to \${HOME}/.${PN}"
+}
diff --git a/media-gfx/mandelbulber/mandelbulber-1.12.1.ebuild b/media-gfx/mandelbulber/mandelbulber-1.12.1.ebuild
new file mode 100644
index 000000000000..68a78d357101
--- /dev/null
+++ b/media-gfx/mandelbulber/mandelbulber-1.12.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs versionator
+
+MY_P=${PN}$(replace_version_separator 2 '-' )
+
+DESCRIPTION="Tool to render 3D fractals"
+HOMEPAGE="http://sites.google.com/site/mandelbulber/home"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2
+ >=media-libs/libsndfile-1
+ >=media-libs/libpng-1.4:0=
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-1.11-qa.patch \
+ "${FILESDIR}"/${P}-memcpy_and_memset.patch
+}
+
+src_compile() {
+ emake CXX="$(tc-getCXX)" -C makefiles all
+}
+
+src_install() {
+ dobin makefiles/${PN}
+ dodoc README NEWS
+ insinto /usr/share/${PN}
+ doins -r usr/share/*
+}
+
+pkg_postinst() {
+ elog "Before you run ${PN} please copy /usr/share/${PN}/* to \${HOME}/.${PN}"
+}
diff --git a/media-gfx/mandelbulber/mandelbulber-1.21.1.ebuild b/media-gfx/mandelbulber/mandelbulber-1.21.1.ebuild
new file mode 100644
index 000000000000..a9dd01cf53e8
--- /dev/null
+++ b/media-gfx/mandelbulber/mandelbulber-1.21.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs versionator
+
+MY_P=${PN}$(replace_version_separator 2 '-' ).orig
+
+DESCRIPTION="Tool to render 3D fractals"
+HOMEPAGE="http://sites.google.com/site/mandelbulber/home"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2
+ dev-libs/glib:2
+ >=media-libs/libpng-1.4:0=
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-qa.patch
+}
+
+src_compile() {
+ emake CXX="$(tc-getCXX)" -C makefiles all
+}
+
+src_install() {
+ dobin makefiles/${PN}
+ dodoc README NEWS
+ insinto /usr/share/${PN}
+ doins -r usr/share/*
+ domenu ${PN}.desktop
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "Before you run ${PN} please copy /usr/share/${PN}/* to \${HOME}/.${PN}"
+ fi
+}
diff --git a/media-gfx/mandelbulber/metadata.xml b/media-gfx/mandelbulber/metadata.xml
new file mode 100644
index 000000000000..f34f1d95dc92
--- /dev/null
+++ b/media-gfx/mandelbulber/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription>
+ Mandelbulber is an easy to use, handy but experimental application
+ designed to help you render 3D Mandelbrot fractals called Mandelbulb
+ and some other kind of 3D fractals like Mandelbox, Bulbbox, Juliabulb,
+ Menger Sponge.
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">mandelbulber</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/mcomix/Manifest b/media-gfx/mcomix/Manifest
new file mode 100644
index 000000000000..848fefe718bd
--- /dev/null
+++ b/media-gfx/mcomix/Manifest
@@ -0,0 +1,2 @@
+DIST mcomix-1.00.tar.bz2 527779 SHA256 d8453109a297153f67fdc898d822fa57057d575b71ed857e538da9a7426f0cde SHA512 9fc975afa92ad7130fe0d39058463cf26f8a9415257869e45e4cf83fae5e2bd8f4f264821046fcf425ee3729ec3dacfa59cd52342055a6246cf0b61b866f09b1 WHIRLPOOL 6aed2176904d5f12cd66e7f6f41fc23914d5a81cd514242a209994222b7ee1d18ceca4367e78f8a61bb6edbec559d0da94165f4db841c44840d6d768ba700f14
+DIST mcomix-1.01.tar.bz2 543293 SHA256 da333d0bce5157fc8e15d13de6d9ce46b1c35692aa510cb20d6b2230f7c2774c SHA512 d31ed5d851c761d9680643df5c5bac1af817c61b49455bfd887381e0d7651593f9fb70fdbdb7533ae7bb6f8a203f0cabcbfdcce8a9681aa1d9ceaa3a411c1e70 WHIRLPOOL eb57890b612341d9920894b757c2eed8d1b6e8d31c911f2d7aff33a76c7cc2d1c3f5ebf3bfe96945fc0fa3ad612c369e6d96517b200ead3679559be69924329a
diff --git a/media-gfx/mcomix/mcomix-1.00-r1.ebuild b/media-gfx/mcomix/mcomix-1.00-r1.ebuild
new file mode 100644
index 000000000000..b1ca4fa54d6d
--- /dev/null
+++ b/media-gfx/mcomix/mcomix-1.00-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1 eutils fdo-mime
+
+DESCRIPTION="A fork of comix, a GTK image viewer for comic book archives"
+HOMEPAGE="http://mcomix.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ >=dev-python/pygtk-2.14[${PYTHON_USEDEP}]
+ virtual/jpeg
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ x11-libs/gdk-pixbuf
+ !media-gfx/comix"
+
+DOCS=( ChangeLog README )
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+ echo
+ elog "Additional packages are required to open most common comic files:"
+ elog
+ elog " cbr: app-arch/unrar"
+ elog " cbz: app-arch/unzip"
+ elog
+ elog "You can also add support for 7z or LHA archives by installing"
+ elog "app-arch/p7zip or app-arch/lha."
+ echo
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/mcomix/mcomix-1.01.ebuild b/media-gfx/mcomix/mcomix-1.01.ebuild
new file mode 100644
index 000000000000..1dfcd26042ea
--- /dev/null
+++ b/media-gfx/mcomix/mcomix-1.01.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="sqlite"
+
+inherit distutils-r1 eutils fdo-mime
+
+DESCRIPTION="A fork of comix, a GTK image viewer for comic book archives"
+HOMEPAGE="http://mcomix.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ >=dev-python/pygtk-2.14[${PYTHON_USEDEP}]
+ virtual/jpeg
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ x11-libs/gdk-pixbuf
+ !media-gfx/comix"
+
+DOCS=( ChangeLog README )
+
+pkg_postinst() {
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+ echo
+ elog "Additional packages are required to open the most common comic archives:"
+ elog
+ elog " cbr: app-arch/unrar"
+ elog " cbz: app-arch/unzip"
+ elog
+ elog "You can also add support for 7z or LHA archives by installing"
+ elog "app-arch/p7zip or app-arch/lha. Install app-text/mupdf for"
+ elog "pdf support."
+ echo
+}
+
+pkg_postrm() {
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/mcomix/metadata.xml b/media-gfx/mcomix/metadata.xml
new file mode 100644
index 000000000000..7cb3023cf69d
--- /dev/null
+++ b/media-gfx/mcomix/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <maintainer>
+ <email>rhill@gentoo.org</email>
+ <name>Ryan Hill</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">mcomix</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/meshlab/Manifest b/media-gfx/meshlab/Manifest
new file mode 100644
index 000000000000..8bed7d390991
--- /dev/null
+++ b/media-gfx/meshlab/Manifest
@@ -0,0 +1,2 @@
+DIST MeshLabSrc_AllInc_v132.tgz 12874196 SHA256 d57f0a99a55421aac54a66e2475d48f00f7b1752f9587cd69cf9b5b9c1a519b1 SHA512 40ef1f887d18e2146d6001d9c290bb76f6fc27caf13a1256a4061d5e2c43fd8dfdc843ace2cb83c6370648c2c5be3a22e2d5b31698df46e0695890d6a20651ac WHIRLPOOL aa6da94a8d5b9d28c9b787fe307774b7223e57278ed45c3bf1a823da9f5a9b59fd058a466f3f4dea3c4c57e3934b0aed88b1446f20e746349881c1bc965fec36
+DIST MeshLabSrc_AllInc_v133.tgz 13390531 SHA256 c9829cd1f58713f1f82d546af1ee69291b52a0f94585f803174fb9e55654980f SHA512 ec155292be10ebe17a7d41b26d51cce88e1f00b692b8adb29462a2c3cb15444c6f27067a3396e4427cd694c82424910ba80f32f536b5f5d46d6765b2461cef43 WHIRLPOOL f1f938e7eb8d648f2a8ac4399420d947efe403f19cc163b4a4e28f8cf620ae5aa22d17503e3b5ca7920996e78dfbb41dbd89447d61bd95e4a2f69420f2196d5d
diff --git a/media-gfx/meshlab/files/1.3.2/01_crash-on-save.patch b/media-gfx/meshlab/files/1.3.2/01_crash-on-save.patch
new file mode 100644
index 000000000000..84c5ced8dc6a
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/01_crash-on-save.patch
@@ -0,0 +1,29 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Fix crash on project save (closes: #718583)
+Git-Branch: p/crash-on-save
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..cfc9473d1fa0e565d0aad4994fbb31
+
+Patch from upstream SVN commit [r6114].
+
+ meshlab/src/meshlab/mainwindow_RunTime.cpp | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/meshlab/src/meshlab/mainwindow_RunTime.cpp b/meshlab/src/meshlab/mainwindow_RunTime.cpp
+index 8f5057c..3273cec 100644
+--- a/meshlab/src/meshlab/mainwindow_RunTime.cpp
++++ b/meshlab/src/meshlab/mainwindow_RunTime.cpp
+@@ -1575,8 +1575,12 @@ void MainWindow::saveProject()
+
+ /*********WARNING!!!!!! CHANGE IT!!! ALSO IN THE OPENPROJECT FUNCTION********/
+ meshDoc()->setDocLabel(fileName);
+- mdiarea->activeSubWindow()->setWindowTitle(meshDoc()->docLabel());
+- layerDialog->setWindowTitle(meshDoc()->docLabel());
++ QMdiSubWindow* sub = mdiarea->currentSubWindow();
++ if (sub != NULL)
++ {
++ sub->setWindowTitle(meshDoc()->docLabel());
++ layerDialog->setWindowTitle(meshDoc()->docLabel());
++ }
+ /****************************************************************************/
+
+
diff --git a/media-gfx/meshlab/files/1.3.2/02_cstddef.patch b/media-gfx/meshlab/files/1.3.2/02_cstddef.patch
new file mode 100644
index 000000000000..903b0c77b547
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/02_cstddef.patch
@@ -0,0 +1,46 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Include <cstddef> on files using offsetoff (closes: #625053)
+Git-Branch: p/cstddef
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..8fb2fc380c1a53d0e603d1aaeff156
+
+ vcglib/wrap/io_tetramesh/import_ply.h | 1 +
+ vcglib/wrap/io_trimesh/import_ply.h | 1 +
+ vcglib/wrap/ply/plystuff.h | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/vcglib/wrap/io_tetramesh/import_ply.h b/vcglib/wrap/io_tetramesh/import_ply.h
+index 0da4c1f..8370e48 100644
+--- a/vcglib/wrap/io_tetramesh/import_ply.h
++++ b/vcglib/wrap/io_tetramesh/import_ply.h
+@@ -36,6 +36,7 @@ created
+ #include<wrap/ply/io_mask.h>
+ #include<wrap/io_tetramesh/io_ply.h>
+ #include<vcg/complex/tetramesh/allocate.h>
++#include <cstddef>
+
+
+
+diff --git a/vcglib/wrap/io_trimesh/import_ply.h b/vcglib/wrap/io_trimesh/import_ply.h
+index 13eaa30..ce2de3a 100644
+--- a/vcglib/wrap/io_trimesh/import_ply.h
++++ b/vcglib/wrap/io_trimesh/import_ply.h
+@@ -29,6 +29,7 @@
+ #include<wrap/io_trimesh/io_mask.h>
+ #include<wrap/io_trimesh/io_ply.h>
+ #include<vcg/complex/algorithms/create/platonic.h>
++#include <cstddef>
+
+ namespace vcg {
+ namespace tri {
+diff --git a/vcglib/wrap/ply/plystuff.h b/vcglib/wrap/ply/plystuff.h
+index 3e41e63..4761e9f 100644
+--- a/vcglib/wrap/ply/plystuff.h
++++ b/vcglib/wrap/ply/plystuff.h
+@@ -57,6 +57,7 @@ Cleaning of the automatic bbox caching support for ply files. First working vers
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <cstddef>
+ #ifdef WIN32
+ #include <io.h>
+ #endif
diff --git a/media-gfx/meshlab/files/1.3.2/03_disable-updates.patch b/media-gfx/meshlab/files/1.3.2/03_disable-updates.patch
new file mode 100644
index 000000000000..9702758dca85
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/03_disable-updates.patch
@@ -0,0 +1,21 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Disable checking for updates on startup.
+Git-Branch: p/disable-updates
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..8f6cf9176644dce65ef4518b08526c
+
+ meshlab/src/meshlab/mainwindow_Init.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meshlab/src/meshlab/mainwindow_Init.cpp b/meshlab/src/meshlab/mainwindow_Init.cpp
+index de3ff1d..ce7bf81 100644
+--- a/meshlab/src/meshlab/mainwindow_Init.cpp
++++ b/meshlab/src/meshlab/mainwindow_Init.cpp
+@@ -926,7 +926,7 @@ void MainWindow::saveRecentFileList(const QString &fileName)
+
+ if(loadedMeshCounter-lastComunicatedValue>connectionInterval && !myLocalBuf.isOpen())
+ {
+-#if not defined(__DISABLE_AUTO_STATS__)
++#if defined(__ENABLE_AUTO_STATS__)
+ checkForUpdates(false);
+ #endif
+ int congratsMeshCounter = settings.value("congratsMeshCounter",50).toInt();
diff --git a/media-gfx/meshlab/files/1.3.2/05_externals.patch b/media-gfx/meshlab/files/1.3.2/05_externals.patch
new file mode 100644
index 000000000000..0592b5709646
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/05_externals.patch
@@ -0,0 +1,25 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Only build necessary external sources.
+Git-Branch: p/externals
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..ca572df8704909a1bbe18b1ce25d76
+
+ meshlab/src/external/external.pro | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/meshlab/src/external/external.pro b/meshlab/src/external/external.pro
+index c103d88..324eb91 100644
+--- a/meshlab/src/external/external.pro
++++ b/meshlab/src/external/external.pro
+@@ -2,11 +2,6 @@ config += debug_and_release
+
+ TEMPLATE = subdirs
+
+-SUBDIRS = lib3ds-1.3.0/lib3ds \
+- bzip2-1.0.5/bzip2-1.0.5.pro \
+- muparser_v132/src \
+- levmar-2.3/levmar-2.3.pro \
++SUBDIRS = levmar-2.3/levmar-2.3.pro \
+ structuresynth/structuresynth.pro \
+- OpenCTM-1.0.3/openctm.pro \
+ jhead-2.95/jhead-2.95.pro
+-# openkinect/openkinect.pro
diff --git a/media-gfx/meshlab/files/1.3.2/06_format-security.patch b/media-gfx/meshlab/files/1.3.2/06_format-security.patch
new file mode 100644
index 000000000000..36a767ca07e9
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/06_format-security.patch
@@ -0,0 +1,44 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Fix compilation errors with -Werror=format-security.
+Git-Branch: p/format-security
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..be247b855ebb49a4d826d60b7d21a0
+
+ .../meshlabplugins/decorate_raster_proj/decorate_raster_proj.cpp | 4 ++--
+ meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.cpp | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/meshlab/src/meshlabplugins/decorate_raster_proj/decorate_raster_proj.cpp b/meshlab/src/meshlabplugins/decorate_raster_proj/decorate_raster_proj.cpp
+index 4864214..233b657 100644
+--- a/meshlab/src/meshlabplugins/decorate_raster_proj/decorate_raster_proj.cpp
++++ b/meshlab/src/meshlabplugins/decorate_raster_proj/decorate_raster_proj.cpp
+@@ -526,7 +526,7 @@ bool DecorateRasterProjPlugin::startDecorate( QAction *act,
+ GLenum err = glewInit();
+ if( err != GLEW_OK )
+ {
+- qWarning( (std::string("Impossible to load GLEW library.")+(char*)glewGetErrorString(err)).c_str() );
++ qWarning("Impossible to load GLEW library: %s", glewGetErrorString(err));
+ return false;
+ }
+ Log( "GLEW library correctly initialized." );
+@@ -536,7 +536,7 @@ bool DecorateRasterProjPlugin::startDecorate( QAction *act,
+ std::string logs;
+ if( !initShaders(logs) )
+ {
+- qWarning( ("Error while initializing shaders.\n"+logs).c_str() );
++ qWarning("Error while initializing shaders.\n%s", logs.c_str());
+ return false;
+ }
+ Log( "Shaders correctly loaded." );
+diff --git a/meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.cpp b/meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.cpp
+index 88b6f9f..c23987c 100644
+--- a/meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.cpp
++++ b/meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.cpp
+@@ -269,7 +269,7 @@ void EditArc3DPlugin::ExportPly()
+ QString suffix = "." + qfInfo.completeSuffix();
+ QString path = qfInfo.absoluteFilePath().remove(suffix);
+ path.append("Undist" + suffix);
+- qDebug(path.toLatin1());
++ qDebug("%s", path.toStdString().c_str());
+
+ QImage undistImg(originalImg.width(),originalImg.height(),originalImg.format());
+ undistImg.fill(qRgba(0,0,0,255));
diff --git a/media-gfx/meshlab/files/1.3.2/07_gcc47.patch b/media-gfx/meshlab/files/1.3.2/07_gcc47.patch
new file mode 100644
index 000000000000..df608d8369ed
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/07_gcc47.patch
@@ -0,0 +1,105 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Fix FTBFS with GCC-4.7
+Git-Branch: p/gcc47
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..07a6c6cf991f44779236b31381a7ca
+
+Closes: #667276
+
+Thanks to Matej Vela for the patch.
+
+ meshlab/src/meshlabplugins/decorate_base/colorhistogram.h | 2 +-
+ .../vcg/complex/algorithms/local_optimization/tri_edge_flip.h | 8 ++++----
+ vcglib/vcg/space/index/grid_static_obj.h | 2 +-
+ vcglib/wrap/gl/trimesh.h | 2 +-
+ vcglib/wrap/ply/plystuff.h | 1 +
+ 5 files changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/meshlab/src/meshlabplugins/decorate_base/colorhistogram.h b/meshlab/src/meshlabplugins/decorate_base/colorhistogram.h
+index 2351b2a..90c6d76 100644
+--- a/meshlab/src/meshlabplugins/decorate_base/colorhistogram.h
++++ b/meshlab/src/meshlabplugins/decorate_base/colorhistogram.h
+@@ -40,7 +40,7 @@ public:
+
+ //! Reset histogram data.
+ void Clear() {
+- this->::Clear();
++ Histogram<ScalarType>::Clear();
+ CV.clear();
+ }
+ /*
+diff --git a/vcglib/vcg/complex/algorithms/local_optimization/tri_edge_flip.h b/vcglib/vcg/complex/algorithms/local_optimization/tri_edge_flip.h
+index 9054166..f40f0dc 100644
+--- a/vcglib/vcg/complex/algorithms/local_optimization/tri_edge_flip.h
++++ b/vcglib/vcg/complex/algorithms/local_optimization/tri_edge_flip.h
+@@ -558,13 +558,13 @@ public:
+ // edges of the first face, except the flipped edge
+ for(int i = 0; i < 3; i++) if(i != flipped) {
+ PosType newpos(f1, i);
+- Insert(heap, newpos, this->GlobalMark());
++ this->Insert(heap, newpos, this->GlobalMark());
+ }
+
+ // edges of the second face, except the flipped edge
+ for(int i = 0; i < 3; i++) if(i != f1->FFi(flipped)) {
+ PosType newpos(f2, i);
+- Insert(heap, newpos, this->GlobalMark());
++ this->Insert(heap, newpos, this->GlobalMark());
+ }
+
+ // every edge with v0, v1 v3 of f1
+@@ -583,7 +583,7 @@ public:
+ do {
+ VertexPointer v = pos.VFlip();
+ if(v != v0 && v != v1 && v != v2 && v != v3)
+- Insert(heap, pos, this->GlobalMark());
++ this->Insert(heap, pos, this->GlobalMark());
+
+ pos.NextE();
+ } while(pos != startpos && !pos.IsBorder());
+@@ -603,7 +603,7 @@ public:
+ do {
+ VertexPointer v = pos.VFlip();
+ if(v != v0 && v != v1 && v != v2 && v != v3)
+- Insert(heap, pos, this->GlobalMark());
++ this->Insert(heap, pos, this->GlobalMark());
+
+ pos.NextE();
+ } while(pos != startpos && !pos.IsBorder());
+diff --git a/vcglib/vcg/space/index/grid_static_obj.h b/vcglib/vcg/space/index/grid_static_obj.h
+index 0554393..26608d5 100644
+--- a/vcglib/vcg/space/index/grid_static_obj.h
++++ b/vcglib/vcg/space/index/grid_static_obj.h
+@@ -72,7 +72,7 @@ class GridStaticObj : public BasicGrid<FLT>
+ inline ~GridStaticObj() { if(grid) delete[] grid; }
+ inline void Init(const ObjType &val)
+ {
+- fill(grid,grid+size(),val);
++ std::fill(grid,grid+size(),val);
+ }
+
+
+diff --git a/vcglib/wrap/gl/trimesh.h b/vcglib/wrap/gl/trimesh.h
+index 5d40404..ba72456 100644
+--- a/vcglib/wrap/gl/trimesh.h
++++ b/vcglib/wrap/gl/trimesh.h
+@@ -1003,7 +1003,7 @@ void Crease(MESH_TYPE &m, typename MESH_TYPE::scalar_type angleRad)
+ }
+ }
+
+- m.vert.math::Swap(newvert);
++ m.vert.swap(newvert);
+ m.vn=m.vert.size();
+ }
+
+diff --git a/vcglib/wrap/ply/plystuff.h b/vcglib/wrap/ply/plystuff.h
+index 3e41e63..4af9508 100644
+--- a/vcglib/wrap/ply/plystuff.h
++++ b/vcglib/wrap/ply/plystuff.h
+@@ -75,6 +75,7 @@ using namespace vcg;
+ #define pb_close _close
+ #define DIR_SEP "\\"
+ #else
++#include <unistd.h>
+ #define pb_mkdir(n) mkdir(n,0755)
+ #define pb_access access
+ #define pb_stat stat
diff --git a/media-gfx/meshlab/files/1.3.2/08_lib3ds.patch b/media-gfx/meshlab/files/1.3.2/08_lib3ds.patch
new file mode 100644
index 000000000000..243ed1d9668a
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/08_lib3ds.patch
@@ -0,0 +1,32 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Use Debian lib3ds.
+Git-Branch: p/lib3ds
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..944ece3e566dbf4cc885163178d303
+
+ meshlab/src/meshlabplugins/io_3ds/io_3ds.pro | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro b/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro
+index cf8052a..fed064d 100644
+--- a/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro
++++ b/meshlab/src/meshlabplugins/io_3ds/io_3ds.pro
+@@ -14,7 +14,7 @@ SOURCES += meshio.cpp \
+
+ TARGET = io_3ds
+
+-INCLUDEPATH += ../../external/lib3ds-1.3.0/
++INCLUDEPATH += /usr/include/lib3ds
+
+ # Notes on the paths of lib3ds files.
+ # Once you have compiled the library put the lib files in a dir named lib/XXX/
+@@ -25,9 +25,7 @@ win32-msvc.net:LIBS += ../../external/lib/win32-msvc.net/3ds.lib
+ win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/3ds.lib
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/3ds.lib
+ win32-g++:LIBS += ../../external/lib/win32-gcc/lib3ds.a
+-linux-g++:LIBS += ../../external/lib/linux-g++/lib3ds.a
+-linux-g++-32:LIBS += ../../external/lib/linux-g++-32/lib3ds.a
+-linux-g++-64:LIBS += ../../external/lib/linux-g++-64/lib3ds.a
++linux-g++:LIBS += -l3ds
+
+ # unix:LIBS += -L../../../../code/lib/lib3ds-1.3.0/lib3ds/lib/unix -l3ds
+
diff --git a/media-gfx/meshlab/files/1.3.2/09_libbz2.patch b/media-gfx/meshlab/files/1.3.2/09_libbz2.patch
new file mode 100644
index 000000000000..1b064f7f6ae9
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/09_libbz2.patch
@@ -0,0 +1,31 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Use Debian libbz2.
+Git-Branch: p/libbz2
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..a6e1a0b242a02075c0d686ec4fa8b8
+
+ meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.pro | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.pro b/meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.pro
+index e317b99..94dc124 100644
+--- a/meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.pro
++++ b/meshlab/src/meshlabplugins/edit_arc3D/edit_arc3D.pro
+@@ -32,16 +32,12 @@ RESOURCES = edit_arc3D.qrc
+ win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/bz2.lib
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/bz2.lib
+ win32-g++:LIBS += ../../external/lib/win32-gcc/libbz2.a
+-linux-g++:LIBS += ../../external/lib/linux-g++/libbz2.a
+-linux-g++-32:LIBS += ../../external/lib/linux-g++-32/libbz2.a
+-linux-g++-64:LIBS += ../../external/lib/linux-g++-64/libbz2.a
++linux-g++:LIBS += -lbz2
+
+ win32-msvc2005:INCLUDEPATH += ../../external/bzip2-1.0.5
+ win32-msvc2008:INCLUDEPATH += ../../external/bzip2-1.0.5
+ win32-g++:INCLUDEPATH += ../../external/bzip2-1.0.5
+-linux-g++:INCLUDEPATH += ../../external/bzip2-1.0.5
+-linux-g++-32:INCLUDEPATH += ../../external/bzip2-1.0.5
+-linux-g++-64:INCLUDEPATH += ../../external/bzip2-1.0.5
++linux-g++:INCLUDEPATH += /usr/include
+
+ mac:LIBS += -lbz2
+
diff --git a/media-gfx/meshlab/files/1.3.2/10_muparser.patch b/media-gfx/meshlab/files/1.3.2/10_muparser.patch
new file mode 100644
index 000000000000..f640377c59f4
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/10_muparser.patch
@@ -0,0 +1,30 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Use Debian muparser.
+Git-Branch: p/muparser
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..5e9cfcdae805ddac6f550b2a9f7011
+
+ meshlab/src/meshlabplugins/filter_func/filter_func.pro | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/meshlab/src/meshlabplugins/filter_func/filter_func.pro b/meshlab/src/meshlabplugins/filter_func/filter_func.pro
+index 3bcce2a..9a147b2 100644
+--- a/meshlab/src/meshlabplugins/filter_func/filter_func.pro
++++ b/meshlab/src/meshlabplugins/filter_func/filter_func.pro
+@@ -6,7 +6,7 @@ SOURCES += filter_func.cpp
+
+ TARGET = filter_func
+
+-INCLUDEPATH += ../../external/muparser_v132/include
++INCLUDEPATH += /usr/include/muParser
+
+ # Note: we need static libs so when building muparser lib use
+ # ./configure --enable-shared=no
+@@ -14,7 +14,5 @@ INCLUDEPATH += ../../external/muparser_v132/include
+ win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/muparser.lib
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/muparser.lib
+ macx:LIBS += $$MACLIBDIR/libmuparser.a
+-linux-g++:LIBS += ../../external/lib/linux-g++/libmuparser.a
+-linux-g++-32:LIBS += ../../external/lib/linux-g++-32/libmuparser.a
+-linux-g++-64:LIBS += ../../external/lib/linux-g++-64/libmuparser.a
++linux-g++:LIBS += -lmuparser
+ win32-g++:LIBS += ../../external/lib/win32-gcc/libmuparser.a
diff --git a/media-gfx/meshlab/files/1.3.2/11_openctm.patch b/media-gfx/meshlab/files/1.3.2/11_openctm.patch
new file mode 100644
index 000000000000..7fcbced741a3
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/11_openctm.patch
@@ -0,0 +1,31 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Use Debian OpenCTM
+Git-Branch: p/openctm
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..e067d2c66c2408593f62f9c7776eed
+
+ meshlab/src/meshlabplugins/io_ctm/io_ctm.pro | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/meshlab/src/meshlabplugins/io_ctm/io_ctm.pro b/meshlab/src/meshlabplugins/io_ctm/io_ctm.pro
+index 1084902..31f0237 100644
+--- a/meshlab/src/meshlabplugins/io_ctm/io_ctm.pro
++++ b/meshlab/src/meshlabplugins/io_ctm/io_ctm.pro
+@@ -3,7 +3,7 @@ HEADERS += io_ctm.h \
+ $$VCGDIR/wrap/io_trimesh/import_ctm.h \
+ $$VCGDIR/wrap/io_trimesh/export_ctm.h
+ SOURCES += io_ctm.cpp
+-INCLUDEPATH += ../../external/OpenCTM-1.0.3/lib
++INCLUDEPATH += /usr/include
+ TARGET = io_ctm
+
+ win32-msvc.net:QMAKE_CXXFLAGS += /DOPENCTM_STATIC
+@@ -15,8 +15,6 @@ win32-msvc.net:LIBS += ../../external/lib/win32-msvc.net/openctm.lib
+ win32-msvc2005:LIBS += ../../external/lib/win32-msvc2005/openctm.lib
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/openctm.lib
+ win32-g++:LIBS += ../../external/lib/win32-gcc/libopenctm.a
+-linux-g++:LIBS += ../../external/lib/linux-g++/libopenctm.a
+-linux-g++-32:LIBS += ../../external/lib/linux-g++-32/libopenctm.a
+-linux-g++-64:LIBS += ../../external/lib/linux-g++-64/libopenctm.a
++linux-g++:LIBS += -lopenctm
+ #macx:LIBS += ../../external/lib/macx/libopenctm.a
+ macx:LIBS += $$MACLIBDIR/libopenctm.a
diff --git a/media-gfx/meshlab/files/1.3.2/12_overflow.patch b/media-gfx/meshlab/files/1.3.2/12_overflow.patch
new file mode 100644
index 000000000000..7bf594302c82
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/12_overflow.patch
@@ -0,0 +1,23 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Fix overflowing array index in VCGlib
+Git-Branch: p/overflow
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..ec0961589f0d134ab51265b8431c5f
+
+Fixes also E-array-bounds error in Debian build log scanner.
+
+ vcglib/wrap/gl/addons.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vcglib/wrap/gl/addons.h b/vcglib/wrap/gl/addons.h
+index 002ff1b..bc863bf 100644
+--- a/vcglib/wrap/gl/addons.h
++++ b/vcglib/wrap/gl/addons.h
+@@ -292,7 +292,7 @@ public:
+ P[1] = Point3f( 0, sinf(angle), cosf(angle));
+ assert(!glGetError());
+ glBegin(GL_TRIANGLES);
+- Point3f n = ( (P[0]-p0) ^ (P[2]-p0) ).Normalize();
++ Point3f n = ( (P[0]-p0) ^ (P[1]-p0) ).Normalize();
+ glNormal3f(n[0],n[1],n[2]);
+ glVertex3f(p0[0],p0[1],p0[2]);
+ glNormal3f(N[0][0],N[0][1],N[0][2]);
diff --git a/media-gfx/meshlab/files/1.3.2/13_pluginsdir.patch b/media-gfx/meshlab/files/1.3.2/13_pluginsdir.patch
new file mode 100644
index 000000000000..f92ad6376ff1
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/13_pluginsdir.patch
@@ -0,0 +1,21 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Hardcode pluginsDir to the correct path in Debian
+Git-Branch: p/pluginsdir
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..e1db74a038fd5fc27cc5e9f0bee8d3
+
+ meshlab/src/common/pluginmanager.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meshlab/src/common/pluginmanager.cpp b/meshlab/src/common/pluginmanager.cpp
+index d84c8fa..a039736 100644
+--- a/meshlab/src/common/pluginmanager.cpp
++++ b/meshlab/src/common/pluginmanager.cpp
+@@ -230,7 +230,7 @@ QString PluginManager::getBaseDirPath()
+
+ QString PluginManager::getPluginDirPath()
+ {
+- QDir pluginsDir(getBaseDirPath());
++ QDir pluginsDir("/usr/lib/meshlab");
+ if(!pluginsDir.exists("plugins"))
+ //QMessageBox::warning(0,"Meshlab Initialization","Serious error. Unable to find the plugins directory.");
+ qDebug("Meshlab Initialization: Serious error. Unable to find the plugins directory.");
diff --git a/media-gfx/meshlab/files/1.3.2/14_ply_numeric.patch b/media-gfx/meshlab/files/1.3.2/14_ply_numeric.patch
new file mode 100644
index 000000000000..2f7c6e0a72d2
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/14_ply_numeric.patch
@@ -0,0 +1,32 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Set LC_NUMERIC to "C"
+Git-Branch: p/ply_numeric
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..2aeac7daa4785a9cf0b2480f663780
+
+Fixes reading of ascii float values in locales which use the comma as a
+float separator.
+
+ meshlab/src/meshlab/main.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/meshlab/src/meshlab/main.cpp b/meshlab/src/meshlab/main.cpp
+index 7058e31..e452e87 100644
+--- a/meshlab/src/meshlab/main.cpp
++++ b/meshlab/src/meshlab/main.cpp
+@@ -25,12 +25,16 @@
+ #include <QMessageBox>
+ #include "mainwindow.h"
+
++using namespace std;
++
+ int main(int argc, char *argv[])
+ {
+ MeshLabApplication app(argc, argv);
+ QLocale::setDefault(QLocale::C);
+ QCoreApplication::setOrganizationName("VCG");
+ QCoreApplication::setApplicationName("MeshLab");
++
++ std::setlocale(LC_NUMERIC, "C");
+
+ if(argc>1)
+ {
diff --git a/media-gfx/meshlab/files/1.3.2/15_qhull.patch b/media-gfx/meshlab/files/1.3.2/15_qhull.patch
new file mode 100644
index 000000000000..6c1f70a3f0bc
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/15_qhull.patch
@@ -0,0 +1,67 @@
+diff -Naur a/meshlab/src/meshlabplugins/filter_qhull/filter_qhull.pro b/meshlab/src/meshlabplugins/filter_qhull/filter_qhull.pro
+--- a/meshlab/src/meshlabplugins/filter_qhull/filter_qhull.pro 2013-10-30 21:12:42.000000000 +0000
++++ b/meshlab/src/meshlabplugins/filter_qhull/filter_qhull.pro 2013-10-30 21:31:35.692580129 +0000
+@@ -8,28 +8,6 @@
+ SOURCES += filter_qhull.cpp \
+ qhull_tools.cpp
+
+-HEADERS += ../../external/qhull-2003.1/src/geom.h \
+- ../../external/qhull-2003.1/src/io.h \
+- ../../external/qhull-2003.1/src/mem.h \
+- ../../external/qhull-2003.1/src/merge.h \
+- ../../external/qhull-2003.1/src/poly.h \
+- ../../external/qhull-2003.1/src/qhull.h \
+- ../../external/qhull-2003.1/src/qset.h \
+- ../../external/qhull-2003.1/src/stat.h \
+- ../../external/qhull-2003.1/src/user.h
+-
+-SOURCES += ../../external/qhull-2003.1/src/geom.c \
+- ../../external/qhull-2003.1/src/geom2.c \
+- ../../external/qhull-2003.1/src/global.c \
+- ../../external/qhull-2003.1/src/io.c \
+- ../../external/qhull-2003.1/src/mem.c \
+- ../../external/qhull-2003.1/src/merge.c \
+- ../../external/qhull-2003.1/src/poly.c \
+- ../../external/qhull-2003.1/src/poly2.c \
+- ../../external/qhull-2003.1/src/qconvex.c \
+- ../../external/qhull-2003.1/src/qhull.c \
+- ../../external/qhull-2003.1/src/qset.c \
+- ../../external/qhull-2003.1/src/stat.c \
+- ../../external/qhull-2003.1/src/user.c
++LIBS += -lqhull
+
+ TARGET = filter_qhull
+\ В конце файла нет новой строки
+diff -Naur a/meshlab/src/meshlabplugins/filter_qhull/qhull_tools.h b/meshlab/src/meshlabplugins/filter_qhull/qhull_tools.h
+--- a/meshlab/src/meshlabplugins/filter_qhull/qhull_tools.h 1970-01-01 00:00:00.000000000 +0000
++++ b/meshlab/src/meshlabplugins/filter_qhull/qhull_tools.h 2013-10-30 21:32:57.242574626 +0000
+@@ -0,0 +1,29 @@
++
++#include <common/meshmodel.h>
++#include <math.h>
++
++
++#if defined(__cplusplus)
++extern "C"
++{
++#endif
++#include <stdio.h>
++#include <stdlib.h>
++#include <libqhull/libqhull.h>
++#include <libqhull/mem.h>
++#include <libqhull/qset.h>
++#include <libqhull/geom.h>
++#include <libqhull/merge.h>
++#include <libqhull/poly.h>
++#include <libqhull/io.h>
++#include <libqhull/stat.h>
++#if defined(__cplusplus)
++}
++#endif
++
++facetT *compute_convex_hull(int dim, int numpoints, MeshModel &m);
++facetT *compute_delaunay(int dim, int numpoints, MeshModel &m);
++bool compute_voronoi(int dim, int numpoints, MeshModel &m, MeshModel &pm,float threshold);
++bool compute_alpha_shapes(int dim, int numpoints, MeshModel &m, MeshModel &pm,double alpha, bool alphashape);
++int visible_points(int dim, int numpoints, MeshModel &m, MeshModel &pm,MeshModel &pm2, vcg::Point3f viewpointP,float threshold,bool convex_hullFP,bool triangVP);
++
diff --git a/media-gfx/meshlab/files/1.3.2/16_shadersdir.patch b/media-gfx/meshlab/files/1.3.2/16_shadersdir.patch
new file mode 100644
index 000000000000..d8ebc206f045
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/16_shadersdir.patch
@@ -0,0 +1,49 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Hardcode shadersDir to the correct path in Debian in various plugins
+Git-Branch: p/shadersdir
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..06b8aa9ce525fc0c5c221f5d675c29
+
+ meshlab/src/meshlabplugins/render_gdp/meshrender.cpp | 2 +-
+ meshlab/src/meshlabplugins/render_gdp/shaderDialog.cpp | 2 +-
+ meshlab/src/meshlabplugins/render_rfx/render_rfx.cpp | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/meshlab/src/meshlabplugins/render_gdp/meshrender.cpp b/meshlab/src/meshlabplugins/render_gdp/meshrender.cpp
+index 64dbcc3..c07998c 100644
+--- a/meshlab/src/meshlabplugins/render_gdp/meshrender.cpp
++++ b/meshlab/src/meshlabplugins/render_gdp/meshrender.cpp
+@@ -39,7 +39,7 @@ void MeshShaderRenderPlugin::initActionList() {
+ qaNone->setCheckable(false);
+ actionList << qaNone;*/
+
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++ QDir shadersDir = QDir("/usr/share/meshlab");
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release" || shadersDir.dirName() == "plugins" )
+ shadersDir.cdUp();
+diff --git a/meshlab/src/meshlabplugins/render_gdp/shaderDialog.cpp b/meshlab/src/meshlabplugins/render_gdp/shaderDialog.cpp
+index 9c45981..0256805 100644
+--- a/meshlab/src/meshlabplugins/render_gdp/shaderDialog.cpp
++++ b/meshlab/src/meshlabplugins/render_gdp/shaderDialog.cpp
+@@ -323,7 +323,7 @@ void ShaderDialog::changeTexturePath(int i) {
+ void ShaderDialog::browseTexturePath(int i) {
+ QFileDialog fd(0,"Choose new texture");
+
+- QDir shadersDir = QDir(qApp->applicationDirPath());
++ QDir shadersDir = QDir("/usr/share/meshlab");
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" || shadersDir.dirName() == "release")
+ shadersDir.cdUp();
+diff --git a/meshlab/src/meshlabplugins/render_rfx/render_rfx.cpp b/meshlab/src/meshlabplugins/render_rfx/render_rfx.cpp
+index e327cea..eb67fd2 100755
+--- a/meshlab/src/meshlabplugins/render_rfx/render_rfx.cpp
++++ b/meshlab/src/meshlabplugins/render_rfx/render_rfx.cpp
+@@ -55,7 +55,7 @@ QList<QAction*> RenderRFX::actions()
+
+ void RenderRFX::initActionList()
+ {
+- QDir shadersDir = PluginManager::getBaseDirPath();
++ QDir shadersDir = QDir("/usr/share/meshlab");
+
+ #if defined(Q_OS_WIN)
+ if (shadersDir.dirName() == "debug" ||
diff --git a/media-gfx/meshlab/files/1.3.2/17_structuresynth.patch b/media-gfx/meshlab/files/1.3.2/17_structuresynth.patch
new file mode 100644
index 000000000000..6a6b84c8d682
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/17_structuresynth.patch
@@ -0,0 +1,48 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Include glu.h where needed in included structure-synth code.
+Git-Branch: p/structuresynth
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..45495fd45078a06d7c5f7405ba636c
+
+Also link structuresynth code with libGLU.
+
+This FTBS was exposed by GCC-4.7. See Debian bug #672000 for the same
+issue in the real structure-synth Debian package.
+
+ .../structuresynth/ssynth/SyntopiaCore/GLEngine/EngineWidget.h | 1 +
+ .../src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/Sphere.h | 1 +
+ meshlab/src/external/structuresynth/structuresynth.pro | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/EngineWidget.h b/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/EngineWidget.h
+index 8905cbe..e13b011 100644
+--- a/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/EngineWidget.h
++++ b/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/EngineWidget.h
+@@ -5,6 +5,7 @@
+ #include <QMainWindow>
+ #include <QPoint>
+ #include <QList>
++#include <GL/glu.h>
+
+ #include "SyntopiaCore/Math/Vector3.h"
+ #include "SyntopiaCore/Math/Matrix4.h"
+diff --git a/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/Sphere.h b/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/Sphere.h
+index 0b0dc40..ed95346 100644
+--- a/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/Sphere.h
++++ b/meshlab/src/external/structuresynth/ssynth/SyntopiaCore/GLEngine/Sphere.h
+@@ -2,6 +2,7 @@
+
+ #include "SyntopiaCore/Math/Vector3.h"
+ #include "Object3D.h"
++#include <GL/glu.h>
+
+ namespace SyntopiaCore {
+ namespace GLEngine {
+diff --git a/meshlab/src/external/structuresynth/structuresynth.pro b/meshlab/src/external/structuresynth/structuresynth.pro
+index 8579b03..362ce5d 100644
+--- a/meshlab/src/external/structuresynth/structuresynth.pro
++++ b/meshlab/src/external/structuresynth/structuresynth.pro
+@@ -120,3 +120,4 @@ win32-msvc2008:DESTDIR = ../lib/win32-msvc2008
+ linux-g++-32:DESTDIR = ../lib/linux-g++-32
+ linux-g++-64:DESTDIR = ../lib/linux-g++-64
+ linux-g++:DESTDIR = ../lib/linux-g++
++unix:LIBS+=-lGLU
diff --git a/media-gfx/meshlab/files/1.3.2/18_glew.c18p1.patch b/media-gfx/meshlab/files/1.3.2/18_glew.c18p1.patch
new file mode 100644
index 000000000000..894f05cf2423
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/18_glew.c18p1.patch
@@ -0,0 +1,146 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Use Debian GLEW.
+Git-Branch: p/glew
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..7023f74389baab6b9032c08ae2e2b2
+
+ meshlab/src/common/common.pro | 5 ++---
+ meshlab/src/meshlab/meshlab.pro | 4 +---
+ meshlab/src/meshlabplugins/filter_plymc/plymc.pro | 2 +-
+ meshlab/src/meshlabserver/meshlabserver.pro | 6 ++----
+ meshlab/src/shared.pri | 7 ++++---
+ vcglib/apps/sample/trimesh_QT/trimesh_qt.pro | 5 +++--
+ vcglib/apps/sample/trimesh_pos_demo/trimesh_pos_demo.pro | 4 ++--
+ 7 files changed, 15 insertions(+), 18 deletions(-)
+
+diff --git a/meshlab/src/common/common.pro b/meshlab/src/common/common.pro
+index eec1863..58bda06 100644
+--- a/meshlab/src/common/common.pro
++++ b/meshlab/src/common/common.pro
+@@ -1,9 +1,9 @@
+ include (../general.pri)
+ EXIF_DIR = ../external/jhead-2.95
++GLEWDIR = /usr
++LIBS += -lGLEW
+
+
+-GLEWCODE = $$GLEWDIR/src/glew.c
+-
+ win32-msvc2005:DESTDIR = ../distrib
+ win32-msvc2008:DESTDIR = ../distrib
+ win32-msvc2010:DESTDIR = ../distrib
+@@ -106,7 +106,6 @@ SOURCES += filterparameter.cpp \
+ mlapplication.cpp \
+ scriptsyntax.cpp \
+ searcher.cpp \
+- $$GLEWCODE \
+ meshlabdocumentxml.cpp \
+ meshlabdocumentbundler.cpp
+
+diff --git a/meshlab/src/meshlab/meshlab.pro b/meshlab/src/meshlab/meshlab.pro
+index 4a7d0fd..ecd9ed6 100644
+--- a/meshlab/src/meshlab/meshlab.pro
++++ b/meshlab/src/meshlab/meshlab.pro
+@@ -129,11 +129,9 @@ win32-g++:LIBS += -L../external/lib/win32-gcc -L../distrib -lcommon
+ # win32-g++:release:LIBS += -L../common/release -lcommon
+ #}
+
+-linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLU
++linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLEW -lGLU
+ linux-g++:QMAKE_RPATHDIR += ../distrib
+-linux-g++-32:LIBS += -L../external/lib/linux-g++-32 -L../distrib -lcommon -lGLU
+ linux-g++-32:QMAKE_RPATHDIR += ../distrib
+-linux-g++-64:LIBS += -L../external/lib/linux-g++-64 -L../distrib -lcommon -lGLU
+ linux-g++-64:QMAKE_RPATHDIR += ../distrib
+
+ # uncomment in your local copy only in emergency cases.
+diff --git a/meshlab/src/meshlabplugins/filter_plymc/plymc.pro b/meshlab/src/meshlabplugins/filter_plymc/plymc.pro
+index b609419..a89e8c6 100755
+--- a/meshlab/src/meshlabplugins/filter_plymc/plymc.pro
++++ b/meshlab/src/meshlabplugins/filter_plymc/plymc.pro
+@@ -1,7 +1,7 @@
+ TARGET = plymc
+ DEPENDPATH += .
+ INCLUDEPATH += ../../../../vcglib \
+- ../../code/lib/glew/include
++ /usr/include
+ CONFIG += console \
+ stl \
+ debug_and_release
+diff --git a/meshlab/src/meshlabserver/meshlabserver.pro b/meshlab/src/meshlabserver/meshlabserver.pro
+index cca5560..9b070c7 100644
+--- a/meshlab/src/meshlabserver/meshlabserver.pro
++++ b/meshlab/src/meshlabserver/meshlabserver.pro
+@@ -1,4 +1,4 @@
+-GLEWDIR = ../external/glew-1.5.1
++GLEWDIR = /usr
+
+ HEADERS =
+
+@@ -25,11 +25,9 @@ win32-msvc2005: LIBS += -L../distrib -lcommon
+ win32-msvc2008: LIBS += -L../distrib -lcommon
+ win32-msvc2010: LIBS += -L../distrib -lcommon
+ win32-g++: LIBS += -L../distrib -lcommon
+-linux-g++: LIBS += -L../distrib -lcommon
++linux-g++: LIBS += -L../distrib -lcommon -lGLEW
+ linux-g++:QMAKE_RPATHDIR += ../distrib
+-linux-g++-32: LIBS += -L../distrib -lcommon
+ linux-g++-32:QMAKE_RPATHDIR += ../distrib
+-linux-g++-64: LIBS += -L../distrib -lcommon
+ linux-g++-64:QMAKE_RPATHDIR += ../distrib
+ #CONFIG (release,debug | release) {
+ # win32-msvc2005:release: LIBS += -L../common/release -lcommon
+diff --git a/meshlab/src/shared.pri b/meshlab/src/shared.pri
+index 93ed32f..0ba3e67 100644
+--- a/meshlab/src/shared.pri
++++ b/meshlab/src/shared.pri
+@@ -17,9 +17,10 @@ win32-msvc2005: LIBS += ../../distrib/common.lib
+ win32-msvc2008: LIBS += ../../distrib/common.lib
+ win32-msvc2010: LIBS += ../../distrib/common.lib
+ win32-g++:LIBS += -L../../distrib -lcommon
+-linux-g++:LIBS += -L../../distrib -lcommon
+-linux-g++-32:LIBS += -L../../distrib -lcommon
+-linux-g++-64:LIBS += -L../../distrib -lcommon
++linux-g++:LIBS += -L../../distrib -lcommon -lGLEW
++#linux-g++-32:LIBS += -L../../distrib -lcommon
++#linux-g++-64:LIBS += -L../../distrib -lcommon
++
+
+ #CONFIG(debug, debug|release) {
+ # win32-msvc2005: LIBS += ../../common/debug/common.lib
+diff --git a/vcglib/apps/sample/trimesh_QT/trimesh_qt.pro b/vcglib/apps/sample/trimesh_QT/trimesh_qt.pro
+index 8a3c7fc..986116e 100644
+--- a/vcglib/apps/sample/trimesh_QT/trimesh_qt.pro
++++ b/vcglib/apps/sample/trimesh_QT/trimesh_qt.pro
+@@ -26,8 +26,9 @@ SOURCES += ../../../wrap/gui/trackmode.cpp
+
+ # Compile glew
+ DEFINES += GLEW_STATIC
+-INCLUDEPATH += ../../../../code/lib/glew/include
+-SOURCES += ../../../../code/lib/glew/src/glew.c
++INCLUDEPATH += /usr/include
++#SOURCES += ../../../../code/lib/glew/src/glew.c
++LIBS += -lGLEW
+
+ # Awful problem with windows..
+ win32{
+diff --git a/vcglib/apps/sample/trimesh_pos_demo/trimesh_pos_demo.pro b/vcglib/apps/sample/trimesh_pos_demo/trimesh_pos_demo.pro
+index e8ae178..4a69fef 100644
+--- a/vcglib/apps/sample/trimesh_pos_demo/trimesh_pos_demo.pro
++++ b/vcglib/apps/sample/trimesh_pos_demo/trimesh_pos_demo.pro
+@@ -1,14 +1,14 @@
+-INCLUDEPATH += . ../../.. ../../../../code/lib ../../../../code/lib/glew/include
++INCLUDEPATH += . ../../.. ../../../../code/lib /usr/include
+ HEADERS = glwidget.h \
+ window.h \
+ mesh_type.h
+ SOURCES = glwidget.cpp \
+ main.cpp \
+ window.cpp\
+- ../../../../code/lib/glew/src/glew.c \
+ ../../../wrap/ply/plylib.cpp\
+ ../../../wrap/gui/trackmode.cpp\
+ ../../../wrap/gui/trackball.cpp
++LIBS += -lGLEW
+ QT += opengl
+
+ # install
diff --git a/media-gfx/meshlab/files/1.3.2/19_CONFLICTS_IN_rpath.patch b/media-gfx/meshlab/files/1.3.2/19_CONFLICTS_IN_rpath.patch
new file mode 100644
index 000000000000..c3dfc4de35be
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/19_CONFLICTS_IN_rpath.patch
@@ -0,0 +1,32 @@
+reverted:
+--- b/meshlab/src/meshlab/meshlab.pro
++++ a/meshlab/src/meshlab/meshlab.pro
+@@ -129,9 +129,11 @@
+ # win32-g++:release:LIBS += -L../common/release -lcommon
+ #}
+
++linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLU
+-linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLEW -lGLU
+ linux-g++:QMAKE_RPATHDIR += ../distrib
++linux-g++-32:LIBS += -L../external/lib/linux-g++-32 -L../distrib -lcommon -lGLU
+ linux-g++-32:QMAKE_RPATHDIR += ../distrib
++linux-g++-64:LIBS += -L../external/lib/linux-g++-64 -L../distrib -lcommon -lGLU
+ linux-g++-64:QMAKE_RPATHDIR += ../distrib
+
+ # uncomment in your local copy only in emergency cases.
+reverted:
+--- b/meshlab/src/meshlabserver/meshlabserver.pro
++++ a/meshlab/src/meshlabserver/meshlabserver.pro
+@@ -25,9 +25,11 @@
+ win32-msvc2008: LIBS += -L../distrib -lcommon
+ win32-msvc2010: LIBS += -L../distrib -lcommon
+ win32-g++: LIBS += -L../distrib -lcommon
++linux-g++: LIBS += -L../distrib -lcommon
+-linux-g++: LIBS += -L../distrib -lcommon -lGLEW
+ linux-g++:QMAKE_RPATHDIR += ../distrib
++linux-g++-32: LIBS += -L../distrib -lcommon
+ linux-g++-32:QMAKE_RPATHDIR += ../distrib
++linux-g++-64: LIBS += -L../distrib -lcommon
+ linux-g++-64:QMAKE_RPATHDIR += ../distrib
+ #CONFIG (release,debug | release) {
+ # win32-msvc2005:release: LIBS += -L../common/release -lcommon
diff --git a/media-gfx/meshlab/files/1.3.2/20_rpath.c18p2.patch b/media-gfx/meshlab/files/1.3.2/20_rpath.c18p2.patch
new file mode 100644
index 000000000000..e53d8bf1e798
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/20_rpath.c18p2.patch
@@ -0,0 +1,43 @@
+From: Teemu Ikonen <tpikonen@gmail.com>
+Subject: Use /usr/lib/meshlab as RPATH in binaries.
+Git-Branch: p/rpath
+Git-Diff: 532bdd9a6bde03cf47da8fb63fee60..0ecffa4d55bfff6f3b98a478d0cd82
+
+ meshlab/src/meshlab/meshlab.pro | 4 +---
+ meshlab/src/meshlabserver/meshlabserver.pro | 4 +---
+ 2 files changed, 2 insertions(+), 6 deletions(-)
+
+diff --git a/meshlab/src/meshlab/meshlab.pro b/meshlab/src/meshlab/meshlab.pro
+index 4a7d0fd..f67ba07 100644
+--- a/meshlab/src/meshlab/meshlab.pro
++++ b/meshlab/src/meshlab/meshlab.pro
+@@ -130,11 +130,9 @@ win32-g++:LIBS += -L../external/lib/win32-gcc -L../distrib -lcommon
+ #}
+
+ linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLU
+-linux-g++:QMAKE_RPATHDIR += ../distrib
++linux-g++:QMAKE_RPATHDIR += /usr/lib/meshlab
+ linux-g++-32:LIBS += -L../external/lib/linux-g++-32 -L../distrib -lcommon -lGLU
+-linux-g++-32:QMAKE_RPATHDIR += ../distrib
+ linux-g++-64:LIBS += -L../external/lib/linux-g++-64 -L../distrib -lcommon -lGLU
+-linux-g++-64:QMAKE_RPATHDIR += ../distrib
+
+ # uncomment in your local copy only in emergency cases.
+ # We should never be too permissive
+diff --git a/meshlab/src/meshlabserver/meshlabserver.pro b/meshlab/src/meshlabserver/meshlabserver.pro
+index cca5560..6a19b81 100644
+--- a/meshlab/src/meshlabserver/meshlabserver.pro
++++ b/meshlab/src/meshlabserver/meshlabserver.pro
+@@ -26,11 +26,9 @@ win32-msvc2008: LIBS += -L../distrib -lcommon
+ win32-msvc2010: LIBS += -L../distrib -lcommon
+ win32-g++: LIBS += -L../distrib -lcommon
+ linux-g++: LIBS += -L../distrib -lcommon
+-linux-g++:QMAKE_RPATHDIR += ../distrib
++linux-g++:QMAKE_RPATHDIR += /usr/lib/meshlab
+ linux-g++-32: LIBS += -L../distrib -lcommon
+-linux-g++-32:QMAKE_RPATHDIR += ../distrib
+ linux-g++-64: LIBS += -L../distrib -lcommon
+-linux-g++-64:QMAKE_RPATHDIR += ../distrib
+ #CONFIG (release,debug | release) {
+ # win32-msvc2005:release: LIBS += -L../common/release -lcommon
+ # win32-msvc2008:release: LIBS += -L../common/release -lcommon
diff --git a/media-gfx/meshlab/files/1.3.2/21_RESOLUTION.patch b/media-gfx/meshlab/files/1.3.2/21_RESOLUTION.patch
new file mode 100644
index 000000000000..35c1cac41412
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/21_RESOLUTION.patch
@@ -0,0 +1,29 @@
+Resolve patch overlaps.
+--- a/meshlab/src/meshlab/meshlab.pro
++++ b/meshlab/src/meshlab/meshlab.pro
+@@ -129,10 +129,8 @@ win32-g++:LIBS += -L../external/lib/win32-gcc -L../distrib -lcommon
+ # win32-g++:release:LIBS += -L../common/release -lcommon
+ #}
+
+-linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLU
++linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLEW -lGLU
+ linux-g++:QMAKE_RPATHDIR += /usr/lib/meshlab
+-linux-g++-32:LIBS += -L../external/lib/linux-g++-32 -L../distrib -lcommon -lGLU
+-linux-g++-64:LIBS += -L../external/lib/linux-g++-64 -L../distrib -lcommon -lGLU
+
+ # uncomment in your local copy only in emergency cases.
+ # We should never be too permissive
+--- a/meshlab/src/meshlabserver/meshlabserver.pro
++++ b/meshlab/src/meshlabserver/meshlabserver.pro
+@@ -25,10 +25,8 @@ win32-msvc2005: LIBS += -L../distrib -lcommon
+ win32-msvc2008: LIBS += -L../distrib -lcommon
+ win32-msvc2010: LIBS += -L../distrib -lcommon
+ win32-g++: LIBS += -L../distrib -lcommon
+-linux-g++: LIBS += -L../distrib -lcommon
++linux-g++: LIBS += -L../distrib -lcommon -lGLEW
+ linux-g++:QMAKE_RPATHDIR += /usr/lib/meshlab
+-linux-g++-32: LIBS += -L../distrib -lcommon
+-linux-g++-64: LIBS += -L../distrib -lcommon
+ #CONFIG (release,debug | release) {
+ # win32-msvc2005:release: LIBS += -L../common/release -lcommon
+ # win32-msvc2008:release: LIBS += -L../common/release -lcommon
diff --git a/media-gfx/meshlab/files/1.3.2/22_aliasing.patch b/media-gfx/meshlab/files/1.3.2/22_aliasing.patch
new file mode 100644
index 000000000000..7f3b8447c2d0
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.2/22_aliasing.patch
@@ -0,0 +1,43 @@
+diff -urN meshlab-1.3.2-r1.old/meshlab/src/meshlabplugins/io_tri/io_tri.cpp meshlab-1.3.2-r1/meshlab/src/meshlabplugins/io_tri/io_tri.cpp
+--- meshlab-1.3.2-r1.old/meshlab/src/meshlabplugins/io_tri/io_tri.cpp 2014-08-11 18:01:55.329182160 +0200
++++ meshlab-1.3.2-r1/meshlab/src/meshlabplugins/io_tri/io_tri.cpp 2014-08-11 15:11:20.000000000 +0200
+@@ -149,9 +149,11 @@
+ fread(&numFaces,sizeof(int),1,fp);
+ }
+ // advance pointer ??
+- char s[4];
++
++ char s[5];
+ fread(s,sizeof(char),4,fp);
+- printf("extara is %s (%d)\n", s, *(int*)(&s[0]));
++ s[4]=0;
++ printf("extara is %s (%d)\n", s, ((unsigned)s[0])|(((unsigned)s[1])<<8)|(((unsigned)s[2])<<16)|(((unsigned)s[3])<<24));
+ return 0;
+ }
+
+@@ -284,7 +286,7 @@
+ bool floatFlag=false;
+
+ int ret=fread(texCode,sizeof(char),4,fp);
+- qDebug("TexString code is '%s' (int:%d) (float:%f)\n", texCode, *(int*)(&texCode[0]), *(float*)(&texCode[0]));
++ //qDebug("TexString code is '%s' (int:%d) (float:%f)\n", texCode, *(int*)((void*)(&texCode[0])), *(float*)((void*)(&texCode[0])));
+
+ if(feof(fp)){
+ qDebug("Premature end of file");
+diff -urN meshlab-1.3.2-r1.old/vcglib/vcg/complex/algorithms/clustering.h meshlab-1.3.2-r1/vcglib/vcg/complex/algorithms/clustering.h
+--- meshlab-1.3.2-r1.old/vcglib/vcg/complex/algorithms/clustering.h 2014-08-11 18:01:55.366182161 +0200
++++ meshlab-1.3.2-r1/vcglib/vcg/complex/algorithms/clustering.h 2014-08-11 14:36:38.000000000 +0200
+@@ -233,12 +233,12 @@
+ // DuplicateFace=false a model with looks ok if you enable doublesided lighting and disable backfaceculling
+
+ bool DuplicateFaceParam;
+-
+ // This class keeps the references to the three cells where a face has its vertexes.
+ class SimpleTri
+ {
+ public:
+ CellType *v[3];
++#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+ int ii(int i) const {return *((int *)(&(v[i])));}
+ bool operator < ( const SimpleTri &p) const {
+ return (v[2]!=p.v[2])?(v[2]<p.v[2]):
diff --git a/media-gfx/meshlab/files/1.3.3/gcc-4.7.patch b/media-gfx/meshlab/files/1.3.3/gcc-4.7.patch
new file mode 100644
index 000000000000..b918ca52ec45
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.3/gcc-4.7.patch
@@ -0,0 +1,12 @@
+diff --git vcglib/wrap/ply/plystuff.h vcglib/wrap/ply/plystuff.h
+index 3e41e63..4af9508 100644
+--- vcglib/wrap/ply/plystuff.h
++++ vcglib/wrap/ply/plystuff.h
+@@ -75,6 +75,7 @@ using namespace vcg;
+ #define pb_close _close
+ #define DIR_SEP "\\"
+ #else
++#include <unistd.h>
+ #define pb_mkdir(n) mkdir(n,0755)
+ #define pb_access access
+ #define pb_stat stat
diff --git a/media-gfx/meshlab/files/1.3.3/lapack.patch b/media-gfx/meshlab/files/1.3.3/lapack.patch
new file mode 100644
index 000000000000..81c094634050
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.3/lapack.patch
@@ -0,0 +1,11 @@
+diff -Nur meshlab.orig/src/external/levmar-2.3/lm.h meshlab/src/external/levmar-2.3/lm.h
+--- meshlab.orig/src/external/levmar-2.3/lm.h 2010-04-28 17:30:47.000000000 +1000
++++ meshlab/src/external/levmar-2.3/lm.h 2010-05-13 20:17:35.488505907 +1000
+@@ -27,7 +27,6 @@
+
+ /* specify whether to use LAPACK or not. The first option is strongly recommended */
+ #define HAVE_LAPACK /* use LAPACK */
+- #undef HAVE_LAPACK /* uncomment this to force not using LAPACK */
+
+ /* to avoid the overhead of repeated mallocs(), routines in Axb.c can be instructed to
+ * retain working memory between calls. Such a choice, however, renders these routines
diff --git a/media-gfx/meshlab/files/1.3.3/mpir.patch b/media-gfx/meshlab/files/1.3.3/mpir.patch
new file mode 100644
index 000000000000..a3f8d051d891
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.3/mpir.patch
@@ -0,0 +1,10 @@
+diff -Nur meshlab.orig/src/meshlabplugins/filter_csg/filter_csg.pro meshlab/src/meshlabplugins/filter_csg/filter_csg.pro
+--- meshlab.orig/src/meshlabplugins/filter_csg/filter_csg.pro 2014-04-02 02:59:31.000000000 +1100
++++ meshlab/src/meshlabplugins/filter_csg/filter_csg.pro 2014-06-01 21:10:24.521095356 +1000
+@@ -18,6 +18,4 @@
+ win32-msvc2008:LIBS += ../../external/lib/win32-msvc2008/mpirxx.lib ../../external/lib/win32-msvc2008/mpir.lib
+ win32-msvc2010:LIBS += ../../external/lib/win32-msvc2008/mpirxx.lib ../../external/lib/win32-msvc2008/mpir.lib
+ win32-msvc2012:LIBS += ../../external/lib/win32-msvc2008/mpirxx.lib ../../external/lib/win32-msvc2008/mpir.lib
+-linux-g++:INCLUDEPATH += ../../external/inc/linux-g++/mpir-2.4.0
+-linux-g++:LIBS += ../../external/lib/linux-g++/libmpirxx.a ../../external/lib/linux-g++/libmpir.a
+
diff --git a/media-gfx/meshlab/files/1.3.3/qt-4.8.patch b/media-gfx/meshlab/files/1.3.3/qt-4.8.patch
new file mode 100644
index 000000000000..e820aceb5bbe
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.3/qt-4.8.patch
@@ -0,0 +1,11 @@
+diff -Nur meshlab.orig/src/meshlab/meshlab.pro meshlab/src/meshlab/meshlab.pro
+--- meshlab.orig/src/meshlab/meshlab.pro 2011-02-15 20:39:47.000000000 +1100
++++ meshlab/src/meshlab/meshlab.pro 2012-01-07 11:57:18.055586086 +1100
+@@ -85,6 +85,7 @@
+ QT += xmlpatterns
+ QT += network
+ QT += script
++unix:LIBS += -lGLU
+
+
+ # the following line is needed to avoid mismatch between
diff --git a/media-gfx/meshlab/files/1.3.3/rpath.patch b/media-gfx/meshlab/files/1.3.3/rpath.patch
new file mode 100644
index 000000000000..31ed26b0344e
--- /dev/null
+++ b/media-gfx/meshlab/files/1.3.3/rpath.patch
@@ -0,0 +1,39 @@
+diff -Nur meshlab.orig/src/meshlab/meshlab.pro meshlab/src/meshlab/meshlab.pro
+--- meshlab.orig/src/meshlab/meshlab.pro 2012-05-31 00:32:44.000000000 +1000
++++ meshlab/src/meshlab/meshlab.pro 2012-08-06 21:26:01.405784190 +1000
+@@ -130,11 +130,11 @@
+ #}
+
+-linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLU
++linux-g++:LIBS += -L../external/lib/linux-g++ -ljhead -L../distrib -lcommon -lGLU -lGLEW
+-linux-g++:QMAKE_RPATHDIR += ../distrib
++linux-g++:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+-linux-g++-32:LIBS += -L../external/lib/linux-g++-32 -ljhead -L../distrib -lcommon -lGLU
++linux-g++-32:LIBS += -L../external/lib/linux-g++-32 -ljhead -L../distrib -lcommon -lGLU -lGLEW
+-linux-g++-32:QMAKE_RPATHDIR += ../distrib
++linux-g++-32:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+-linux-g++-64:LIBS += -L../external/lib/linux-g++-64 -ljhead -L../distrib -lcommon -lGLU
++linux-g++-64:LIBS += -L../external/lib/linux-g++-64 -ljhead -L../distrib -lcommon -lGLU -lGLEW
+-linux-g++-64:QMAKE_RPATHDIR += ../distrib
++linux-g++-64:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+
+ # uncomment in your local copy only in emergency cases.
+ # We should never be too permissive
+diff -Nur meshlab.orig/src/meshlabserver/meshlabserver.pro meshlab/src/meshlabserver/meshlabserver.pro
+--- meshlab.orig/src/meshlabserver/meshlabserver.pro 2011-10-15 03:34:48.000000000 +1100
++++ meshlab/src/meshlabserver/meshlabserver.pro 2012-08-06 21:26:34.609557938 +1000
+@@ -26,11 +26,11 @@
+ win32-msvc2010: LIBS += -L../distrib -lcommon
+ win32-g++: LIBS += -L../distrib -lcommon
+ linux-g++: LIBS += -L../distrib -lcommon
+-linux-g++:QMAKE_RPATHDIR += ../distrib
++linux-g++:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+ linux-g++-32: LIBS += -L../distrib -lcommon
+-linux-g++-32:QMAKE_RPATHDIR += ../distrib
++linux-g++-32:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+ linux-g++-64: LIBS += -L../distrib -lcommon
+-linux-g++-64:QMAKE_RPATHDIR += ../distrib
++linux-g++-64:QMAKE_LFLAGS += -Wl,-rpath,\''$'$ORIGIN\'
+ #CONFIG (release,debug | release) {
+ # win32-msvc2005:release: LIBS += -L../common/release -lcommon
+ # win32-msvc2008:release: LIBS += -L../common/release -lcommon
diff --git a/media-gfx/meshlab/meshlab-1.3.2.ebuild b/media-gfx/meshlab/meshlab-1.3.2.ebuild
new file mode 100644
index 000000000000..c5514d682ca5
--- /dev/null
+++ b/media-gfx/meshlab/meshlab-1.3.2.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils versionator multilib qt4-r2
+
+DESCRIPTION="A mesh processing system"
+HOMEPAGE="http://meshlab.sourceforge.net/"
+MY_PV="$(delete_all_version_separators ${PV})"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/MeshLab%20v${PV}/MeshLabSrc_AllInc_v${MY_PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND="dev-cpp/eigen:3
+ dev-cpp/muParser
+ dev-qt/qtcore:4
+ dev-qt/qtopengl:4
+ media-libs/glew
+ media-libs/qhull
+ =media-libs/lib3ds-1*
+ media-libs/openctm
+ sci-libs/levmar
+ sys-libs/libunwind"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/meshlab/src"
+
+src_prepare() {
+ rm "${WORKDIR}"/meshlab/src/distrib/plugins/*.xml
+ rm "${WORKDIR}"/meshlab/src/meshlabplugins/filter_qhull/qhull_tools.h
+ cd ${PORTAGE_BUILDDIR}
+ #patches from debian repo
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}/${PV}"/01_crash-on-save.patch \
+ "${FILESDIR}/${PV}"/02_cstddef.patch \
+ "${FILESDIR}/${PV}"/03_disable-updates.patch \
+ "${FILESDIR}/${PV}"/05_externals.patch \
+ "${FILESDIR}/${PV}"/06_format-security.patch \
+ "${FILESDIR}/${PV}"/07_gcc47.patch \
+ "${FILESDIR}/${PV}"/08_lib3ds.patch \
+ "${FILESDIR}/${PV}"/09_libbz2.patch \
+ "${FILESDIR}/${PV}"/10_muparser.patch \
+ "${FILESDIR}/${PV}"/11_openctm.patch \
+ "${FILESDIR}/${PV}"/12_overflow.patch \
+ "${FILESDIR}/${PV}"/13_pluginsdir.patch \
+ "${FILESDIR}/${PV}"/14_ply_numeric.patch \
+ "${FILESDIR}/${PV}"/15_qhull.patch \
+ "${FILESDIR}/${PV}"/16_shadersdir.patch \
+ "${FILESDIR}/${PV}"/17_structuresynth.patch \
+ "${FILESDIR}/${PV}"/18_glew.c18p1.patch \
+ "${FILESDIR}/${PV}"/19_CONFLICTS_IN_rpath.patch \
+ "${FILESDIR}/${PV}"/20_rpath.c18p2.patch \
+ "${FILESDIR}/${PV}"/21_RESOLUTION.patch \
+ "${FILESDIR}/${PV}"/22_aliasing.patch
+}
+
+src_configure() {
+ eqmake4 external/external.pro
+ eqmake4 meshlab_full.pro
+}
+
+src_compile() {
+ cd external && emake
+ cd .. && emake
+}
+
+src_install() {
+ dobin distrib/{meshlab,meshlabserver}
+ dolib distrib/libcommon.so.1.0.0
+ dosym libcommon.so.1.0.0 /usr/$(get_libdir)/libcommon.so.1
+ dosym libcommon.so.1 /usr/$(get_libdir)/libcommon.so
+
+ exeinto /usr/$(get_libdir)/meshlab/plugins
+ doexe distrib/plugins/*.so
+
+ insinto /usr/share/meshlab/shaders
+ doins -r distrib/shaders/*
+ newicon "${S}"/meshlab/images/eye64.png "${PN}".png
+ make_desktop_entry meshlab "Meshlab"
+}
diff --git a/media-gfx/meshlab/meshlab-1.3.3.ebuild b/media-gfx/meshlab/meshlab-1.3.3.ebuild
new file mode 100644
index 000000000000..10241aa0e5ba
--- /dev/null
+++ b/media-gfx/meshlab/meshlab-1.3.3.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils versionator multilib
+
+DESCRIPTION="A mesh processing system"
+HOMEPAGE="http://meshlab.sourceforge.net/"
+MY_PV="$(delete_all_version_separators ${PV})"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/MeshLab%20v${PV}/MeshLabSrc_AllInc_v${MY_PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+DEPEND="dev-cpp/eigen:3
+ dev-cpp/muParser
+ dev-qt/qtcore:4
+ dev-qt/qtopengl:4
+ media-libs/glew
+ media-libs/qhull
+ =media-libs/lib3ds-1*
+ media-libs/openctm
+ sci-libs/levmar
+ sys-libs/libunwind
+ sci-libs/mpir"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/meshlab/src"
+
+src_prepare() {
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}/${PV}"/gcc-4.7.patch \
+ "${FILESDIR}/${PV}"/lapack.patch \
+ "${FILESDIR}/${PV}"/mpir.patch \
+ "${FILESDIR}/${PV}"/qt-4.8.patch \
+ "${FILESDIR}/${PV}"/rpath.patch
+}
+
+src_configure() {
+ qmake -recursive external/external.pro
+ qmake -recursive meshlab_full.pro
+}
+
+src_compile() {
+ cd external && emake
+ cd .. && emake
+}
+
+src_install() {
+ dobin distrib/{meshlab,meshlabserver}
+ dolib distrib/libcommon.so.1.0.0
+ dosym libcommon.so.1.0.0 /usr/$(get_libdir)/libcommon.so.1
+ dosym libcommon.so.1 /usr/$(get_libdir)/libcommon.so
+
+ exeinto /usr/$(get_libdir)/meshlab/plugins
+ doexe distrib/plugins/*.so
+
+ insinto /usr/share/meshlab/shaders
+ doins -r distrib/shaders/*
+ newicon "${S}"/meshlab/images/eye64.png "${PN}".png
+ make_desktop_entry meshlab "Meshlab"
+}
diff --git a/media-gfx/meshlab/metadata.xml b/media-gfx/meshlab/metadata.xml
new file mode 100644
index 000000000000..5ef1f3b61674
--- /dev/null
+++ b/media-gfx/meshlab/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>3dprint</herd>
+ <maintainer>
+ <email>amynka@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Printrun is a set of G-code sending applications for RepRap.
+ It consists of printcore (dumb G-code sender), pronsole (featured command line
+ G-code sender), pronterface (featured G-code sender with graphical user
+ interface), and a small collection of helpful scripts.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">meshlab</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/metadata.xml b/media-gfx/metadata.xml
new file mode 100644
index 000000000000..3e62cd89181c
--- /dev/null
+++ b/media-gfx/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The media-gfx category contains graphics-related packages.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie media-gfx enthält Programme rund um das Thema Grafik.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría media-gfx contiene paquetes relacionados con gráficos.
+ </longdescription>
+ <longdescription lang="ja">
+ media-gfxカテゴリーにはグラフィック関連のパッケージが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De media-gfx categorie bevat grafische applicaties.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm media-gfx chứa các gói liên quan đến đồ hoạ.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria media-gfx contiene pacchetti per la grafica.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria media-gfx contém pacotes relacionados com gráficos.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria media-gfx zawiera programy graficzne.
+ </longdescription>
+</catmetadata>
+
diff --git a/media-gfx/metapixel/Manifest b/media-gfx/metapixel/Manifest
new file mode 100644
index 000000000000..a36da97047ca
--- /dev/null
+++ b/media-gfx/metapixel/Manifest
@@ -0,0 +1 @@
+DIST metapixel-1.0.2.tar.gz 63197 RMD160 7343c66e925e5b55cfe63624be18159717b1295e SHA1 f917aec91430b1bdbcc7b3dea29cb93f15a04c77 SHA256 8d77810978da397c070b9b4e228ae6204e9f5c524518ad1a4fcab9462171f55b
diff --git a/media-gfx/metapixel/files/metapixel-1.0.2-libpng15.patch b/media-gfx/metapixel/files/metapixel-1.0.2-libpng15.patch
new file mode 100644
index 000000000000..988437dea2af
--- /dev/null
+++ b/media-gfx/metapixel/files/metapixel-1.0.2-libpng15.patch
@@ -0,0 +1,141 @@
+--- rwimg/rwpng.c
++++ rwimg/rwpng.c
+@@ -42,6 +42,7 @@
+ open_png_file_reading (const char *filename, int *width, int *height)
+ {
+ png_data_t *data = (png_data_t*)malloc(sizeof(png_data_t));
++ int _bit_depth,_color_type,_interlace_type,_compression,_filter;
+
+ assert(data != 0);
+
+@@ -57,19 +58,20 @@
+ data->end_info = png_create_info_struct(data->png_ptr);
+ assert(data->end_info != 0);
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+ png_init_io(data->png_ptr, data->file);
+
+ png_read_info(data->png_ptr, data->info_ptr);
+
+- *width = data->info_ptr->width;
+- *height = data->info_ptr->height;
+-
+- assert(data->info_ptr->bit_depth == 8 || data->info_ptr->bit_depth == 16);
+- assert(data->info_ptr->color_type == PNG_COLOR_TYPE_RGB || data->info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA);
+- assert(data->info_ptr->interlace_type == PNG_INTERLACE_NONE);
++ png_get_IHDR(data->png_ptr,data->info_ptr,
++ (png_uint_32 *)width,(png_uint_32 *)height,
++ &_bit_depth,&_color_type,&_interlace_type,&_compression,&_filter);
++
++ assert(_bit_depth == 8 || _bit_depth == 16);
++ assert(_color_type == PNG_COLOR_TYPE_RGB || _color_type == PNG_COLOR_TYPE_RGB_ALPHA);
++ assert(_interlace_type == PNG_INTERLACE_NONE);
+
+ data->have_read = 0;
+
+@@ -83,30 +85,36 @@
+ int i;
+ int bps, spp;
+ unsigned char *row;
++ png_uint_32 _width,_height;
++ int _bit_depth,_color_type,_interlace_type,_compression,_filter;
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+- if (data->info_ptr->color_type == PNG_COLOR_TYPE_RGB)
++ png_get_IHDR(data->png_ptr,data->info_ptr,
++ &_width,&_height,&_bit_depth,&_color_type,&_interlace_type,
++ &_compression,&_filter);
++
++ if (_color_type == PNG_COLOR_TYPE_RGB)
+ spp = 3;
+ else
+ spp = 4;
+
+- if (data->info_ptr->bit_depth == 16)
++ if (_bit_depth == 16)
+ bps = 2;
+ else
+ bps = 1;
+
+- row = (unsigned char*)malloc(data->info_ptr->width * spp * bps);
++ row = (unsigned char*)malloc(_width * spp * bps);
+
+ for (i = 0; i < num_lines; ++i)
+ {
+ int j, channel;
+
+ png_read_row(data->png_ptr, (png_bytep)row, 0);
+- for (j = 0; j < data->info_ptr->width; ++j)
++ for (j = 0; j < _width; ++j)
+ for (channel = 0; channel < 3; ++channel)
+- lines[i * data->info_ptr->width * 3 + j * 3 + channel] = row[j * spp * bps + channel * bps];
++ lines[i * _width * 3 + j * 3 + channel] = row[j * spp * bps + channel * bps];
+ }
+
+ free(row);
+@@ -119,7 +127,7 @@
+ {
+ png_data_t *data = (png_data_t*)_data;
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+ if (data->have_read)
+@@ -148,7 +156,7 @@
+ data->info_ptr = png_create_info_struct(data->png_ptr);
+ assert(data->info_ptr != 0);
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+ if (pixel_stride == 4)
+@@ -156,18 +164,14 @@
+
+ png_init_io(data->png_ptr, data->file);
+
+- data->info_ptr->width = width;
+- data->info_ptr->height = height;
+- data->info_ptr->valid = 0;
++ png_set_IHDR(data->png_ptr,data->info_ptr,width,height,
++ 8,PNG_COLOR_TYPE_RGB,PNG_INTERLACE_NONE,
++ PNG_COMPRESSION_TYPE_DEFAULT,PNG_FILTER_TYPE_DEFAULT);
++ /* setting these to 0 so just skipping ...
+ data->info_ptr->rowbytes = width * 3;
+ data->info_ptr->palette = 0;
+ data->info_ptr->num_palette = 0;
+- data->info_ptr->num_trans = 0;
+- data->info_ptr->bit_depth = 8;
+- data->info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+- data->info_ptr->compression_type = PNG_COMPRESSION_TYPE_DEFAULT;
+- data->info_ptr->filter_type = PNG_FILTER_TYPE_DEFAULT;
+- data->info_ptr->interlace_type = PNG_INTERLACE_NONE;
++ data->info_ptr->num_trans = 0; */
+
+ png_write_info(data->png_ptr, data->info_ptr);
+
+@@ -182,7 +186,7 @@
+ png_data_t *data = (png_data_t*)_data;
+ int i;
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+ for (i = 0; i < num_lines; ++i)
+@@ -194,7 +198,7 @@
+ {
+ png_data_t *data = (png_data_t*)_data;
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+ png_write_end(data->png_ptr, data->info_ptr);
diff --git a/media-gfx/metapixel/metadata.xml b/media-gfx/metapixel/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/metapixel/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/metapixel/metapixel-1.0.2.ebuild b/media-gfx/metapixel/metapixel-1.0.2.ebuild
new file mode 100644
index 000000000000..67e2c002dd44
--- /dev/null
+++ b/media-gfx/metapixel/metapixel-1.0.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="a program for generating photomosaics"
+HOMEPAGE="http://www.complang.tuwien.ac.at/schani/metapixel"
+SRC_URI="http://www.complang.tuwien.ac.at/schani/${PN}/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl
+ media-libs/giflib
+ >=media-libs/libpng-1.4
+ virtual/jpeg"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+
+ sed -i -e 's:/usr/X11R6:/usr:g' Makefile || die
+ sed -i -e 's:ar:$(AR):' rwimg/Makefile || die
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" CC="$(tc-getCC)" OPTIMIZE="${CFLAGS}" LDOPTS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}{,-prepare,-imagesize,-sizesort}
+ doman ${PN}.1
+ dodoc NEWS README
+}
diff --git a/media-gfx/mirage/Manifest b/media-gfx/mirage/Manifest
new file mode 100644
index 000000000000..dfb0a501e8b4
--- /dev/null
+++ b/media-gfx/mirage/Manifest
@@ -0,0 +1,2 @@
+DIST mirage-0.9.5.1.tar.bz2 110288 SHA256 6dc3595ac416229eac7b75abae0a2f3971b98be9a0290595cc0f4d4abf3d87af
+DIST mirage-0.9.5.2.tar.bz2 114991 SHA256 d214a1b6d99d1d1e83da5848a2cef181f6781e0990e93f7ebff5880b0c43f43c SHA512 c754c7c74523f060cf5c120750de3a5d9935eff2b04a30b4f266939528c1b01f26a27294765dbed47adeef88301cb3d7ff8f7464e6504ba5e8ff734ec0685c76 WHIRLPOOL 53893d24aec11c19c88cdf38ebc8c1efa6d5ad7c71002b32852f0cfd0ccb63c6d2ce8ce491f6d735a59e3c6a374277d55f917d8be2f700d62a1fd898f884b690
diff --git a/media-gfx/mirage/files/mirage-0.9.3-stop_cleaning_up.patch b/media-gfx/mirage/files/mirage-0.9.3-stop_cleaning_up.patch
new file mode 100644
index 000000000000..0f315297184b
--- /dev/null
+++ b/media-gfx/mirage/files/mirage-0.9.3-stop_cleaning_up.patch
@@ -0,0 +1,27 @@
+diff -ur mirage-0.9.3.orig/setup.py mirage-0.9.3/setup.py
+--- mirage-0.9.3.orig/setup.py 2008-03-27 06:05:28.000000000 +0200
++++ mirage-0.9.3/setup.py 2008-11-30 16:34:11.000000000 +0200
+@@ -70,23 +70,3 @@
+ ('share/locale/cs/LC_MESSAGES', ['mo/cs/mirage.mo']),
+ ('share/locale/it/LC_MESSAGES', ['mo/it/mirage.mo'])],
+ )
+-
+-# Cleanup (remove /build, /mo, and *.pyc files:
+-print "Cleaning up..."
+-try:
+- removeall("build/")
+- os.rmdir("build/")
+-except:
+- pass
+-try:
+- removeall("mo/")
+- os.rmdir("mo/")
+-except:
+- pass
+-try:
+- for f in os.listdir("."):
+- if os.path.isfile(f):
+- if os.path.splitext(os.path.basename(f))[1] == ".pyc":
+- os.remove(f)
+-except:
+- pass
diff --git a/media-gfx/mirage/metadata.xml b/media-gfx/mirage/metadata.xml
new file mode 100644
index 000000000000..9be90a258970
--- /dev/null
+++ b/media-gfx/mirage/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/mirage/mirage-0.9.5.1.ebuild b/media-gfx/mirage/mirage-0.9.5.1.ebuild
new file mode 100644
index 000000000000..42945bc16d41
--- /dev/null
+++ b/media-gfx/mirage/mirage-0.9.5.1.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.6"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="2.[45] 3.* *-jython"
+
+inherit distutils eutils
+
+DESCRIPTION="A fast and simple image viewer based on python and GTK+"
+HOMEPAGE="http://mirageiv.berlios.de/"
+SRC_URI="mirror://berlios/mirageiv/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ >=dev-python/pygtk-2.12"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ !media-plugins/banshee-mirage"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.3-stop_cleaning_up.patch
+ distutils_src_prepare
+}
+
+src_install() {
+ local DOCS="CHANGELOG README TODO TRANSLATORS"
+ distutils_src_install
+
+ rm -f "${D}"/usr/share/mirage/COPYING
+
+ local x
+ for x in ${DOCS}; do
+ rm -f "${D}"/usr/share/mirage/${x}
+ done
+}
diff --git a/media-gfx/mirage/mirage-0.9.5.2-r1.ebuild b/media-gfx/mirage/mirage-0.9.5.2-r1.ebuild
new file mode 100644
index 000000000000..f86c32122a11
--- /dev/null
+++ b/media-gfx/mirage/mirage-0.9.5.2-r1.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="A fast and simple image viewer based on python and GTK+"
+HOMEPAGE="http://mirageiv.berlios.de/"
+SRC_URI="mirror://berlios/mirageiv/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ >=dev-python/pygtk-2.12:2[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ !media-plugins/banshee-mirage"
+
+PATCHES=( "${FILESDIR}"/${PN}-0.9.3-stop_cleaning_up.patch )
+
+src_install() {
+ distutils-r1_src_install
+ local XDOCS="COPYING CHANGELOG README TODO TRANSLATORS"
+ local x
+ for x in ${XDOCS}; do
+ rm -f "${D}"/usr/share/mirage/${x}
+ done
+}
diff --git a/media-gfx/mirage/mirage-0.9.5.2.ebuild b/media-gfx/mirage/mirage-0.9.5.2.ebuild
new file mode 100644
index 000000000000..6671186aab9d
--- /dev/null
+++ b/media-gfx/mirage/mirage-0.9.5.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=3
+
+PYTHON_DEPEND="2:2.6"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="2.[45] 3.* *-jython"
+
+inherit distutils eutils
+
+DESCRIPTION="A fast and simple image viewer based on python and GTK+"
+HOMEPAGE="http://mirageiv.berlios.de/"
+SRC_URI="mirror://berlios/mirageiv/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ >=dev-python/pygtk-2.12:2"
+DEPEND="${RDEPEND}
+ sys-devel/gettext
+ !media-plugins/banshee-mirage"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.3-stop_cleaning_up.patch
+ distutils_src_prepare
+}
+
+src_install() {
+ local DOCS="CHANGELOG README TODO TRANSLATORS"
+ distutils_src_install
+
+ rm -f "${D}"/usr/share/mirage/COPYING
+
+ local x
+ for x in ${DOCS}; do
+ rm -f "${D}"/usr/share/mirage/${x}
+ done
+}
diff --git a/media-gfx/mkgallery/Manifest b/media-gfx/mkgallery/Manifest
new file mode 100644
index 000000000000..0302be392129
--- /dev/null
+++ b/media-gfx/mkgallery/Manifest
@@ -0,0 +1 @@
+DIST mkgallery-1.1.tgz 6514 RMD160 5b24374590b4dc12aaef8abcd331988900f7302b SHA1 350431f91e1f57774199a22fde04d60b49bb825f SHA256 db062a5ae432e4299650939a580b51f9816414e1de8f5e52a15195a77b16feec
diff --git a/media-gfx/mkgallery/metadata.xml b/media-gfx/mkgallery/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/media-gfx/mkgallery/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/mkgallery/mkgallery-1.1.ebuild b/media-gfx/mkgallery/mkgallery-1.1.ebuild
new file mode 100644
index 000000000000..8436aa36db1c
--- /dev/null
+++ b/media-gfx/mkgallery/mkgallery-1.1.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Creates thumbnails and a HTML index file for a directory of jpg files"
+HOMEPAGE="http://mkgallery.sourceforge.net/"
+SRC_URI="http://mkgallery.sourceforge.net/${P}.tgz"
+
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+SLOT="0"
+
+DEPEND="media-gfx/imagemagick"
+RDEPEND="$DEPEND
+ sys-devel/bc"
+
+src_install() {
+ dobin mkgallery
+ dodoc BUGS README THANKS TODO
+}
diff --git a/media-gfx/monica/Manifest b/media-gfx/monica/Manifest
new file mode 100644
index 000000000000..9ce0acb54b66
--- /dev/null
+++ b/media-gfx/monica/Manifest
@@ -0,0 +1 @@
+DIST monica-3.7.tar.bz2 18330 RMD160 a10b15563b6e35bf1d3aa36cb21c6d3a601bce34 SHA1 ff99dcaa1da0c2945ee8d91558f8739b296b2b8b SHA256 da0d7762f5a2eed482e8e2f87762d3ac1f013d5c99bd99b34083b69f03492036
diff --git a/media-gfx/monica/files/monica-3.6-makefile-cleanup.patch b/media-gfx/monica/files/monica-3.6-makefile-cleanup.patch
new file mode 100644
index 000000000000..21881db24971
--- /dev/null
+++ b/media-gfx/monica/files/monica-3.6-makefile-cleanup.patch
@@ -0,0 +1,33 @@
+diff -Nuar monica-3.6.orig/Makefile monica-3.6/Makefile
+--- monica-3.6.orig/Makefile 2005-03-14 22:00:18.000000000 -0800
++++ monica-3.6/Makefile 2007-11-15 00:48:39.000000000 -0800
+@@ -2,22 +2,24 @@
+ CXX = g++
+ LINK = g++
+ CFLAGS = -Wall -O2
+-CXXFLAGS = `fltk-config --cxxflags` -Wall -O2
+-LDFLAGS = `fltk-config --ldflags`
++CXXFLAGS = -Wall -O2
++FLTK_CXXFLAGS = `fltk-config --cxxflags`
++LDFLAGS =
++FLTK_LDFLAGS = `fltk-config --ldflags`
+ TARGET = monica
+-DESTINATION = /usr/bin
++DESTINATION = $(DESTDIR)/usr/bin
+ OBJECTS = monica.o
+
+ all: $(TARGET)
+
+ $(TARGET): $(OBJECTS)
+- $(LINK) -o $(TARGET) $(OBJECTS) $(LDFLAGS)
++ $(LINK) -o $(TARGET) $(OBJECTS) $(FLTK_LDFLAGS) $(LDFLAGS)
+
+
+ monica.o: monica.cpp
+- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o monica.o monica.cpp
++ $(CXX) -c $(FLTK_CXXFLAGS) $(CXXFLAGS) $(INCPATH) -o monica.o monica.cpp
+
+ clean:
+ rm -f $(OBJECTS)
+ rm -f monica
+
diff --git a/media-gfx/monica/files/monica-3.7-gcc44.patch b/media-gfx/monica/files/monica-3.7-gcc44.patch
new file mode 100644
index 000000000000..6fad87c6f86b
--- /dev/null
+++ b/media-gfx/monica/files/monica-3.7-gcc44.patch
@@ -0,0 +1,11 @@
+diff -ur monica-3.7.orig/monica.cpp monica-3.7/monica.cpp
+--- monica-3.7.orig/monica.cpp 2008-06-02 06:45:50.000000000 +0300
++++ monica-3.7/monica.cpp 2009-07-24 20:42:12.000000000 +0300
+@@ -14,6 +14,7 @@
+ #include <FL/Fl_Tooltip.H>
+ #include <FL/Fl_Pixmap.H>
+
++#include <cstdio>
+ #include <cstdlib>
+ #include <string>
+ #include <iostream>
diff --git a/media-gfx/monica/metadata.xml b/media-gfx/monica/metadata.xml
new file mode 100644
index 000000000000..95463dedc2f3
--- /dev/null
+++ b/media-gfx/monica/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <longdescription>
+ Monica is a Monitor Calibration Tool.
+ An easy way to get respectable color rendetion on your screen. Especially
+ important to get a reasonable overall gamma setting, to make sure the basic
+ "brightness" of your screen jibes with what others see... (the Internet sRGB
+ standard gamma of 2.2)
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/monica/monica-3.7.ebuild b/media-gfx/monica/monica-3.7.ebuild
new file mode 100644
index 000000000000..f737b66987aa
--- /dev/null
+++ b/media-gfx/monica/monica-3.7.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Monica is a Monitor Calibration Tool"
+HOMEPAGE="http://www.pcbypaul.com/software/monica.html"
+SRC_URI="http://www.pcbypaul.com/software/dl/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+DEPEND=">=x11-libs/fltk-1.1:1"
+RDEPEND="${DEPEND}
+ x11-apps/xgamma"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-3.6-makefile-cleanup.patch \
+ "${FILESDIR}"/${P}-gcc44.patch
+
+ emake clean
+}
+
+src_compile() {
+ emake \
+ CXX="$(tc-getCXX)" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LINK="$(tc-getCXX)" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin monica
+ dodoc authors ChangeLog news readme
+}
diff --git a/media-gfx/mscgen/Manifest b/media-gfx/mscgen/Manifest
new file mode 100644
index 000000000000..0861b469eb60
--- /dev/null
+++ b/media-gfx/mscgen/Manifest
@@ -0,0 +1 @@
+DIST mscgen-src-0.20.tar.gz 204818 SHA256 3c3481ae0599e1c2d30b7ed54ab45249127533ab2f20e768a0ae58d8551ddc23 SHA512 12fdea38633a42d6d235520550b16bea0cd3fb67d198b1f956845f4057239d7f80fa961e37f6f8bad9fb03f29ff8c6ffab4f4ae7402eea3083dfddeaf39687e3 WHIRLPOOL b924eae08da4e11310a85452fc4a63ca81c5b63406fdfe7b5d2968f58368f2f2ed6884e28b8d1b3f00e1af0a79f394f19b19116d5cad27742ee5d04778af950b
diff --git a/media-gfx/mscgen/files/mscgen-0.18-pkg.patch b/media-gfx/mscgen/files/mscgen-0.18-pkg.patch
new file mode 100644
index 000000000000..72a9ce9c2a5e
--- /dev/null
+++ b/media-gfx/mscgen/files/mscgen-0.18-pkg.patch
@@ -0,0 +1,11 @@
+--- configure.ac
++++ configure.ac
+@@ -20,6 +20,8 @@
+ AC_CHECK_HEADERS([unistd.h])
+ AC_CHECK_HEADERS([limits.h])
+
++PKG_PROG_PKG_CONFIG
++
+ #
+ # Check if libgd is needed
+ #
diff --git a/media-gfx/mscgen/metadata.xml b/media-gfx/mscgen/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/mscgen/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/mscgen/mscgen-0.20.ebuild b/media-gfx/mscgen/mscgen-0.20.ebuild
new file mode 100644
index 000000000000..519898503778
--- /dev/null
+++ b/media-gfx/mscgen/mscgen-0.20.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools
+
+DESCRIPTION="A message sequence chart generator"
+HOMEPAGE="http://www.mcternan.me.uk/mscgen/"
+SRC_URI="http://www.mcternan.me.uk/${PN}/software/${PN}-src-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 arm ppc ppc64 x86 ~x64-solaris"
+IUSE="png truetype"
+
+RDEPEND="png? ( media-libs/gd[png,truetype?] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/bison
+ sys-devel/flex"
+
+# Workaround for bug #379279
+RESTRICT="test"
+
+src_prepare() {
+ sed -i -e '/dist_doc_DATA/d' Makefile.am || die
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ if use png; then
+ use truetype && myconf="--with-freetype"
+ else
+ myconf="--without-png"
+ fi
+
+ econf \
+ --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ ${myconf}
+}
diff --git a/media-gfx/mypaint/Manifest b/media-gfx/mypaint/Manifest
new file mode 100644
index 000000000000..eae8bb3f3e0b
--- /dev/null
+++ b/media-gfx/mypaint/Manifest
@@ -0,0 +1,2 @@
+DIST mypaint-1.0.0.tar.bz2 36748957 SHA256 ced440ec0307e29bfe4f612604fe27ec9bfaea3f4f9c8019ffaa50ef12dc7131 SHA512 91434f6d352d4f5dde3d919772a678a17f15a6d2914fb2377b40e4a0fea042e3c96b5618e1864eacdbfa52f449be03062da2ecb8ec08bae168e3a12904047bf2 WHIRLPOOL a4693b6436485126a033dacb014586e85c448863bbb14acb30aff739a96d8d2abdd2c920ad3e9a5be7790d18e13e4a8e15ebcde85fafcaafe9d2a901b53d5f52
+DIST mypaint-1.1.0.tar.bz2 37416388 SHA256 780d57e50dd90afd586873bc5120261930ea4c309d4d0958020916932122e838 SHA512 a3eef378ddcaa0a33f9afc49cc587489ecfff6f3e46e2238aab83f89d682f2407e2760e6029eaac3591f0a8955c95280c12839adcb42ec452cefbcdb142ab9b9 WHIRLPOOL bfd7356ad393dd85b91ccc010b5d0be23a6d82a33866edade0ef6eb739a1cbdb6823d7bffbdc943f96cdac9059abb7ac1edacf31d4ac2cd3871444594e23557a
diff --git a/media-gfx/mypaint/files/mypaint-0.9.0-gentoo.patch b/media-gfx/mypaint/files/mypaint-0.9.0-gentoo.patch
new file mode 100644
index 000000000000..329c8a981e6f
--- /dev/null
+++ b/media-gfx/mypaint/files/mypaint-0.9.0-gentoo.patch
@@ -0,0 +1,26 @@
+Index: mypaint-0.9.0/SConstruct
+===================================================================
+--- mypaint-0.9.0.orig/SConstruct
++++ mypaint-0.9.0/SConstruct
+@@ -64,6 +64,21 @@ if env['debug']:
+ env.Append(CPPDEFINES='HEAVY_DEBUG')
+ env.Append(CCFLAGS='-O0', LINKFLAGS='-O0')
+
++# Respect cxxflags,ldflags and cxx
++# Code found on
++# http://http://dev.gentoo.org/~vapier/scons-blows.txt
++import SCons.Util
++if os.environ.has_key('CC'):
++ env['CC'] = os.environ['CC']
++if os.environ.has_key('CFLAGS'):
++ env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
++if os.environ.has_key('CXX'):
++ env['CXX'] = os.environ['CXX']
++if os.environ.has_key('CXXFLAGS'):
++ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
++if os.environ.has_key('LDFLAGS'):
++ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
++
+ Export('env')
+ module = SConscript('lib/SConscript')
+ SConscript('brushlib/SConscript')
diff --git a/media-gfx/mypaint/files/mypaint-0.9.1-gentoo.patch b/media-gfx/mypaint/files/mypaint-0.9.1-gentoo.patch
new file mode 100644
index 000000000000..9c0f884d752a
--- /dev/null
+++ b/media-gfx/mypaint/files/mypaint-0.9.1-gentoo.patch
@@ -0,0 +1,25 @@
+Index: mypaint-0.9.1/SConstruct
+===================================================================
+--- mypaint-0.9.1.orig/SConstruct
++++ mypaint-0.9.1/SConstruct
+@@ -70,6 +70,20 @@ if env.get('CPPDEFINES'):
+ if env['debug']:
+ env.Append(CPPDEFINES='HEAVY_DEBUG')
+ env.Append(CCFLAGS='-O0', LINKFLAGS='-O0')
++# Respect cxxflags,ldflags and cxx
++# Code found on
++# http://http://dev.gentoo.org/~vapier/scons-blows.txt
++import SCons.Util
++if os.environ.has_key('CC'):
++ env['CC'] = os.environ['CC']
++if os.environ.has_key('CFLAGS'):
++ env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
++if os.environ.has_key('CXX'):
++ env['CXX'] = os.environ['CXX']
++if os.environ.has_key('CXXFLAGS'):
++ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
++if os.environ.has_key('LDFLAGS'):
++ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
+
+ Export('env', 'python')
+ module = SConscript('lib/SConscript')
diff --git a/media-gfx/mypaint/files/mypaint-1.1.0-build-env-vars.patch b/media-gfx/mypaint/files/mypaint-1.1.0-build-env-vars.patch
new file mode 100644
index 000000000000..7d7ac3e36359
--- /dev/null
+++ b/media-gfx/mypaint/files/mypaint-1.1.0-build-env-vars.patch
@@ -0,0 +1,53 @@
+From 516d184b5db8ebdd8b184ef871050c3ab3f03fdf Mon Sep 17 00:00:00 2001
+From: Andrew Chadwick <andrewc-git@piffle.org>
+Date: Sun, 21 Apr 2013 22:51:05 +0100
+Subject: [PATCH] SConstruct: support standard build environ vars
+
+Support the standard build environment vars CC, CXX, CFLAGS, CXXFLAGS,
+CPPFLAGS, and LDFLAGS everywhere.
+
+Partially addresses https://gna.org/bugs/?20754
+---
+ SConstruct | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/SConstruct b/SConstruct
+index 0b55da1..ef39b9e 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -1,6 +1,7 @@
+ import os, sys
+ from os.path import join, basename
+ from SCons.Script.SConscript import SConsEnvironment
++import SCons.Util
+
+ EnsureSConsVersion(1, 0)
+
+@@ -45,6 +46,24 @@ print('using %r (use scons python_config=xxx to change)' % env['python_config'])
+ if sys.platform == "win32":
+ # remove this mingw if trying VisualStudio
+ env = Environment(tools=tools + ['mingw'], ENV=os.environ, options=opts)
++
++# Respect some standard build environment stuff
++if os.environ.has_key('CC'):
++ env['CC'] = os.environ['CC']
++if os.environ.has_key('CFLAGS'):
++ env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
++if os.environ.has_key('CXX'):
++ env['CXX'] = os.environ['CXX']
++if os.environ.has_key('CXXFLAGS'):
++ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
++if os.environ.has_key('CPPFLAGS'):
++ env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CPPFLAGS'])
++ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CPPFLAGS'])
++if os.environ.has_key('LDFLAGS'):
++ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
++if "$CCFLAGS" in env['CXXCOM']:
++ env['CXXCOM'] = env['CXXCOM'].replace("$CCFLAGS","")
++
+ opts.Update(env)
+
+ env.Append(CXXFLAGS=' -Wall -Wno-sign-compare -Wno-write-strings')
+--
+1.7.10.4
+
diff --git a/media-gfx/mypaint/files/mypaint-1.1.0-desktop.patch b/media-gfx/mypaint/files/mypaint-1.1.0-desktop.patch
new file mode 100644
index 000000000000..b992131bf29e
--- /dev/null
+++ b/media-gfx/mypaint/files/mypaint-1.1.0-desktop.patch
@@ -0,0 +1,24 @@
+From: Andrew Chadwick <andrewc-git@piffle.org>
+Date: Tue, 8 Jan 2013 13:53:01 +0000
+Subject: desktop: remove deprecated Encoding key
+
+The Encoding key is deprecated as of 1.0 of the Desktop Entry Specification
+(8 Jan 2012)
+
+http://standards.freedesktop.org/desktop-entry-spec/1.0/apc.html
+---
+ desktop/mypaint.desktop | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/desktop/mypaint.desktop b/desktop/mypaint.desktop
+index 9850b54..24383db 100644
+--- a/desktop/mypaint.desktop
++++ b/desktop/mypaint.desktop
+@@ -1,6 +1,5 @@
+ [Desktop Entry]
+ Version=1.0
+-Encoding=UTF-8
+ Name=MyPaint
+ TryExec=mypaint
+ Exec=mypaint %f
+--
diff --git a/media-gfx/mypaint/files/mypaint-1.1.0-gentoo.patch b/media-gfx/mypaint/files/mypaint-1.1.0-gentoo.patch
new file mode 100644
index 000000000000..641ace05ea57
--- /dev/null
+++ b/media-gfx/mypaint/files/mypaint-1.1.0-gentoo.patch
@@ -0,0 +1,36 @@
+diff -ru mypaint-1.1.0-orig/desktop/mypaint.desktop mypaint-1.1.0/desktop/mypaint.desktop
+--- mypaint-1.1.0-orig/desktop/mypaint.desktop 2012-12-31 21:03:38.000000000 +0400
++++ mypaint-1.1.0/desktop/mypaint.desktop 2013-01-06 15:21:11.468785464 +0400
+@@ -1,6 +1,5 @@
+ [Desktop Entry]
+ Version=1.0
+-Encoding=UTF-8
+ Name=MyPaint
+ TryExec=mypaint
+ Exec=mypaint %f
+diff -ru mypaint-1.1.0-orig/SConstruct mypaint-1.1.0/SConstruct
+--- mypaint-1.1.0-orig/SConstruct 2012-12-31 21:03:38.000000000 +0400
++++ mypaint-1.1.0/SConstruct 2013-01-06 15:20:17.640771176 +0400
+@@ -1,6 +1,7 @@
+ import os, sys
+ from os.path import join, basename
+ from SCons.Script.SConscript import SConsEnvironment
++from SCons.Util import CLVar
+
+ EnsureSConsVersion(1, 0)
+
+@@ -75,6 +76,14 @@
+
+ env.Append(RPATH = env.Literal(os.path.join('\\$$ORIGIN')))
+
++for key in ['CC', 'CXX']:
++ if os.environ.has_key(key):
++ env[key] = os.environ[key]
++
++for key in ['CFLAGS', 'CXXFLAGS']:
++ if os.environ.has_key(key):
++ env[key] += CLVar(os.environ[key])
++
+ # remove libraries produced by earlier versions, which are actually
+ # being used if they keep lying around, leading to mysterious bugs
+ env.Execute('rm -f libmypaint-tests.so libmypaint.so libmypaintlib.so')
diff --git a/media-gfx/mypaint/files/mypaint-1.1.0-json-c-0.11.patch b/media-gfx/mypaint/files/mypaint-1.1.0-json-c-0.11.patch
new file mode 100644
index 000000000000..f2aa9b9a0edf
--- /dev/null
+++ b/media-gfx/mypaint/files/mypaint-1.1.0-json-c-0.11.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=467322
+Patch-by: Helmut Jarausch <jarausch@igpm.rwth-aachen.de>
+Fixes pkgconfig name for new json-c (since 0.11)
+
+--- brushlib/SConscript.ORIG 2012-12-31 18:03:38.000000000 +0100
++++ brushlib/SConscript 2013-04-26 11:47:27.008232199 +0200
+@@ -73,7 +73,7 @@
+
+ env.Append(CPPPATH='./')
+
+-pkg_deps = ['json']
++pkg_deps = ['json-c']
+ libs = ['m']
+ linkflags = []
+
diff --git a/media-gfx/mypaint/metadata.xml b/media-gfx/mypaint/metadata.xml
new file mode 100644
index 000000000000..5e3a61a90139
--- /dev/null
+++ b/media-gfx/mypaint/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>hwoarang@gentoo.org</email>
+<name>Markos Chandras</name>
+</maintainer>
+<longdescription lang="en">
+</longdescription>
+</pkgmetadata>
+
diff --git a/media-gfx/mypaint/mypaint-1.0.0-r1.ebuild b/media-gfx/mypaint/mypaint-1.0.0-r1.ebuild
new file mode 100644
index 000000000000..b8aea36146bf
--- /dev/null
+++ b/media-gfx/mypaint/mypaint-1.0.0-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="2:2.5"
+
+inherit eutils fdo-mime gnome2-utils multilib scons-utils toolchain-funcs python
+
+DESCRIPTION="fast and easy graphics application for digital painters"
+HOMEPAGE="http://mypaint.intilinux.com/"
+SRC_URI="http://download.gna.org/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+LANGS="cs de en_CA es fr hu id it ja ko nb nn_NO pl pt_BR ru sl sv uk zh_CN zh_TW"
+for x in ${LANGS}; do
+ IUSE+="linguas_${x} "
+done
+
+RDEPEND="dev-python/pygtk
+ dev-python/numpy
+ >=dev-python/pycairo-1.4
+ dev-libs/protobuf[python]"
+DEPEND="${RDEPEND}
+ dev-lang/swig
+ virtual/pkgconfig"
+
+pkg_setup(){
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ # multilib support
+ sed -i -e "s:lib\/${PN}:$(get_libdir)\/${PN}:" "${S}"/SConstruct || die
+ # respect CXXFLAGS,CXX,LDFLAGS
+ epatch "${FILESDIR}"/${PN}-0.9.1-gentoo.patch
+}
+
+src_compile() {
+ #workaround scons bug with locales. Bug #352700
+ export LANG="en_US.UTF-8"
+ tc-export CXX
+ escons || die "scons failed"
+}
+
+src_install () {
+ escons prefix="${D}/usr" install || die "scons install failed"
+ newicon pixmaps/${PN}_logo.png ${PN}.png
+ for x in ${LANGS}; do
+ if ! has ${x} ${LINGUAS}; then
+ find "${D}"/usr/share/locale/${x} -name "mypaint.mo" -exec rm {} \;
+ fi
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+ python_mod_optimize /usr/share/${PN}
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ python_mod_cleanup /usr/share/${PN}
+}
diff --git a/media-gfx/mypaint/mypaint-1.1.0-r1.ebuild b/media-gfx/mypaint/mypaint-1.1.0-r1.ebuild
new file mode 100644
index 000000000000..574640f023a8
--- /dev/null
+++ b/media-gfx/mypaint/mypaint-1.1.0-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_DEPEND="2:2.5"
+
+inherit eutils fdo-mime gnome2-utils multilib scons-utils toolchain-funcs python
+
+DESCRIPTION="fast and easy graphics application for digital painters"
+HOMEPAGE="http://mypaint.intilinux.com/"
+SRC_URI="http://download.gna.org/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+LANGS="cs de en_CA en_GB es fr hu id it ja ko nb nn_NO pl pt_BR ro ru sl sv uk zh_CN zh_TW"
+for x in ${LANGS}; do
+ IUSE+="linguas_${x} "
+done
+
+RDEPEND="
+ dev-python/pygtk:2
+ dev-python/numpy
+ >=dev-python/pycairo-1.4
+ dev-libs/protobuf[python]
+ >=dev-libs/json-c-0.11:=
+ media-libs/lcms:2
+ media-libs/libpng:0=
+"
+DEPEND="${RDEPEND}
+ dev-lang/swig
+ virtual/pkgconfig"
+
+pkg_setup(){
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ # multilib support
+ sed -i -e "s:lib\/${PN}:$(get_libdir)\/${PN}:" \
+ SConstruct SConscript || die
+ # respect CXXFLAGS,CXX,LDFLAGS
+ epatch "${FILESDIR}"/${P}-build-env-vars.patch
+ # fix mypaint.desktop
+ epatch "${FILESDIR}"/${P}-desktop.patch
+ # pkgconfig patch for json-c-0.11. 467322
+ epatch "${FILESDIR}"/${P}-json-c-0.11.patch
+}
+
+src_compile() {
+ #workaround scons bug with locales. Bug #352700
+ export LANG="en_US.UTF-8"
+ tc-export CC CXX
+ escons
+}
+
+src_install () {
+ escons prefix="${D}/usr" install
+ newicon pixmaps/${PN}_logo.png ${PN}.png
+ for x in ${LANGS}; do
+ if ! has ${x} ${LINGUAS}; then
+ rm -rf "${ED}"/usr/share/locale/${x} || die
+ fi
+ done
+
+ # not used and broken
+ rm -rf "${ED}"/usr/{include/,lib/libmypaint.a,lib/pkgconfig/} || die
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+ python_mod_optimize /usr/share/${PN}
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ python_mod_cleanup /usr/share/${PN}
+}
diff --git a/media-gfx/mypaint/mypaint-1.1.0-r2.ebuild b/media-gfx/mypaint/mypaint-1.1.0-r2.ebuild
new file mode 100644
index 000000000000..ed9dcf18c7a3
--- /dev/null
+++ b/media-gfx/mypaint/mypaint-1.1.0-r2.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit fdo-mime gnome2-utils multilib scons-utils toolchain-funcs python-single-r1
+
+DESCRIPTION="fast and easy graphics application for digital painters"
+HOMEPAGE="http://mypaint.intilinux.com/"
+SRC_URI="http://download.gna.org/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+LANGS="cs de en_CA en_GB es fr hu id it ja ko nb nn_NO pl pt_BR ro ru sl sv uk zh_CN zh_TW"
+for x in ${LANGS}; do
+ IUSE+="linguas_${x} "
+done
+
+RDEPEND="
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ >=dev-python/pycairo-1.4[${PYTHON_USEDEP}]
+ dev-libs/protobuf[python,${PYTHON_USEDEP}]
+ >=dev-libs/json-c-0.11:=
+ media-libs/lcms:2
+ media-libs/libpng:0=
+ ${PYTHON_DEPS}
+"
+DEPEND="${RDEPEND}
+ dev-lang/swig
+ virtual/pkgconfig"
+
+REQUIRED_USE=${PYTHON_REQUIRED_USE}
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # multilib support
+ sed -i -e "s:lib\/${PN}:$(get_libdir)\/${PN}:" \
+ SConstruct SConscript || die
+ # respect CXXFLAGS,CXX,LDFLAGS
+ epatch "${FILESDIR}"/${P}-build-env-vars.patch
+ # fix mypaint.desktop
+ epatch "${FILESDIR}"/${P}-desktop.patch
+ # pkgconfig patch for json-c-0.11. 467322
+ epatch "${FILESDIR}"/${P}-json-c-0.11.patch
+}
+
+src_compile() {
+ #workaround scons bug with locales. Bug #352700
+ export LANG="en_US.UTF-8"
+ tc-export CC CXX
+ escons
+}
+
+src_install () {
+ escons prefix="${D}/usr" install
+ newicon pixmaps/${PN}_logo.png ${PN}.png
+ for x in ${LANGS}; do
+ if ! has ${x} ${LINGUAS}; then
+ rm -rf "${ED}"/usr/share/locale/${x} || die
+ fi
+ done
+
+ python_optimize "${D}"usr/share/${PN}
+ # not used and broken
+ rm -rf "${ED}"/usr/{include/,lib/libmypaint.a,lib/pkgconfig/} || die
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/mypaint/mypaint-1.1.0.ebuild b/media-gfx/mypaint/mypaint-1.1.0.ebuild
new file mode 100644
index 000000000000..acaf8e1bc88e
--- /dev/null
+++ b/media-gfx/mypaint/mypaint-1.1.0.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+PYTHON_DEPEND="2:2.5"
+
+inherit eutils fdo-mime gnome2-utils multilib scons-utils toolchain-funcs python
+
+DESCRIPTION="fast and easy graphics application for digital painters"
+HOMEPAGE="http://mypaint.intilinux.com/"
+SRC_URI="http://download.gna.org/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+LANGS="cs de en_CA es fr hu id it ja ko nb nn_NO pl pt_BR ru sl sv uk zh_CN zh_TW"
+for x in ${LANGS}; do
+ IUSE+="linguas_${x} "
+done
+
+RDEPEND="dev-python/pygtk
+ dev-python/numpy
+ >=dev-python/pycairo-1.4
+ dev-libs/protobuf[python]
+ >=dev-libs/json-c-0.11
+ >=media-libs/lcms-2.0
+ media-libs/libpng"
+DEPEND="${RDEPEND}
+ dev-lang/swig
+ virtual/pkgconfig"
+
+pkg_setup(){
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ # multilib support
+ sed -i -e "s:lib\/${PN}:$(get_libdir)\/${PN}:" \
+ SConstruct SConscript || die
+ # respect CXXFLAGS,CXX,LDFLAGS
+ epatch "${FILESDIR}"/${PN}-1.1.0-gentoo.patch
+ # pkgconfig patch for json-c-0.11. 467322
+ epatch "${FILESDIR}"/${P}-json-c-0.11.patch
+}
+
+src_compile() {
+ #workaround scons bug with locales. Bug #352700
+ export LANG="en_US.UTF-8"
+ tc-export CXX
+ escons || die "scons failed"
+}
+
+src_install () {
+ escons prefix="${D}/usr" install || die "scons install failed"
+ newicon pixmaps/${PN}_logo.png ${PN}.png
+ for x in ${LANGS}; do
+ if ! has ${x} ${LINGUAS}; then
+ find "${D}"/usr/share/locale/${x} -name "mypaint.mo" -exec rm {} \;
+ fi
+ done
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+ python_mod_optimize /usr/share/${PN}
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ python_mod_cleanup /usr/share/${PN}
+}
diff --git a/media-gfx/nip2/Manifest b/media-gfx/nip2/Manifest
new file mode 100644
index 000000000000..bfb6edb02020
--- /dev/null
+++ b/media-gfx/nip2/Manifest
@@ -0,0 +1 @@
+DIST nip2-7.26.4.tar.gz 8700478 SHA256 0344420f7da39efc7011e552528db9651ebbbe1c6d26b8c11d0ccfaae20f34a8
diff --git a/media-gfx/nip2/files/nip2-7.16.4-fftw3-build.patch b/media-gfx/nip2/files/nip2-7.16.4-fftw3-build.patch
new file mode 100644
index 000000000000..d67134638502
--- /dev/null
+++ b/media-gfx/nip2/files/nip2-7.16.4-fftw3-build.patch
@@ -0,0 +1,12 @@
+=== modified file 'configure.in'
+--- configure.in 2009-01-13 09:30:52 +0000
++++ configure.in 2009-01-13 09:35:48 +0000
+@@ -186,6 +186,7 @@
+ with_fftw3=no
+ ])
+ IP_CFLAGS="$FFTW_INCLUDES $FFTW3_CFLAGS $IP_CFLAGS"
++ IP_LIBS="$FFTW3_LIBS $IP_LIBS"
+ fi
+
+ # optional ... we add some gsl funcs as builtins if available
+
diff --git a/media-gfx/nip2/metadata.xml b/media-gfx/nip2/metadata.xml
new file mode 100644
index 000000000000..91ac8ee94a6b
--- /dev/null
+++ b/media-gfx/nip2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name='goffice'>use <pkg>x11-libs/goffice</pkg> to show plots</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/nip2/nip2-7.26.4.ebuild b/media-gfx/nip2/nip2-7.26.4.ebuild
new file mode 100644
index 000000000000..b4f61fb35053
--- /dev/null
+++ b/media-gfx/nip2/nip2-7.26.4.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils autotools fdo-mime gnome2-utils versionator
+
+MY_MAJ_VER=$(get_version_component_range 1-2)
+DESCRIPTION="VIPS Image Processing Graphical User Interface"
+SRC_URI="http://www.vips.ecs.soton.ac.uk/supported/${MY_MAJ_VER}/${P}.tar.gz"
+HOMEPAGE="http://vips.sourceforge.net"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug fftw goffice gsl test"
+
+RDEPEND=">=dev-libs/glib-2.14:2
+ dev-libs/libxml2
+ x11-misc/xdg-utils
+ >=media-libs/vips-${MY_MAJ_VER}
+ >=x11-libs/gtk+-2.18:2
+ goffice? ( x11-libs/goffice:0.8 )
+ gsl? ( sci-libs/gsl )
+ fftw? ( sci-libs/fftw:3.0 )"
+DEPEND="${RDEPEND}
+ sys-devel/bison
+ sys-devel/flex
+ test? ( media-libs/vips[jpeg,lcms,tiff] )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-7.16.4-fftw3-build.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-update-desktop \
+ $(use_enable debug) \
+ $(use_with goffice libgoffice) \
+ $(use_with gsl) \
+ $(use_with fftw fftw3)
+}
+
+src_test() {
+ if ! use gsl; then
+ ewarn "Some tests require USE=gsl. Disabling test_math.ws tests."
+ rm test/workspaces/test_math.ws
+ fi
+ make check || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS ChangeLog NEWS README* || die
+ insinto /usr/share/icons/hicolor/128x128/apps
+ newins share/nip2/data/vips-128.png nip2.png || die
+
+ mv "${D}"/usr/share/doc/${PN}/* "${D}"/usr/share/doc/${PF} || die
+ rmdir "${D}"/usr/share/doc/${PN}/ || die
+ dosym /usr/share/doc/${PF}/html /usr/share/doc/${PN}/
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-gfx/nomacs/Manifest b/media-gfx/nomacs/Manifest
new file mode 100644
index 000000000000..8925a44092a0
--- /dev/null
+++ b/media-gfx/nomacs/Manifest
@@ -0,0 +1,2 @@
+DIST nomacs-2.4.2-source.tar.bz2 1443270 SHA256 b0f52b919025a48a0e0300ea15c90b40d6ad892b055088fca02a8137e229bc3a SHA512 e3fae11ae8c385f9548bda32b2364967a457e9645fa4375da9d1cf85dc8fb150a56a19c3eab12ddef90d58f20a57d02a8720ddb8fef22c569ab6c28d54654f02 WHIRLPOOL ac21dd3afe3b45324daa6e07030203611c9f2de4ad1427ce4bb388d84ade5e38a686b42e0d757adbaa3a91fbb658d94f9f47de61e9ccf4ccc339af4ce1c4fd8d
+DIST nomacs-2.4.4-source.tar.bz2 1448716 SHA256 01b0cb48936ca0214c120a126069c50a9b8fe7ecbdb69bb4e5fe283d6b198257 SHA512 76cd5efaba09584757843e895b5b8293adcdab7df68a7d5bdcf38e9e5df04e38382944cf64293c9820815b9e6328793dd8e46afef5ffeaa80ddc4f7d43290fc2 WHIRLPOOL d858887f66cbbed858c1985313107839a8162052bfb825bc48f344516444a1e184e839c9a067283d7503b98a6993126ade3f39c0a85b50ca534f963335c85513
diff --git a/media-gfx/nomacs/files/nomacs-2.4.2-include.patch b/media-gfx/nomacs/files/nomacs-2.4.2-include.patch
new file mode 100644
index 000000000000..abf3d406ce5e
--- /dev/null
+++ b/media-gfx/nomacs/files/nomacs-2.4.2-include.patch
@@ -0,0 +1,10 @@
+--- src/DkMath.h
++++ src/DkMath.h
+@@ -29,6 +29,7 @@
+
+ #pragma warning(push, 0) // no warnings from includes - begin
+ #include <cmath>
++#include <float.h>
+ #include <QDebug>
+ #include <QPointF>
+ #include <QPolygonF>
diff --git a/media-gfx/nomacs/metadata.xml b/media-gfx/nomacs/metadata.xml
new file mode 100644
index 000000000000..0025d46170c3
--- /dev/null
+++ b/media-gfx/nomacs/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <upstream>
+ <remote-id type="sourceforge">nomacs</remote-id>
+ <bugs-to>http://www.nomacs.org/redmine/projects/nomacs</bugs-to>
+ </upstream>
+ <use>
+ <flag name="opencv">Build support for <pkg>media-libs/opencv</pkg></flag>
+ <flag name="webp">Build support for WEBP image format</flag>
+ <flag name="zip">Build support for zip archives</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/nomacs/nomacs-2.4.2.ebuild b/media-gfx/nomacs/nomacs-2.4.2.ebuild
new file mode 100644
index 000000000000..b3ef73bdc759
--- /dev/null
+++ b/media-gfx/nomacs/nomacs-2.4.2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils fdo-mime
+
+DESCRIPTION="Qt4-based image viewer"
+HOMEPAGE="http://www.nomacs.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-source.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~amd64-linux"
+IUSE="opencv raw tiff webp zip"
+
+REQUIRED_USE="raw? ( opencv ) tiff? ( opencv )"
+
+RDEPEND="
+ >=media-gfx/exiv2-0.20[zlib]
+ >=dev-qt/qtcore-4.7.0:4
+ >=dev-qt/qtgui-4.7.0:4
+ opencv? ( >=media-libs/opencv-2.4.0[qt4] )
+ raw? ( >=media-libs/libraw-0.14 )
+ tiff? ( media-libs/tiff:0= )
+ webp? ( >=media-libs/libwebp-0.3.1:= )
+ zip? ( dev-libs/quazip )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}/${P}-include.patch" )
+
+src_configure() {
+ local mycmakeargs=(
+ -DUSE_SYSTEM_WEBP=true
+ -DUSE_SYSTEM_QUAZIP=true
+ $(cmake-utils_use_enable opencv)
+ $(cmake-utils_use_enable raw)
+ $(cmake-utils_use_enable tiff)
+ $(cmake-utils_use_enable webp)
+ $(cmake-utils_use_enable zip QUAZIP)
+ )
+ cmake-utils_src_configure
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/nomacs/nomacs-2.4.4.ebuild b/media-gfx/nomacs/nomacs-2.4.4.ebuild
new file mode 100644
index 000000000000..dee2bc0a009b
--- /dev/null
+++ b/media-gfx/nomacs/nomacs-2.4.4.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils fdo-mime
+
+DESCRIPTION="Qt4-based image viewer"
+HOMEPAGE="http://www.nomacs.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-source.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~amd64-linux"
+IUSE="opencv raw tiff webp zip"
+
+REQUIRED_USE="
+ raw? ( opencv )
+ tiff? ( opencv )
+"
+
+RDEPEND="
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ >=media-gfx/exiv2-0.20:=[zlib]
+ opencv? ( >=media-libs/opencv-2.4:=[qt4] )
+ raw? ( >=media-libs/libraw-0.14:= )
+ tiff? ( media-libs/tiff:0 )
+ webp? ( >=media-libs/libwebp-0.3.1:= )
+ zip? ( dev-libs/quazip )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_configure() {
+ local mycmakeargs=(
+ -DENABLE_QT5=OFF
+ $(cmake-utils_use_enable opencv)
+ $(cmake-utils_use_enable raw)
+ $(cmake-utils_use_enable tiff)
+ $(cmake-utils_use_enable webp)
+ $(cmake-utils_use_enable zip QUAZIP)
+ -DUSE_SYSTEM_WEBP=ON
+ -DUSE_SYSTEM_QUAZIP=ON
+ )
+ cmake-utils_src_configure
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/media-gfx/nvidia-cg-toolkit/Manifest b/media-gfx/nvidia-cg-toolkit/Manifest
new file mode 100644
index 000000000000..cab4d89794ae
--- /dev/null
+++ b/media-gfx/nvidia-cg-toolkit/Manifest
@@ -0,0 +1,2 @@
+DIST Cg-3.1_April2012_x86.tgz 23332348 SHA256 cef3591e436f528852db0e8c145d3842f920e0c89bcfb219c466797cb7b18879 SHA512 7b2addad157e151eb42b320aea31ccddfd53ec5640cb97bc86a3d461c1b08a2dff280bfc3f7859d124c311e1710e39d40405c387e5724ebc82d95303b250837a WHIRLPOOL f15f3e8f65310a47661a0473cdf7dc1ef195aff8422ad8a0ec26a2302a52d73f9f22922180482cb2724197037eb619cb9389f9732718a08dca8889d2be5dff1d
+DIST Cg-3.1_April2012_x86_64.tgz 24829131 SHA256 e8ff01e6cc38d1b3fd56a083f5860737dbd2f319a39037528fb1a74a89ae9878 SHA512 591b51195193e7e3bbb9f1c2579336d24a179b0a88b955a01f4661bda55543fbccd73cac53033912f2eea8a1068e4c1394c6d286f195963cfb33a0d8b4428e27 WHIRLPOOL c4295473b82d67f6cf370e725a36189fbdbc3bfd02369e4afc0f510b6ab06a160a7de5e47931689dccc5ff52f95f0e10ebd03b32c8c30881d6d2f02183cad2a9
diff --git a/media-gfx/nvidia-cg-toolkit/files/80cgc b/media-gfx/nvidia-cg-toolkit/files/80cgc
new file mode 100644
index 000000000000..19b9b4083b0f
--- /dev/null
+++ b/media-gfx/nvidia-cg-toolkit/files/80cgc
@@ -0,0 +1,7 @@
+# /etc/env.d/80cgc :
+# $Id$
+
+
+# Configures the CG Runtime environment for Bourne shell and compatible shells
+
+CG_COMPILER_EXE=/usr/bin/cgc
diff --git a/media-gfx/nvidia-cg-toolkit/files/80cgc-opt b/media-gfx/nvidia-cg-toolkit/files/80cgc-opt
new file mode 100644
index 000000000000..3da3da2d90f6
--- /dev/null
+++ b/media-gfx/nvidia-cg-toolkit/files/80cgc-opt
@@ -0,0 +1,6 @@
+# Configures the CG Runtime environment for Bourne shell and compatible shells
+CG_COMPILER_EXE=/opt/bin/cgc
+
+# Make sure the helper files are found
+LDPATH="/opt/nvidia-cg-toolkit/lib"
+MANPATH="/opt/nvidia-cg-toolkit/man"
diff --git a/media-gfx/nvidia-cg-toolkit/files/80cgc-opt-2 b/media-gfx/nvidia-cg-toolkit/files/80cgc-opt-2
new file mode 100644
index 000000000000..f550ccab841b
--- /dev/null
+++ b/media-gfx/nvidia-cg-toolkit/files/80cgc-opt-2
@@ -0,0 +1,11 @@
+# $Id$
+
+# Configures the CG Runtime environment for Bourne shell and compatible shells
+CG_COMPILER_EXE=@GENTOO_PORTAGE_EPREFIX@/opt/bin/cgc
+CG_INC_PATH=@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit/include
+CG_LIB_PATH="ELDPATH"
+
+PATH="@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit/bin"
+ROOTPATH="@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit/bin"
+
+LDPATH="ELDPATH"
diff --git a/media-gfx/nvidia-cg-toolkit/files/80cgc-opt-3 b/media-gfx/nvidia-cg-toolkit/files/80cgc-opt-3
new file mode 100644
index 000000000000..9013927d11e9
--- /dev/null
+++ b/media-gfx/nvidia-cg-toolkit/files/80cgc-opt-3
@@ -0,0 +1,9 @@
+# $Id$
+
+# Configures the CG Runtime environment for Bourne shell and compatible shells
+CG_COMPILER_EXE=@GENTOO_PORTAGE_EPREFIX@/opt/bin/cgc
+CG_INC_PATH=@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit/include
+CG_LIB_PATH="ELDPATH"
+
+PATH="@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit/bin"
+ROOTPATH="@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit/bin"
diff --git a/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit-gl.pc.in b/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit-gl.pc.in
new file mode 100644
index 000000000000..be92a7e4e22b
--- /dev/null
+++ b/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit-gl.pc.in
@@ -0,0 +1,10 @@
+prefix=@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit
+libdir=${prefix}/GENTOO_LIBDIR
+includedir=${prefix}/include
+Name: nvidia-cg-toolkit
+Description: DESCRIPTION
+Version: VERSION
+URL: HOMEPAGE
+Libs: -L${libdir} -lCgGL
+Cflags: -I${includedir}/
+Requires: nvidia-cg-toolkitSUFFIX
diff --git a/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit.pc.in b/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit.pc.in
new file mode 100644
index 000000000000..43dedbef4bb7
--- /dev/null
+++ b/media-gfx/nvidia-cg-toolkit/files/nvidia-cg-toolkit.pc.in
@@ -0,0 +1,9 @@
+prefix=@GENTOO_PORTAGE_EPREFIX@/opt/nvidia-cg-toolkit
+libdir=${prefix}/GENTOO_LIBDIR
+includedir=${prefix}/include
+Name: nvidia-cg-toolkit
+Description: DESCRIPTION
+Version: VERSION
+URL: HOMEPAGE
+Libs: -L${libdir} -lCg
+Cflags: -I${includedir}/
diff --git a/media-gfx/nvidia-cg-toolkit/metadata.xml b/media-gfx/nvidia-cg-toolkit/metadata.xml
new file mode 100644
index 000000000000..84b9190efd25
--- /dev/null
+++ b/media-gfx/nvidia-cg-toolkit/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ <name>Justin Lecher</name>
+ </maintainer>
+ <longdescription>
+The Cg Toolkit provides a compiler for the Cg language, runtime libraries for
+use with both leading graphics APIs, runtime libraries for CgFX, example
+applications, and extensive documentation. Supporting over 20 different OpenGL
+and DirectX profile targets, Cg will allow you to incorporate stunning
+interactive effects into your 3D applications.
+</longdescription>
+</pkgmetadata>
diff --git a/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r3.ebuild b/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r3.ebuild
new file mode 100644
index 000000000000..16db91518c10
--- /dev/null
+++ b/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r3.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+inherit multilib multilib-minimal prefix versionator
+
+MY_PV="$(get_version_component_range 1-2)"
+MY_DATE="April2012"
+
+DESCRIPTION="NVIDIA's C graphics compiler toolkit"
+HOMEPAGE="http://developer.nvidia.com/cg_toolkit"
+SRC_URI="
+ abi_x86_32? (
+ http://developer.download.nvidia.com/cg/Cg_${MY_PV}/Cg-${MY_PV}_${MY_DATE}_x86.tgz
+ )
+ abi_x86_64? (
+ http://developer.download.nvidia.com/cg/Cg_${MY_PV}/Cg-${MY_PV}_${MY_DATE}_x86_64.tgz
+ )"
+
+LICENSE="NVIDIA-r1"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples multilib"
+
+REQUIRED_USE="amd64? ( multilib? ( abi_x86_32 ) )"
+RESTRICT="strip"
+
+RDEPEND="
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXt
+ media-libs/glu
+ media-libs/mesa
+ media-libs/freeglut
+ amd64? ( abi_x86_32? (
+ >=media-libs/glu-9.0.0-r1[abi_x86_32(-)]
+ >=media-libs/mesa-9.1.6[abi_x86_32(-)]
+ >=media-libs/freeglut-2.8.1[abi_x86_32(-)]
+ >=x11-libs/libICE-1.0.8-r1[abi_x86_32(-)]
+ >=x11-libs/libSM-1.2.1-r1[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=x11-libs/libXi-1.7.2[abi_x86_32(-)]
+ >=x11-libs/libXmu-1.1.1-r1[abi_x86_32(-)]
+ >=x11-libs/libXt-1.1.4[abi_x86_32(-)]
+ ) )
+ x86? ( virtual/libstdc++:3.3 )"
+DEPEND=""
+
+S=${WORKDIR}
+
+DEST=/opt/${PN}
+
+QA_PREBUILT="${DEST}/*"
+
+src_unpack() {
+ multilib_src_unpack() {
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local i
+ for i in ${A}; do
+ if [[ ${i} == *x86_64* && ${ABI} == amd64 ]]; then
+ unpack "${i}"
+ elif [[ ${i} != *x86_64* && ${ABI} != amd64 ]]; then
+ unpack "${i}"
+ fi
+ done
+ }
+
+ multilib_foreach_abi multilib_src_unpack
+}
+
+install_pkgconfig() {
+ # One arg: .pc file
+ insinto /usr/$(get_libdir)/pkgconfig
+ sed \
+ -e "s:GENTOO_LIBDIR:$(get_libdir):g" \
+ -e "s:DESCRIPTION:${DESCRIPTION}:g" \
+ -e "s:VERSION:${PV}:g" \
+ -e "s|HOMEPAGE|${HOMEPAGE}|g" \
+ -e "s:SUFFIX::g" \
+ "${FILESDIR}/${1}.in" > "${T}/${1}" || die
+ eprefixify "${T}/${1}"
+ doins "${T}/${1}"
+}
+
+src_install() {
+ local LDPATH=()
+
+ multilib-minimal_src_install
+}
+
+multilib_src_install() {
+ LDPATH+=( "${EPREFIX}${DEST}/$(get_libdir)" )
+ into ${DEST}
+
+ if [[ ${ABI} == amd64 ]]; then
+ dolib usr/lib64/*
+ else
+ dolib usr/lib/*
+ fi
+ install_pkgconfig nvidia-cg-toolkit.pc
+ install_pkgconfig nvidia-cg-toolkit-gl.pc
+
+ insinto ${DEST}/include
+ doins -r usr/include/Cg
+
+ if multilib_is_native_abi; then
+ dobin usr/bin/{cgc,cgfxcat,cginfo}
+
+ insinto ${DEST}
+ dodoc usr/local/Cg/README
+ if use doc; then
+ dodoc usr/local/Cg/docs/*.{txt,pdf}
+ dohtml -r usr/local/Cg/docs/html/*
+ fi
+ if use examples; then
+ insinto /usr/share/${PN}
+ doins -r usr/local/Cg/examples
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ local ldpath=${LDPATH[*]}
+
+ sed \
+ -e "s|ELDPATH|${ldpath// /:}|g" \
+ "${FILESDIR}"/80cgc-opt-2 > "${T}"/80cgc-opt || die
+ eprefixify "${T}"/80cgc-opt
+ doenvd "${T}"/80cgc-opt
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} < 2.1.0016 ]]; then
+ einfo "Starting with ${CATEGORY}/${PN}-2.1.0016, ${PN} is installed in"
+ einfo "${DEST}. Packages might have to add something like:"
+ einfo " append-cppflags -I${DEST}/include"
+ fi
+}
diff --git a/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r4.ebuild b/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r4.ebuild
new file mode 100644
index 000000000000..69a5820be548
--- /dev/null
+++ b/media-gfx/nvidia-cg-toolkit/nvidia-cg-toolkit-3.1.0013-r4.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+
+inherit eutils multilib multilib-minimal prefix versionator
+
+MY_PV="$(get_version_component_range 1-2)"
+MY_DATE="April2012"
+
+DESCRIPTION="NVIDIA's C graphics compiler toolkit"
+HOMEPAGE="http://developer.nvidia.com/cg_toolkit"
+SRC_URI="
+ abi_x86_32? (
+ http://developer.download.nvidia.com/cg/Cg_${MY_PV}/Cg-${MY_PV}_${MY_DATE}_x86.tgz
+ )
+ abi_x86_64? (
+ http://developer.download.nvidia.com/cg/Cg_${MY_PV}/Cg-${MY_PV}_${MY_DATE}_x86_64.tgz
+ )"
+
+LICENSE="NVIDIA-r1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc examples multilib"
+
+REQUIRED_USE="amd64? ( multilib? ( abi_x86_32 ) )"
+
+RESTRICT="strip"
+
+RDEPEND="
+ media-libs/glu
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXt
+ virtual/opengl
+ amd64? (
+ abi_x86_32? (
+ >=media-libs/freeglut-2.8.1[abi_x86_32(-)]
+ >=media-libs/glu-9.0.0-r1[abi_x86_32(-)]
+ >=virtual/opengl-7.0-r1[abi_x86_32(-)]
+ >=x11-libs/libICE-1.0.8-r1[abi_x86_32(-)]
+ >=x11-libs/libSM-1.2.1-r1[abi_x86_32(-)]
+ >=x11-libs/libX11-1.6.2[abi_x86_32(-)]
+ >=x11-libs/libXext-1.3.2[abi_x86_32(-)]
+ >=x11-libs/libXi-1.7.2[abi_x86_32(-)]
+ >=x11-libs/libXmu-1.1.1-r1[abi_x86_32(-)]
+ >=x11-libs/libXt-1.1.4[abi_x86_32(-)]
+ )
+ )"
+DEPEND=""
+
+S=${WORKDIR}
+
+DEST=/opt/${PN}
+
+QA_PREBUILT="${DEST}/.* /usr/share/.*"
+
+src_unpack() {
+ multilib_src_unpack() {
+ mkdir -p "${BUILD_DIR}" || die
+ cd "${BUILD_DIR}" || die
+
+ local i
+ for i in ${A}; do
+ if [[ ${i} == *x86_64* && ${ABI} == amd64 ]]; then
+ unpack "${i}"
+ elif [[ ${i} != *x86_64* && ${ABI} != amd64 ]]; then
+ unpack "${i}"
+ fi
+ done
+ }
+
+ multilib_foreach_abi multilib_src_unpack
+}
+
+install_pkgconfig() {
+ # One arg: .pc file
+ insinto /usr/$(get_libdir)/pkgconfig
+ sed \
+ -e "s:GENTOO_LIBDIR:$(get_libdir):g" \
+ -e "s:DESCRIPTION:${DESCRIPTION}:g" \
+ -e "s:VERSION:${PV}:g" \
+ -e "s|HOMEPAGE|${HOMEPAGE}|g" \
+ -e "s:SUFFIX::g" \
+ "${FILESDIR}/${1}.in" > "${T}/${1}" || die
+ eprefixify "${T}/${1}"
+ doins "${T}/${1}"
+}
+
+src_install() {
+ local LDPATH=()
+
+ multilib-minimal_src_install
+}
+
+multilib_src_install() {
+ LDPATH+=( "${EPREFIX}${DEST}/$(get_libdir)" )
+ into ${DEST}
+
+ if [[ ${ABI} == amd64 ]]; then
+ dolib usr/lib64/*
+ else
+ dolib usr/lib/*
+ fi
+ install_pkgconfig nvidia-cg-toolkit.pc
+ install_pkgconfig nvidia-cg-toolkit-gl.pc
+
+ insinto ${DEST}/include
+ doins -r usr/include/Cg
+
+ if multilib_is_native_abi; then
+ dobin usr/bin/{cgc,cgfxcat,cginfo}
+
+ insinto ${DEST}
+ dodoc usr/local/Cg/README
+ if use doc; then
+ DOCS=( usr/local/Cg/docs/*.{txt,pdf} )
+ HTML_DOCS=( usr/local/Cg/docs/html/. )
+ einstalldocs
+ fi
+ if use examples; then
+ dodir /usr/share/${PN}
+ mv usr/local/Cg/examples "${ED}"/usr/share/${PN}/
+ fi
+ fi
+}
+
+multilib_src_install_all() {
+ local ldpath=${LDPATH[*]}
+
+ sed \
+ -e "s|ELDPATH|${ldpath// /:}|g" \
+ "${FILESDIR}"/80cgc-opt-2 > "${T}"/80cgc-opt || die
+ eprefixify "${T}"/80cgc-opt
+ doenvd "${T}"/80cgc-opt
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} < 2.1.0016 ]]; then
+ einfo "Starting with ${CATEGORY}/${PN}-2.1.0016, ${PN} is installed in"
+ einfo "${DEST}. Packages might have to add something like:"
+ einfo " append-cppflags -I${DEST}/include"
+ fi
+}
diff --git a/media-gfx/nvidia-texture-tools/Manifest b/media-gfx/nvidia-texture-tools/Manifest
new file mode 100644
index 000000000000..1b119be13574
--- /dev/null
+++ b/media-gfx/nvidia-texture-tools/Manifest
@@ -0,0 +1,2 @@
+DIST nvidia-texture-tools-2.0.8-1.tar.gz 935227 SHA256 6b3c83500b420ee976f61eeae16e5727e2401e133f543baeac76c66c381eed2e SHA512 8e7ac79daaa10a2b1b64cfc8d6b37b37698e2a46f925cc33cdfd8e4b36705db8836edec6f98c5d6da475d7773f4a5826b5cebc120b7c5a6f9515906e2e4fae9d WHIRLPOOL 5f4e3daeab3f2dd0fc057d2fc56d4bfc888cd86449c1b390380b24a561d1538c010bc93c7990b0f156f03df37933333596796e53174fc4ce818845d74b45d400
+DIST nvidia-texture-tools-2.0.8-patchset-1.tar.xz 9688 SHA256 7cc8ba61cf0290984b31bdbe7b291ff75f2eeab8b07da908dfb5a1b421341516 SHA512 36305036d178c4a9960148d4ae5fd72e866ebc3f193f7c75e720275f4fa11d4a1f9067f42309de739db84678c81cd921f117cfe5b2e6a78785cf35c7e3947c8b WHIRLPOOL 6c530a09a7e46a34dbaa9bdaf5017e58e8f490bc5afef230b3fa83362e30f4bbe3d3454e8b9153af0acfb27e77652b578a2c52da86d34b287b919806233942bc
diff --git a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cg.patch b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cg.patch
new file mode 100644
index 000000000000..6dcb1b466944
--- /dev/null
+++ b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-cg.patch
@@ -0,0 +1,39 @@
+From: hasufell <hasufell@gentoo.org>
+Date: Thu May 3 20:06:31 UTC 2012
+
+fix compilation for cg useflag
+
+--- cmake/FindCg.cmake
++++ cmake/FindCg.cmake
+@@ -86,6 +86,7 @@
+ FIND_PROGRAM( CG_COMPILER cgc
+ /usr/bin
+ /usr/local/bin
++ /opt/nvidia-cg-toolkit/bin
+ DOC "The Cg Compiler"
+ )
+ GET_FILENAME_COMPONENT(CG_COMPILER_DIR "${CG_COMPILER}" PATH)
+@@ -93,6 +94,7 @@
+ FIND_PATH( CG_INCLUDE_PATH Cg/cg.h
+ /usr/include
+ /usr/local/include
++ /opt/nvidia-cg-toolkit/include
+ ${CG_COMPILER_SUPER_DIR}/include
+ DOC "The directory where Cg/cg.h resides"
+ )
+@@ -102,6 +104,7 @@
+ /usr/lib
+ /usr/local/lib64
+ /usr/local/lib
++ /opt/nvidia-cg-toolkit/lib
+ ${CG_COMPILER_SUPER_DIR}/lib64
+ ${CG_COMPILER_SUPER_DIR}/lib
+ DOC "The Cg runtime library"
+@@ -113,6 +116,7 @@
+ /usr/lib
+ /usr/local/lib64
+ /usr/local/lib
++ /opt/nvidia-cg-toolkit/lib
+ ${CG_COMPILER_SUPER_DIR}/lib64
+ ${CG_COMPILER_SUPER_DIR}/lib
+ DOC "The Cg runtime library"
diff --git a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-clang.patch b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-clang.patch
new file mode 100644
index 000000000000..373c87e4171b
--- /dev/null
+++ b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-clang.patch
@@ -0,0 +1,18 @@
+Index: src/src/nvtt/squish/CMakeLists.txt
+===================================================================
+--- src/src/nvtt/squish/CMakeLists.txt (revision 13060)
++++ src/src/nvtt/squish/CMakeLists.txt (working copy)
+@@ -22,7 +22,11 @@
+
+ ADD_LIBRARY(squish STATIC ${SQUISH_SRCS})
+
+-IF(CMAKE_COMPILER_IS_GNUCXX)
++IF("${CMAKE_CXX_COMPILER}" MATCHES "clang(\\+\\+)?$" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
++ SET(CMAKE_COMPILER_IS_CLANGXX 1)
++ENDIF()
++
++IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
+ SET_TARGET_PROPERTIES(squish PROPERTIES COMPILE_FLAGS -fPIC)
+-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
++ENDIF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
+
diff --git a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-gcc-4.7.patch b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-gcc-4.7.patch
new file mode 100644
index 000000000000..62f33e905bfd
--- /dev/null
+++ b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-gcc-4.7.patch
@@ -0,0 +1,16 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Fri Jun 29 08:15:12 UTC 2012
+Subject: fix compilation on gcc 4.7
+
+https://bugs.gentoo.org/show_bug.cgi?id=423965
+
+--- src/nvcore/nvcore.h
++++ src/nvcore/nvcore.h
+@@ -158,6 +158,7 @@
+ #elif NV_CC_GNUC
+ # if NV_OS_LINUX
+ # include "DefsGnucLinux.h"
++# include <unistd.h> // gcc 4.7
+ # elif NV_OS_DARWIN
+ # include "DefsGnucDarwin.h"
+ # elif NV_OS_MINGW
diff --git a/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-openexr.patch b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-openexr.patch
new file mode 100644
index 000000000000..b49abf9e5c32
--- /dev/null
+++ b/media-gfx/nvidia-texture-tools/files/nvidia-texture-tools-2.0.8-openexr.patch
@@ -0,0 +1,93 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Wed Mar 20 22:10:22 UTC 2013
+Subject: add pkgconfig checks
+
+https://bugs.gentoo.org/show_bug.cgi?id=462494
+
+--- nvidia-texture-tools/cmake/FindOpenEXR.cmake
++++ nvidia-texture-tools/cmake/FindOpenEXR.cmake
+@@ -7,11 +7,15 @@
+ # OPENEXR_LIBRARIES = libraries that are needed to use OpenEXR.
+ #
+
+-INCLUDE(FindZLIB)
++IF(UNIX)
++ INCLUDE(FindPkgConfig)
++ pkg_check_modules(_PKG_OPENEXR OpenEXR)
++ENDIF(UNIX)
+
++find_package(ZLIB REQUIRED)
+
+-IF(ZLIB_FOUND)
+-
++IF(NOT _PKG_OPENEXR_FOUND)
++
+ SET(LIBRARY_PATHS
+ /usr/lib
+ /usr/local/lib
+@@ -46,10 +50,20 @@
+ NAMES IlmThread
+ PATHS ${LIBRARY_PATHS})
+
+-ENDIF(ZLIB_FOUND)
++ENDIF(NOT _PKG_OPENEXR_FOUND)
+
+ #MESSAGE(STATUS ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ZLIB_LIBRARY})
+
++IF(_PKG_OPENEXR_FOUND)
++ SET(OPENEXR_FOUND TRUE)
++ foreach(i ${_PKG_OPENEXR_CFLAGS})
++ SET(OPENEXR_CFLAGS "${OPENEXR_CFLAGS} ${i}")
++ endforeach(i)
++ foreach(p ${_PKG_OPENEXR_LDFLAGS})
++ SET(OPENEXR_LDFLAGS "${OPENEXR_LDFLAGS} ${p}")
++ endforeach(p)
++ SET(OPENEXR_LDFLAGS "${OPENEXR_LDFLAGS} ${ZLIB_LIBRARY}")
++ELSE(_PKG_OPENEXR_FOUND)
+ IF (OPENEXR_INCLUDE_PATH AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
+ SET(OPENEXR_FOUND TRUE)
+ SET(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
+@@ -65,6 +79,8 @@
+ MESSAGE(FATAL_ERROR "Could not find OpenEXR library")
+ ENDIF(OPENEXR_FIND_REQUIRED)
+ ENDIF(OPENEXR_FOUND)
++ENDIF(_PKG_OPENEXR_FOUND)
++
+
+ MARK_AS_ADVANCED(
+ OPENEXR_INCLUDE_PATHS
+@@ -73,3 +89,4 @@
+ OPENEXR_IMATH_LIBRARY
+ OPENEXR_IEX_LIBRARY
+ OPENEXR_HALF_LIBRARY)
++
+--- nvidia-texture-tools/src/nvimage/CMakeLists.txt
++++ nvidia-texture-tools/src/nvimage/CMakeLists.txt
+@@ -44,10 +44,10 @@
+ INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR})
+ ENDIF(TIFF_FOUND)
+
+-IF(OPENEXR_FOUND)
++IF(OPENEXR_FOUND AND NOT _PKG_OPENEXR_FOUND)
+ SET(LIBS ${LIBS} ${OPENEXR_LIBRARIES})
+ INCLUDE_DIRECTORIES(${OPENEXR_INCLUDE_PATHS})
+-ENDIF(OPENEXR_FOUND)
++ENDIF(OPENEXR_FOUND AND NOT _PKG_OPENEXR_FOUND)
+
+ # targets
+ ADD_DEFINITIONS(-DNVIMAGE_EXPORTS)
+@@ -61,6 +61,14 @@
+
+ TARGET_LINK_LIBRARIES(nvimage ${LIBS} nvcore nvmath posh)
+
++IF(_PKG_OPENEXR_FOUND)
++ SET_TARGET_PROPERTIES(nvimage
++ PROPERTIES
++ COMPILE_FLAGS "${OPENEXR_CFLAGS}"
++ LINK_FLAGS "${OPENEXR_LDFLAGS}"
++ )
++ENDIF(_PKG_OPENEXR_FOUND)
++
+ INSTALL(TARGETS nvimage
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
diff --git a/media-gfx/nvidia-texture-tools/metadata.xml b/media-gfx/nvidia-texture-tools/metadata.xml
new file mode 100644
index 000000000000..c9e65157de89
--- /dev/null
+++ b/media-gfx/nvidia-texture-tools/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name='cg'>Enable NVIDIA C graphics compiler toolkit plug-in</flag>
+ <flag name='cuda'>Enable NVIDIA CUDA toolkit support</flag>
+ <flag name='glew'>Enable support for The OpenGL Extension Wrangler Library (<pkg>media-libs/glew</pkg>)</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild b/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild
new file mode 100644
index 000000000000..18c852f1bee5
--- /dev/null
+++ b/media-gfx/nvidia-texture-tools/nvidia-texture-tools-2.0.8-r2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit cmake-utils eutils multilib toolchain-funcs
+
+DESCRIPTION="A set of cuda-enabled texture tools and compressors"
+HOMEPAGE="http://developer.nvidia.com/object/texture_tools.html"
+SRC_URI="http://${PN}.googlecode.com/files/${P}-1.tar.gz
+ http://dev.gentoo.org/~ssuominen/${P}-patchset-1.tar.xz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="cg cuda glew glut openexr"
+
+RDEPEND="media-libs/libpng:0
+ media-libs/ilmbase
+ media-libs/tiff:0
+ sys-libs/zlib
+ virtual/jpeg
+ virtual/opengl
+ x11-libs/libX11
+ cg? ( media-gfx/nvidia-cg-toolkit )
+ cuda? ( dev-util/nvidia-cuda-toolkit )
+ glew? ( media-libs/glew )
+ glut? ( media-libs/freeglut )
+ openexr? ( media-libs/openexr )
+ "
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${PN}
+
+pkg_setup() {
+ if use cuda; then
+ if [[ $(( $(gcc-major-version) * 10 + $(gcc-minor-version) )) -gt 44 ]] ; then
+ eerror "gcc 4.5 and up are not supported for useflag cuda!"
+ die "gcc 4.5 and up are not supported for useflag cuda!"
+ fi
+ fi
+}
+
+src_prepare() {
+ edos2unix cmake/*
+ EPATCH_SUFFIX=patch epatch "${WORKDIR}"/patches
+ # fix bug #414509
+ epatch "${FILESDIR}"/${P}-cg.patch
+ # fix bug #423965
+ epatch "${FILESDIR}"/${P}-gcc-4.7.patch
+ # fix bug #462494
+ epatch "${FILESDIR}"/${P}-openexr.patch
+ # fix clang build
+ epatch "${FILESDIR}"/${P}-clang.patch
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIBDIR=$(get_libdir)
+ -DNVTT_SHARED=TRUE
+ $(cmake-utils_use cg CG)
+ $(cmake-utils_use cuda CUDA)
+ $(cmake-utils_use glew GLEW)
+ $(cmake-utils_use glut GLUT)
+ $(cmake-utils_use openexr OPENEXR)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ dodoc ChangeLog
+}
diff --git a/media-gfx/opcion/Manifest b/media-gfx/opcion/Manifest
new file mode 100644
index 000000000000..587716dff1d7
--- /dev/null
+++ b/media-gfx/opcion/Manifest
@@ -0,0 +1 @@
+DIST Opcion_v1.1.1_src.zip 319793 SHA256 f1af9606c63e200d860d01c2f7bd241031b857928b939fb8044d27aabf83f298
diff --git a/media-gfx/opcion/files/opcion-1.1.1-fix-source.patch b/media-gfx/opcion/files/opcion-1.1.1-fix-source.patch
new file mode 100644
index 000000000000..4c5f1dc9c9e3
--- /dev/null
+++ b/media-gfx/opcion/files/opcion-1.1.1-fix-source.patch
@@ -0,0 +1,15 @@
+--- FontViewer/components/AAToggleButton.java 2007-04-29 12:20:16.000000000 +0200
++++ FontViewer/components/AAToggleButton.java 2007-04-29 12:10:53.000000000 +0200
+@@ -38,7 +38,11 @@
+ this.setToolTipText(fname + " (" + floc + ")");
+ }
+
+- public String getFName() {
++ public AAToggleButton(String s) {
++ super(s);
++ }
++
++ public String getFName() {
+ return fname;
+ }
+
diff --git a/media-gfx/opcion/metadata.xml b/media-gfx/opcion/metadata.xml
new file mode 100644
index 000000000000..4a2bc1931f55
--- /dev/null
+++ b/media-gfx/opcion/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>fonts</herd>
+ <upstream>
+ <remote-id type="sourceforge">opcion</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/opcion/opcion-1.1.1-r2.ebuild b/media-gfx/opcion/opcion-1.1.1-r2.ebuild
new file mode 100644
index 000000000000..babe77b7fa4e
--- /dev/null
+++ b/media-gfx/opcion/opcion-1.1.1-r2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils java-pkg-2
+
+MY_P="Opcion_v${PV}"
+
+DESCRIPTION="Free font viewer written in Java"
+HOMEPAGE="http://opcion.sourceforge.net/"
+SRC_URI="mirror://sourceforge/opcion/${MY_P}_src.zip"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+COMMON_DEP="=dev-java/jgoodies-looks-1.2*"
+RDEPEND=">=virtual/jre-1.4
+ ${COMMON_DEP}"
+DEPEND=">=virtual/jdk-1.4
+ ${COMMON_DEP}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # add missing constructor
+ epatch "${FILESDIR}/${P}-fix-source.patch"
+
+ # calls nonexisting constructor and seems unused
+ rm FontViewer/windows/test.java || die
+
+ rm -rf com/jgoodies || die
+ find . -name '*.class' -delete || die
+ rm *.txt || die
+}
+
+src_compile() {
+ find . -name '*.java' > "${T}/src.list"
+ local cp="$(java-pkg_getjars jgoodies-looks-1.2)"
+ mkdir build || die
+ # quite icky way to copy resources
+ cp -R FontViewer com build || die
+ find build -name '*.java' -delete
+ ejavac -nowarn -classpath "${cp}" -d build "@${T}/src.list"
+ jar cf ${PN}.jar -C build . || die
+}
+
+src_install() {
+ java-pkg_dojar ${PN}.jar
+
+ java-pkg_dolauncher ${PN} --main FontViewer.Opcion
+
+ newicon FontViewer/resources/icons/IconSmall.png ${PN}-icon.png
+ make_desktop_entry ${PN} opcion ${PN}-icon
+}
diff --git a/media-gfx/openclipart/Manifest b/media-gfx/openclipart/Manifest
new file mode 100644
index 000000000000..527ecac2b1ce
--- /dev/null
+++ b/media-gfx/openclipart/Manifest
@@ -0,0 +1 @@
+DIST openclipart-0.20.tar.bz2 367385284 SHA256 6f1fc33b0149e755196882ecab083d56daa3ff6ed78823b36be01f40abc7eb87 SHA512 2d3e0071e019cc272d220b5a4960d4dd7d8ca1ea36d2de7358c7b21e4b3135630075da032b3e274b88e6be8b7e3d331c02c9eebfd43e4e5b199c6016a8fbbdb7 WHIRLPOOL 5c657ac72c816f669c08256db85588fb6462e8e176eae88699174f5f4ae8e306ffc77c47c2951ce96b3d5614f6ed37867971582e56faf190742470a16a26bc3a
diff --git a/media-gfx/openclipart/metadata.xml b/media-gfx/openclipart/metadata.xml
new file mode 100644
index 000000000000..7600f7a1fc40
--- /dev/null
+++ b/media-gfx/openclipart/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="gzip">Compresses clip art using gzip</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/openclipart/openclipart-0.20.ebuild b/media-gfx/openclipart/openclipart-0.20.ebuild
new file mode 100644
index 000000000000..0859716b36a2
--- /dev/null
+++ b/media-gfx/openclipart/openclipart-0.20.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+DESCRIPTION="Open Clip Art Library (openclipart.org)"
+HOMEPAGE="http://www.openclipart.org/"
+
+SRC_URI="http://download.openclipart.org/downloads/${PV}/${P}.tar.bz2"
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="svg png gzip"
+
+# We don't really need anything to run
+DEPEND=""
+RDEPEND=""
+
+# suggested basedir for cliparts
+CLIPART="/usr/share/clipart/${PN}"
+
+src_compile() {
+ local removeext
+
+ if ! use svg && ! use png; then
+ elog "No image formats specified - defaulting to all (png and svg)"
+ else
+ ! use png && removeext="${removeext} png"
+ ! use svg && removeext="${removeext} svg"
+ fi
+
+ for ext in ${removeext}; do
+ elog "Removing ${ext} files..."
+ find -name "*.${ext}" -exec rm -f {} \; \
+ || die "Failed - remove"
+ done
+
+ if use gzip; then
+ einfo "Compressing SVG files..."
+ find -name "*.svg" -print0 | xargs -L 1 -0 \
+ bash -c 'gzip -9c "${1}" > "${1}z"; rm -f "${1}"' --
+ fi
+}
+
+src_install() {
+ insinto ${CLIPART}
+ doins -r .
+}
diff --git a/media-gfx/opencsg/Manifest b/media-gfx/opencsg/Manifest
new file mode 100644
index 000000000000..c508e0d2b208
--- /dev/null
+++ b/media-gfx/opencsg/Manifest
@@ -0,0 +1 @@
+DIST OpenCSG-1.3.2.tar.gz 744712 SHA256 c790c92998f7113cb35cde825f81c5532755908a0a3f43c3c3c8df2326b3b925 SHA512 12c4308234d61ae013db62039974178d49a7298fb18c9d4e431d3629c75c808e0892c6553f1676d991b50d69e26eeb6d6da1f1eea6b8b2785d06683f523ca0d8 WHIRLPOOL ed59764c861ede60dd430ad111613de92c44bbe6b9d5f33f6c0aee93671b7abb9ef266627f126820c877ee54a651aa0d560beaf1458cbce952e30ed88a6bf908
diff --git a/media-gfx/opencsg/metadata.xml b/media-gfx/opencsg/metadata.xml
new file mode 100644
index 000000000000..c90d92f5ccd0
--- /dev/null
+++ b/media-gfx/opencsg/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>mattm@gentoo.org</email>
+<name>Matthew Marlowe</name>
+</maintainer>
+<longdescription>
+OpenCSG is a library that does image-based CSG rendering using OpenGL. OpenCSG is written in C++ and supports most modern graphics hardware using Microsoft Windows or the Linux operating system. What is CSG, anyway? CSG is short for Constructive Solid Geometry and denotes an approach to model complex 3D-shapes using simpler ones. I.e., two shapes can be combined by taking the union of them, by intersecting them, or by subtracting one shape of the other. SG is often used as fundamental modeling technique in CAD/CAM applications. Here, image-based CSG rendering is the key to interactively manipulate CSG shapes. Since OpenCSG renders even complex CSG shapes fast, it can be advantageously used in such applications. The OpenCSG library requires graphics hardware that either supports frame buffer objects or PBuffers in OpenGL.
+</longdescription>
+<use>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/opencsg/opencsg-1.3.2-r1.ebuild b/media-gfx/opencsg/opencsg-1.3.2-r1.ebuild
new file mode 100644
index 000000000000..fcc92050d995
--- /dev/null
+++ b/media-gfx/opencsg/opencsg-1.3.2-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2
+
+DESCRIPTION="The Constructive Solid Geometry rendering library"
+HOMEPAGE="http://www.opencsg.org"
+SRC_URI="http://www.opencsg.org/OpenCSG-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CDEPEND="media-libs/glew dev-qt/qtcore:4"
+DEPEND="${CDEPEND} sys-devel/gcc"
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}/OpenCSG-${PV}"
+
+src_prepare() {
+ # removes duplicated headers
+ rm -r "${S}"/glew || die
+
+ # We actually want to install something
+ cat << EOF >> src/src.pro
+include.path=/usr/include
+include.files=../include/*
+target.path=/usr/$(get_libdir)
+INSTALLS += target include
+EOF
+
+}
+
+src_configure() {
+ eqmake4 "${S}"/src/src.pro
+}
diff --git a/media-gfx/openexr_viewers/Manifest b/media-gfx/openexr_viewers/Manifest
new file mode 100644
index 000000000000..7af3f56c3fc5
--- /dev/null
+++ b/media-gfx/openexr_viewers/Manifest
@@ -0,0 +1,4 @@
+DIST openexr_viewers-1.0.2.tar.gz 482009 SHA256 eb6b1987d587b441f113d417dc8a5baec25f3d81bc06b0369217567c1cde13ef SHA512 06e01be3310a05c5709cdb4641f230522a5d91d50b08b6736a5541d20a03decfd80a9f5b65af383659a3d19407f932317c04eba73d199c03fa0ff9e24cc7ad07 WHIRLPOOL dd6d805f71db710bb70db9d993cc07bcd0b02c225527402f194300b82a3f1036d3584bed5db517c937d3f638e14466ff3c9c3653430d1d7c6fb1a01e331012f8
+DIST openexr_viewers-2.0.1.tar.gz 495240 SHA256 9329e87922eb5e4707a5a107f90434113136299a026d78133e4083742808a412 SHA512 75af19e4a06d31bbb21217bc75a800852d2817dd9d120b879c377316e8aa64f75c49dccbb0d2a4d11d949f48b8fac40249692d1286a77e4812e43b3e8e303235 WHIRLPOOL c9c6a46451a3f2709afaecdbbfbf5e69f74ba2e76a853871a9a1eb5789579be567de39b9206f7b3ff22351c2f5d579f1b5bbcd3a8d4df0d37c9c2eb1140fc455
+DIST openexr_viewers-2.1.0.tar.gz 497290 SHA256 80d98aaa03ab98906f0e535bb2ae908ce3929f4e318ef069620937d195a6fea7 SHA512 fd3b08ad91b1b2299d01d56c7a17694538fd912302db3472a8d8621b49a699a42604de8d816288399b31207304c7684de198acecd2c8a9825d35b827b8a2ddaf WHIRLPOOL 2918c3c40f8969711becc70d422bc89fe28a209b56e964da8e69f249b619b6790efb686ad45aefb57d14a514ad7642a4cc6a7c3af0152e13f5fd6ee3ee6155f5
+DIST openexr_viewers-2.2.0.tar.gz 486235 SHA256 f73fe2e4d19e8fc9317d6c34f156598ad43497bb9549f03feacb8ba095dd04e9 SHA512 ab2f15d0352fa4e9daf76c7317312dad6cfe7b65a86affaf057c8eceb48d2637fc0df58125ea2ec5ad3b7251eed392a8eccff1001cfeced969bbb66fe92284f8 WHIRLPOOL 83190cbab3749dbc543e16cac76b7b0bc4c9c0110feb6ef4ddb4b84808cc9508dc94dda3be5674e6d50f042e0bfd78a951d66b231ad0296ee6b7b24a81ac2e15
diff --git a/media-gfx/openexr_viewers/files/openexr_viewers-1.0.1-gcc43.patch b/media-gfx/openexr_viewers/files/openexr_viewers-1.0.1-gcc43.patch
new file mode 100644
index 000000000000..3630efc6f7a2
--- /dev/null
+++ b/media-gfx/openexr_viewers/files/openexr_viewers-1.0.1-gcc43.patch
@@ -0,0 +1,55 @@
+diff -up openexr_viewers-1.0.1/exrdisplay/applyCtl.h.gcc43 openexr_viewers-1.0.1/exrdisplay/applyCtl.h
+--- openexr_viewers-1.0.1/exrdisplay/applyCtl.h.gcc43 2006-12-09 01:14:07.000000000 +0100
++++ openexr_viewers-1.0.1/exrdisplay/applyCtl.h 2008-01-10 02:07:14.000000000 +0100
+@@ -49,6 +49,7 @@
+ #include <ImfArray.h>
+ #include <ImfHeader.h>
+ #include <vector>
++#include <cstdlib>
+
+ //
+ // Apply a series of CTL transforms to the raw pixel data from an image file
+diff -up openexr_viewers-1.0.1/configure.ac.gcc43 openexr_viewers-1.0.1/configure.ac
+--- openexr_viewers-1.0.1/configure.ac.gcc43 2007-10-10 00:20:51.000000000 +0200
++++ openexr_viewers-1.0.1/configure.ac 2008-01-10 02:07:14.000000000 +0100
+@@ -126,6 +126,7 @@ AM_COMPILELINKRUN(
+ #include <ImfFrameBuffer.h>
+ #include <ImathBox.h>
+ #include <vector>
++#include <cstdlib>
+ using namespace Ctl;
+ using namespace Imf;
+ using namespace Imath;
+diff -up openexr_viewers-1.0.1/configure.gcc43 openexr_viewers-1.0.1/configure
+--- openexr_viewers-1.0.1/configure.gcc43 2007-10-10 00:21:01.000000000 +0200
++++ openexr_viewers-1.0.1/configure 2008-01-10 02:07:14.000000000 +0100
+@@ -20869,6 +20869,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #include <ImfFrameBuffer.h>
+ #include <ImathBox.h>
+ #include <vector>
++#include <cstdlib>
+ using namespace Ctl;
+ using namespace Imf;
+ using namespace Imath;
+diff -up openexr_viewers-1.0.1/playexr/ctlToLut.h.gcc43 openexr_viewers-1.0.1/playexr/ctlToLut.h
+--- openexr_viewers-1.0.1/playexr/ctlToLut.h.gcc43 2008-01-10 03:09:55.000000000 +0100
++++ openexr_viewers-1.0.1/playexr/ctlToLut.h 2008-01-10 03:11:18.000000000 +0100
+@@ -88,6 +88,7 @@
+ #include <string>
+ #include <vector>
+ #include <half.h>
++#include <cstdlib>
+
+
+ void
+diff -up openexr_viewers-1.0.1/playexr/main.cpp.gcc43 openexr_viewers-1.0.1/playexr/main.cpp
+--- openexr_viewers-1.0.1/playexr/main.cpp.gcc43 2008-01-10 03:05:03.000000000 +0100
++++ openexr_viewers-1.0.1/playexr/main.cpp 2008-01-10 03:05:48.000000000 +0100
+@@ -48,6 +48,7 @@
+ #include <vector>
+ #include <string>
+ #include <stdlib.h>
++#include <cstring>
+
+ using namespace std;
+
diff --git a/media-gfx/openexr_viewers/files/openexr_viewers-1.0.1-gcc44.patch b/media-gfx/openexr_viewers/files/openexr_viewers-1.0.1-gcc44.patch
new file mode 100644
index 000000000000..4ab58548d71a
--- /dev/null
+++ b/media-gfx/openexr_viewers/files/openexr_viewers-1.0.1-gcc44.patch
@@ -0,0 +1,37 @@
+diff -ur openexr_viewers-1.0.1.orig/exrdisplay/applyCtl.cpp openexr_viewers-1.0.1/exrdisplay/applyCtl.cpp
+--- playexr/ctlToLut.cpp.orig 2009-12-14 09:07:00.863493115 -0800
++++ playexr/ctlToLut.cpp 2009-12-14 09:08:16.721186947 -0800
+@@ -49,6 +49,7 @@
+ #include <ImfFrameBuffer.h>
+ #include <cassert>
+ #include <iostream>
++ #include <cstdio>
+
+ using namespace std;
+ using namespace Ctl;
+@@ -61,6 +62,7 @@
+ #include <ImfHeader.h>
+ #include <cassert>
+ #include <iostream>
++ #include <cstdio>
+
+ using namespace std;
+ using namespace Imf;
+--- exrdisplay/applyCtl.cpp.orig 2009-12-14 09:11:44.950334079 -0800
++++ exrdisplay/applyCtl.cpp 2009-12-14 09:11:59.900332294 -0800
+@@ -49,6 +49,7 @@
+ #include <ImfFrameBuffer.h>
+ #include <cassert>
+ #include <iostream>
++ #include <cstdio>
+
+ using namespace std;
+ using namespace Ctl;
+@@ -61,6 +62,7 @@
+ #include <ImfHeader.h>
+ #include <cassert>
+ #include <iostream>
++ #include <cstdio>
+
+ using namespace std;
+ using namespace Imf;
diff --git a/media-gfx/openexr_viewers/files/openexr_viewers-1.0.2-nvidia-automagic.patch b/media-gfx/openexr_viewers/files/openexr_viewers-1.0.2-nvidia-automagic.patch
new file mode 100644
index 000000000000..e39a0c1da789
--- /dev/null
+++ b/media-gfx/openexr_viewers/files/openexr_viewers-1.0.2-nvidia-automagic.patch
@@ -0,0 +1,16 @@
+--- configure.ac
++++ configure.ac
+@@ -188,8 +188,11 @@
+
+ dnl
+ dnl check for Cg
+-dnlCG_LD
+-if test "${have_fltk}" = yes; then
++dnl CG_LD
++AC_ARG_ENABLE(nvidia, AC_HELP_STRING([--enable-nvidia],
++ [enable nvidia cg support [[default=check]]]), [want_nvidia="${enableval}"], [want_nvidia=yes])
++
++if test "${have_fltk}" = yes -a "${want_nvidia}" != "no"; then
+ AM_PATH_CG(have_cg=yes, have_cg=no)
+ if test "${have_cg}" = yes; then
+ AC_DEFINE(HAVE_FRAGMENT_SHADERS)
diff --git a/media-gfx/openexr_viewers/files/openexr_viewers-2.0.0-nvidia-automagic.patch b/media-gfx/openexr_viewers/files/openexr_viewers-2.0.0-nvidia-automagic.patch
new file mode 100644
index 000000000000..1ea9f869a671
--- /dev/null
+++ b/media-gfx/openexr_viewers/files/openexr_viewers-2.0.0-nvidia-automagic.patch
@@ -0,0 +1,14 @@
+--- configure.ac
++++ configure.ac
+@@ -192,7 +192,10 @@
+ dnl
+ dnl check for Cg
+ dnl
+-if test "${have_fltk}" = yes; then
++AC_ARG_ENABLE(cg, AC_HELP_STRING([--enable-cg],
++ [enable nvidia cg support [[default=check]]]), [want_cg="${enableval}"], [want_cg=yes])
++
++if test "${have_fltk}" = yes -a "${want_cg}" != "no"; then
+ AM_PATH_CG(have_cg=yes, have_cg=no)
+ if test "${have_cg}" = yes; then
+ AC_DEFINE(HAVE_FRAGMENT_SHADERS)
diff --git a/media-gfx/openexr_viewers/metadata.xml b/media-gfx/openexr_viewers/metadata.xml
new file mode 100644
index 000000000000..68f5c4738332
--- /dev/null
+++ b/media-gfx/openexr_viewers/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>video</herd>
+ <maintainer>
+ <email>media-video@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name='cg'>Add support for nvidia's cg shaders</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/openexr_viewers/openexr_viewers-1.0.2.ebuild b/media-gfx/openexr_viewers/openexr_viewers-1.0.2.ebuild
new file mode 100644
index 000000000000..b977448a0943
--- /dev/null
+++ b/media-gfx/openexr_viewers/openexr_viewers-1.0.2.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="OpenEXR Viewers"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+HOMEPAGE="http://openexr.com/"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE="opengl video_cards_nvidia"
+
+RDEPEND=">=media-libs/ilmbase-1.0.2
+ >=media-libs/openexr-1.7.0
+ media-libs/ctl
+ media-libs/openexr_ctl
+ opengl? ( virtual/opengl
+ x11-libs/fltk:1[opengl]
+ video_cards_nvidia? ( media-gfx/nvidia-cg-toolkit ) )
+ !<media-libs/openexr-1.5.0"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-nvidia-automagic.patch \
+ "${FILESDIR}"/${PN}-1.0.1-gcc43.patch \
+ "${FILESDIR}"/${PN}-1.0.1-gcc44.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ if use video_cards_nvidia; then
+ myconf="--with-cg-prefix=/opt/nvidia-cg-toolkit"
+ append-flags $(no-as-needed) # binary-only libCg is not properly linked
+ fi
+
+ econf \
+ --disable-dependency-tracking \
+ $(use_enable video_cards_nvidia nvidia) \
+ $(use_with opengl fltk-config /usr/bin/fltk-config) \
+ ${myconf}
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir="/usr/share/doc/${PF}/pdf" \
+ install || die
+
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/media-gfx/openexr_viewers/openexr_viewers-2.0.1.ebuild b/media-gfx/openexr_viewers/openexr_viewers-2.0.1.ebuild
new file mode 100644
index 000000000000..b7ae24f04f51
--- /dev/null
+++ b/media-gfx/openexr_viewers/openexr_viewers-2.0.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="OpenEXR Viewers"
+HOMEPAGE="http://openexr.com/"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="cg opengl"
+
+RDEPEND=">=media-libs/ilmbase-${PV}:=
+ >=media-libs/openexr-${PV}:=
+ media-libs/ctl:=
+ >=media-libs/openexr_ctl-1.0.1-r2:=
+ opengl? (
+ virtual/opengl
+ x11-libs/fltk:1[opengl]
+ cg? ( media-gfx/nvidia-cg-toolkit )
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die
+ epatch "${FILESDIR}"/${PN}-2.0.0-nvidia-automagic.patch
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ if use cg; then
+ myconf="--with-cg-prefix=/opt/nvidia-cg-toolkit"
+ append-flags "$(no-as-needed)" # binary-only libCg is not properly linked
+ fi
+
+ econf \
+ $(use_enable cg) \
+ $(use_with opengl fltk-config /usr/bin/fltk-config) \
+ ${myconf}
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF}/pdf \
+ install
+
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/media-gfx/openexr_viewers/openexr_viewers-2.1.0.ebuild b/media-gfx/openexr_viewers/openexr_viewers-2.1.0.ebuild
new file mode 100644
index 000000000000..ade36c14b08d
--- /dev/null
+++ b/media-gfx/openexr_viewers/openexr_viewers-2.1.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="OpenEXR Viewers"
+HOMEPAGE="http://openexr.com/"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 hppa ~ia64 ppc ppc64 ~sparc x86 ~x86-fbsd"
+IUSE="cg opengl"
+
+RDEPEND=">=media-libs/ilmbase-${PV}:=
+ >=media-libs/openexr-${PV}:=
+ media-libs/ctl:=
+ >=media-libs/openexr_ctl-1.0.1-r2:=
+ opengl? (
+ virtual/opengl
+ x11-libs/fltk:1[opengl]
+ cg? ( media-gfx/nvidia-cg-toolkit )
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die
+ epatch "${FILESDIR}"/${PN}-2.0.0-nvidia-automagic.patch
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ if use cg; then
+ myconf="--with-cg-prefix=/opt/nvidia-cg-toolkit"
+ append-flags "$(no-as-needed)" # binary-only libCg is not properly linked
+ fi
+
+ econf \
+ $(use_enable cg) \
+ $(use_with opengl fltk-config /usr/bin/fltk-config) \
+ ${myconf}
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF}/pdf \
+ install
+
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/media-gfx/openexr_viewers/openexr_viewers-2.2.0.ebuild b/media-gfx/openexr_viewers/openexr_viewers-2.2.0.ebuild
new file mode 100644
index 000000000000..b7ae24f04f51
--- /dev/null
+++ b/media-gfx/openexr_viewers/openexr_viewers-2.2.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="OpenEXR Viewers"
+HOMEPAGE="http://openexr.com/"
+SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="cg opengl"
+
+RDEPEND=">=media-libs/ilmbase-${PV}:=
+ >=media-libs/openexr-${PV}:=
+ media-libs/ctl:=
+ >=media-libs/openexr_ctl-1.0.1-r2:=
+ opengl? (
+ virtual/opengl
+ x11-libs/fltk:1[opengl]
+ cg? ( media-gfx/nvidia-cg-toolkit )
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die
+ epatch "${FILESDIR}"/${PN}-2.0.0-nvidia-automagic.patch
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ if use cg; then
+ myconf="--with-cg-prefix=/opt/nvidia-cg-toolkit"
+ append-flags "$(no-as-needed)" # binary-only libCg is not properly linked
+ fi
+
+ econf \
+ $(use_enable cg) \
+ $(use_with opengl fltk-config /usr/bin/fltk-config) \
+ ${myconf}
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ docdir=/usr/share/doc/${PF}/pdf \
+ install
+
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/media-gfx/openmesh/Manifest b/media-gfx/openmesh/Manifest
new file mode 100644
index 000000000000..d13300c2f142
--- /dev/null
+++ b/media-gfx/openmesh/Manifest
@@ -0,0 +1,4 @@
+DIST OpenMesh-2.3.1.tar.bz2 18203577 SHA256 5cd6537c64e1ff3f451e19328a70c02d283d06705e96698c19dde75c3749e4f8 SHA512 5d0822032111f07dc23751edebc7efa6e98d7e729ee020cfa6b5cf78b4c5e1a9f0ea1ca4a5cf3b1fe1cb1fc4389260f834b9e1c682a4f4c68cdc84035eef6c67 WHIRLPOOL 398fd2ae94e3927024fdc8489801480b9c27449e1ac5559f0e8c890ebee3d61b66207c6909f4b3ef73ec16829fee877e57e434a77c9dde2c0d22ec80a987e968
+DIST OpenMesh-3.2.tar.bz2 23766435 SHA256 c74890539846c8222aae93ad63316132e84bf4b2080c9b8321790767723f32e5 SHA512 40b346a6c7b141c284183ca66a489d20b668e3c3c0fb5b4e4185b86ea4552f031ea3106e918b2c3cf8e1bc713f3aac325dd17b50ec4d29f6446cf2cbde9a3dd9 WHIRLPOOL 93d8a2d2443f3de8938bf02836f1e1af92fc5adcd0c8c8fbc404a489d566d8d0e4dc4ed86665a8de0c94b171c045713497a7ef6fdb2aa83e04c5a3e2c18a79d5
+DIST OpenMesh-3.3.tar.bz2 24797682 SHA256 4eff6fff5685c57e2e7cdbf5b4b1ef183b3806db822eb01f74c8895e0fbe7a1d SHA512 3bed1f6a3d7db9b67d6c17647bf6c5efa26aca394763d14f5106f70573660329618d99287a51bea23c3a34b495117e38d5756d6d5bf49ea1add711d9e68bab8d WHIRLPOOL 3e6469940dd0ea5c6b83f79841faae8917c25558ea2bc43d78b7576c070fb8ab14b0280c1900e7d871f30a305ab42791a5498373a8869674179b0fd73dc626d5
+DIST OpenMesh-4.1.tar.bz2 24728164 SHA256 3e30cd7325db6367175e2e88c7516c23b7f90c9e1ff739c7d62e7de21228bb8e SHA512 064a4d5cb467589869baf4a302e6c620bd84de874b24019252b97ef863b59e83f2fe23ea45e4a5162a7765847da19f75f563f084cf2b3ae77c7e704b4c859b71 WHIRLPOOL 6989d0ff9dd24bf5b8252e6fc0a416258015d1b5a6202b4e7583c1f2eefe59826a5e2aaa6d50f105083f43680431a67e1cab5b81ace06b119d4e3737267f79ee
diff --git a/media-gfx/openmesh/files/QGLViewerWidget-hh-gcc-4.3-include-fix.patch b/media-gfx/openmesh/files/QGLViewerWidget-hh-gcc-4.3-include-fix.patch
new file mode 100644
index 000000000000..f6be7bab8dad
--- /dev/null
+++ b/media-gfx/openmesh/files/QGLViewerWidget-hh-gcc-4.3-include-fix.patch
@@ -0,0 +1,18 @@
+diff -urN a/OpenMesh/Apps/QtViewer/QGLViewerWidget.hh b/OpenMesh/Apps/QtViewer/QGLViewerWidget.hh
+--- a/OpenMesh/Apps/QtViewer/QGLViewerWidget.hh 2008-07-01 09:05:13.000000000 -0400
++++ b/OpenMesh/Apps/QtViewer/QGLViewerWidget.hh 2009-04-17 16:38:31.099766294 -0400
+@@ -36,11 +36,11 @@
+ //== INCLUDES =================================================================
+
+
+-#include <OpenMesh/Core/Geometry/VectorT.hh>
+-#include <QtOpenGL/qgl.h>
+-#include <string>
++#include <cstring>
+ #include <vector>
+ #include <map>
++#include <OpenMesh/Core/Geometry/VectorT.hh>
++#include <QtOpenGL/qgl.h>
+
+
+ //== FORWARD DECLARATIONS =====================================================
diff --git a/media-gfx/openmesh/files/openmesh-1.0.0-gcc41.patch b/media-gfx/openmesh/files/openmesh-1.0.0-gcc41.patch
new file mode 100644
index 000000000000..ce6f5e108a5a
--- /dev/null
+++ b/media-gfx/openmesh/files/openmesh-1.0.0-gcc41.patch
@@ -0,0 +1,145 @@
+From: Daniel Drake <dsd@gentoo.org>
+
+Index: OpenMesh/Core/IO/OMFormat.hh
+===================================================================
+--- OpenMesh.orig/Core/IO/OMFormat.hh
++++ OpenMesh/Core/IO/OMFormat.hh
+@@ -462,23 +462,6 @@ namespace OMFormat {
+ typedef GenProg::False t_unsigned;
+
+
+- /// Store an integer with a wanted number of bits
+- template< typename T >
+- inline
+- size_t
+- store( std::ostream& _os,
+- const T& _val,
+- OMFormat::Chunk::Integer_Size _b,
+- bool _swap)
+- {
+- assert( OMFormat::is_integer( _val ) );
+-
+- if ( OMFormat::is_signed( _val ) )
+- return store( _os, _val, _b, _swap, t_signed() );
+- return store( _os, _val, _b, _swap, t_unsigned() );
+- }
+-
+-
+ // helper to store a an integer
+ template< typename T >
+ size_t
+@@ -497,24 +480,22 @@ namespace OMFormat {
+ bool _swap,
+ t_unsigned);
+
+-
+- /// Restore an integer with a wanted number of bits
++ /// Store an integer with a wanted number of bits
+ template< typename T >
+ inline
+ size_t
+- restore( std::istream& _is,
+- T& _val,
+- OMFormat::Chunk::Integer_Size _b,
+- bool _swap)
++ store( std::ostream& _os,
++ const T& _val,
++ OMFormat::Chunk::Integer_Size _b,
++ bool _swap)
+ {
+ assert( OMFormat::is_integer( _val ) );
+-
++
+ if ( OMFormat::is_signed( _val ) )
+- return restore( _is, _val, _b, _swap, t_signed() );
+- return restore( _is, _val, _b, _swap, t_unsigned() );
++ return store( _os, _val, _b, _swap, t_signed() );
++ return store( _os, _val, _b, _swap, t_unsigned() );
+ }
+
+-
+ // helper to store a an integer
+ template< typename T > inline
+ size_t restore( std::istream& _is,
+@@ -530,18 +511,26 @@ namespace OMFormat {
+ OMFormat::Chunk::Integer_Size _b,
+ bool _swap,
+ t_unsigned);
+- //
+- // ---------------------------------------- storing vectors
+
+- /// storing a vector type
+- template <typename VecT> inline
+- size_t vector_store( std::ostream& _os, const VecT& _vec, bool _swap )
+- {
+- return store( _os, _vec,
+- GenProg::Int2Type< vector_traits<VecT>::size_ >(),
+- _swap );
++ /// Restore an integer with a wanted number of bits
++ template< typename T >
++ inline
++ size_t
++ restore( std::istream& _is,
++ T& _val,
++ OMFormat::Chunk::Integer_Size _b,
++ bool _swap)
++ {
++ assert( OMFormat::is_integer( _val ) );
++
++ if ( OMFormat::is_signed( _val ) )
++ return restore( _is, _val, _b, _swap, t_signed() );
++ return restore( _is, _val, _b, _swap, t_unsigned() );
+ }
+
++ //
++ // ---------------------------------------- storing vectors
++
+ template <typename VecT> inline
+ size_t store( std::ostream& _os, const VecT& _vec, GenProg::Int2Type<1>,
+ bool _swap )
+@@ -579,19 +568,17 @@ namespace OMFormat {
+ return bytes;
+ }
+
+- // ---------------------------------------- restoring vectors
+-
+- /// Restoring a vector type
+- template <typename VecT>
+- inline
+- size_t
+- vector_restore( std::istream& _is, VecT& _vec, bool _swap )
++ /// storing a vector type
++ template <typename VecT> inline
++ size_t vector_store( std::ostream& _os, const VecT& _vec, bool _swap )
+ {
+- return restore( _is, _vec,
+- GenProg::Int2Type< vector_traits<VecT>::size_ >(),
+- _swap );
++ return store( _os, _vec,
++ GenProg::Int2Type< vector_traits<VecT>::size_ >(),
++ _swap );
+ }
+
++ // ---------------------------------------- restoring vectors
++
+
+ template <typename VecT>
+ inline
+@@ -644,6 +631,17 @@ namespace OMFormat {
+ return bytes;
+ }
+
++ /// Restoring a vector type
++ template <typename VecT>
++ inline
++ size_t
++ vector_restore( std::istream& _is, VecT& _vec, bool _swap )
++ {
++ return restore( _is, _vec,
++ GenProg::Int2Type< vector_traits<VecT>::size_ >(),
++ _swap );
++ }
++
+ // ---------------------------------------- storing property names
+
+ template <>
diff --git a/media-gfx/openmesh/metadata.xml b/media-gfx/openmesh/metadata.xml
new file mode 100644
index 000000000000..755646a27ffe
--- /dev/null
+++ b/media-gfx/openmesh/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>jsbronder@gentoo.org</email>
+ <name>Justin Bronder</name>
+</maintainer>
+<longdescription>
+OpenMesh is a generic and efficient data structure for representing and
+manipulating polygonal meshes. OpenMesh is developed at the Computer Graphics
+Group, RWTH Aachen, as part of the OpenSGPlus project, is funded by the
+German Ministry for Research and Education (BMBF), and will serve as
+geometry kernel upon which the so-called high level primitives (e.g.
+subdivision surfaces or progressive meshes) of OpenSGPlus are built.
+</longdescription>
+</pkgmetadata>
diff --git a/media-gfx/openmesh/openmesh-2.3.1.ebuild b/media-gfx/openmesh/openmesh-2.3.1.ebuild
new file mode 100644
index 000000000000..1c73cd0d2127
--- /dev/null
+++ b/media-gfx/openmesh/openmesh-2.3.1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+inherit eutils cmake-utils
+
+MY_PN="OpenMesh"
+MY_PV="${PV/_rc/-RC}"
+S="${WORKDIR}/${MY_PN}-${MY_PV}"
+
+DESCRIPTION="A generic and efficient data structure for representing and manipulating polygonal meshes"
+HOMEPAGE="http://www.openmesh.org/"
+SRC_URI="http://openmesh.org/fileadmin/${PN}-files/${MY_PV/-RC/RC}/${MY_PN}-${MY_PV}.tar.bz2"
+
+LICENSE="LGPL-3-with-linking-exception"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="qt4 static-libs"
+
+RDEPEND="qt4? ( dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ media-libs/freeglut )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # Fix libdir and remove rpath.
+ sed -i \
+ -e "s|\(set (ACG_PROJECT_LIBDIR \"\).*|\1$(get_libdir)/\")|" \
+ -e "s|\(set (ACG_PROJECT_PLUGINDIR \"\)lib\(.*\)|\1$(get_libdir)\2|" \
+ -e "s|\(BUILD_WITH_INSTALL_RPATH \)1|\1 0|" \
+ -e "s|\(SKIP_BUILD_RPATH\) 0|\1 1|" \
+ -e '/^ *INSTALL_RPATH/d' \
+ cmake/ACGCommon.cmake || die
+
+ if ! use static-libs; then
+ sed -i "s|\(SHARED\)ANDSTATIC|\1|" \
+ src/${MY_PN}/{Core,Tools}/CMakeLists.txt || die
+ sed -i '/OpenMeshCoreStatic/d' \
+ src/${MY_PN}/Tools/CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ mycmakeargs="$(cmake-utils_use_build "qt4" "APPS")"
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc LICENSE/* README CHANGELOG || die
+}
diff --git a/media-gfx/openmesh/openmesh-3.2.ebuild b/media-gfx/openmesh/openmesh-3.2.ebuild
new file mode 100644
index 000000000000..a743001de11f
--- /dev/null
+++ b/media-gfx/openmesh/openmesh-3.2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils cmake-utils
+
+MY_PN="OpenMesh"
+MY_PV="${PV/_rc/-RC}"
+S="${WORKDIR}/${MY_PN}-${MY_PV}"
+
+DESCRIPTION="A generic and efficient data structure for representing and manipulating polygonal meshes"
+HOMEPAGE="http://www.openmesh.org/"
+SRC_URI="http://openmesh.org/media/Releases/${MY_PV/-RC/RC}/${MY_PN}-${MY_PV}.tar.bz2"
+
+LICENSE="LGPL-3-with-linking-exception"
+SLOT="0"
+KEYWORDS="~amd64 ia64 x86"
+IUSE="qt4 qt5 static-libs"
+
+RDEPEND="
+ qt4? ( dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ media-libs/freeglut )
+ qt5? ( dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ media-libs/freeglut )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # Fix libdir and remove rpath.
+ sed -i \
+ -e "s|\(set (ACG_PROJECT_LIBDIR \"\).*|\1$(get_libdir)/\")|" \
+ -e "s|\(set (ACG_PROJECT_PLUGINDIR \"\)lib\(.*\)|\1$(get_libdir)\2|" \
+ -e "s|\(BUILD_WITH_INSTALL_RPATH \)1|\1 0|" \
+ -e "s|\(SKIP_BUILD_RPATH\) 0|\1 1|" \
+ -e '/^ *INSTALL_RPATH/d' \
+ cmake/ACGCommon.cmake || die
+
+ if ! use static-libs; then
+ sed -i "s|\(SHARED\)ANDSTATIC|\1|" \
+ src/${MY_PN}/{Core,Tools}/CMakeLists.txt || die
+ sed -i '/OpenMeshCoreStatic/d' \
+ src/${MY_PN}/Tools/CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ mycmakeargs=""
+
+ if ! use qt4 && ! use qt5; then
+ mycmakeargs="${mycmakeargs} -DBUILD_APPS=OFF"
+ fi
+
+ if use qt4 && ! use qt5; then
+ mycmakeargs="${mycmakeargs} -DFORCE_QT4=ON"
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc LICENSE/* README CHANGELOG
+}
diff --git a/media-gfx/openmesh/openmesh-3.3.ebuild b/media-gfx/openmesh/openmesh-3.3.ebuild
new file mode 100644
index 000000000000..df9aafcccc8c
--- /dev/null
+++ b/media-gfx/openmesh/openmesh-3.3.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils cmake-utils
+
+MY_PN="OpenMesh"
+MY_PV="${PV/_rc/-RC}"
+S="${WORKDIR}/${MY_PN}-${MY_PV}"
+
+DESCRIPTION="A generic and efficient data structure for representing and manipulating polygonal meshes"
+HOMEPAGE="http://www.openmesh.org/"
+SRC_URI="http://openmesh.org/media/Releases/${MY_PV/-RC/RC}/${MY_PN}-${MY_PV}.tar.bz2"
+
+LICENSE="LGPL-3-with-linking-exception"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE="qt4 qt5 static-libs test"
+
+RDEPEND="
+ qt4? ( dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ media-libs/freeglut )
+ qt5? ( dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ media-libs/freeglut )"
+DEPEND="${RDEPEND}
+ test? ( dev-cpp/gtest )"
+
+src_prepare() {
+ # Fix libdir and remove rpath.
+ sed -i \
+ -e "s|\(set (ACG_PROJECT_LIBDIR \"\).*|\1$(get_libdir)/\")|" \
+ -e "s|\(set (ACG_PROJECT_PLUGINDIR \"\)lib\(.*\)|\1$(get_libdir)\2|" \
+ -e "s|\(BUILD_WITH_INSTALL_RPATH \)1|\1 0|" \
+ -e "s|\(SKIP_BUILD_RPATH\) 0|\1 1|" \
+ -e '/^ *INSTALL_RPATH/d' \
+ cmake/ACGCommon.cmake || die
+
+ if ! use static-libs; then
+ sed -i "s|\(SHARED\)ANDSTATIC|\1|" \
+ src/${MY_PN}/{Core,Tools}/CMakeLists.txt || die
+ sed -i '/OpenMeshCoreStatic/d' \
+ src/${MY_PN}/Tools/CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ mycmakeargs=""
+
+ mycmakeargs="${mycmakeargs} -DOPENMESH_BUILD_UNIT_TESTS=TRUE"
+
+ # Disable python bindings until someone wants them.
+ mycmakeargs="${mycmakeargs} -DOPENMESH_BUILD_PYTHON_BINDINGS=FALSE"
+ mycmakeargs="${mycmakeargs} -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=FALSE"
+
+ if ! use qt4 && ! use qt5; then
+ mycmakeargs="${mycmakeargs} -DBUILD_APPS=OFF"
+ fi
+
+ if use qt4 && ! use qt5; then
+ mycmakeargs="${mycmakeargs} -DFORCE_QT4=ON"
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc LICENSE/* README CHANGELOG
+}
diff --git a/media-gfx/openmesh/openmesh-4.1.ebuild b/media-gfx/openmesh/openmesh-4.1.ebuild
new file mode 100644
index 000000000000..f2ac637b27e3
--- /dev/null
+++ b/media-gfx/openmesh/openmesh-4.1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit eutils cmake-utils
+
+MY_PN="OpenMesh"
+MY_PV="${PV/_rc/-RC}"
+S="${WORKDIR}/${MY_PN}-${MY_PV}"
+
+DESCRIPTION="A generic and efficient data structure for representing and manipulating polygonal meshes"
+HOMEPAGE="http://www.openmesh.org/"
+SRC_URI="http://openmesh.org/media/Releases/${MY_PV/-RC/RC}/${MY_PN}-${MY_PV}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="4"
+KEYWORDS="~amd64 ~ia64 ~x86"
+IUSE="qt4 qt5 static-libs test"
+
+RDEPEND="
+ qt4? ( dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ media-libs/freeglut )
+ qt5? ( dev-qt/qtgui:5
+ dev-qt/qtopengl:5
+ media-libs/freeglut )"
+DEPEND="${RDEPEND}
+ test? ( dev-cpp/gtest )"
+
+src_prepare() {
+ # Fix libdir and remove rpath.
+ sed -i \
+ -e "s|\(set (ACG_PROJECT_LIBDIR \"\).*|\1$(get_libdir)/\")|" \
+ -e "s|\(BUILD_WITH_INSTALL_RPATH \)1|\1 0|" \
+ -e "s|\(SKIP_BUILD_RPATH\) 0|\1 1|" \
+ -e '/^ *INSTALL_RPATH/d' \
+ cmake/ACGCommon.cmake || die
+
+ if ! use static-libs; then
+ sed -i "s|\(SHARED\)ANDSTATIC|\1|" \
+ src/${MY_PN}/{Core,Tools}/CMakeLists.txt || die
+ sed -i '/OpenMeshCoreStatic/d' \
+ src/${MY_PN}/Tools/CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ mycmakeargs=""
+
+ mycmakeargs="${mycmakeargs} -DOPENMESH_BUILD_UNIT_TESTS=TRUE"
+
+ # Disable python bindings until someone wants them.
+ mycmakeargs="${mycmakeargs} -DOPENMESH_BUILD_PYTHON_BINDINGS=FALSE"
+ mycmakeargs="${mycmakeargs} -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=FALSE"
+
+ if ! use qt4 && ! use qt5; then
+ mycmakeargs="${mycmakeargs} -DBUILD_APPS=OFF"
+ fi
+
+ if use qt4 && ! use qt5; then
+ mycmakeargs="${mycmakeargs} -DFORCE_QT4=ON"
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc LICENSE/* README CHANGELOG
+}
+
+src_test() {
+ cd "${BUILD_DIR}" || die
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BUILD_DIR}/Build/$(get_libdir) ctest --verbose
+}
diff --git a/media-gfx/openscad/Manifest b/media-gfx/openscad/Manifest
new file mode 100644
index 000000000000..335ddd5d9d97
--- /dev/null
+++ b/media-gfx/openscad/Manifest
@@ -0,0 +1,2 @@
+DIST openscad-2013.06.src.tar.gz 4083085 SHA256 f277a8c3e6a548272f95279e50de6d4a6d73552775ab7a33c7f837c8e59173df SHA512 b0993c5a4517ebc13b88bc0167f9fc73d12a6a97938f0b6f6b1e5e436e1fb4704f6ff6a181c51f4cd0fb64c49493296d7172914ec5ae03c26a78da505a32edfc WHIRLPOOL 4a0366b0c6ae0aab91172af2c85a5ad785e5ad3526c3370350b813cda03fd3fb15d03a107e6d1f5e96c03fd6fbe9325f3b66c5c332d2bf0404bfde1eec8e48a1
+DIST openscad-2014.03.src.tar.gz 4417283 SHA256 865fdc637a3ceb0678d35e88995411d8e70e8a7937625d7ede147a1570a561c3 SHA512 32398f6d31109a77215972452740ac5612db34dc08613166f0c7e91ce117c0476c34a8282e9e1ba500bfbff56a60e81573605f2a7ca979b146686341c897e3f5 WHIRLPOOL 6caa2a74fb3f554b615f94576c481d9d309f74dc87a6d76e8d8d0b5577cc6b8a2b859f3ba044b191acf06228247988e43885d7344f76355f1c70264a5dc9c9e1
diff --git a/media-gfx/openscad/metadata.xml b/media-gfx/openscad/metadata.xml
new file mode 100644
index 000000000000..e750c67b6c81
--- /dev/null
+++ b/media-gfx/openscad/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>mattm@gentoo.org</email>
+<name>Matthew Marlowe</name>
+</maintainer>
+<longdescription>
+OpenSCAD is a software for creating solid 3D CAD objects. Unlike most free software for creating 3D models (such as the famous application Blender) it does not focus on the artistic aspects of 3D modelling but instead on the CAD aspects. Thus it might be the application you are looking for when you are planning to create 3D models of machine parts but pretty sure is not what you are looking for when you are more interested in creating computer-animated movies. OpenSCAD is free software and available for Linux/UNIX, MS Windows and Mac OS X.
+</longdescription>
+<use>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/openscad/openscad-2013.06.ebuild b/media-gfx/openscad/openscad-2013.06.ebuild
new file mode 100644
index 000000000000..d840086f47d6
--- /dev/null
+++ b/media-gfx/openscad/openscad-2013.06.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2
+
+DESCRIPTION="The Programmers Solid 3D CAD Modeller"
+HOMEPAGE="http://www.openscad.org/"
+SRC_URI="https://openscad.googlecode.com/files/${P}.src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CDEPEND="media-gfx/opencsg
+ sci-mathematics/cgal
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-cpp/eigen:2
+ dev-libs/gmp
+ dev-libs/mpfr
+ dev-libs/boost:=
+ sys-libs/glibc
+"
+DEPEND="${CDEPEND} sys-devel/gcc"
+RDEPEND="${CDEPEND}"
+
+src_prepare() {
+ #Use our CFLAGS (specifically don't force x86)
+ sed -i "s/QMAKE_CXXFLAGS_RELEASE = .*//g" ${PN}.pro
+
+ sed -i "s/\/usr\/local/\/usr/g" ${PN}.pro
+}
diff --git a/media-gfx/openscad/openscad-2014.03.ebuild b/media-gfx/openscad/openscad-2014.03.ebuild
new file mode 100644
index 000000000000..edfdc55972db
--- /dev/null
+++ b/media-gfx/openscad/openscad-2014.03.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2
+
+DESCRIPTION="The Programmers Solid 3D CAD Modeller"
+HOMEPAGE="http://www.openscad.org/"
+SRC_URI="http://files.openscad.org/${P}.src.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+CDEPEND="media-gfx/opencsg
+ sci-mathematics/cgal
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-cpp/eigen:3
+ dev-libs/gmp
+ dev-libs/mpfr
+ dev-libs/boost:=
+ sys-libs/glibc
+"
+DEPEND="${CDEPEND} sys-devel/gcc"
+RDEPEND="${CDEPEND}"
+
+src_prepare() {
+ #Use our CFLAGS (specifically don't force x86)
+ sed -i "s/QMAKE_CXXFLAGS_RELEASE = .*//g" ${PN}.pro
+
+ sed -i "s/\/usr\/local/\/usr/g" ${PN}.pro
+}
diff --git a/media-gfx/optipng/Manifest b/media-gfx/optipng/Manifest
new file mode 100644
index 000000000000..2bd43fa7ddcb
--- /dev/null
+++ b/media-gfx/optipng/Manifest
@@ -0,0 +1,3 @@
+DIST optipng-0.7.3.tar.gz 1613868 SHA256 e07079fbf4cd7f11e756ca042f5285dd7a1f1784bb398fe6bbb63e5324368491 SHA512 2e15f88e9c1d1ed447c9236485bf6a0560678e11ea51e53a967b66ad6205f2cd000d0dccdeb2dd8f4ee3496891da112b37451ddeef80f31700542a69b9749eb4 WHIRLPOOL 87e397962019885ac1e4f9a36f1a707c325b4e8030add9f56bbf11841c2a5eab95ec472737a954bf96fbd8be0e06b08911f8786416758efd02ce3c4479c0fd83
+DIST optipng-0.7.4.tar.gz 1613916 SHA256 520b5d5a9405dbdc5c905dd0cff87211e69c4ed2059744037510e613fe8237ff SHA512 53db8f528cded99aded4db85424e38890ebdc26043e0497a575d0f3b81fe575638355dab1ca0d46c24ebbbe8a6657ac8e0c4216eee0d02f41d7365e3e168e40f WHIRLPOOL 9ad5b0d5097c9de72780f22a501438c57606d03b8f522b258d43d148f2239518eaccd1ec4e3c40eb99da571db1debf739f5722405c9988345a0d55debf7fcfd5
+DIST optipng-0.7.5.tar.gz 2141943 SHA256 74e54b798b012dff8993fb8d90185ca83f18cfa4935f4a93b0bcfc33c849619d SHA512 6f319965739235387e99244dda5f52533e22b7040301cf680180e383f24361819f66cb3adf1a90923e9509ed08d55bbe442ec363310c385fcf70f551febfbb6f WHIRLPOOL e632f2c018d132280fb73ec80587b1d8e4b8e857663175a3c47933054369cec4bf8a93d34c4627e00513a804fe1500c6ea2c2c62d908f295cab743c2f0e92cbe
diff --git a/media-gfx/optipng/files/optipng-0.7.5-estonian.patch b/media-gfx/optipng/files/optipng-0.7.5-estonian.patch
new file mode 100644
index 000000000000..37a2ca3ec688
--- /dev/null
+++ b/media-gfx/optipng/files/optipng-0.7.5-estonian.patch
@@ -0,0 +1,34 @@
+From 2cf0d7cb7928aac9ec0e21ceaaf09053434a4947 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Tue, 16 Sep 2014 02:58:45 +0200
+Subject: [PATCH] Fix for Estonian locale support (bug #522446)
+
+---
+ configure | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 6d2a507..17d4bc1 100755
+--- a/configure
++++ b/configure
+@@ -256,7 +256,7 @@ then
+ $sed_preconfig_libpng
+ s|^AR *=.*|AR = $AR|
+ s|^ARFLAGS *=.*|ARFLAGS = $ARFLAGS|
+- s|^AR_\([A-Z]*\) *=.*|AR_\1 = $AR $ARFLAGS|
++ s|^AR_\([[:upper:]]*\) *=.*|AR_\1 = $AR $ARFLAGS|
+ "
+ fi
+ if test "$RANLIB"
+@@ -408,7 +408,7 @@ sed_config="
+ s|@LIBPNG_DISTCLEAN_XCMD@|${LIBPNG_DISTCLEAN_XCMD-true}|g
+ s|@ZLIB_MK@|${ZLIB_MK-Makefile}|g
+ s|@ZLIB_DISTCLEAN@|${ZLIB_DISTCLEAN-distclean}|g
+- s|@[A-Z]*_MK@|Makefile|g
++ s|@[[:upper:]]*_MK@|Makefile|g
+ s| *\$||
+ "
+
+--
+2.1.0
+
diff --git a/media-gfx/optipng/metadata.xml b/media-gfx/optipng/metadata.xml
new file mode 100644
index 000000000000..f822dec2523b
--- /dev/null
+++ b/media-gfx/optipng/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>tristan@gentoo.org</email>
+ <name>Tristan Heaven</name>
+ </maintainer>
+ <maintainer>
+ <email>sping@gentoo.org</email>
+ <name>Sebastian Pipping</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">optipng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/optipng/optipng-0.7.3-r1.ebuild b/media-gfx/optipng/optipng-0.7.3-r1.ebuild
new file mode 100644
index 000000000000..b5bcc84c5e69
--- /dev/null
+++ b/media-gfx/optipng/optipng-0.7.3-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Compress PNG files without affecting image quality"
+HOMEPAGE="http://optipng.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE=""
+
+RDEPEND="sys-libs/zlib
+ media-libs/libpng:0"
+DEPEND="${RDEPEND}
+ sys-apps/findutils"
+
+src_prepare() {
+ rm -R src/{libpng,zlib} || die
+ find . -type d -name build -exec rm -R {} + || die
+
+ # next release is almost a complete rewrite, so plug this compilation
+ # problem in anticipation of the much (c)leaner(?) rewrite
+ sed -i \
+ -e 's/^#ifdef AT_FDCWD/#if defined(AT_FDCWD) \&\& !(defined (__SVR4) \&\& defined (__sun))/' \
+ src/optipng/osys.c || die
+
+ tc-export CC AR RANLIB
+}
+
+src_configure() {
+ ./configure \
+ -with-system-libpng \
+ -with-system-zlib \
+ || die "configure failed"
+}
+
+src_compile() {
+ emake \
+ -C src/optipng \
+ GENTOO_CFLAGS="${CFLAGS}" \
+ GENTOO_LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dodoc README.txt doc/*.txt
+ dohtml doc/*.html
+ doman src/${PN}/man/${PN}.1
+
+ dobin src/${PN}/${PN}
+}
diff --git a/media-gfx/optipng/optipng-0.7.3.ebuild b/media-gfx/optipng/optipng-0.7.3.ebuild
new file mode 100644
index 000000000000..418528ccb763
--- /dev/null
+++ b/media-gfx/optipng/optipng-0.7.3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Compress PNG files without affecting image quality"
+HOMEPAGE="http://optipng.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE=""
+
+RDEPEND="sys-libs/zlib
+ media-libs/libpng:0"
+DEPEND="${RDEPEND}
+ sys-apps/findutils"
+
+src_prepare() {
+ rm -R src/{libpng,zlib} || die
+ find . -type d -name build -exec rm -R {} + || die
+
+ # next release is almost a complete rewrite, so plug this compilation
+ # problem in anticipation of the much (c)leaner(?) rewrite
+ sed -i \
+ -e 's/^#ifdef AT_FDCWD/#if defined(AT_FDCWD) \&\& !(defined (__SVR4) \&\& defined (__sun))/' \
+ src/optipng/osys.c || die
+}
+
+src_configure() {
+ ./configure \
+ -with-system-libpng \
+ -with-system-zlib \
+ || die "configure failed"
+}
+
+src_compile() {
+ emake \
+ -C src/optipng \
+ CC="$(tc-getCC)" \
+ GENTOO_CFLAGS="${CFLAGS}" \
+ GENTOO_LDFLAGS="${LDFLAGS}" \
+ || die "emake failed"
+}
+
+src_install() {
+ dodoc README.txt doc/*.txt || die
+ dohtml doc/*.html || die
+ doman src/optipng/man/optipng.1 || die
+
+ dobin src/optipng/optipng || die "dobin failed"
+}
diff --git a/media-gfx/optipng/optipng-0.7.4.ebuild b/media-gfx/optipng/optipng-0.7.4.ebuild
new file mode 100644
index 000000000000..f774e25768fc
--- /dev/null
+++ b/media-gfx/optipng/optipng-0.7.4.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Compress PNG files without affecting image quality"
+HOMEPAGE="http://optipng.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE=""
+
+RDEPEND="sys-libs/zlib
+ media-libs/libpng:0"
+DEPEND="${RDEPEND}
+ sys-apps/findutils"
+
+src_prepare() {
+ rm -R src/{libpng,zlib} || die
+ find . -type d -name build -exec rm -R {} + || die
+
+ # next release is almost a complete rewrite, so plug this compilation
+ # problem in anticipation of the much (c)leaner(?) rewrite
+ sed -i \
+ -e 's/^#ifdef AT_FDCWD/#if defined(AT_FDCWD) \&\& !(defined (__SVR4) \&\& defined (__sun))/' \
+ src/optipng/osys.c || die
+
+ tc-export CC AR RANLIB
+ export LD=$(tc-getCC)
+}
+
+src_configure() {
+ ./configure \
+ -with-system-libpng \
+ -with-system-zlib \
+ || die "configure failed"
+}
+
+src_compile() {
+ emake -C src/optipng
+}
+
+src_install() {
+ dodoc README.txt doc/*.txt
+ dohtml doc/*.html
+ doman src/${PN}/man/${PN}.1
+
+ dobin src/${PN}/${PN}
+}
diff --git a/media-gfx/optipng/optipng-0.7.5.ebuild b/media-gfx/optipng/optipng-0.7.5.ebuild
new file mode 100644
index 000000000000..7b324b61b8da
--- /dev/null
+++ b/media-gfx/optipng/optipng-0.7.5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Compress PNG files without affecting image quality"
+HOMEPAGE="http://optipng.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+IUSE=""
+
+RDEPEND="sys-libs/zlib
+ media-libs/libpng:0"
+DEPEND="${RDEPEND}
+ sys-apps/findutils"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-estonian.patch
+
+ rm -R src/{libpng,zlib} || die
+ find . -type d -name build -exec rm -R {} + || die
+
+ # next release is almost a complete rewrite, so plug this compilation
+ # problem in anticipation of the much (c)leaner(?) rewrite
+ sed -i \
+ -e 's/^#ifdef AT_FDCWD/#if defined(AT_FDCWD) \&\& !(defined (__SVR4) \&\& defined (__sun))/' \
+ src/optipng/osys.c || die
+
+ tc-export CC AR RANLIB
+ export LD=$(tc-getCC)
+}
+
+src_configure() {
+ ./configure \
+ -with-system-libpng \
+ -with-system-zlib \
+ || die "configure failed"
+}
+
+src_compile() {
+ emake -C src/optipng
+}
+
+src_install() {
+ dodoc README.txt doc/*.txt
+ dohtml doc/*.html
+ doman src/${PN}/man/${PN}.1
+
+ dobin src/${PN}/${PN}
+}
diff --git a/media-gfx/paint-mono/Manifest b/media-gfx/paint-mono/Manifest
new file mode 100644
index 000000000000..4bbddbf5a353
--- /dev/null
+++ b/media-gfx/paint-mono/Manifest
@@ -0,0 +1 @@
+DIST paintdotnet-0.1.63.tar.gz 1318570 SHA256 32273a51d1643ff6eb28186c732e91f70474ecf796bbba3fbebb3eee7e1b53a5
diff --git a/media-gfx/paint-mono/metadata.xml b/media-gfx/paint-mono/metadata.xml
new file mode 100644
index 000000000000..069dd9168434
--- /dev/null
+++ b/media-gfx/paint-mono/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>dotnet</herd>
+ <upstream>
+ <remote-id type="google-code">paint-mono</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/paint-mono/paint-mono-0.1.63.ebuild b/media-gfx/paint-mono/paint-mono-0.1.63.ebuild
new file mode 100644
index 000000000000..dbad389c10e4
--- /dev/null
+++ b/media-gfx/paint-mono/paint-mono-0.1.63.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit mono multilib
+
+DESCRIPTION="An unofficial effort to port Paint.NET 3.0 to Linux using Mono"
+HOMEPAGE="http://code.google.com/p/paint-mono/"
+SRC_URI="http://${PN}.googlecode.com/files/paintdotnet-${PV}.tar.gz"
+
+LICENSE="MIT CC-BY-NC-ND-2.5"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=dev-lang/mono-2.4[-minimal]"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/paintdotnet-${PV}"
+
+src_configure() {
+ ./configure --prefix=/usr
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ mono_multilib_comply
+ sed -i -e 's:usr/local:usr:' "${D}"/usr/$(get_libdir)/pkgconfig/* "${D}"/usr/bin/*
+}
diff --git a/media-gfx/panini/Manifest b/media-gfx/panini/Manifest
new file mode 100644
index 000000000000..70cdcecb0390
--- /dev/null
+++ b/media-gfx/panini/Manifest
@@ -0,0 +1 @@
+DIST Panini-0.71.104-src.zip 602843 SHA256 aacd27a71049c5e3b953afc02ecd67fb9bfd35702255ff5cc21a96719c0c82b3 SHA512 506047cbaf6928ee234ad1071b4aeefeec43dc7cfe7640db796d25c4932521ed19c8adb3983dc00e31595e4ce87c38d65f88903f1756bbae2ce0b19843680737 WHIRLPOOL c39ef654e9967cf531376059e33ed3026dc39226753512c105f9089a845888b48a0a16b4bd923dbc7f131be5dce86f2dec48e39476055eeb554a198827f5099c
diff --git a/media-gfx/panini/files/panini-0.71.104-glu.patch b/media-gfx/panini/files/panini-0.71.104-glu.patch
new file mode 100644
index 000000000000..e9866161ae10
--- /dev/null
+++ b/media-gfx/panini/files/panini-0.71.104-glu.patch
@@ -0,0 +1,10 @@
+--- Panini-0.71.104-src/panini.pro
++++ Panini-0.71.104-src/panini.pro
+@@ -3,6 +3,7 @@
+ TARGET = Panini
+ CONFIG += debug_and_release
+ QT = gui core opengl
++LIBS += -lGLU -lz
+
+ # # Directories ##
+ OBJECTS_DIR = build
diff --git a/media-gfx/panini/files/panini.desktop b/media-gfx/panini/files/panini.desktop
new file mode 100644
index 000000000000..cffd55d5a02a
--- /dev/null
+++ b/media-gfx/panini/files/panini.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Panini
+GenericName=Panini perspective tool
+Comment=Perspective views from panoramic images
+Exec=panini %f
+Terminal=false
+Type=Application
+Icon=panini
+Categories=Graphics;
+MimeType=video/quicktime;image/jpeg;image/tiff;image/png;
diff --git a/media-gfx/panini/metadata.xml b/media-gfx/panini/metadata.xml
new file mode 100644
index 000000000000..8f3639ff8807
--- /dev/null
+++ b/media-gfx/panini/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">pvqt</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/panini/panini-0.71.104.ebuild b/media-gfx/panini/panini-0.71.104.ebuild
new file mode 100644
index 000000000000..9a6d10a42800
--- /dev/null
+++ b/media-gfx/panini/panini-0.71.104.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2 eutils
+
+MY_P="${P/p/P}-src"
+DESCRIPTION="OpenGL-based panoramic image viewer"
+HOMEPAGE="http://sourceforge.net/projects/pvqt/"
+SRC_URI="mirror://sourceforge/pvqt/${MY_P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtcore:4
+ dev-qt/qtopengl:4
+ virtual/glu
+ sys-libs/zlib"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-glu.patch
+}
+
+src_install() {
+ newbin Panini panini
+ dodoc panini-usage.txt panini-0.71-release.txt
+ domenu "${FILESDIR}"/${PN}.desktop
+ newicon ui/panini-icon-blue.jpg ${PN}.jpg
+}
diff --git a/media-gfx/pdf2svg/Manifest b/media-gfx/pdf2svg/Manifest
new file mode 100644
index 000000000000..b40696c7e776
--- /dev/null
+++ b/media-gfx/pdf2svg/Manifest
@@ -0,0 +1,2 @@
+DIST pdf2svg-0.2.1.tar.gz 77601 SHA256 96e6902e0bca6aeb70f3c6621d0d95b346b14c6a0282c12c1e7635f67af0c74b SHA512 17b54ed40f38982452206a9e7eb6fd309906904af10ef375d7e3894e7d8d8a351a5c47ef6553678db48373c5de878923fd46a66cc3e22a01034434fde9671793 WHIRLPOOL 4018341269d189000a79d58d429d3346e3e33e649ccc762fe84c6da04e1ecc10573d7a2659c4f897484023a5ab393ce723b6227ac8f7df76ceb0c1fda84d7dd6
+DIST pdf2svg-0.2.2.tar.gz 84009 SHA256 c2a29cc81d01fea220523abad39c400e9c5411b395b6ba3ccbedb4cd398ec6cb SHA512 ea8b3d33acc7900d162a338b715d55a0cda578e2f08afcbe2773558998b267134ce0c34d5ed295d3dcb2bf882f0097835a6ba83fc837a201173e4c67b9d4dca3 WHIRLPOOL b4a0381d175e0ad18534681c53e994e6e47915d27584f2efd12d638f1f5eb4fb9e181673f81079384addc0ba933da4f777dc632eafe1055b8b79952dbf599e33
diff --git a/media-gfx/pdf2svg/metadata.xml b/media-gfx/pdf2svg/metadata.xml
new file mode 100644
index 000000000000..a083c07fab9e
--- /dev/null
+++ b/media-gfx/pdf2svg/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/pdf2svg/pdf2svg-0.2.1.ebuild b/media-gfx/pdf2svg/pdf2svg-0.2.1.ebuild
new file mode 100644
index 000000000000..67858320961f
--- /dev/null
+++ b/media-gfx/pdf2svg/pdf2svg-0.2.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="pdf2svg is based on poppler and cairo and can convert pdf to svg files"
+HOMEPAGE="http://www.cityinthesky.co.uk/pdf2svg.html"
+SRC_URI="http://www.cityinthesky.co.uk/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND=">=app-text/poppler-0.12.3-r3:=[cairo]
+ >=x11-libs/cairo-1.2.6:=[svg]
+ x11-libs/gtk+:2="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i \
+ -e 's:#include <stdio.h>:#include <stdio.h>\n#include <stdlib.h>:' \
+ ${PN}.c || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog README
+}
diff --git a/media-gfx/pdf2svg/pdf2svg-0.2.2.ebuild b/media-gfx/pdf2svg/pdf2svg-0.2.2.ebuild
new file mode 100644
index 000000000000..6a470094ae97
--- /dev/null
+++ b/media-gfx/pdf2svg/pdf2svg-0.2.2.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="pdf2svg is based on poppler and cairo and can convert pdf to svg files"
+HOMEPAGE="http://www.cityinthesky.co.uk/opensource/pdf2svg/"
+SRC_URI="http://www.cityinthesky.co.uk/wp-content/uploads/2013/10/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=app-text/poppler-0.12.3-r3:=[cairo]
+ >=x11-libs/cairo-1.2.6:=[svg]
+ x11-libs/gtk+:2="
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="AUTHORS" # ChangeLog is only for <=0.2.1 and README.md doesn't have anything useful for usage
+
+src_prepare() {
+ sed -i \
+ -e 's:#include <stdio.h>:#include <stdio.h>\n#include <stdlib.h>:' \
+ ${PN}.c || die
+}
diff --git a/media-gfx/pencil/Manifest b/media-gfx/pencil/Manifest
new file mode 100644
index 000000000000..0b12434f7f53
--- /dev/null
+++ b/media-gfx/pencil/Manifest
@@ -0,0 +1 @@
+DIST pencil-0.4.4b-src.zip 1147003 SHA256 8a1373e745d9c039e15c7b3f0c1846190fcc4621306b2dd507c31ac31de64303
diff --git a/media-gfx/pencil/files/pencil-0.4.4_beta-gcc461.patch b/media-gfx/pencil/files/pencil-0.4.4_beta-gcc461.patch
new file mode 100644
index 000000000000..d0aa8936b8fd
--- /dev/null
+++ b/media-gfx/pencil/files/pencil-0.4.4_beta-gcc461.patch
@@ -0,0 +1,14 @@
+--- src/graphics/vector/beziercurve.cpp 2007-07-14 21:41:33.000000000 +0200
++++ src/graphics/vector/beziercurve.cpp 2011-08-29 16:19:08.930675072 +0200
+@@ -700,9 +700,9 @@
+ R1.setTopLeft(P1); R1.setBottomRight(Q1);
+ R2.setTopLeft(P2); R2.setBottomRight(Q2);
+
+- //QPointF intersectionPoint = QPointF(50.0, 50.0); // bogus point
++ QPointF intersectionPoint = QPointF(50.0, 50.0); // bogus point
+ //QPointF* intersection = &intersectionPoint;
+- QPointF* cubicIntersection = &QPointF(50.0, 50.0); // bogus point
++ QPointF* cubicIntersection = &intersectionPoint; // bogus point
+ if( R1.intersects(R2) || L2.intersect(L1, cubicIntersection) == QLineF::BoundedIntersection ) {
+ //if(L2.intersect(L1, intersection) == QLineF::BoundedIntersection) {
+ //qDebug() << " FOUND rectangle intersection ";
diff --git a/media-gfx/pencil/metadata.xml b/media-gfx/pencil/metadata.xml
new file mode 100644
index 000000000000..c7699071b168
--- /dev/null
+++ b/media-gfx/pencil/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">pencil-planner</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/pencil/pencil-0.4.4_beta.ebuild b/media-gfx/pencil/pencil-0.4.4_beta.ebuild
new file mode 100644
index 000000000000..e26e14f04c0c
--- /dev/null
+++ b/media-gfx/pencil/pencil-0.4.4_beta.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils qt4-r2
+
+MY_P=${P/_beta/b}
+
+DESCRIPTION="A Qt4 based animation and drawing program"
+HOMEPAGE="http://www.pencil-animation.org/"
+SRC_URI="mirror://sourceforge/pencil-planner/${MY_P}-src.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ >=media-libs/ming-0.4.3"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}-source
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gcc461.patch
+ sed -i s:SWFSprite:SWFMovieClip:g src/external/flash/flash.{cpp,h} || die
+}
+
+src_install() {
+ # install target not yet provided
+ #emake INSTALL_ROOT="${D}" install || die "emake install failed"
+ newbin Pencil ${PN} || die "dobin failed"
+
+ dodoc README TODO || die
+
+ mv "${S}"/icons/icon.png "${S}"/icons/${PN}.png
+ doicon "${S}"/icons/${PN}.png || die "doicon failed"
+ make_desktop_entry ${PN} Pencil ${PN} Graphics
+}
diff --git a/media-gfx/peps/Manifest b/media-gfx/peps/Manifest
new file mode 100644
index 000000000000..b05b7545e711
--- /dev/null
+++ b/media-gfx/peps/Manifest
@@ -0,0 +1 @@
+DIST peps-2.0.tar.gz 55421 SHA256 b514fed9412548cdcf43a95b6dcf01b2038f314bc9ef363498ebd2779c897a91
diff --git a/media-gfx/peps/metadata.xml b/media-gfx/peps/metadata.xml
new file mode 100644
index 000000000000..3442601e4dfd
--- /dev/null
+++ b/media-gfx/peps/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ peps will preprocess encapsulated Postscript files and allow you to
+ convert them into bitmaps. Note the word allow: peps does not do the
+ conversion for you. Rather, it prepares the Postscript input for a
+ bitmap conversion by Ghostscript, which must already be installed on
+ your system.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/peps/peps-2.0.ebuild b/media-gfx/peps/peps-2.0.ebuild
new file mode 100644
index 000000000000..9148d36d8a5c
--- /dev/null
+++ b/media-gfx/peps/peps-2.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Peps preprocesses EPS files and passes it to Ghostscript for conversion into a bitmap"
+HOMEPAGE="http://peps.redprince.net/peps/"
+SRC_URI="http://www.peps.redprince.net/peps/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="X"
+
+DEPEND="app-text/ghostscript-gpl
+ app-arch/gzip"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ if use X && ! grep -q x11gray4 <(gs -h 2>/dev/null); then
+ die "you need a ghostscript version with 'x11' and 'x11gray4' devices!"
+ fi
+}
+
+src_prepare() {
+ # adding <string.h> include
+ sed -i -e "s:^\(#include.*<unistd.h>.*\):\1\n#include <string.h>:" peps.c
+ # adding LDFLAGS to Makefile
+ sed -i -e "s:\( -o \): \${LDFLAGS}\1:g" Makefile
+}
+
+src_compile() {
+ local myopts="peps"
+ use X && myopts="${myopts} xpeps"
+ emake CC="$(tc-getCC)" ${myopts} || die "emake failed"
+}
+
+src_install() {
+ # manual install, because fixing dumb Makefile is more compilcated
+ dobin peps || die "install failed"
+ use X && dobin xpeps
+
+ doman peps.1
+ dodoc README
+
+ insinto /etc
+ doins peps.mime
+
+ # copy PDF so it won't be compressed
+ cp peps.pdf "${D}usr/share/doc/${PF}"
+}
diff --git a/media-gfx/photivo/Manifest b/media-gfx/photivo/Manifest
new file mode 100644
index 000000000000..3e2c2c478133
--- /dev/null
+++ b/media-gfx/photivo/Manifest
@@ -0,0 +1,3 @@
+DIST photivo-0_pre20121006.tar.gz 2515621 SHA256 41627ab3516d365fab218b605f1d5917b7eda7b94b5604a81d5c3dbdc879ef7b SHA512 fa9763929acd1ea5afcc9ae6a68034f7cc571ea41569eae987ce0d99101b2d17cfa3a71fece4484478c207712e49112824dd496ccb6be80aebe20b5bbf8f2be5 WHIRLPOOL bb0130883c72aa992ebc682af1f152ba3a4819310b32107f21883660edf15b4ae03a704c2fae81c8e68a96b7f66a8639c4a5731aa5b0de7c53af872df36a82d0
+DIST photivo-0_pre20121212.tar.gz 2606004 SHA256 86fadfa343d0b9b8c6390dba43ad3e1f42a23f17314186449894f83578f1fb9b SHA512 000ffe58f2b676c2796aff4e445a0968441dd850b397f3b3292dcd3bc2abfdb49a781799c3f85eefff09ce74dede6a1eb846ed4a760ee0ec033043a12f03f967 WHIRLPOOL 355d884fb3b273141c39789e63b5b52cae5ceea561c0f3c8ff9664b83537bdee08285d1969ce296a419dd74d3f45be7c8e7e0ebdad72b5f2a3d0ca5bc73c594f
+DIST photivo-0_pre20131115.tar.gz 3145008 SHA256 cfbbf7f9dfb41ba0aadb6771739d95fe36219f78bd32d340a3908344a0ce82ac SHA512 b98d2dced306325b5ab116c4ba170404a6956d081128095b5315f3b061797290b5a305da73ede9f496659b2b1cc8090cd2f300cfbd311c69db59c8425bd2e047 WHIRLPOOL 4671c62c647ca919973adeed2aceac0570d9f8d70b90819660f8a42958bd514278f119063def0c77e355813a84c85f7199b1fa4182926c4694b4a1c9217c037f
diff --git a/media-gfx/photivo/metadata.xml b/media-gfx/photivo/metadata.xml
new file mode 100644
index 000000000000..7533536edaac
--- /dev/null
+++ b/media-gfx/photivo/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>opensource@andmarios.com</email>
+ <name>Marios Andreopoulos</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">photivo</remote-id>
+ <bugs-to>http://code.google.com/p/photivo/issues/list</bugs-to>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/photivo/photivo-0_pre20121006.ebuild b/media-gfx/photivo/photivo-0_pre20121006.ebuild
new file mode 100644
index 000000000000..a958bcbb068d
--- /dev/null
+++ b/media-gfx/photivo/photivo-0_pre20121006.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2
+
+DESCRIPTION="Photo processor for RAW and Bitmap images"
+HOMEPAGE="http://www.photivo.org"
+SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gimp"
+
+RDEPEND="dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ virtual/jpeg
+ media-libs/tiff
+ media-libs/libpng
+ media-gfx/exiv2
+ media-libs/lcms:2
+ media-libs/lensfun
+ sci-libs/fftw:3.0
+ media-libs/liblqr
+ media-gfx/graphicsmagick[q16,-lcms]
+ media-gfx/greycstoration[lapack]
+ virtual/lapack
+ media-libs/cimg
+ gimp? ( media-gfx/gimp )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}-${PV/0_pre/}
+
+src_prepare() {
+ # remove ccache dependency
+ local File
+ for File in $(find "${S}" -type f); do
+ if grep -sq ccache ${File}; then
+ sed -e 's/ccache//' -i "${File}"
+ fi
+ done
+
+ # useless check (no pkgconfig file is provided)
+ sed -e "/PKGCONFIG += CImg/d" \
+ -i photivoProject/photivoProject.pro || die
+ qt4-r2_src_prepare
+}
+
+src_configure() {
+ local config="WithSystemCImg"
+ if ! use gimp ; then
+ config+=" WithoutGimp"
+ fi
+
+ eqmake4 "CONFIG+=${config}"
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ if use gimp; then
+ exeinto $(gimptool-2.0 --gimpplugindir)/plug-ins
+ doexe ptGimp
+ doexe "mm extern photivo.py"
+ fi
+}
diff --git a/media-gfx/photivo/photivo-0_pre20121212.ebuild b/media-gfx/photivo/photivo-0_pre20121212.ebuild
new file mode 100644
index 000000000000..f2b68601ab13
--- /dev/null
+++ b/media-gfx/photivo/photivo-0_pre20121212.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2
+
+DESCRIPTION="Photo processor for RAW and Bitmap images"
+HOMEPAGE="http://www.photivo.org"
+SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gimp"
+
+RDEPEND="dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ virtual/jpeg
+ media-libs/tiff
+ media-libs/libpng
+ media-gfx/exiv2
+ media-libs/lcms:2
+ media-libs/lensfun
+ sci-libs/fftw:3.0
+ media-libs/liblqr
+ media-gfx/graphicsmagick[q16,-lcms]
+ media-gfx/greycstoration[lapack]
+ virtual/lapack
+ media-libs/cimg
+ gimp? ( media-gfx/gimp )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}-${PV/0_pre/}
+
+src_prepare() {
+ # remove ccache dependency
+ local File
+ for File in $(find "${S}" -type f); do
+ if grep -sq ccache ${File}; then
+ sed -e 's/ccache//' -i "${File}"
+ fi
+ done
+
+ # useless check (no pkgconfig file is provided)
+ sed -e "/PKGCONFIG += CImg/d" \
+ -i photivoProject/photivoProject.pro || die
+ qt4-r2_src_prepare
+}
+
+src_configure() {
+ local config="WithSystemCImg"
+ if use gimp ; then
+ config+=" WithGimp"
+ fi
+
+ eqmake4 "CONFIG+=${config}"
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ if use gimp; then
+ exeinto $(gimptool-2.0 --gimpplugindir)/plug-ins
+ doexe ptGimp
+ doexe "mm extern photivo.py"
+ fi
+}
diff --git a/media-gfx/photivo/photivo-0_pre20131115.ebuild b/media-gfx/photivo/photivo-0_pre20131115.ebuild
new file mode 100644
index 000000000000..239a2a821a3f
--- /dev/null
+++ b/media-gfx/photivo/photivo-0_pre20131115.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2
+
+DESCRIPTION="Photo processor for RAW and Bitmap images"
+HOMEPAGE="http://www.photivo.org"
+SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="gimp"
+
+RDEPEND="dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ || ( virtual/jpeg:62 media-libs/jpeg:62 )
+ media-gfx/exiv2
+ media-libs/tiff
+ media-libs/libpng
+ media-libs/cimg
+ media-libs/lcms:2
+ >=media-libs/lensfun-0.2.8-r1
+ sci-libs/fftw:3.0
+ media-libs/liblqr
+ media-gfx/graphicsmagick[q16,-lcms]
+ gimp? ( media-gfx/gimp )"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}-${PV/0_pre/}
+
+src_prepare() {
+ # remove ccache dependency and fix lensfun header path
+ local File
+ for File in $(find "${S}" -type f); do
+ if grep -sq ccache ${File}; then
+ sed -e 's/ccache//' -i "${File}"
+ fi
+ if grep -sq "lensfun.h" ${File}; then
+ sed -e 's/lensfun\.h/lensfun\/lensfun.h/' -i ${File}
+ fi
+ done
+
+ # useless check (no pkgconfig file is provided)
+ sed -e "/PKGCONFIG += CImg/d" \
+ -i photivoProject/photivoProject.pro || die
+ qt4-r2_src_prepare
+}
+
+src_configure() {
+ local config="WithSystemCImg"
+ if use gimp ; then
+ config+=" WithGimp"
+ fi
+
+ eqmake4 "CONFIG+=${config}"
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ if use gimp; then
+ exeinto $(gimptool-2.0 --gimpplugindir)/plug-ins
+ doexe ptGimp
+ doexe "mm extern photivo.py"
+ fi
+}
diff --git a/media-gfx/photivo/photivo-9999.ebuild b/media-gfx/photivo/photivo-9999.ebuild
new file mode 100644
index 000000000000..9f921e5abd84
--- /dev/null
+++ b/media-gfx/photivo/photivo-9999.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit qt4-r2 mercurial
+
+DESCRIPTION="Photo processor for RAW and Bitmap images"
+HOMEPAGE="http://www.photivo.org"
+EHG_REPO_URI="https://photivo.googlecode.com/hg/"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="gimp"
+
+RDEPEND="dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ || ( virtual/jpeg:62 media-libs/jpeg:62 )
+ media-gfx/exiv2
+ media-libs/cimg
+ media-libs/lcms:2
+ media-libs/lensfun
+ sci-libs/fftw:3.0
+ media-libs/liblqr
+ media-gfx/graphicsmagick[q16,-lcms]
+ gimp? ( media-gfx/gimp )"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # remove ccache dependency
+ local File
+ for File in $(find "${S}" -type f); do
+ if grep -sq ccache ${File}; then
+ sed -e 's/ccache//' -i "${File}"
+ fi
+ done
+
+ # useless check (no pkgconfig file is provided)
+ sed -e "/PKGCONFIG += CImg/d" \
+ -i photivoProject/photivoProject.pro || die
+ qt4-r2_src_prepare
+}
+
+src_configure() {
+ local config="WithSystemCImg"
+ if use gimp ; then
+ config+=" WithGimp"
+ fi
+
+ eqmake4 "CONFIG+=${config}"
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ if use gimp; then
+ exeinto $(gimptool-2.0 --gimpplugindir)/plug-ins
+ doexe ptGimp
+ doexe "mm extern photivo.py"
+ fi
+}
diff --git a/media-gfx/photopc/Manifest b/media-gfx/photopc/Manifest
new file mode 100644
index 000000000000..3783dbf4643e
--- /dev/null
+++ b/media-gfx/photopc/Manifest
@@ -0,0 +1 @@
+DIST photopc-3.07.tar.gz 183668 SHA256 b42824a7cf7ce76e8e8e81345463d25b8dadd16799920da062aa36aa6ed8489c SHA512 2346da12e8276024a33582806898660da74613edd7fe8ee3f707e505197ba6072c31d58a24b540021e60117d81f553360a7efa57924db9cd0a4e428d64c0c1d3 WHIRLPOOL c2867cfc6e46a038cd00c3ac391e3dac0d6d927e21f1dc1a7fb34c247fb19707286b4e726d0b27f2bb4e69f960204b9dbf1ffceffd5038266a14e39c5a552626
diff --git a/media-gfx/photopc/metadata.xml b/media-gfx/photopc/metadata.xml
new file mode 100644
index 000000000000..62f407f90494
--- /dev/null
+++ b/media-gfx/photopc/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">photopc</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/photopc/photopc-3.07.ebuild b/media-gfx/photopc/photopc-3.07.ebuild
new file mode 100644
index 000000000000..bd4066f8e9f1
--- /dev/null
+++ b/media-gfx/photopc/photopc-3.07.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit toolchain-funcs
+
+DESCRIPTION="Utility to control digital cameras based on Sierra Imaging firmware"
+HOMEPAGE="http://photopc.sourceforge.net"
+SRC_URI="mirror://sourceforge/photopc/${P}.tar.gz"
+
+LICENSE="photopc"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ dodoc README
+ dobin photopc epinfo
+ doman photopc.1 epinfo.1
+}
diff --git a/media-gfx/photoqt/Manifest b/media-gfx/photoqt/Manifest
new file mode 100644
index 000000000000..2057b17a24f8
--- /dev/null
+++ b/media-gfx/photoqt/Manifest
@@ -0,0 +1,5 @@
+DIST photo-0.8.tar.gz 241142 SHA256 123f8cfa8e86dd131147b58e1c94a138bb9d3e5873f29b550cc960e83b2c4f5f SHA512 b5b8700a4f15e4ce880c5558247cc0e96e59df21c0674f57e202b5d6474e1ef0a251d5be391e795b230c4959251e194ec4a1c87e75075ee9ae501d3e18c4e32f WHIRLPOOL c6ff5a3a41cdfac0c54593dfbabb35bcb903b592809f698cf7d7c56bce05b1a29c31d8db7031392819481188f563bcf67e997cec24acd0a0842a311efaa76529
+DIST photoqt-1.0.tar.gz 709752 SHA256 e7f866540a03e95463dacdf2769a954f601ac3cd1507655793f9f231ab8689ce SHA512 2badf4e6e6694460fb8d1c8a9f8cb73fdcbcc20868588beec7da01e86ee906f81ed4f5154050960cb5000c40ef1efc03684872c35b352fe4246a880e03ee1bd7 WHIRLPOOL c33eae430c34e0e1c9dbf3d7721fa52af44dbc825060e804b42eeeec64bfc8c59bcf056e3f79227c4cd4a03823efc8716b9f5d172cb6a552165131f2600cdf2a
+DIST photoqt-1.1.0.1.tar.gz 1201723 SHA256 3727ec58a243586d367dc609793ad043cc78d4e67d9e7d3454f7cad782f6a9f8 SHA512 024c4fa1212d773b53b0bd7dd0a15bda961c33bd01ed9b8199f555e94339f97bb2d56a2928f68440f3de7f3ebaf539585be044cd5ba9f6e6b0f284d0c744ff6a WHIRLPOOL be35177b1b8587130f8728be6f44d5dc657b4d188dc947a514bcac344700fcec58db99e36c85163ddb22460331b64b2c1d3f7dab643d1c42beea5e5a58542655
+DIST photoqt-1.2.tar.gz 1452897 SHA256 4a293136c82c075c2f87bb1d8c6be384e8e8ca00f3d32e1783271439a090d6b6 SHA512 13b34a5511bebe9e2845b4fb9949472af2a75e358d836d05521f3efd848c8cc36f0d977a1c1a5ed16df9e0333ce8082f1b4fa4984a3318b4cb1012c44c6237e4 WHIRLPOOL 2fa599a5d1ff550253607a13a05bf67e5c3fc81152238be4a208f1d6bcd3939d1eaf4af398818cea728fb778955e3a6d5a3ef6191b757b5cb0b134b65b7b5220
+DIST photoqt-1.3.tar.gz 1382474 SHA256 81baba387538f62a24af1e69ec26b2a62aafd9b4c1841dd952a9ddb25cdf5348 SHA512 6fdc0c00449519304e0e0da09cabee6f096100ce8054213ca48f5093629328b5f2b6d45215edbbf5419e34189b456eac1389b561840077b3b8320461a1591762 WHIRLPOOL 7989d53468e5f94a4ae5d160feb928c11790d381c5395e97eea2e5e715f76a7c95bfff34f3879cfc5bed2a5d29a3140cd8c978c3a08757cd5efd933363fc9489
diff --git a/media-gfx/photoqt/files/photo-0.7.1.1-install-desktop.patch b/media-gfx/photoqt/files/photo-0.7.1.1-install-desktop.patch
new file mode 100644
index 000000000000..4814a4199b07
--- /dev/null
+++ b/media-gfx/photoqt/files/photo-0.7.1.1-install-desktop.patch
@@ -0,0 +1,22 @@
+diff -burN photo-0.7.1.1-orig/CMakeLists.txt photo-0.7.1.1/CMakeLists.txt
+--- photo-0.7.1.1-orig/CMakeLists.txt 2012-04-29 20:38:49.374650243 +0800
++++ photo-0.7.1.1/CMakeLists.txt 2012-04-29 21:00:03.237838770 +0800
+@@ -28,7 +28,7 @@
+ if(UNIX)
+
+ # find xdg-desktop-menu and xdg-mime
+- find_program(XDG-DESKTOP-MENU_EXECUTABLE xdg-desktop-menu)
++ #find_program(XDG-DESKTOP-MENU_EXECUTABLE xdg-desktop-menu)
+
+ # Set the install prefix to /usr/
+ SET(PRODUCT_INSTALL_PREFIX /usr)
+@@ -41,7 +41,8 @@
+
+ # Install desktop file
+ INSTALL(
+- CODE "execute_process(COMMAND ${XDG-DESKTOP-MENU_EXECUTABLE} install --novendor ${CMAKE_CURRENT_SOURCE_DIR}/photo.desktop)"
++ FILES photo.desktop
++ DESTINATION share/applications/
+ )
+
+ # And install all the icons
diff --git a/media-gfx/photoqt/metadata.xml b/media-gfx/photoqt/metadata.xml
new file mode 100644
index 000000000000..417b83ed5733
--- /dev/null
+++ b/media-gfx/photoqt/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name='exiv2'>
+ Use <pkg>media-gfx/exiv2</pkg> as optional dependency
+ </flag>
+ <flag name='graphicsmagick'>
+ Use <pkg>media-gfx/graphicsmagick</pkg> as optional dependency
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/photoqt/photoqt-0.8-r1.ebuild b/media-gfx/photoqt/photoqt-0.8-r1.ebuild
new file mode 100644
index 000000000000..0328224dd1c3
--- /dev/null
+++ b/media-gfx/photoqt/photoqt-0.8-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="Simple but powerful Qt-based image viewer"
+HOMEPAGE="http://photoqt.org/"
+SRC_URI="http://photoqt.org/oldRel/photo-${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtsql:4
+ media-gfx/exiv2:="
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/photo-0.7.1.1-install-desktop.patch"
+)
+
+S=${WORKDIR}/photo-${PV}
diff --git a/media-gfx/photoqt/photoqt-1.0.ebuild b/media-gfx/photoqt/photoqt-1.0.ebuild
new file mode 100644
index 000000000000..2f1eb8ca4da8
--- /dev/null
+++ b/media-gfx/photoqt/photoqt-1.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="Simple but powerful Qt-based image viewer"
+HOMEPAGE="http://photoqt.org/"
+SRC_URI="http://photoqt.org/oldRel/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="exiv2 graphicsmagick" # phonon"
+
+DEPEND="dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtsql:4
+ exiv2? ( media-gfx/exiv2:= )
+ graphicsmagick? ( media-gfx/graphicsmagick:= )"
+# phonon? ( || ( media-libs/phonon dev-qt/qtphonon ) )" # fails to compile
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # make desktop file validate; needs more work
+ echo ';' >> "${S}"/${PN}.desktop || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use exiv2 EXIV2)
+ $(cmake-utils_use graphicsmagick GM)
+ -DPHONON=OFF
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-gfx/photoqt/photoqt-1.1.0.1.ebuild b/media-gfx/photoqt/photoqt-1.1.0.1.ebuild
new file mode 100644
index 000000000000..2b2336e58333
--- /dev/null
+++ b/media-gfx/photoqt/photoqt-1.1.0.1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="Simple but powerful Qt-based image viewer"
+HOMEPAGE="http://photoqt.org/"
+SRC_URI="http://photoqt.org/pkgs/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="graphicsmagick exiv2"
+
+RDEPEND="dev-qt/qtgui:5
+ dev-qt/qtimageformats:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtsql:5
+ dev-qt/qtwidgets:5
+ exiv2? ( media-gfx/exiv2:= )
+ graphicsmagick? ( media-gfx/graphicsmagick )"
+DEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use graphicsmagick GM)
+ $(cmake-utils_use exiv2 EXIV2)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ MAKEOPTS+=" -j1" cmake-utils_src_compile
+}
diff --git a/media-gfx/photoqt/photoqt-1.2.ebuild b/media-gfx/photoqt/photoqt-1.2.ebuild
new file mode 100644
index 000000000000..a24f72df62b6
--- /dev/null
+++ b/media-gfx/photoqt/photoqt-1.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="Simple but powerful Qt-based image viewer"
+HOMEPAGE="http://photoqt.org/"
+SRC_URI="http://photoqt.org/pkgs/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="graphicsmagick exiv2"
+
+RDEPEND="dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtimageformats:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtsql:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ exiv2? ( media-gfx/exiv2:= )
+ graphicsmagick? ( media-gfx/graphicsmagick )"
+DEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use graphicsmagick GM)
+ $(cmake-utils_use exiv2 EXIV2)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ MAKEOPTS+=" -j1" cmake-utils_src_compile
+}
diff --git a/media-gfx/photoqt/photoqt-1.3.ebuild b/media-gfx/photoqt/photoqt-1.3.ebuild
new file mode 100644
index 000000000000..f3c87c8c3fe7
--- /dev/null
+++ b/media-gfx/photoqt/photoqt-1.3.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="Simple but powerful Qt-based image viewer"
+HOMEPAGE="http://photoqt.org/"
+SRC_URI="http://photoqt.org/pkgs/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="graphicsmagick exiv2"
+
+RDEPEND="dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtimageformats:5
+ dev-qt/qtmultimedia:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtquickcontrols:5
+ dev-qt/qtsql:5
+ dev-qt/qtsvg:5
+ dev-qt/qtwidgets:5
+ exiv2? ( media-gfx/exiv2:= )
+ graphicsmagick? ( media-gfx/graphicsmagick )"
+DEPEND="${RDEPEND}
+ dev-qt/linguist-tools:5"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use graphicsmagick GM)
+ $(cmake-utils_use exiv2 EXIV2)
+ )
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ MAKEOPTS+=" -j1" cmake-utils_src_compile
+}
diff --git a/media-gfx/phototonic/Manifest b/media-gfx/phototonic/Manifest
new file mode 100644
index 000000000000..1092dab6ba3d
--- /dev/null
+++ b/media-gfx/phototonic/Manifest
@@ -0,0 +1,2 @@
+DIST phototonic-1.5.54.tar.xz 160716 SHA256 a84ec02cd03635fd5f2b19deea46eec0c74e6f9fabb24943fcf37bbece1c214e SHA512 a4ce914503a8452bb6d2a2c97cef6c5b4b69e0d8c5a349bd5a68680731b3a9e70a9afa7ff63cb2836aa8d970f074b058627687fa7cdcfb898da13c696c2d6df7 WHIRLPOOL a17369097cdf5ec9efac2cefaee582aafbdbfee0a22ee8395c2824aa16913c10c929e8359fcd70d508400e85d4f30b25fcba7b176fc135a29b43d0e009080883
+DIST phototonic-1.6.6.tar.xz 166448 SHA256 52b11420f2da6637f7b570029f6f6a8052277631e74bb80ad97be47a50c485a3 SHA512 ce1766b120ae27dacd34219943eec092385713e187415a65e59f1d0b94942266b02686377000be07a3a0ad2a0d4d4f19753d150ee6bf3c1ca85fa224eac6ebfd WHIRLPOOL 822c3248d0d1b4e5f3e3a7eec15e11aea598ebb43550601e5483cd6516c42cfd7ae04c79273766c117fc525b837b29a8546a8f272b4d5761e2957e9e6275cc80
diff --git a/media-gfx/phototonic/metadata.xml b/media-gfx/phototonic/metadata.xml
new file mode 100644
index 000000000000..56722af239a3
--- /dev/null
+++ b/media-gfx/phototonic/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <maintainer>
+ <email>yngwin@gentoo.org</email>
+ <name>Ben de Groot</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">oferkv/phototonic</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/phototonic/phototonic-1.5.54.ebuild b/media-gfx/phototonic/phototonic-1.5.54.ebuild
new file mode 100644
index 000000000000..cc3f4daaba73
--- /dev/null
+++ b/media-gfx/phototonic/phototonic-1.5.54.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qmake-utils
+
+DESCRIPTION="Image viewer and organizer"
+HOMEPAGE="http://oferkv.github.io/phototonic/"
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/oferkv/phototonic.git"
+else
+ SRC_URI="http://dev.gentoo.org/~yngwin/distfiles/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="svg tiff"
+
+RDEPEND="dev-qt/qtwidgets:5
+ dev-qt/qtgui:5
+ dev-qt/qtcore:5
+ media-gfx/exiv2:=
+ svg? ( dev-qt/qtsvg:5 )
+ tiff? ( dev-qt/qtimageformats:5 )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake5
+}
+
+src_install() {
+ emake install INSTALL_ROOT="${D}"
+}
diff --git a/media-gfx/phototonic/phototonic-1.6.6.ebuild b/media-gfx/phototonic/phototonic-1.6.6.ebuild
new file mode 100644
index 000000000000..cc3f4daaba73
--- /dev/null
+++ b/media-gfx/phototonic/phototonic-1.6.6.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qmake-utils
+
+DESCRIPTION="Image viewer and organizer"
+HOMEPAGE="http://oferkv.github.io/phototonic/"
+if [[ ${PV} = *9999* ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/oferkv/phototonic.git"
+else
+ SRC_URI="http://dev.gentoo.org/~yngwin/distfiles/${P}.tar.xz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="svg tiff"
+
+RDEPEND="dev-qt/qtwidgets:5
+ dev-qt/qtgui:5
+ dev-qt/qtcore:5
+ media-gfx/exiv2:=
+ svg? ( dev-qt/qtsvg:5 )
+ tiff? ( dev-qt/qtimageformats:5 )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ eqmake5
+}
+
+src_install() {
+ emake install INSTALL_ROOT="${D}"
+}
diff --git a/media-gfx/pictureflow/Manifest b/media-gfx/pictureflow/Manifest
new file mode 100644
index 000000000000..985ea4748f01
--- /dev/null
+++ b/media-gfx/pictureflow/Manifest
@@ -0,0 +1 @@
+DIST pictureflow-0.1.0.tar.gz 10704 SHA256 cae5a13ab5cc05cf2510f38b8559b9b7a855cfe9a2f3a521c2d5f0e39269bb42
diff --git a/media-gfx/pictureflow/metadata.xml b/media-gfx/pictureflow/metadata.xml
new file mode 100644
index 000000000000..383b938a3ff1
--- /dev/null
+++ b/media-gfx/pictureflow/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">pictureflow</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/pictureflow/pictureflow-0.1.0.ebuild b/media-gfx/pictureflow/pictureflow-0.1.0.ebuild
new file mode 100644
index 000000000000..e5c9a1e60fe2
--- /dev/null
+++ b/media-gfx/pictureflow/pictureflow-0.1.0.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+inherit qt4-r2
+
+DESCRIPTION="Qt widget to display images with animated transition effect"
+HOMEPAGE="http://www.qt-apps.org/content/show.php/PictureFlow?content=75348"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~sparc x86"
+IUSE="debug"
+
+DEPEND="dev-qt/qtgui:4"
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/${P}/${PN}-qt"
+
+src_install() {
+ dobin ${PN} || die "dobin failed"
+ cd ..
+ dodoc ChangeLog || die "dodoc failed"
+}
diff --git a/media-gfx/picturewall/Manifest b/media-gfx/picturewall/Manifest
new file mode 100644
index 000000000000..2914a8372581
--- /dev/null
+++ b/media-gfx/picturewall/Manifest
@@ -0,0 +1 @@
+DIST PictureWall_1.0.zip 3265185 SHA256 e7458a6f71b3354fd88ce0656d236e7aafa9736f1d079f417986cf3bc6a39722
diff --git a/media-gfx/picturewall/metadata.xml b/media-gfx/picturewall/metadata.xml
new file mode 100644
index 000000000000..04609cf457fa
--- /dev/null
+++ b/media-gfx/picturewall/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">picturewall</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/picturewall/picturewall-1.0-r1.ebuild b/media-gfx/picturewall/picturewall-1.0-r1.ebuild
new file mode 100644
index 000000000000..fec481e90d7d
--- /dev/null
+++ b/media-gfx/picturewall/picturewall-1.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+MY_PN="PictureWall"
+
+DESCRIPTION="Qt4 picture viewer and image searching tool using google.com"
+HOMEPAGE="http://www.qt-apps.org/content/show.php?content=106101"
+SRC_URI="http://picturewall.googlecode.com/files/${MY_PN}_${PV}.zip"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug doc"
+
+RDEPEND=">=dev-qt/qtcore-4.5.3:4
+ >=dev-qt/qtgui-4.5.3:4
+ >=dev-qt/qtwebkit-4.5.3:4"
+DEPEND="app-arch/unzip
+ ${RDEPEND}"
+
+S=${WORKDIR}/${MY_PN}/${MY_PN}
+
+src_install(){
+ dobin bin/${PN}
+ dodoc ReadMe
+ use doc && dohtml -r doc/html/*
+ make_desktop_entry ${PN} ${MY_PN}
+}
diff --git a/media-gfx/pinta/Manifest b/media-gfx/pinta/Manifest
new file mode 100644
index 000000000000..6f0b8a918b8b
--- /dev/null
+++ b/media-gfx/pinta/Manifest
@@ -0,0 +1,2 @@
+DIST pinta-1.4.tar.gz 1230765 SHA256 fde40f78560aab5a891bf499396db099b86bbd365c1eb81df480b35b4d37d8bb SHA512 7a1abd62a10569aa572ab956a860d1813104e4cc35c800798d78085ff2c66f4bf0583f8270d279d1342959c86cdc9383b93e004e1ee8e96cfc99de45bc9fe79f WHIRLPOOL 71101a513748d8cdd0a46ab2c115b1719cb987d5efc6c1ceb24e4a8a0b12e898218209f310887564279065ac8c69a6e349799c7300f1f0bc2a53e8e15ba9d401
+DIST pinta-1.5-preview-20121118.tar.gz 2373151 SHA256 b7ee93a171d24a37237e5d975a2756bd566b5f2c7e5666e591cf42b1aa278c4d SHA512 a954a7556e7e852e3d7bb6eb6dfcf207ed5b22a42d7f278c38815be2d6feacfd006e945f675d86ca923c4cddbf4b2e39e85e1b24bb7d84be6d87397c1e29a604 WHIRLPOOL fa848ef794fb7c5a90fac2d7a6ad3d5e4fe4f3c1d4ca38fcbabbdedc481058fc90836e8e777f8bc76faec0a864dd86834784ed846838f390bf598be8b659348d
diff --git a/media-gfx/pinta/metadata.xml b/media-gfx/pinta/metadata.xml
new file mode 100644
index 000000000000..dcd2a7bc5583
--- /dev/null
+++ b/media-gfx/pinta/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <maintainer status="active">
+ <email>cameronwhite91@gmail.com</email>
+ </maintainer>
+ <changelog>https://github.com/PintaProject/Pinta/commits/1.3</changelog>
+ <doc lang="en">http://pinta-project.com/HowTo.ashx</doc>
+ <bugs-to>https://bugs.launchpad.net/pinta/+filebug</bugs-to>
+ </upstream>
+ <longdescription lang="en">
+ Pinta is a free, open source drawing/editing program modeled after
+ Paint.NET. Its goal is to provide users with a simple yet powerful
+ way to draw and manipulate images on Linux, Mac, and Windows.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/pinta/pinta-1.4.ebuild b/media-gfx/pinta/pinta-1.4.ebuild
new file mode 100644
index 000000000000..2f27e1e0a1d2
--- /dev/null
+++ b/media-gfx/pinta/pinta-1.4.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit fdo-mime mono
+
+DESCRIPTION="Simple Painting for Gtk"
+HOMEPAGE="http://pinta-project.com"
+SRC_URI="mirror://github/PintaProject/Pinta/${P}.tar.gz"
+
+LICENSE="MIT CC-BY-3.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+COMMON_DEPEND="dev-dotnet/atk-sharp:2
+ dev-dotnet/gdk-sharp:2
+ dev-dotnet/glib-sharp:2
+ dev-dotnet/gtk-sharp:2
+ dev-dotnet/mono-addins[gtk]
+ dev-dotnet/pango-sharp:2
+ dev-lang/mono"
+RDEPEND="${COMMON_DEPEND}
+ x11-libs/cairo[X]
+ x11-libs/gdk-pixbuf[X,jpeg,tiff]
+ x11-themes/gnome-icon-theme"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+}
diff --git a/media-gfx/pinta/pinta-1.5_pre20121118.ebuild b/media-gfx/pinta/pinta-1.5_pre20121118.ebuild
new file mode 100644
index 000000000000..d29ee1c69497
--- /dev/null
+++ b/media-gfx/pinta/pinta-1.5_pre20121118.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit fdo-mime gnome2-utils mono
+
+DESCRIPTION="Simple Painting for Gtk"
+HOMEPAGE="http://pinta-project.com"
+SRC_URI="mirror://github/PintaProject/Pinta/${P/_pre/-preview-}.tar.gz"
+
+LICENSE="MIT CC-BY-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+COMMON_DEPEND="dev-dotnet/atk-sharp:2
+ dev-dotnet/gdk-sharp:2
+ dev-dotnet/glib-sharp:2
+ dev-dotnet/gtk-sharp:2
+ dev-dotnet/mono-addins[gtk]
+ dev-dotnet/pango-sharp:2
+ dev-lang/mono"
+RDEPEND="${COMMON_DEPEND}
+ x11-libs/cairo[X]
+ x11-libs/gdk-pixbuf[X,jpeg,tiff]
+ x11-themes/gnome-icon-theme"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${P%_pre*}
+
+src_prepare() {
+ local i
+ if [[ -n "${LINGUAS+x}" ]] ; then
+ for i in $(cd "${S}"/po ; echo *.po) ; do
+ if ! has ${i%.po} ${LINGUAS} ; then
+ sed -i -e "/po\/${i%.po}.po/{N;N;d;}" Pinta.Install.proj || die
+ fi
+ done
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-gfx/pinta/pinta-9999.ebuild b/media-gfx/pinta/pinta-9999.ebuild
new file mode 100644
index 000000000000..d95905d276f0
--- /dev/null
+++ b/media-gfx/pinta/pinta-9999.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools fdo-mime gnome2-utils git-2 mono
+
+DESCRIPTION="Simple Painting for Gtk"
+HOMEPAGE="http://pinta-project.com"
+EGIT_REPO_URI="git://github.com/PintaProject/Pinta.git"
+
+LICENSE="MIT CC-BY-3.0"
+SLOT="0"
+KEYWORDS=""
+
+COMMON_DEPEND="dev-dotnet/atk-sharp:2
+ dev-dotnet/gdk-sharp:2
+ dev-dotnet/glib-sharp:2
+ dev-dotnet/gtk-sharp:2
+ dev-dotnet/mono-addins[gtk]
+ dev-dotnet/pango-sharp:2
+ dev-lang/mono"
+RDEPEND="${COMMON_DEPEND}
+ x11-libs/cairo[X]
+ x11-libs/gdk-pixbuf[X,jpeg,tiff]
+ x11-themes/gnome-icon-theme"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ virtual/pkgconfig"
+
+src_prepare() {
+ local i
+ if [[ -n "${LINGUAS+x}" ]] ; then
+ for i in $(cd "${S}"/po ; echo *.po) ; do
+ if ! has ${i%.po} ${LINGUAS} ; then
+ sed -i -e "/po\/${i%.po}.po/{N;N;d;}" Pinta.Install.proj || die
+ fi
+ done
+ fi
+ eautoreconf
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-gfx/pixels2pgf/Manifest b/media-gfx/pixels2pgf/Manifest
new file mode 100644
index 000000000000..2a4982459d88
--- /dev/null
+++ b/media-gfx/pixels2pgf/Manifest
@@ -0,0 +1 @@
+DIST pixels2pgf-0.1.tar.bz2 52260 SHA256 d6aa4f92e9a23719e98882b8537137fcd20ca99708bd90e902a47ff259eae1be SHA512 30ae063fcc6fe0a4b2ea98d9a4c90772e6f41d8923b5d0746e1fa22f92832bbca02c33d41fa3032f300c3e7cd866a735337cf0166d29cd39a6346474a3016204 WHIRLPOOL 04ade14cc447e9ebc4a7dd52b373b29f915bba87cf83af5b8ba4fd04ee075f3d28c7ed2cff367632dc76cf783fa8a327333a4cbcf6bc61b3718c7afb3f9f1807
diff --git a/media-gfx/pixels2pgf/metadata.xml b/media-gfx/pixels2pgf/metadata.xml
new file mode 100644
index 000000000000..d0066fcacd73
--- /dev/null
+++ b/media-gfx/pixels2pgf/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <upstream>
+ <maintainer status="active">
+ <email>mgorny@gentoo.org</email>
+ <name>Michał Górny</name>
+ </maintainer>
+ <bugs-to>https://bitbucket.org/mgorny/pixels2pgf/issues/</bugs-to>
+ <remote-id type="bitbucket">mgorny/pixels2pgf</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/pixels2pgf/pixels2pgf-0.1.ebuild b/media-gfx/pixels2pgf/pixels2pgf-0.1.ebuild
new file mode 100644
index 000000000000..45d9eb8d185b
--- /dev/null
+++ b/media-gfx/pixels2pgf/pixels2pgf-0.1.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools-utils
+
+DESCRIPTION="Convert pixel images (e.g. QRCode) to PGF/Tikz rectangles"
+HOMEPAGE="https://github.com/mgorny/pixels2pgf/"
+SRC_URI="mirror://github/mgorny/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/libsdl
+ media-libs/sdl-image"
+DEPEND="${RDEPEND}"
diff --git a/media-gfx/pixels2pgf/pixels2pgf-9999.ebuild b/media-gfx/pixels2pgf/pixels2pgf-9999.ebuild
new file mode 100644
index 000000000000..5e4fa6660278
--- /dev/null
+++ b/media-gfx/pixels2pgf/pixels2pgf-9999.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+#if LIVE
+AUTOTOOLS_AUTORECONF=yes
+EGIT_REPO_URI="http://bitbucket.org/mgorny/${PN}.git"
+
+inherit git-r3
+#endif
+
+inherit autotools-utils
+
+DESCRIPTION="Convert pixel images (e.g. QRCode) to PGF/Tikz rectangles"
+HOMEPAGE="https://bitbucket.org/mgorny/pixels2pgf/"
+SRC_URI="https://www.bitbucket.org/mgorny/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/libsdl
+ media-libs/sdl-image"
+DEPEND="${RDEPEND}"
+#if LIVE
+
+KEYWORDS=
+SRC_URI=
+#endif
diff --git a/media-gfx/pixie/Manifest b/media-gfx/pixie/Manifest
new file mode 100644
index 000000000000..9340d4888798
--- /dev/null
+++ b/media-gfx/pixie/Manifest
@@ -0,0 +1 @@
+DIST Pixie-src-2.2.6.tgz 9993504 SHA256 ffbbc404265aff3d4c0303ec91549708ffba8edefc0368ac119ae2e588f35037
diff --git a/media-gfx/pixie/files/Makefile.shaders b/media-gfx/pixie/files/Makefile.shaders
new file mode 100644
index 000000000000..fbc261c0c9bf
--- /dev/null
+++ b/media-gfx/pixie/files/Makefile.shaders
@@ -0,0 +1,15 @@
+SDRC = ../src/sdrc/sdrc
+SDRCFLAGS +=
+
+%.sdr: %.sl
+ $(SDRC) $(SDRCFLAGS) $<
+
+OBJECT1 := $(wildcard *.sl)
+OBJECT := $(OBJECT1:.sl=.sdr)
+
+all: clean $(OBJECT)
+
+clean:
+ rm -f *.sdr
+
+.PHONY: clean
diff --git a/media-gfx/pixie/files/pixie-2.2.6-autotools.patch b/media-gfx/pixie/files/pixie-2.2.6-autotools.patch
new file mode 100644
index 000000000000..d12de70a67cf
--- /dev/null
+++ b/media-gfx/pixie/files/pixie-2.2.6-autotools.patch
@@ -0,0 +1,22 @@
+--- src/ri/Makefile.in 2009-09-23 18:10:13.414866323 +0200
++++ src/ri/Makefile.in 2009-09-23 18:11:15.629864395 +0200
+@@ -214,7 +214,7 @@
+ host_os = @host_os@
+ host_vendor = @host_vendor@
+ htmldir = @htmldir@
+-includedir = $(prefix)/include
++includedir = @includedir@
+ infodir = @infodir@
+ install_sh = @install_sh@
+ libdir = @libdir@
+--- src/sdr/Makefile.in 2009-09-23 18:14:54.194865868 +0200
++++ src/sdr/Makefile.in 2009-09-23 18:15:18.297863856 +0200
+@@ -199,7 +199,7 @@
+ host_os = @host_os@
+ host_vendor = @host_vendor@
+ htmldir = @htmldir@
+-includedir = $(prefix)/include
++includedir = @includedir@
+ infodir = @infodir@
+ install_sh = @install_sh@
+ libdir = @libdir@
diff --git a/media-gfx/pixie/files/pixie-2.2.6-zlib-1.2.5.2.patch b/media-gfx/pixie/files/pixie-2.2.6-zlib-1.2.5.2.patch
new file mode 100644
index 000000000000..6d022f02fdb1
--- /dev/null
+++ b/media-gfx/pixie/files/pixie-2.2.6-zlib-1.2.5.2.patch
@@ -0,0 +1,73 @@
+http://bugs.gentoo.org/406899
+
+--- src/ri/rib.l
++++ src/ri/rib.l
+@@ -17,7 +17,7 @@
+
+ // Overwrite the YYinput so that it uses libz
+ #undef YY_INPUT
+-#define YY_INPUT(buf, retval, maxlen) if ( (retval = gzread(ribin,buf,maxlen)) < 0) \
++#define YY_INPUT(buf, retval, maxlen) if ( (retval = gzread((gzFile)ribin,buf,maxlen)) < 0) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+
+ #endif
+@@ -223,7 +223,7 @@
+ TRibFile *nextFile = ribStack->next;
+ rib_delete_buffer( YY_CURRENT_BUFFER );
+ #ifdef HAVE_ZLIB
+- gzclose(ribin);
++ gzclose((gzFile)ribin);
+ #else
+ fclose(ribin);
+ #endif
+@@ -243,7 +243,7 @@
+ rib_delete_buffer( YY_CURRENT_BUFFER );
+
+ #ifdef HAVE_ZLIB
+- gzclose(ribin);
++ gzclose((gzFile)ribin);
+ #else
+ fclose(ribin);
+ #endif
+--- src/ri/ribOut.cpp
++++ src/ri/ribOut.cpp
+@@ -162,7 +162,7 @@
+
+ #ifdef HAVE_ZLIB
+ if (outputCompressed) {
+- gzclose(outFile);
++ gzclose((gzFile)outFile);
+ } else {
+ fclose(outFile);
+ }
+--- src/ri/ribOut.h
++++ src/ri/ribOut.h
+@@ -237,7 +237,7 @@
+ const int l = vsprintf(scratch,mes,args);
+
+ #ifdef HAVE_ZLIB
+- if (outputCompressed) gzwrite(outFile,scratch,l);
++ if (outputCompressed) gzwrite((gzFile)outFile,scratch,l);
+ else fwrite(scratch,1,l,outFile);
+ #else
+ fwrite(scratch,1,l,outFile);
+@@ -258,7 +258,7 @@
+ const int l = vsprintf(scratch,mes,args);
+
+ #ifdef HAVE_ZLIB
+- if (outputCompressed) gzwrite(outFile,scratch,l);
++ if (outputCompressed) gzwrite((gzFile)outFile,scratch,l);
+ else fwrite(scratch,1,l,outFile);
+ #else
+ fwrite(scratch,1,l,outFile);
+--- src/ri/rib.y
++++ src/ri/rib.y
+@@ -2940,7 +2940,7 @@
+
+ if (ribin != NULL) {
+ #ifdef HAVE_ZLIB
+- gzclose(ribin);
++ gzclose((gzFile)ribin);
+ #else
+ fclose(ribin);
+ #endif
diff --git a/media-gfx/pixie/metadata.xml b/media-gfx/pixie/metadata.xml
new file mode 100644
index 000000000000..9dc1ecece7da
--- /dev/null
+++ b/media-gfx/pixie/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ <description>Proxying maintainer</description>
+ </maintainer>
+ <maintainer>
+ <email>toffanin.mauro@gmail.com</email>
+ <description>Proxied maintainer</description>
+ </maintainer>
+ <longdescription>
+ Pixie is an open source photorealistic renderer that uses a RenderMan-like
+ interface. Features include programmable shading, motion blur, depth of
+ field, raytracing, scan-line rendering, occlusion culling, global
+ illumination, caustics ...
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">pixie</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/pixie/pixie-2.2.6-r1.ebuild b/media-gfx/pixie/pixie-2.2.6-r1.ebuild
new file mode 100644
index 000000000000..50baf2d88cc7
--- /dev/null
+++ b/media-gfx/pixie/pixie-2.2.6-r1.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+WANT_AUTOMAKE="1.10"
+
+inherit eutils multilib autotools
+
+MY_PN="Pixie"
+S="${WORKDIR}/${MY_PN}"
+
+DESCRIPTION="RenderMan like photorealistic renderer"
+HOMEPAGE="http://pixie.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_PN}-src-${PV}.tgz"
+
+LICENSE="GPL-2"
+IUSE="X static-libs"
+SLOT="0"
+KEYWORDS="amd64 ~ppc sparc x86"
+
+RDEPEND="virtual/jpeg
+ media-libs/tiff
+ media-libs/libpng
+ x11-libs/fltk:1[opengl]
+ media-libs/openexr
+ virtual/opengl
+ sys-libs/zlib
+ X? (
+ x11-libs/libXext
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libxcb
+ x11-libs/libXdmcp
+ x11-libs/libXi
+ x11-libs/libXmu
+ x11-libs/libXt
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-zlib-1.2.5.2.patch
+ # FIX: missing @includedir@
+ # https://sf.net/tracker/?func=detail&aid=2923415&group_id=59462&atid=491094
+ epatch "${FILESDIR}"/${P}-autotools.patch
+ eautoreconf
+
+ # FIX: removing pre-compiled shaders
+ # shaders must be removed before of their compilation or make
+ # parallelism can break the regeneration process, with resulting
+ # missing shaders.
+ rm "${S}"/shaders/*.sdr
+}
+
+src_configure() {
+ # NOTE: the option program-transform-name is used to avoid binary name
+ # conflict with package: mail-client/nmh (see #295996)
+ econf \
+ $(use_with X x) \
+ $(use_enable static-libs static) \
+ --includedir=/usr/include/pixie \
+ --libdir=/usr/$(get_libdir)/pixie \
+ --with-docdir=/usr/share/doc/${PF}/html \
+ --with-shaderdir=/usr/share/Pixie/shaders \
+ --with-ribdir=/usr/share/Pixie/ribs \
+ --with-texturedir=/usr/share/Pixie/textures \
+ --with-displaysdir=/usr/$(get_libdir)/pixie/displays \
+ --with-modulesdir=/usr/$(get_libdir)/pixie/modules \
+ --enable-openexr-threads \
+ --disable-static-fltk \
+ --mandir=/usr/share/man \
+ --bindir=/usr/bin \
+ --program-transform-name="s/show/pixie-show/"
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ # regenerating Pixie shaders - see upstream bug report:
+ # https://sf.net/tracker/?func=detail&aid=2923407&group_id=59462&atid=491094
+ einfo "Re-building Pixie Shaders for v${PV} format"
+ emake -f "${FILESDIR}/Makefile.shaders" -C "${S}/shaders" || die "shaders rebuild failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "installation failed."
+
+ insinto /usr/share/Pixie/textures
+ doins "${S}"/textures/*
+
+ # remove useless .la files
+ find "${D}" -name '*.la' -delete || die "removal of libtool archive files failed"
+
+ dodoc README AUTHORS ChangeLog || die
+}
diff --git a/media-gfx/plantuml/Manifest b/media-gfx/plantuml/Manifest
new file mode 100644
index 000000000000..bb0b9cc3efc2
--- /dev/null
+++ b/media-gfx/plantuml/Manifest
@@ -0,0 +1 @@
+DIST plantuml-7999.tar.gz 977426 SHA256 9d080cb0d888c0889a8a15b7163f478d426082f05e24d70069f7d5aef51db313 SHA512 e54af0ef7cf593939c82d7a2a6260d3d776a98684c1a8553813ea4e7bdfae43a3ece9d2358fe16121b5ff0173ec7eae3270cd5239d8b8b3b51b57605bbc34d46 WHIRLPOOL 89c09036d35467a622b400f1979056f61b9f7c5217f5e93f0b537399e40cd0af3001a9f6240eb880656c3dcd76cc470ea38ccfd7594f7a9106bc29e6e5a15ed8
diff --git a/media-gfx/plantuml/metadata.xml b/media-gfx/plantuml/metadata.xml
new file mode 100644
index 000000000000..cbdad507dd9f
--- /dev/null
+++ b/media-gfx/plantuml/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pva@gentoo.org</email>
+ <name>Peter Volkov</name>
+ </maintainer>
+ <herd>java</herd>
+ <longdescription lang="en">
+ PlantUMLis a component that allows to quickly write: sequence diagram, use
+ case diagram, class diagram, activity diagram, component diagram, state
+ diagram, object diagram and wireframe graphical interface.
+
+ Diagrams are defined in a text file using a simple and intuitive language.
+ This can be used within many other tools. Images can be generated in PNG
+ or SVG format. It is also possible to generate ASCII art diagrams (only for
+ sequence diagrams).
+ </longdescription>
+ <upstream>
+ <remote-id type="sourceforge">plantuml</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/plantuml/plantuml-7999.ebuild b/media-gfx/plantuml/plantuml-7999.ebuild
new file mode 100644
index 000000000000..8623cdb97282
--- /dev/null
+++ b/media-gfx/plantuml/plantuml-7999.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+JAVA_PKG_IUSE="source"
+inherit java-pkg-2 java-ant-2
+
+DESCRIPTION="PlantUML is used to draw UML diagram, using a simple and human readable text description"
+HOMEPAGE="http://plantuml.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+ >=virtual/jdk-1.6
+"
+RDEPEND="
+ >=virtual/jre-1.6
+ >=media-gfx/graphviz-2.26.3
+"
+
+EANT_BUILD_TARGET="dist"
+EANT_GENTOO_CLASSPATH="ant-core"
+JAVA_ANT_REWRITE_CLASSPATH="true"
+
+src_install() {
+ java-pkg_dojar ${PN}.jar
+ java-pkg_dolauncher ${PN} --jar ${PN}.jar
+ use source && java-pkg_dosrc src/*
+}
diff --git a/media-gfx/png2ico/Manifest b/media-gfx/png2ico/Manifest
new file mode 100644
index 000000000000..e21800f420b2
--- /dev/null
+++ b/media-gfx/png2ico/Manifest
@@ -0,0 +1 @@
+DIST png2ico-src-2002-12.08.tar.gz 26527 SHA256 d6bc2b8f9dacfb8010e5f5654aaba56476df18d88e344ea1a32523bb5843b68e SHA512 f9410d2d15a14b5350cab7bf93f91b80f9e1d0b6a1fdae8b8850d11f29c9f4000bc8c3778fe24acec75f1f182d5ea383cff38e22b8ac5da6432c0a7a2d0e3208 WHIRLPOOL 66e73ec1ec91761552a832812b30862488a2fa305f22e2ed37d44533350c44bbec8bf3015ad75fe85ef76a083c1f9e82c722a2a1ab4160cf87b2ce9a7d1c3ead
diff --git a/media-gfx/png2ico/files/png2ico-2002.12.08-memset_and_strcmp.patch b/media-gfx/png2ico/files/png2ico-2002.12.08-memset_and_strcmp.patch
new file mode 100644
index 000000000000..96720bebd18f
--- /dev/null
+++ b/media-gfx/png2ico/files/png2ico-2002.12.08-memset_and_strcmp.patch
@@ -0,0 +1,13 @@
+png2ico.cpp:133:31: error: ‘memset’ was not declared in this scope
+png2ico.cpp:443:34: error: ‘strcmp’ was not declared in this scope
+
+--- png2ico.cpp
++++ png2ico.cpp
+@@ -33,6 +33,7 @@
+
+
+ #include <cstdio>
++#include <cstring>
+ #include <vector>
+ #include <climits>
+
diff --git a/media-gfx/png2ico/metadata.xml b/media-gfx/png2ico/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/png2ico/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/png2ico/png2ico-2002.12.08.ebuild b/media-gfx/png2ico/png2ico-2002.12.08.ebuild
new file mode 100644
index 000000000000..d759357eb01e
--- /dev/null
+++ b/media-gfx/png2ico/png2ico-2002.12.08.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="PNG to icon converter"
+HOMEPAGE="http://winterdrache.de/freeware/png2ico/index.html"
+SRC_URI="http://winterdrache.de/freeware/${PN}/data/${PN}-src-${PV/./-}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/libpng:0=
+ sys-libs/zlib:="
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-memset_and_strcmp.patch
+
+ sed -i \
+ -e 's:CPPFLAGS=-W -Wall -O2:CXXFLAGS+=-W -Wall:' \
+ -e 's:g++ $(CPPFLAGS):$(CXX) $(LDFLAGS) $(CXXFLAGS):' \
+ Makefile || die
+}
+
+src_compile() {
+ tc-export CXX
+ emake DEBUG=""
+}
+
+src_install() {
+ dobin png2ico
+ dodoc doc/bmp.txt README
+ doman doc/png2ico.1
+}
diff --git a/media-gfx/pngcheck/Manifest b/media-gfx/pngcheck/Manifest
new file mode 100644
index 000000000000..73cc71e5433b
--- /dev/null
+++ b/media-gfx/pngcheck/Manifest
@@ -0,0 +1 @@
+DIST pngcheck-2.3.0.tar.gz 59864 SHA256 77f0a039ac64df55fbd06af6f872fdbad4f639d009bbb5cd5cbe4db25690f35f SHA512 d099a360d41fc553e9ea02e56ae9812a4a72f3b7f1cd73c021fdb0b9233bb247e100b95fe8e297a2dcdd1bb996128a365794cb8f5702e5c93618af03f18140ad WHIRLPOOL 21c097b90c87bfb1a7dd4324c4c8109adc4e4d1835b31bcb31ba21443ce16409947a3588619136890fb7600dab232c99903fa72c59e5e3a885230f5cd9ca6a4d
diff --git a/media-gfx/pngcheck/metadata.xml b/media-gfx/pngcheck/metadata.xml
new file mode 100644
index 000000000000..8e5a86cf66d2
--- /dev/null
+++ b/media-gfx/pngcheck/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">png-mng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/pngcheck/pngcheck-2.3.0.ebuild b/media-gfx/pngcheck/pngcheck-2.3.0.ebuild
new file mode 100644
index 000000000000..7293de435f26
--- /dev/null
+++ b/media-gfx/pngcheck/pngcheck-2.3.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit toolchain-funcs
+
+DESCRIPTION="verifies the integrity of PNG, JNG and MNG files with internal checksums"
+HOMEPAGE="http://www.libpng.org/pub/png/apps/pngcheck.html"
+SRC_URI="mirror://sourceforge/png-mng/${P}.tar.gz"
+
+LICENSE="HPND GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+src_compile() {
+ emake -f Makefile.unx \
+ CC="$(tc-getCC)" \
+ CFLAGS="${LDFLAGS} ${CFLAGS} -DUSE_ZLIB" \
+ ZLIB="-lz" || die
+}
+
+src_install() {
+ dobin png{check,split,-fix-IDAT-windowsize} || die
+ dodoc CHANGELOG README
+}
diff --git a/media-gfx/pngcrush/Manifest b/media-gfx/pngcrush/Manifest
new file mode 100644
index 000000000000..0d244a028c30
--- /dev/null
+++ b/media-gfx/pngcrush/Manifest
@@ -0,0 +1,6 @@
+DIST pngcrush-1.7.81-nolib.tar.xz 59400 SHA256 37a8d0097b5f1e8eedf99caf2db899b9496a4324bd21a4cfd8d19e69e5047163 SHA512 6539a00f0aa20aaf2553892f181634b8b97751a30516e7b64e4a7e0c4730b0286eb54736db8cc7852a4b721b7ae7665b4d8427bca3023eb3e8a012d53dcb8f67 WHIRLPOOL 75b5cb9dc1f7c49fe97d95b1ad73ea5a78f0c4d481f330eec3e6219bd9a3ae8433badd0076ffba76de7b6664551fb1789d7a9d7b17094da221f795e4dd2b83fb
+DIST pngcrush-1.7.81.tar.xz 359140 SHA256 f9575468941c5e8b406fabcd829b7ed3b9c6bda71b9e78cd1cdc6c088958ecde SHA512 04eb047ad711c49b053649f0ff29640a5df4151c5a96e8e695e045ade06e5ca6f419a8eb989921597f80454438f11503c9487a4fbe33bdc34477f7c20ccb5659 WHIRLPOOL 13f495354d6392675a31cbe77484c87175421c06b2190b09b6dbe2681b7fe54f399ff72ffe1ccf7aaec448ebbe7193c9d34d71446585d8a07e8643ce8fc14c1b
+DIST pngcrush-1.7.85-nolib.tar.xz 59828 SHA256 296cef699cac7b23c02f5458e4fd7fe3b07ee4748a69928c7d51743198f56cc3 SHA512 7b959fc6a8839fb0dab6471b13e866e11d5fefa072d6b135c7f621bd4b475765c2e8d0b471f074b6df7d6ccd8b5c33938e1143fb2e013986c4e8e5fada68c8ca WHIRLPOOL eb721a1772b6d8eb289ce76b2a9e5b13e3352a1db691e8113665d64424f8f0d946c1696f5831fdc1831604b6886fcfc128ef4e123165c358b6ac0f1a162d631c
+DIST pngcrush-1.7.85.tar.xz 359588 SHA256 d285f87f2d24e03d99b0340708952de342ca404e90782ce44bfb394a4d0d9dbc SHA512 0f9f9e99817fe4f4915d5a5a2469106a02e90b6ea7911a562b8412d4a15bed9668ac7eb8d47abfeb4646882fac44e4606d73296c8c088c8c01ec1f10164eefd5 WHIRLPOOL 953bff70af591c1690a8d74861bb84ab527e3101d8db1bd25e0b48c2623798dc3b343e68db93aa2683a1ff8fcde74b22d8828906b882c4f322479f10252730c5
+DIST pngcrush-1.7.86-nolib.tar.xz 60024 SHA256 135cb6cf0607b5b72152c0eb2cbd1db9722f333ec4f8e166c7ef96db8eeadece SHA512 dfb7d0e63c815f8855fdb4f1479a0152d824b9538880896182f605fbae63ea917bba4473955da1788182b9c2582e02e135cf021a196a027afe3010ef1e47d2f0 WHIRLPOOL 1b9f028fd5ff9c2f5d9698435c904b2ccecc90762ebf7066dafdbfa1055685a2cfe7f89c1cad28e3e0041cb05976c0fb5a3cca3b7c2381f2c484fb6fdabcd30b
+DIST pngcrush-1.7.86.tar.xz 358656 SHA256 7bf1c1e81b6d14bf1cfce5447dba487f0895525fc62ae02714baa1dcc90f9550 SHA512 55c6b4b449561ba693d891a7f2996fb9ea54dd0e8727b5e0a9a6b880fdad82de2346690b24347e922e265298ee438a2d69ea454142b855e26b0eaf8c14a9d4db WHIRLPOOL d2d670917a12af978508776b028ee73fd18000149222018e39510d0ae66fca6fbf564a82d0ecf5931dd829d9d31f5600e52f7469b23b99d772f5072343c65820
diff --git a/media-gfx/pngcrush/metadata.xml b/media-gfx/pngcrush/metadata.xml
new file mode 100644
index 000000000000..bbdda004cb79
--- /dev/null
+++ b/media-gfx/pngcrush/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <maintainer status="active">
+ <email>glennrp@gmail.com</email>
+ <name>Glenn Randers-Pehrson</name>
+ </maintainer>
+ <bugs-to>http://sourceforge.net/tracker/?group_id=1689</bugs-to>
+ <remote-id type="sourceforge">pmt</remote-id>
+ </upstream>
+ <use>
+ <flag name="system-libs">Use libpng and libz provided by system</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/pngcrush/pngcrush-1.7.81.ebuild b/media-gfx/pngcrush/pngcrush-1.7.81.ebuild
new file mode 100644
index 000000000000..65f64f08c1cd
--- /dev/null
+++ b/media-gfx/pngcrush/pngcrush-1.7.81.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Portable Network Graphics (PNG) optimizing utility"
+HOMEPAGE="http://pmt.sourceforge.net/pngcrush/"
+SRC_URI="system-libs? ( mirror://sourceforge/pmt/${P}-nolib.tar.xz )
+ !system-libs? ( mirror://sourceforge/pmt/${P}.tar.xz )"
+
+LICENSE="pngcrush"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+system-libs"
+
+RDEPEND="
+ system-libs? (
+ >=media-libs/libpng-1.5:0=
+ sys-libs/zlib:=
+ )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+pkg_setup() {
+ use system-libs && S+="-nolib"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} -Wall" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ dohtml ChangeLog.html
+}
diff --git a/media-gfx/pngcrush/pngcrush-1.7.85.ebuild b/media-gfx/pngcrush/pngcrush-1.7.85.ebuild
new file mode 100644
index 000000000000..5e107fd4c8a0
--- /dev/null
+++ b/media-gfx/pngcrush/pngcrush-1.7.85.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Portable Network Graphics (PNG) optimizing utility"
+HOMEPAGE="http://pmt.sourceforge.net/pngcrush/"
+SRC_URI="system-libs? ( mirror://sourceforge/pmt/${P}-nolib.tar.xz )
+ !system-libs? ( mirror://sourceforge/pmt/${P}.tar.xz )"
+
+LICENSE="pngcrush"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+system-libs"
+
+RDEPEND="
+ system-libs? (
+ media-libs/libpng:0=
+ sys-libs/zlib:=
+ )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+pkg_setup() {
+ use system-libs && S+="-nolib"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} ${CPPFLAGS} -Wall" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ dohtml ChangeLog.html
+}
diff --git a/media-gfx/pngcrush/pngcrush-1.7.86.ebuild b/media-gfx/pngcrush/pngcrush-1.7.86.ebuild
new file mode 100644
index 000000000000..5e107fd4c8a0
--- /dev/null
+++ b/media-gfx/pngcrush/pngcrush-1.7.86.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="Portable Network Graphics (PNG) optimizing utility"
+HOMEPAGE="http://pmt.sourceforge.net/pngcrush/"
+SRC_URI="system-libs? ( mirror://sourceforge/pmt/${P}-nolib.tar.xz )
+ !system-libs? ( mirror://sourceforge/pmt/${P}.tar.xz )"
+
+LICENSE="pngcrush"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="+system-libs"
+
+RDEPEND="
+ system-libs? (
+ media-libs/libpng:0=
+ sys-libs/zlib:=
+ )"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils"
+
+pkg_setup() {
+ use system-libs && S+="-nolib"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getCC)" \
+ CFLAGS="${CFLAGS} ${CPPFLAGS} -Wall" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ dohtml ChangeLog.html
+}
diff --git a/media-gfx/pngnq/Manifest b/media-gfx/pngnq/Manifest
new file mode 100644
index 000000000000..e2cba9d9d917
--- /dev/null
+++ b/media-gfx/pngnq/Manifest
@@ -0,0 +1 @@
+DIST pngnq-1.1.tar.gz 117372 SHA256 c147fe0a94b32d323ef60be9fdcc9b683d1a82cd7513786229ef294310b5b6e2 SHA512 3bbc4ace1375517a7a73bbc65ff39512ef316e4b67fc3941cd0b7269e584a26f915f30591f8aa1c44eea73fe4ebe9519063a7bc426841e412c648aaa188be234 WHIRLPOOL 7d9ef79ed10d452cae47262104258210b0d51f898c477dd3d6d6ef23c7cde577c15e7b29ada4b14217bc4005a8efea2ee244b0eefa9e5bfc95adf812d133eb6d
diff --git a/media-gfx/pngnq/files/pngnq-1.0-libpng14.patch b/media-gfx/pngnq/files/pngnq-1.0-libpng14.patch
new file mode 100644
index 000000000000..e2eb9c8972e5
--- /dev/null
+++ b/media-gfx/pngnq/files/pngnq-1.0-libpng14.patch
@@ -0,0 +1,13 @@
+http://aur.archlinux.org/packages.php?ID=10325
+
+--- src/rwpng.c
++++ src/rwpng.c
+@@ -80,7 +80,7 @@
+ * have used slightly more general png_sig_cmp() function instead */
+
+ fread(sig, 1, 8, infile);
+- if (!png_check_sig(sig, 8)) {
++ if (png_sig_cmp(sig, 0, 8)) {
+ mainprog_ptr->retval = 21; /* bad signature */
+ return mainprog_ptr->retval;
+ }
diff --git a/media-gfx/pngnq/files/pngnq-1.0-libpng15.patch b/media-gfx/pngnq/files/pngnq-1.0-libpng15.patch
new file mode 100644
index 000000000000..7590431dcd3a
--- /dev/null
+++ b/media-gfx/pngnq/files/pngnq-1.0-libpng15.patch
@@ -0,0 +1,13 @@
+--- src/rwpng.c
++++ src/rwpng.c
+@@ -31,8 +31,9 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <zlib.h>
+
+-#include "png.h" /* libpng header; includes zlib.h */
++#include "png.h" /* libpng header */
+ #include "rwpng.h" /* typedefs, common macros, public prototypes */
+
+ /* future versions of libpng will provide this macro: */
diff --git a/media-gfx/pngnq/metadata.xml b/media-gfx/pngnq/metadata.xml
new file mode 100644
index 000000000000..cb1ed53807e7
--- /dev/null
+++ b/media-gfx/pngnq/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">pngnq</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/pngnq/pngnq-1.1.ebuild b/media-gfx/pngnq/pngnq-1.1.ebuild
new file mode 100644
index 000000000000..5fdee99da3af
--- /dev/null
+++ b/media-gfx/pngnq/pngnq-1.1.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+WANT_AUTOMAKE=1.13
+inherit autotools eutils
+
+DESCRIPTION="Pngnq is a tool for quantizing PNG images in RGBA format"
+HOMEPAGE="http://pngnq.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD pngnq rwpng"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="media-libs/libpng:0="
+DEPEND=${RDEPEND}
+
+DOCS=( NEWS README )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0-libpng1{4,5}.patch
+ eautoreconf
+}
diff --git a/media-gfx/pngquant/Manifest b/media-gfx/pngquant/Manifest
new file mode 100644
index 000000000000..9b4bea02e3c9
--- /dev/null
+++ b/media-gfx/pngquant/Manifest
@@ -0,0 +1,6 @@
+DIST pngquant-1.8.2-src.tar.bz2 31901 SHA256 a51924ad141c010516e46122e84c6d1882d26b7e984900aaa107d74274e1a396 SHA512 394688ea754be781f96372a793c4186d35014dc1fc3b974e2335542d0aaaebe811bd4db5c34f7d7ec492aa38ff8b46c43a6ce77dc78483c4d43afb8aef8ba708 WHIRLPOOL 1904afa05206b11458fe54889cfacee0267f85379186e1cd344a4dc8411598e79e1950a90e1f997b212e0a5b8ed3c13acfce36a2300e0afa295c0eac361d44fa
+DIST pngquant-1.8.3-src.tar.bz2 32287 SHA256 e3d18b12ddf4ee159a696408b147d667674e52121f11660fc15ce3967dd053b9 SHA512 6a123722d1b035fd9cff51004ab222e5d6cc09890cdc440683609b187d492a24f924fec7b15201c8c4bff84bb3891d7f17a99fd24714b71d4ab3c8ac5c3cfc38 WHIRLPOOL a799e840e645c6bd5ec4ce118d5af8b263f3d1ca0ed898ed447bee8ffa98d61eb97eab392cd7db0440600568809891b9cac1c033cfecac65d0c36bca446f469f
+DIST pngquant-2.0.2-src.tar.bz2 45160 SHA256 e1988b18cab1efb889224ac1d640510f09464b5b6fd43beb5edcb161b67db96f SHA512 9e7f652c8e32d408e3f2ccd7854961d8b49e3517f847018cddb9ed415f4bc820c00d27a15760222af33e631a2023c57c420ca306a56f717d2de526da4b5670b8 WHIRLPOOL f0af27fbd3d172677b5cae0bf20d13b71a66fb7738c3b9576b19b785a29b6cd77c21935b3aeb51230696cfb05f4495eca2977d885d616e344f0bf2be079e3621
+DIST pngquant-2.1.0-src.tar.bz2 46435 SHA256 ef41138ff320495c785155eb9f774ae6e1d41978b3e490854e6a8c46c0b032e2 SHA512 277c8fdb07e3eb2fa3643787b2442fc35f17b955e90a5e496aacd87c791ea2ae9fd0c9734cccf5bdc8bc7bc633ea42d6ff94dcb410ad0bfce83c619fff8d83df WHIRLPOOL d277027232fc96f37a7e3e3aacfad4f2bf5ec0cbaa46b67dd291d88075c5794918a3d1a24bbb345def79fb2b0669bdcbd6b547099abe6b15aa877ef17edec5c4
+DIST pngquant-2.2.0-src.tar.bz2 49041 SHA256 7ee202f26270bb0ea8ad6f9a2fc2517ffca2bcded3dfdbd3b99692dcc72e5d11 SHA512 58ab515f1b3a12d95edc597b088f026668be3d022e753ddaf2e9474dd9feaaad9f0362b1b7ad0951ffe27b00fa7940e555372b404a52b79398e06e3c533b584c WHIRLPOOL b3aa2269771e94262badd396766b472d65b310b17c1a733b91059a61194f612f20b9fc9e34bab6015d228d24f1fa7ec5b17327131e2ea5afcbe7787cb0ce316a
+DIST pngquant-2.3.3-src.tar.bz2 53274 SHA256 522d8d4255dbba7ee7b0edd4cadd387a819eae925f4a0679278c3295430b78d6 SHA512 b772d7d887cb1e52ca4c61fd55aba08f8b1f1b2edf45fcb17411e127cfc7a89afc2f12ef91ad9d690c216ba20cabd6e04fca465622a97f9fd538fb720acd9bba WHIRLPOOL d2eb753723bdbda9649dd3fe4b05333c4d3f2aec4e32f9b19612110c1f99020a7e2d544012205b0caf7aa04b3f3f3ebb1a7844b663606bca9c8f07a3eda3ba2a
diff --git a/media-gfx/pngquant/files/pngquant-1.8.3-libpng16.patch b/media-gfx/pngquant/files/pngquant-1.8.3-libpng16.patch
new file mode 100644
index 000000000000..edf089ff9678
--- /dev/null
+++ b/media-gfx/pngquant/files/pngquant-1.8.3-libpng16.patch
@@ -0,0 +1,53 @@
+Rename to prevent conflict with png_image from libpng16
+
+http://bugs.gentoo.org/464762
+
+--- rwpng.c
++++ rwpng.c
+@@ -213,7 +213,7 @@
+ }
+
+
+-pngquant_error rwpng_write_image_init(png_image *mainprog_ptr, png_structpp png_ptr_p, png_infopp info_ptr_p, FILE *outfile)
++pngquant_error rwpng_write_image_init(rwpng_png_image *mainprog_ptr, png_structpp png_ptr_p, png_infopp info_ptr_p, FILE *outfile)
+ {
+ /* could also replace libpng warning-handler (final NULL), but no need: */
+
+@@ -277,7 +277,7 @@
+ png_structp png_ptr;
+ png_infop info_ptr;
+
+- pngquant_error retval = rwpng_write_image_init((png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
++ pngquant_error retval = rwpng_write_image_init((rwpng_png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
+ if (retval) return retval;
+
+ // Palette images generally don't gain anything from filtering
+@@ -321,7 +321,7 @@
+ png_structp png_ptr;
+ png_infop info_ptr;
+
+- pngquant_error retval = rwpng_write_image_init((png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
++ pngquant_error retval = rwpng_write_image_init((rwpng_png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
+ if (retval) return retval;
+
+ rwpng_set_gamma(info_ptr, png_ptr, mainprog_ptr->gamma);
+@@ -344,7 +344,7 @@
+
+ static void rwpng_error_handler(png_structp png_ptr, png_const_charp msg)
+ {
+- png_image *mainprog_ptr;
++ rwpng_png_image *mainprog_ptr;
+
+ /* This function, aside from the extra step of retrieving the "error
+ * pointer" (below) and the fact that it exists within the application
+--- rwpng.h
++++ rwpng.h
+@@ -80,7 +80,7 @@
+ jmp_buf jmpbuf;
+ png24_image png24;
+ png8_image png8;
+-} png_image;
++} rwpng_png_image;
+
+ /* prototypes for public functions in rwpng.c */
+
diff --git a/media-gfx/pngquant/metadata.xml b/media-gfx/pngquant/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/pngquant/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/pngquant/pngquant-1.8.2.ebuild b/media-gfx/pngquant/pngquant-1.8.2.ebuild
new file mode 100644
index 000000000000..4fc297a65e52
--- /dev/null
+++ b/media-gfx/pngquant/pngquant-1.8.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs
+
+DESCRIPTION="a command-line utility for converting 24/32-bit PNG images to paletted (8-bit) PNGs"
+HOMEPAGE="http://pngquant.org/"
+SRC_URI="http://pngquant.org/${P}-src.tar.bz2"
+
+LICENSE="HPND rwpng"
+SLOT=0
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="media-libs/libpng:0=
+ sys-libs/zlib:="
+DEPEND=${RDEPEND}
+
+src_prepare() {
+ # Failure in upstream logic. Otherwise we lose the -I and -L flags
+ # from Makefile.
+ sed -i \
+ -e 's:CFLAGS ?=:CFLAGS +=:' \
+ -e 's:LDFLAGS ?=:LDFLAGS +=:' \
+ Makefile || die
+}
+
+src_compile() {
+ tc-export CC
+ emake CFLAGSOPT=''
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr install
+ dodoc CHANGELOG README.md
+}
diff --git a/media-gfx/pngquant/pngquant-1.8.3.ebuild b/media-gfx/pngquant/pngquant-1.8.3.ebuild
new file mode 100644
index 000000000000..ac22a581ce24
--- /dev/null
+++ b/media-gfx/pngquant/pngquant-1.8.3.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="a command-line utility for converting 24/32-bit PNG images to paletted (8-bit) PNGs"
+HOMEPAGE="http://pngquant.org/"
+SRC_URI="http://pngquant.org/${P}-src.tar.bz2"
+
+LICENSE="HPND rwpng"
+SLOT=0
+KEYWORDS="~amd64 ~x86"
+IUSE="debug openmp cpu_flags_x86_sse2"
+
+RDEPEND="media-libs/libpng:0=
+ sys-libs/zlib:="
+DEPEND=${RDEPEND}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng16.patch
+
+ # Failure in upstream logic. Otherwise we lose the -I and -L flags
+ # from Makefile.
+ sed -i \
+ -e 's:CFLAGS ?=:CFLAGS +=:' \
+ -e 's:LDFLAGS ?=:LDFLAGS +=:' \
+ Makefile || die
+}
+
+src_compile() {
+ use debug || append-cflags -DNDEBUG
+ use cpu_flags_x86_sse2 && append-cflags -DUSE_SSE=1
+
+ local openmp
+ if use openmp && tc-has-openmp; then
+ append-cflags -fopenmp
+ openmp="-lgomp"
+ fi
+
+ tc-export CC
+ emake CFLAGSOPT="" OPENMPFLAGS="${openmp}"
+}
+
+src_install() {
+ emake CFLAGSOPT="" DESTDIR="${D}" PREFIX=/usr install
+ dodoc CHANGELOG README.md
+}
diff --git a/media-gfx/pngquant/pngquant-2.0.2.ebuild b/media-gfx/pngquant/pngquant-2.0.2.ebuild
new file mode 100644
index 000000000000..c8f98d53f648
--- /dev/null
+++ b/media-gfx/pngquant/pngquant-2.0.2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="a command-line utility for converting 24/32-bit PNG images to paletted (8-bit) PNGs"
+HOMEPAGE="http://pngquant.org/"
+SRC_URI="http://pngquant.org/${P}-src.tar.bz2"
+
+LICENSE="HPND rwpng"
+SLOT=0
+KEYWORDS="~amd64 ~x86"
+IUSE="debug openmp cpu_flags_x86_sse2"
+
+RDEPEND="media-libs/libpng:0=
+ sys-libs/zlib:="
+DEPEND=${RDEPEND}
+
+src_prepare() {
+ # Failure in upstream logic. Otherwise we lose the -I and -L flags
+ # from Makefile.
+ sed -i \
+ -e 's:CFLAGS ?=:CFLAGS +=:' \
+ -e 's:LDFLAGS ?=:LDFLAGS +=:' \
+ Makefile || die
+}
+
+src_compile() {
+ use debug || append-cflags -DNDEBUG
+ use cpu_flags_x86_sse2 && append-cflags -DUSE_SSE=1
+
+ local openmp
+ if use openmp && tc-has-openmp; then
+ append-cflags -fopenmp
+ openmp="-lgomp"
+ fi
+
+ tc-export CC
+ emake CFLAGSOPT="" OPENMPFLAGS="${openmp}"
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc CHANGELOG README.md
+}
diff --git a/media-gfx/pngquant/pngquant-2.1.0.ebuild b/media-gfx/pngquant/pngquant-2.1.0.ebuild
new file mode 100644
index 000000000000..5b75e93d36f2
--- /dev/null
+++ b/media-gfx/pngquant/pngquant-2.1.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="a command-line utility for converting 24/32-bit PNG images to paletted (8-bit) PNGs"
+HOMEPAGE="http://pngquant.org/"
+SRC_URI="http://pngquant.org/${P}-src.tar.bz2"
+
+LICENSE="HPND rwpng"
+SLOT=0
+KEYWORDS="~amd64 ~x86"
+IUSE="debug openmp cpu_flags_x86_sse2"
+
+RDEPEND="media-libs/libpng:0=
+ sys-libs/zlib:="
+DEPEND=${RDEPEND}
+
+src_prepare() {
+ # Failure in upstream logic. Otherwise we lose the -I and -L flags
+ # from Makefile.
+ sed -i \
+ -e 's:CFLAGS ?=:CFLAGS +=:' \
+ -e 's:LDFLAGS ?=:LDFLAGS +=:' \
+ Makefile || die
+}
+
+src_compile() {
+ use debug || append-cflags -DNDEBUG
+ use cpu_flags_x86_sse2 && append-cflags -DUSE_SSE=1
+
+ local openmp
+ if use openmp && tc-has-openmp; then
+ append-cflags -fopenmp
+ openmp="-lgomp"
+ fi
+
+ tc-export CC
+ emake CFLAGSOPT="" OPENMPFLAGS="${openmp}"
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc CHANGELOG README.md
+}
diff --git a/media-gfx/pngquant/pngquant-2.2.0.ebuild b/media-gfx/pngquant/pngquant-2.2.0.ebuild
new file mode 100644
index 000000000000..5b75e93d36f2
--- /dev/null
+++ b/media-gfx/pngquant/pngquant-2.2.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="a command-line utility for converting 24/32-bit PNG images to paletted (8-bit) PNGs"
+HOMEPAGE="http://pngquant.org/"
+SRC_URI="http://pngquant.org/${P}-src.tar.bz2"
+
+LICENSE="HPND rwpng"
+SLOT=0
+KEYWORDS="~amd64 ~x86"
+IUSE="debug openmp cpu_flags_x86_sse2"
+
+RDEPEND="media-libs/libpng:0=
+ sys-libs/zlib:="
+DEPEND=${RDEPEND}
+
+src_prepare() {
+ # Failure in upstream logic. Otherwise we lose the -I and -L flags
+ # from Makefile.
+ sed -i \
+ -e 's:CFLAGS ?=:CFLAGS +=:' \
+ -e 's:LDFLAGS ?=:LDFLAGS +=:' \
+ Makefile || die
+}
+
+src_compile() {
+ use debug || append-cflags -DNDEBUG
+ use cpu_flags_x86_sse2 && append-cflags -DUSE_SSE=1
+
+ local openmp
+ if use openmp && tc-has-openmp; then
+ append-cflags -fopenmp
+ openmp="-lgomp"
+ fi
+
+ tc-export CC
+ emake CFLAGSOPT="" OPENMPFLAGS="${openmp}"
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc CHANGELOG README.md
+}
diff --git a/media-gfx/pngquant/pngquant-2.3.3.ebuild b/media-gfx/pngquant/pngquant-2.3.3.ebuild
new file mode 100644
index 000000000000..03f708f93ead
--- /dev/null
+++ b/media-gfx/pngquant/pngquant-2.3.3.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit toolchain-funcs
+
+DESCRIPTION="a command-line utility for converting 24/32-bit PNG images to paletted (8-bit) PNGs"
+HOMEPAGE="http://pngquant.org/"
+SRC_URI="http://pngquant.org/${P}-src.tar.bz2"
+
+LICENSE="HPND rwpng"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug lcms openmp cpu_flags_x86_sse2"
+
+RDEPEND="media-libs/libpng:0=
+ sys-libs/zlib:=
+ lcms? ( media-libs/lcms:2 )"
+DEPEND="${RDEPEND}"
+
+src_configure() {
+ tc-export AR CC
+ # Hand rolled configure script, so not all flags are supported.
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ $(use debug && echo --enable-debug) \
+ $(use_enable cpu_flags_x86_sse2 sse) \
+ $(use openmp && tc-has-openmp && echo --with-openmp) \
+ $(use_with lcms lcms2) \
+ CFLAGS="${CFLAGS} ${CPPFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+ dodoc CHANGELOG README.md
+}
diff --git a/media-gfx/pngrewrite/Manifest b/media-gfx/pngrewrite/Manifest
new file mode 100644
index 000000000000..910c6e92cc5b
--- /dev/null
+++ b/media-gfx/pngrewrite/Manifest
@@ -0,0 +1,2 @@
+DIST pngrewrite-1.3.0.zip 105995 RMD160 5909e88b14d2c56e0d5bcfc02f70bcbe959207d7 SHA1 0a2a56c53e7b4cd0502c897092e859e92128d1bd SHA256 497d5b8f9fb096a2f5510711a2c76688998706a32cc93ca1709d238969d7ebc6
+DIST pngrewrite-1.4.0.zip 149760 RMD160 2be74754fba7fd878dd59a84bf17fdef4a74f2be SHA1 c959fbd507d84c6d4544d09493934b268e969b56 SHA256 24c3706bcd55b3f957b2590f1cf19ca4dd3f5bc8310db47e464140ce773a94c3
diff --git a/media-gfx/pngrewrite/files/pngrewrite-1.3.0-gcc44.patch b/media-gfx/pngrewrite/files/pngrewrite-1.3.0-gcc44.patch
new file mode 100644
index 000000000000..e514c5d3fa7c
--- /dev/null
+++ b/media-gfx/pngrewrite/files/pngrewrite-1.3.0-gcc44.patch
@@ -0,0 +1,19 @@
+--- pngrewrite.c.orig 2009-06-01 21:12:19.000000000 +0200
++++ pngrewrite.c 2009-06-01 21:12:29.000000000 +0200
+@@ -89,6 +89,7 @@
+ //#define PNGRW_SUPPORT_1_ARG_MODE
+ #define PNGRW_PALSORT_BY_FREQUENCY
+
++#include <png.h>
+
+ #include <stdio.h>
+ #include <string.h>
+@@ -109,8 +110,6 @@
+ #include <unistd.h> /* for isatty() */
+ #endif
+
+-#include <png.h>
+-
+ struct errstruct {
+ jmp_buf jbuf;
+ char errmsg[200];
diff --git a/media-gfx/pngrewrite/metadata.xml b/media-gfx/pngrewrite/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/pngrewrite/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/pngrewrite/pngrewrite-1.3.0.ebuild b/media-gfx/pngrewrite/pngrewrite-1.3.0.ebuild
new file mode 100644
index 000000000000..0a16a9862390
--- /dev/null
+++ b/media-gfx/pngrewrite/pngrewrite-1.3.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs base
+
+DESCRIPTION="A utility which reduces large palettes in PNG images"
+HOMEPAGE="http://entropymine.com/jason/pngrewrite/"
+SRC_URI="http://entropymine.com/jason/${PN}/${P}.zip"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc sparc x86 ~x86-linux ~ppc-macos"
+IUSE=""
+
+RDEPEND="media-libs/libpng"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+PATCHES=( "${FILESDIR}"/${P}-gcc44.patch )
+
+src_compile() {
+ $(tc-getCC) ${LDFLAGS} ${CFLAGS} ${PN}.c -lpng -o ${PN} \
+ || die "compile failed."
+}
+
+src_install() {
+ dobin ${PN} || die "dobin failed."
+}
diff --git a/media-gfx/pngrewrite/pngrewrite-1.4.0.ebuild b/media-gfx/pngrewrite/pngrewrite-1.4.0.ebuild
new file mode 100644
index 000000000000..9e2ef9f32588
--- /dev/null
+++ b/media-gfx/pngrewrite/pngrewrite-1.4.0.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="A utility which reduces large palettes in PNG images"
+HOMEPAGE="http://entropymine.com/jason/pngrewrite/"
+SRC_URI="http://entropymine.com/jason/${PN}/${P}.zip"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-linux ~ppc-macos"
+IUSE=""
+
+RDEPEND="media-libs/libpng"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}
+
+src_compile() {
+ emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc readme.txt
+}
diff --git a/media-gfx/pngtoico/Manifest b/media-gfx/pngtoico/Manifest
new file mode 100644
index 000000000000..0e7105d2dfbb
--- /dev/null
+++ b/media-gfx/pngtoico/Manifest
@@ -0,0 +1 @@
+DIST pngtoico-1.0.1.tar.bz2 4355 RMD160 a8dc5d1618ed9ba077836357516404ff85f7c5b9 SHA1 5a51a6a9e79a723a0b6b23b7b13a84fb19bf46b4 SHA256 63201bf4abff473ee7056bd1c8f54c5eaaade2d9e42ae04ca7426812d64e522b
diff --git a/media-gfx/pngtoico/files/pngtoico-1.0.1-Makefile.patch b/media-gfx/pngtoico/files/pngtoico-1.0.1-Makefile.patch
new file mode 100644
index 000000000000..77d86dc52446
--- /dev/null
+++ b/media-gfx/pngtoico/files/pngtoico-1.0.1-Makefile.patch
@@ -0,0 +1,15 @@
+--- Makefile 2002-01-01 22:46:46.000000000 +0000
++++ Makefile.new 2002-11-11 01:11:12.000000000 +0000
+@@ -21,9 +21,9 @@
+ man1dir = $(mandir)/man1
+
+ CC = gcc -W -Wall
+-CFLAGS = -O2 -fomit-frame-pointer
+-LDFLAGS = -s
+-LIBS = -lpng
++CFLAGS += -fomit-frame-pointer `libpng-config --cflags`
++LDFLAGS += `libpng-config --ldflags`
++LIBS = `libpng-config --libs`
+ INSTALL = install
+ INSTALL_EXEC = $(INSTALL) -c -m 755
+ INSTALL_DATA = $(INSTALL) -c -m 644
diff --git a/media-gfx/pngtoico/files/pngtoico-1.0.1-libpng15.patch b/media-gfx/pngtoico/files/pngtoico-1.0.1-libpng15.patch
new file mode 100644
index 000000000000..c81b25ade627
--- /dev/null
+++ b/media-gfx/pngtoico/files/pngtoico-1.0.1-libpng15.patch
@@ -0,0 +1,11 @@
+--- pngtoico.c
++++ pngtoico.c
+@@ -188,7 +188,7 @@
+ goto perrexit;
+ }
+
+- if ( setjmp(png_ptr->jmpbuf) ) {
++ if ( setjmp(png_jmpbuf(png_ptr)) ) {
+ fprintf(stderr, "%s: PNG format error\n", file);
+ goto errexit;
+ }
diff --git a/media-gfx/pngtoico/metadata.xml b/media-gfx/pngtoico/metadata.xml
new file mode 100644
index 000000000000..1e88186ac14a
--- /dev/null
+++ b/media-gfx/pngtoico/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>graaff@gentoo.org</email>
+<name>Hans de Graaff</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/pngtoico/pngtoico-1.0.1-r1.ebuild b/media-gfx/pngtoico/pngtoico-1.0.1-r1.ebuild
new file mode 100644
index 000000000000..39f6dafdc1c3
--- /dev/null
+++ b/media-gfx/pngtoico/pngtoico-1.0.1-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Convert png images to MS ico format"
+HOMEPAGE="http://www.kernel.org/pub/software/graphics/pngtoico/"
+SRC_URI="mirror://kernel/software/graphics/pngtoico/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+RDEPEND=">=media-libs/libpng-1.4"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-Makefile.patch \
+ "${FILESDIR}"/${P}-libpng15.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ dobin ${PN}
+ doman ${PN}.1
+}
diff --git a/media-gfx/pngtools/Manifest b/media-gfx/pngtools/Manifest
new file mode 100644
index 000000000000..1abdd48f436a
--- /dev/null
+++ b/media-gfx/pngtools/Manifest
@@ -0,0 +1 @@
+DIST pngtools_0_4.tgz 1312178 RMD160 10553ce0f4ec956d8996c2325b6a9a741124ad54 SHA1 bc8b4953fbdf993f5837e2df510d2341e0ab7d54 SHA256 da0035d140c5efbc7d42d95a27327928d982866851c4c67bac58d32936075655
diff --git a/media-gfx/pngtools/files/pngtools-0.3-implicit-declarations.patch b/media-gfx/pngtools/files/pngtools-0.3-implicit-declarations.patch
new file mode 100644
index 000000000000..682bcc8c29d3
--- /dev/null
+++ b/media-gfx/pngtools/files/pngtools-0.3-implicit-declarations.patch
@@ -0,0 +1,40 @@
+diff -ur pngtools.orig/inflateraster.c pngtools/inflateraster.c
+--- pngtools.orig/inflateraster.c 2005-04-08 04:23:34.000000000 +0300
++++ pngtools/inflateraster.c 2008-04-23 20:38:05.000000000 +0300
+@@ -1,5 +1,6 @@
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <math.h>
+
+ // Inflate a raster to a given pixel sample size
+ char *inflateraster(char *input, unsigned long width, unsigned long height,
+diff -ur pngtools.orig/pngchunkdesc.c pngtools/pngchunkdesc.c
+--- pngtools.orig/pngchunkdesc.c 2005-04-08 04:23:34.000000000 +0300
++++ pngtools/pngchunkdesc.c 2008-04-23 20:44:38.000000000 +0300
+@@ -20,6 +20,7 @@
+ ******************************************************************************/
+
+ #include <stdio.h>
++#include <string.h>
+
+ char *meanings[4][2] = {
+ {"Critical", "Ancillary"},
+diff -ur pngtools.orig/pngchunks.c pngtools/pngchunks.c
+--- pngtools.orig/pngchunks.c 2005-04-08 04:23:35.000000000 +0300
++++ pngtools/pngchunks.c 2008-04-23 20:38:29.000000000 +0300
+@@ -1,6 +1,7 @@
+ // List the chunks which appear in a given PNG image
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <sys/mman.h>
+ #include <sys/types.h>
+diff -ur pngtools.orig/pngcp.c pngtools/pngcp.c
+--- pngtools.orig/pngcp.c 2005-04-08 04:23:35.000000000 +0300
++++ pngtools/pngcp.c 2008-04-23 20:38:13.000000000 +0300
+@@ -1,3 +1,4 @@
++#include <stdlib.h>
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <math.h>
diff --git a/media-gfx/pngtools/files/pngtools-0.4-libpng14.patch b/media-gfx/pngtools/files/pngtools-0.4-libpng14.patch
new file mode 100644
index 000000000000..f849549bae13
--- /dev/null
+++ b/media-gfx/pngtools/files/pngtools-0.4-libpng14.patch
@@ -0,0 +1,34 @@
+diff -ur pngtools-0.4.orig/Makefile.am pngtools-0.4/Makefile.am
+--- pngtools-0.4.orig/Makefile.am 2008-11-27 01:14:17.000000000 +0200
++++ pngtools-0.4/Makefile.am 2010-03-09 00:51:10.000000000 +0200
+@@ -4,3 +4,6 @@
+ pngcp_SOURCES = pngcp.c pngread.c pngwrite.c inflateraster.c
+ pngchunkdesc_SOURCES = pngchunkdesc.c
+ pngchunks_SOURCES = pngchunks.c
++
++pnginfo_LDADD = -lpng
++pngcp_LDADD = -lpng
+diff -ur pngtools-0.4.orig/pnginfo.c pngtools-0.4/pnginfo.c
+--- pngtools-0.4.orig/pnginfo.c 2008-11-27 01:14:17.000000000 +0200
++++ pngtools-0.4/pnginfo.c 2010-03-09 00:42:58.000000000 +0200
+@@ -152,7 +152,7 @@
+
+ // Check that it really is a PNG file
+ fread (sig, 1, 8, image);
+- if (!png_check_sig (sig, 8))
++ if (!png_sig_cmp(sig, 0, 8) == 0)
+ {
+ printf (" This file is not a valid PNG file\n");
+ fclose (image);
+diff -ur pngtools-0.4.orig/pngread.c pngtools-0.4/pngread.c
+--- pngtools-0.4.orig/pngread.c 2008-11-27 01:14:17.000000000 +0200
++++ pngtools-0.4/pngread.c 2010-03-09 00:43:27.000000000 +0200
+@@ -26,7 +26,7 @@
+
+ // Check that it really is a PNG file
+ fread(sig, 1, 8, image);
+- if(!png_check_sig(sig, 8)){
++ if(!png_sig_cmp(sig, 0, 8) == 0){
+ fprintf(stderr, "This file is not a valid PNG file\n");
+ goto error;
+ }
diff --git a/media-gfx/pngtools/files/pngtools-0.4-libpng15-fixes.patch b/media-gfx/pngtools/files/pngtools-0.4-libpng15-fixes.patch
new file mode 100644
index 000000000000..29b73233610b
--- /dev/null
+++ b/media-gfx/pngtools/files/pngtools-0.4-libpng15-fixes.patch
@@ -0,0 +1,190 @@
+diff -Nuar --exclude '*.orig' --exclude '*.rej' pngtools-0.4.orig//pnginfo.c pngtools-0.4/pnginfo.c
+--- pngtools-0.4.orig//pnginfo.c 2011-09-16 07:05:05.235477249 +0000
++++ pngtools-0.4/pnginfo.c 2011-09-16 07:07:52.385872705 +0000
+@@ -185,20 +185,25 @@
+ ///////////////////////////////////////////////////////////////////////////
+
+ printf (" Image Width: %d Image Length: %d\n", width, height);
++ int pixel_depth;
++ pixel_depth = bitdepth * png_get_channels(png, info);
+ if(tiffnames == pnginfo_true){
+ printf (" Bits/Sample: %d\n", bitdepth);
+- printf (" Samples/Pixel: %d\n", info->channels);
+- printf (" Pixel Depth: %d\n", info->pixel_depth); // Does this add value?
++ printf (" Samples/Pixel: %d\n", png_get_channels(png, info));
++ printf (" Pixel Depth: %d\n", pixel_depth); // Does this add value?
+ }
+ else{
+ printf (" Bitdepth (Bits/Sample): %d\n", bitdepth);
+- printf (" Channels (Samples/Pixel): %d\n", info->channels);
+- printf (" Pixel depth (Pixel Depth): %d\n", info->pixel_depth); // Does this add value?
++ printf (" Channels (Samples/Pixel): %d\n", png_get_channels(png, info));
++ printf (" Pixel depth (Pixel Depth): %d\n", pixel_depth); // Does this add value?
+ }
+
+ // Photometric interp packs a lot of information
+ printf (" Colour Type (Photometric Interpretation): ");
+
++ int num_palette;
++ int num_trans;
++
+ switch (colourtype)
+ {
+ case PNG_COLOR_TYPE_GRAY:
+@@ -207,10 +212,10 @@
+
+ case PNG_COLOR_TYPE_PALETTE:
+ printf ("PALETTED COLOUR ");
+- if (info->num_trans > 0)
++ if (num_trans > 0)
+ printf ("with alpha ");
+ printf ("(%d colours, %d transparent) ",
+- info->num_palette, info->num_trans);
++ num_palette, num_trans);
+ break;
+
+ case PNG_COLOR_TYPE_RGB:
+@@ -232,7 +237,7 @@
+ printf ("\n");
+
+ printf (" Image filter: ");
+- switch (info->filter_type)
++ switch (png_get_filter_type(png, info))
+ {
+ case PNG_FILTER_TYPE_BASE:
+ printf ("Single row per byte filter ");
+@@ -249,7 +254,7 @@
+ printf ("\n");
+
+ printf (" Interlacing: ");
+- switch (info->interlace_type)
++ switch (png_get_interlace_type(png, info))
+ {
+ case PNG_INTERLACE_NONE:
+ printf ("No interlacing ");
+@@ -266,7 +271,7 @@
+ printf ("\n");
+
+ printf (" Compression Scheme: ");
+- switch (info->compression_type)
++ switch (png_get_compression_type(png, info))
+ {
+ case PNG_COMPRESSION_TYPE_BASE:
+ printf ("Deflate method 8, 32k window");
+@@ -278,9 +283,13 @@
+ }
+ printf ("\n");
+
++ png_uint_32 x_pixels_per_unit, y_pixels_per_unit;
++ int phys_unit_type;
++ png_get_pHYs (png, info, &x_pixels_per_unit, &y_pixels_per_unit, &phys_unit_type);
++
+ printf (" Resolution: %d, %d ",
+- info->x_pixels_per_unit, info->y_pixels_per_unit);
+- switch (info->phys_unit_type)
++ x_pixels_per_unit, y_pixels_per_unit);
++ switch (phys_unit_type)
+ {
+ case PNG_RESOLUTION_UNKNOWN:
+ printf ("(unit unknown)");
+@@ -299,15 +308,18 @@
+ // FillOrder is always msb-to-lsb, big endian
+ printf (" FillOrder: msb-to-lsb\n Byte Order: Network (Big Endian)\n");
+
++ png_textp text;
++ int num_text, max_text;
++
+ // Text comments
+ printf (" Number of text strings: %d of %d\n",
+- info->num_text, info->max_text);
++ num_text, max_text);
+
+- for (i = 0; i < info->num_text; i++)
++ for (i = 0; i < num_text; i++)
+ {
+- printf (" %s ", info->text[i].key);
++ printf (" %s ", text[i].key);
+
+- switch (info->text[1].compression)
++ switch (text[1].compression)
+ {
+ case -1:
+ printf ("(tEXt uncompressed)");
+@@ -332,12 +344,12 @@
+
+ printf (": ");
+ j = 0;
+- while (info->text[i].text[j] != '\0')
++ while (text[i].text[j] != '\0')
+ {
+- if (info->text[i].text[j] == '\n')
++ if (text[i].text[j] == '\n')
+ printf ("\\n");
+ else
+- fputc (info->text[i].text[j], stdout);
++ fputc (text[i].text[j], stdout);
+
+ j++;
+ }
+@@ -385,14 +397,14 @@
+
+ printf ("Dumping the bitmap for this image:\n");
+ printf ("(Expanded samples result in %d bytes per pixel, %d channels with %d bytes per channel)\n\n",
+- info->channels * bytespersample, info->channels, bytespersample);
++ png_get_channels(png, info) * bytespersample, png_get_channels(png, info), bytespersample);
+
+ // runlen is used to stop us displaying repeated byte patterns over and over --
+ // I display them once, and then tell you how many times it occured in the file.
+ // This currently only applies to runs on zeros -- I should one day add an
+ // option to extend this to runs of other values as well
+ runlen = 0;
+- for (i = 0; i < rowbytes * height / info->channels; i += info->channels * bytespersample)
++ for (i = 0; i < rowbytes * height / png_get_channels(png, info); i += png_get_channels(png, info) * bytespersample)
+ {
+ int scount, bcount, pixel;
+
+@@ -408,16 +420,16 @@
+
+ // Determine if this is a pixel whose entire value is zero
+ pixel = 0;
+- for(scount = 0; scount < info->channels; scount++)
++ for(scount = 0; scount < png_get_channels(png, info); scount++)
+ for(bcount = 0; bcount < bytespersample; bcount++)
+ pixel += bitmap[i + scount * bytespersample + bcount];
+
+ if ((runlen == 0) && !pixel)
+ {
+ printf ("[");
+- for(scount = 0; scount < info->channels; scount++){
++ for(scount = 0; scount < png_get_channels(png, info); scount++){
+ for(bcount = 0; bcount < bytespersample; bcount++) printf("00");
+- if(scount != info->channels - 1) printf(" ");
++ if(scount != png_get_channels(png, info) - 1) printf(" ");
+ }
+ printf ("] ");
+ runlen++;
+@@ -425,10 +437,10 @@
+
+ if (runlen == 0){
+ printf ("[");
+- for(scount = 0; scount < info->channels; scount++){
++ for(scount = 0; scount < png_get_channels(png, info); scount++){
+ for(bcount = 0; bcount < bytespersample; bcount++)
+ printf("%02x", (unsigned char) bitmap[i + scount * bytespersample + bcount]);
+- if(scount != info->channels - 1) printf(" ");
++ if(scount != png_get_channels(png, info) - 1) printf(" ");
+ }
+ printf("] ");
+ }
+diff -Nuar --exclude '*.orig' --exclude '*.rej' pngtools-0.4.orig//pngread.c pngtools-0.4/pngread.c
+--- pngtools-0.4.orig//pngread.c 2011-09-16 07:05:05.235477249 +0000
++++ pngtools-0.4/pngread.c 2011-09-16 07:05:44.865570870 +0000
+@@ -68,7 +68,7 @@
+ // palette is correctly reported...
+ //png_set_strip_alpha (png);
+ png_read_update_info (png, info);
+- *channels = info->channels;
++ *channels = png_get_channels(png, info);
+
+ rowbytes = png_get_rowbytes (png, info);
+ if((row_pointers = malloc (*height * sizeof (png_bytep))) == NULL){
diff --git a/media-gfx/pngtools/metadata.xml b/media-gfx/pngtools/metadata.xml
new file mode 100644
index 000000000000..97d39bb23a76
--- /dev/null
+++ b/media-gfx/pngtools/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/pngtools/pngtools-0.4-r2.ebuild b/media-gfx/pngtools/pngtools-0.4-r2.ebuild
new file mode 100644
index 000000000000..3b50433ff8b1
--- /dev/null
+++ b/media-gfx/pngtools/pngtools-0.4-r2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+MY_PV=${PV/./_}
+
+DESCRIPTION="A series of tools for the PNG image format"
+HOMEPAGE="http://www.stillhq.com/pngtools/"
+SRC_URI="http://www.stillhq.com/pngtools/source/pngtools_${MY_PV}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND=">=media-libs/libpng-1.4:0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.3-implicit-declarations.patch
+ epatch "${FILESDIR}"/${P}-libpng14.patch
+ epatch "${FILESDIR}"/${P}-libpng15-fixes.patch
+
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc ABOUT AUTHORS ChangeLog NEWS README chunks.txt
+ insinto /usr/share/doc/${PF}/examples
+ doins *.png
+}
diff --git a/media-gfx/pornview/Manifest b/media-gfx/pornview/Manifest
new file mode 100644
index 000000000000..46e1fa1e8312
--- /dev/null
+++ b/media-gfx/pornview/Manifest
@@ -0,0 +1 @@
+DIST pornview-0.2.2.tar.xz 489416 SHA256 9ec99e372da3fb0bfd62a21e569b13000be9951a947cfedf3eda7400fffb1a6c SHA512 f7413398b7d6a3807d9a8b59b0cd651fc2728ea12b4eec084a2654ab864b6ac79e75c6c7d80ad0a26b0e1d4a3f3cf757cfa86115ede4bd3ff9dfa199801a870f WHIRLPOOL 81f754bf5750772535473cb256c619b28ee8f32edc4584768b82eeef1316c879ecbf1d87b2e4073815ac8fef58fe67773cac38367960ac9a2b716fe40e94cded
diff --git a/media-gfx/pornview/metadata.xml b/media-gfx/pornview/metadata.xml
new file mode 100644
index 000000000000..bfabcd0164b9
--- /dev/null
+++ b/media-gfx/pornview/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hasufell@gentoo.org</email>
+ <name>Julian Ospald</name>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/media-gfx/pornview/pornview-0.2.2.ebuild b/media-gfx/pornview/pornview-0.2.2.ebuild
new file mode 100644
index 000000000000..f414c429d0cd
--- /dev/null
+++ b/media-gfx/pornview/pornview-0.2.2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit gnome2-utils
+
+DESCRIPTION="Image viewer/manager with optional support for MPEG movies"
+HOMEPAGE="http://pornview.sourceforge.net"
+SRC_URI="http://dev.gentoo.org/~hasufell/distfiles/${P}.tar.xz
+ mirror://github/gentoo/${PN}/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 -hppa ppc x86"
+IUSE="exif nls"
+
+RDEPEND="
+ dev-libs/glib:2
+ media-libs/libpng:0
+ virtual/jpeg
+ x11-libs/gdk-pixbuf:2
+ x11-libs/gtk+:2
+ x11-libs/libX11
+ x11-libs/libXinerama
+ exif? ( media-gfx/exiv2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )"
+
+src_configure() {
+ econf \
+ $(use_enable exif) \
+ $(use_enable nls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" desktopdir="/usr/share/applications" \
+ install || die "emake install failed."
+ dodoc AUTHORS NEWS README
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ gnome2_icon_cache_update
+}
diff --git a/media-gfx/postr/Manifest b/media-gfx/postr/Manifest
new file mode 100644
index 000000000000..312028c73263
--- /dev/null
+++ b/media-gfx/postr/Manifest
@@ -0,0 +1 @@
+DIST postr-0.13.1.tar.xz 384196 SHA256 8b004d108ebe18e0399f8a20282f129a3c8c9b6615322479d0e01918c6b42fbc SHA512 43486d6c19ccad86e44e00fd7e7aadbdc8268ada38cffe616c5b7c3b7280556222ae961036cd7c711b067948772acec92927d86d4c1d82a26ecf49011991f598 WHIRLPOOL 7f139f8fa1b4d88b7a9eae13d82d71ca822428fcce3d7f23a0e68940494cbbf067ea61c0dea69a11ffe1841eec05ad13657c5786ab8cecbb62d2678b99ff3a38
diff --git a/media-gfx/postr/metadata.xml b/media-gfx/postr/metadata.xml
new file mode 100644
index 000000000000..da6fd63d0085
--- /dev/null
+++ b/media-gfx/postr/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+</pkgmetadata>
diff --git a/media-gfx/postr/postr-0.13.1.ebuild b/media-gfx/postr/postr-0.13.1.ebuild
new file mode 100644
index 000000000000..caea4997a81f
--- /dev/null
+++ b/media-gfx/postr/postr-0.13.1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE="xml"
+
+inherit eutils gnome2 python-single-r1
+
+DESCRIPTION="Flickr uploader for GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/Postr"
+
+LICENSE="GPL-2+ CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ dev-python/pygtk:2[${PYTHON_USEDEP}]
+"
+
+RDEPEND="${COMMON_DEPEND}
+ dev-python/bsddb3[${PYTHON_USEDEP}]
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ dev-python/gconf-python[${PYTHON_USEDEP}]
+ dev-python/gtkspell-python[${PYTHON_USEDEP}]
+ dev-python/libgnome-python[${PYTHON_USEDEP}]
+ dev-python/pygobject:2[${PYTHON_USEDEP}]
+ dev-python/twisted-core[${PYTHON_USEDEP}]
+ dev-python/twisted-web[${PYTHON_USEDEP}]
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/gnome-doc-utils
+ dev-util/intltool
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+src_prepare() {
+ # Don't check for nautilus-python if we aren't installing the nautilus-2 extension
+ sed -e 's:nautilus-python >= 0.6.1::' -i configure || die
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --with-nautilus-extension-dir="${EPREFIX}"/usr/share/nautilus-python/extensions
+}
+
+src_install() {
+ gnome2_src_install
+ python_fix_shebang "${ED}"
+
+ rm -r "${ED}usr/share/nautilus-python" || die
+}
diff --git a/media-gfx/potrace/Manifest b/media-gfx/potrace/Manifest
new file mode 100644
index 000000000000..6f12f8cda686
--- /dev/null
+++ b/media-gfx/potrace/Manifest
@@ -0,0 +1,3 @@
+DIST potrace-1.10.tar.gz 617866 SHA256 5ace5b470866ba914def16a1cbc09d10b37bf93f22ff704769d25f573d32f8ed SHA512 f9793fb562ff2e8fd99dd37015bc797372e515041fb26aaaaea6121e29e166d6a32dea3a98d0c2069ddbbd5ff465988724495519c641646814251bbaae265f74 WHIRLPOOL 2f19bd0c20a0a6dfe83aa6234eb88707cb1d52bdc70e92bc47a10a7e8b071e3df7c4121ff63f9c38a2b2ee1c1dc920b2aee64f72bd0e9a66adb258b1e6591958
+DIST potrace-1.11.tar.gz 662085 SHA256 5aa5eb496e00206d68b67edf8f6067999a45d1b69f848c18af5cbdf8e4a17ead SHA512 d0ff037ed989a1742a099bb9d120c5f10cf1eae6ed9adb20d1d37eee713e569925eff6235825dfbdd7b1649dc46ad4507982ae001d6d3d49cc281ed16ddf1843 WHIRLPOOL c05613ae20ebd23606098b8cdff7beb327a7dd19986a097fbd82fd7565a88143c8036b71e895c18b4c9e290e01213448ec4abe48a33fc1e0d28ef1e827a3f285
+DIST potrace-1.12.tar.gz 604946 SHA256 b0bbf1d7badbebfcb992280f038936281b47ddbae212e8ae91e863ce0b76173b SHA512 d971f96ea5cd7a243d1409ad94d2ad41e00d1733f56bcc00e12fcaf4d5eb6844bc73fd7dbd270d1876f7931619597d3cace0c2c76aed313046732c26621c2680 WHIRLPOOL 820e310c90a7e6541d773144ff8d4347cdc3cc8207be45c11a1a71922531696e5d51ef69df7bb29f249c8ba9b592e2d34fb63c03e53137d56f02a01a7c769db3
diff --git a/media-gfx/potrace/metadata.xml b/media-gfx/potrace/metadata.xml
new file mode 100644
index 000000000000..4b3ed11c93ef
--- /dev/null
+++ b/media-gfx/potrace/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>fonts</herd>
+ <herd>graphics</herd>
+ <use>
+ <flag name='metric'>
+ default to a4 paper size and metric measurement
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/potrace/potrace-1.10-r1.ebuild b/media-gfx/potrace/potrace-1.10-r1.ebuild
new file mode 100644
index 000000000000..7c9c1fa3eb30
--- /dev/null
+++ b/media-gfx/potrace/potrace-1.10-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools-utils
+
+DESCRIPTION="Transforming bitmaps into vector graphics"
+HOMEPAGE="http://potrace.sourceforge.net/"
+SRC_URI="http://potrace.sourceforge.net/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~hppa ia64 ppc ~ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="metric static-libs"
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_configure() {
+ local myeconfargs=(
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ --enable-zlib
+ --with-libpotrace
+ $(use_enable metric a4)
+ $(use_enable metric)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-gfx/potrace/potrace-1.11.ebuild b/media-gfx/potrace/potrace-1.11.ebuild
new file mode 100644
index 000000000000..ec52bc4c1d06
--- /dev/null
+++ b/media-gfx/potrace/potrace-1.11.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools-utils
+
+DESCRIPTION="Transforming bitmaps into vector graphics"
+HOMEPAGE="http://potrace.sourceforge.net/"
+SRC_URI="http://potrace.sourceforge.net/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="metric static-libs"
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_configure() {
+ local myeconfargs=(
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ --enable-zlib
+ --with-libpotrace
+ $(use_enable metric a4)
+ $(use_enable metric)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-gfx/potrace/potrace-1.12.ebuild b/media-gfx/potrace/potrace-1.12.ebuild
new file mode 100644
index 000000000000..1c1816db17ad
--- /dev/null
+++ b/media-gfx/potrace/potrace-1.12.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools-utils
+
+DESCRIPTION="Transforming bitmaps into vector graphics"
+HOMEPAGE="http://potrace.sourceforge.net/"
+SRC_URI="http://potrace.sourceforge.net/download/${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="metric static-libs"
+
+RDEPEND="sys-libs/zlib"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+src_configure() {
+ local myeconfargs=(
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ --enable-zlib
+ --with-libpotrace
+ $(use_enable metric a4)
+ $(use_enable metric)
+ )
+ autotools-utils_src_configure
+}
diff --git a/media-gfx/povray/Manifest b/media-gfx/povray/Manifest
new file mode 100644
index 000000000000..b909af988a7f
--- /dev/null
+++ b/media-gfx/povray/Manifest
@@ -0,0 +1 @@
+DIST povray-3.7.0.0.tar.gz 38191521 SHA256 bf68861d648e3acafbd1d83a25016a0c68547b257e4fa79fb36eb5f08d665f27 SHA512 82e3dbcd58b7ae921fe3b953815ca4dbbfb22eda434554baee4accabd1455b18cb511061f1cf9cf93128fab0a042df374fe2f68186d78c19853a465bd4bcbe10 WHIRLPOOL 6fc85ef9dc0d31a96d98f52d4c0c42cb37264f4e90da842b0e976076fcb1abad3a38d5f5ce82ebdd111babc67d8f16e460f8b04fd40f9dadf8f115f9493e933f
diff --git a/media-gfx/povray/files/povray-3.7.0.0-automagic.patch b/media-gfx/povray/files/povray-3.7.0.0-automagic.patch
new file mode 100644
index 000000000000..a7c776f13fb6
--- /dev/null
+++ b/media-gfx/povray/files/povray-3.7.0.0-automagic.patch
@@ -0,0 +1,27 @@
+ unix/configure.ac | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f62f5d4..d9a3750 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -335,10 +335,15 @@ fi
+ AC_DEFINE([USE_OFFICIAL_BOOST], [], [Use the official Boost libraries.])
+
+ # Intel Math Kernel library
+-pov_save_ldflags="$LDFLAGS"
+-test x"$with_libmkl" != x"" && LDFLAGS="-L$with_libmkl $LDFLAGS"
+-AC_CHECK_LIB([mkl], [sin])
+-test x"ac_cv_lib_mkl_sin" = x"no" && LDFLAGS="$pov_save_ldflags"
++AS_IF([test x"$with_libmkl" != x"no"], [
++ pov_save_ldflags="$LDFLAGS"
++ AS_IF([test x"$with_libmkl" != x"yes"], [
++ LDFLAGS="-L$with_libmkl $LDFLAGS"
++ ])
++ AC_CHECK_LIB([mkl], [sin], [], [
++ AC_MSG_ERROR([Cannot find working mkl library])
++ ])
++])
+
+ # libm
+ AC_CHECK_LIB([m], [sin])
diff --git a/media-gfx/povray/files/povray-3.7.0.0-boost-1.50.patch b/media-gfx/povray/files/povray-3.7.0.0-boost-1.50.patch
new file mode 100644
index 000000000000..f8e807ad647d
--- /dev/null
+++ b/media-gfx/povray/files/povray-3.7.0.0-boost-1.50.patch
@@ -0,0 +1,72 @@
+ configure.ac | 26 ++++++--------------------
+ vfe/unix/platformbase.cpp | 2 +-
+ 2 files changed, 7 insertions(+), 21 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 51596f8..900c150 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -57,8 +57,6 @@ AC_CONFIG_SRCDIR([unix/disp_text.cpp])
+ m4_include([unix/config/acx_pthread.m4])
+ m4_include([unix/config/ax_arg_enable.m4])
+ m4_include([unix/config/ax_arg_with.m4])
+-m4_include([unix/config/ax_boost_base.m4])
+-m4_include([unix/config/ax_boost_thread.m4])
+ m4_include([unix/config/ax_test_compiler_flags.m4])
+ m4_include([unix/config/ax_check_lib.m4])
+ m4_include([unix/config/ax_check_libjpeg.m4])
+@@ -168,6 +166,7 @@ AC_CANONICAL_HOST
+
+ AM_INIT_AUTOMAKE([1.9 dist-bzip2])
+ AM_MAINTAINER_MODE
++LT_INIT
+
+ AX_FIX_INCORRECT_PATH(C_INCLUDE_PATH, ".", [pov_warn_path="$pov_warn_path C_INCLUDE_PATH"])
+ AX_FIX_INCORRECT_PATH(CPLUS_INCLUDE_PATH, ".", [pov_warn_path="$pov_warn_path CPLUS_INCLUDE_PATH"])
+@@ -298,28 +297,15 @@ LIBS="$LIBS $PTHREAD_CFLAGS $PTHREAD_LIBS" # append
+
+ # Boost; required library
+ # the following macro stops with error when boost is not found
+-AX_BOOST_BASE([$required_libboost_version])
+-AX_BOOST_THREAD
+-if test x"$ax_cv_boost_thread" != x"yes"; then
++BOOST_REQUIRE([$required_libboost_version])
++BOOST_THREADS
++if test x"$boost_cv_lib_thread" != x"yes"; then
+ AC_MSG_ERROR([cannot find a suitable boost thread library])
+ else
+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" # append
+- LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" # append
+- LIBS="$BOOST_THREAD_LIB $LIBS"
++ LDFLAGS="$LDFLAGS -L$BOOST_LDPATH" # append
++ LIBS="$BOOST_THREAD_LIBS $LIBS"
+ fi
+-AC_MSG_CHECKING([whether the boost thread library is usable])
+-AC_RUN_IFELSE(
+- [AC_LANG_PROGRAM([[
+-#include <boost/thread/thread.hpp>
+- ]],
+- [[boost::defer_lock_t(); return 0;]])],
+- [AC_MSG_RESULT([yes])],
+- [
+- AC_MSG_RESULT([no])
+- AC_MSG_FAILURE([cannot link with the boost thread library])
+- ],
+- [AC_MSG_RESULT([cross-compiling])] # FIXME
+-)
+ AC_DEFINE([USE_OFFICIAL_BOOST], [], [Use the official Boost libraries.])
+
+ # Intel Math Kernel library
+diff --git a/vfe/unix/platformbase.cpp b/vfe/unix/platformbase.cpp
+index 8669d19..83c0191 100644
+--- a/vfe/unix/platformbase.cpp
++++ b/vfe/unix/platformbase.cpp
+@@ -68,7 +68,7 @@ namespace pov_base
+ #else
+ // taken from source/base/timer.cpp
+ boost::xtime t;
+- boost::xtime_get(&t, boost::TIME_UTC);
++ boost::xtime_get(&t, POV_TIME_UTC);
+ POV_ULONG ns = (POV_ULONG)(t.sec) * (POV_ULONG)(1000000000) + (POV_ULONG)(t.nsec) + (POV_ULONG)(msec) * (POV_ULONG)(1000000);
+ t.sec = (boost::xtime::xtime_sec_t)(ns / (POV_ULONG)(1000000000));
+ t.nsec = (boost::xtime::xtime_nsec_t)(ns % (POV_ULONG)(1000000000));
diff --git a/media-gfx/povray/files/povray-3.7.0.0-user-conf.patch b/media-gfx/povray/files/povray-3.7.0.0-user-conf.patch
new file mode 100644
index 000000000000..b3c279fcdeff
--- /dev/null
+++ b/media-gfx/povray/files/povray-3.7.0.0-user-conf.patch
@@ -0,0 +1,27 @@
+ Makefile.am | 13 -------------
+ 1 files changed, 0 insertions(+), 13 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 76b394c..9822c52 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -107,19 +107,6 @@ install-data-local:
+ for f in $$filelist ; do \
+ $(INSTALL_DATA) $(top_srcdir)/doc/$$f $(DESTDIR)$(povdocdir)/$$f && echo "$(DESTDIR)$(povdocdir)/$$f" >> $(povinstall); \
+ done
+- @echo "Creating user directories..."; \
+- for p in $(povuser) $(povconfuser) ; do \
+- $(MKDIR_P) $$p && chown $(povowner) $$p && chgrp $(povgroup) $$p && printf "%s\n" "$$p" "`cat $(povinstall)`" > $(povinstall); \
+- done
+- @echo "Copying user configuration and INI files..."; \
+- for f in povray.conf povray.ini ; do \
+- if test -f $(povconfuser)/$$f; then \
+- echo "Creating backup of $(povconfuser)/$$f"; \
+- mv -f $(povconfuser)/$$f $(povconfuser)/$$f.bak; \
+- fi; \
+- done; \
+- $(INSTALL_DATA) $(top_srcdir)/povray.conf $(povconfuser)/povray.conf && chown $(povowner) $(povconfuser)/povray.conf && chgrp $(povgroup) $(povconfuser)/povray.conf && echo "$(povconfuser)/povray.conf" >> $(povinstall); \
+- $(INSTALL_DATA) $(top_builddir)/povray.ini $(povconfuser)/povray.ini && chown $(povowner) $(povconfuser)/povray.ini && chgrp $(povgroup) $(povconfuser)/povray.ini && echo "$(povconfuser)/povray.ini" >> $(povinstall)
+
+ # Remove data, config, and empty folders for 'make uninstall'.
+ # Use 'hook' instead of 'local' so as to properly remove *empty* folders (e.g. scripts).
diff --git a/media-gfx/povray/files/povray-3.7.0_rc6-darwin-defaults.patch b/media-gfx/povray/files/povray-3.7.0_rc6-darwin-defaults.patch
new file mode 100644
index 000000000000..16e09c749b2e
--- /dev/null
+++ b/media-gfx/povray/files/povray-3.7.0_rc6-darwin-defaults.patch
@@ -0,0 +1,21 @@
+# Darwin does not support thread-local storage (__thread)
+# http://lists.apple.com/archives/xcode-users/2006/Jun/msg00551.html
+# so use default from boost thread
+
+# use lseek for lseek64
+# sys/types.h is needed because of uint
+
+--- povray-3.7.0.RC6/vfe/unix/syspovconfig.h.orig 2013-03-01 11:09:42.000000000 -0700
++++ povray-3.7.0.RC6/vfe/unix/syspovconfig.h 2013-03-01 11:07:14.000000000 -0700
+@@ -171,9 +171,7 @@
+ #define METADATA_PLATFORM_STRING BUILD_ARCH
+ #define METADATA_COMPILER_STRING COMPILER_VERSION
+
+-#define DECLARE_THREAD_LOCAL_PTR(ptrType, ptrName) __thread ptrType *ptrName
+-#define IMPLEMENT_THREAD_LOCAL_PTR(ptrType, ptrName, ignore) __thread ptrType *ptrName
+-#define GET_THREAD_LOCAL_PTR(ptrName) (ptrName)
+-#define SET_THREAD_LOCAL_PTR(ptrName, ptrValue) (ptrName = ptrValue)
++#define lseek64 lseek
++#include <sys/types.h>
+
+ #endif
diff --git a/media-gfx/povray/metadata.xml b/media-gfx/povray/metadata.xml
new file mode 100644
index 000000000000..ec7eec1c1443
--- /dev/null
+++ b/media-gfx/povray/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>sci@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="mkl">Enable support for Intel Vector Math Library, part of sci-libs/mkl</flag>
+ <flag name="io-restrictions">POV-Ray's mechanism for control of I/O operations</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">POV-Ray/povray</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/povray/povray-3.7.0.0.ebuild b/media-gfx/povray/povray-3.7.0.0.ebuild
new file mode 100644
index 000000000000..5a0537a30d18
--- /dev/null
+++ b/media-gfx/povray/povray-3.7.0.0.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils flag-o-matic multilib versionator virtualx
+
+POVRAY_MAJOR_VER=$(get_version_component_range 1-3)
+POVRAY_MINOR_VER=$(get_version_component_range 4)
+if [ -n "$POVRAY_MINOR_VER" ]; then
+ POVRAY_MINOR_VER=${POVRAY_MINOR_VER/rc/RC}
+ MY_PV="${POVRAY_MAJOR_VER}.${POVRAY_MINOR_VER}"
+else
+ MY_PV=${POVRAY_MAJOR_VER}
+fi
+
+DESCRIPTION="The Persistence of Vision Raytracer"
+HOMEPAGE="http://www.povray.org/"
+SRC_URI="https://github.com/POV-Ray/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="AGPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="debug +io-restrictions mkl openexr static-libs tiff X"
+
+DEPEND="
+ >=dev-libs/boost-1.50.0:=[threads(+)]
+ media-libs/libpng:0
+ sys-libs/zlib
+ virtual/jpeg
+ mkl? ( sci-libs/mkl )
+ openexr? (
+ media-libs/ilmbase
+ media-libs/openexr )
+ tiff? ( media-libs/tiff:0 )
+ X? ( media-libs/libsdl )"
+RDEPEND="${DEPEND}"
+DEPEND="${DEPEND}
+ sys-devel/boost-m4"
+
+S=${WORKDIR}/${PN}-${MY_PV}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-user-conf.patch
+ "${FILESDIR}"/${P}-boost-1.50.patch
+ "${FILESDIR}"/${P}-automagic.patch
+ )
+
+src_prepare() {
+ [[ ${CHOST} == *-darwin* ]] && \
+ PATCHES+=( "${FILESDIR}"/${PN}-3.7.0_rc6-darwin-defaults.patch )
+
+ cd unix || die
+ bash -x prebuild.sh || die
+ cd .. || die
+ rm -rf libraries || die
+
+ # Change some destination directories that cannot be adjusted via configure
+ sed \
+ -e 's:${povsysconfdir}/$PACKAGE/$VERSION_BASE:${povsysconfdir}/'${PN}':g' \
+ -e 's:${povdatadir}/$PACKAGE-$VERSION_BASE:${povdatadir}/'${PN}':g' \
+ -e 's:${povdatadir}/doc/$PACKAGE-$VERSION_BASE:${povdatadir}/doc/'${PF}':g' \
+ -e 's:BOOST_THREAD_LIBS $LIBS:BOOST_THREAD_LIBS $LIBS -lboost_date_time:g' \
+ -i configure.ac || die
+
+ sed \
+ -e "s:^povlibdir = .*:povlibdir = @datadir@/${PN}:" \
+ -e "s:^povdocdir = .*:povdocdir = @datadir@/doc/${PF}:" \
+ -e "s:^povconfdir = .*:povconfdir = @sysconfdir@/${PN}:" \
+ -e 's:mkdir_p:MKDIR_P:g' \
+ -i Makefile.am || die
+
+ # The "+p" option on the test command line causes a pause and
+ # prompts the user to interact, so remove it.
+ sed -i -e "s:biscuit.pov -f +d +p:biscuit.pov -f +d:" Makefile.am || die
+
+ autotools-utils_src_prepare
+}
+
+_src_compile() {
+ einfo "${LDFLAGS}"
+ autotools-utils_src_compile LDFLAGS="${LDFLAGS}"
+}
+
+src_configure() {
+ local non_redist_conf
+
+ # Fixes bug 71255
+ if [[ $(get-flag march) == k6-2 ]]; then
+ filter-flags -fomit-frame-pointer
+ fi
+
+ # The config files are installed correctly (e.g. povray.conf),
+ # but the code compiles using incorrect [default] paths
+ # (based on /usr/local...), so povray will not find the system
+ # config files without the following fix:
+ append-cppflags -DPOVLIBDIR=\\\"${EROOT}usr/share/${PN}\\\" -DPOVCONFDIR=\\\"${EROOT}etc/${PN}\\\"
+
+ if ! use tiff ; then
+ non_redist_conf="NON_REDISTRIBUTABLE_BUILD=yes"
+ else
+ non_redist_conf=""
+ fi
+
+ local myeconfargs=(
+ ${non_redist_conf}
+ COMPILED_BY="Portage (Gentoo `uname`) on `hostname -f`"
+ $(use_enable debug)
+ $(use_enable io-restrictions)
+ $(use_with openexr openexr "${EPREFIX}/usr/$(get_libdir)")
+ $(use_with mkl libmkl "${EPREFIX}/usr/$(get_libdir)")
+ $(use_with tiff libtiff "${EPREFIX}/usr/$(get_libdir)")
+ $(use_with X libsdl "${EPREFIX}/usr/$(get_libdir)")
+ $(use_with X x "${EPREFIX}/usr/$(get_libdir)")
+ --disable-pipe
+ --disable-strip
+ --disable-optimiz
+ --disable-optimiz-arch
+ )
+ autotools-utils_src_configure
+}
+
+src_test() {
+ # For the beta releases, we generate a license extension in case needed
+ VIRTUALX_COMMAND="autotools-utils_src_test"
+ virtualmake
+}
+
+pkg_preinst() {
+ # Copy the old config files if they are in the old location
+ # but do not yet exist in the new location.
+ # This way, they can be treated by CONFIG_PROTECT as normal.
+ for conf_file in $(ls "${ED}/etc/${PN}"); do
+ if [ ! -e "${EROOT}etc/${PN}/${conf_file}" ]; then
+ for version_dir in $(ls "${EROOT}etc/${PN}" | grep "^[0-9]" | sort -rn); do
+ if [ -e "${EROOT}etc/${PN}/${version_dir}/${conf_file}" ]; then
+ mv "${EROOT}etc/${PN}/${version_dir}/${conf_file}" "${EROOT}etc/${PN}"
+ elog "Note: ${conf_file} moved from ${EROOT}etc/povray/${version_dir}/ to ${EROOT}etc/povray/"
+ break
+ fi
+ done
+ fi
+ done
+}
diff --git a/media-gfx/povtree/Manifest b/media-gfx/povtree/Manifest
new file mode 100644
index 000000000000..84c254407440
--- /dev/null
+++ b/media-gfx/povtree/Manifest
@@ -0,0 +1 @@
+DIST povtree1.5.zip 917548 SHA256 d846e45ad77fe0a5501b46f40c1b2596161d59a51884c67af753d339143ad333 SHA512 ef8de1e1d9b5ffde782bd6bba39a11b57928bdb2b3359613a0ae1bc6ad012876a3a80d8cbbba1df77b366e44a7d2f0b48929f12e18853ec556f5af5780ea7d34 WHIRLPOOL 90cd76777217dd870220a7aebe3c12dc568a9c19877308ed1d56c024660e861819a1c535b38ada2154b3e057186b80865689756b9232dc30e4127fc02deb9e29
diff --git a/media-gfx/povtree/files/povtree b/media-gfx/povtree/files/povtree
new file mode 100644
index 000000000000..a4f041c21d5d
--- /dev/null
+++ b/media-gfx/povtree/files/povtree
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+which java > /dev/null 2>&1 && \
+ java -jar /usr/lib/povtree/povtree.jar $* && \
+ exit 0
+
+echo "No \"java\" binary found in your PATH."
+echo "You should run \"java-config\" to choose your default VM."
+exit 1
diff --git a/media-gfx/povtree/metadata.xml b/media-gfx/povtree/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/povtree/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/povtree/povtree-1.5-r1.ebuild b/media-gfx/povtree/povtree-1.5-r1.ebuild
new file mode 100644
index 000000000000..9326d2fbec7d
--- /dev/null
+++ b/media-gfx/povtree/povtree-1.5-r1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+S="${WORKDIR}"
+MY_P="${PN}${PV}"
+DESCRIPTION="Tree generator for POVray based on TOMTREE macro"
+HOMEPAGE="http://propro.ru/go/Wshop/povtree/povtree.html"
+SRC_URI="http://propro.ru/go/Wshop/povtree/${MY_P}.zip"
+
+# Free for non-commercial use, according to e-mail from authors #446168
+LICENSE="free-noncomm"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+RDEPEND=">=virtual/jre-1.3"
+DEPEND="app-arch/unzip"
+
+src_install() {
+ # wrapper
+ sed "s:/usr/:${EPREFIX}&:" "${FILESDIR}"/povtree > "${T}"/povtree || die
+ dobin "${T}"/povtree
+ # package
+ insinto /usr/lib/povtree
+ doins povtree.jar
+ dodoc TOMTREE-${PV}.inc help.jpg
+}
diff --git a/media-gfx/pqiv/Manifest b/media-gfx/pqiv/Manifest
new file mode 100644
index 000000000000..00d42ffdf615
--- /dev/null
+++ b/media-gfx/pqiv/Manifest
@@ -0,0 +1 @@
+DIST pqiv-2.2.tar.gz 52414 SHA256 88d625de4437c8e65a49d74e993df5debf224ecf726365e138bf90a602b8b74b SHA512 2f504e228607b4b7b3cb341def5a104c86d932dc93f54b68893acbf5becc9cfa5c4d7549ead8ee25c4cb1f6a3cf13623eb3836e368299de2a21624d9773458bc WHIRLPOOL 0df549d3cc686806413741e453335e7e54f1e194c4296ccc9a72f9b6805b5f83514ee6dbdb45478753c91d36b7baf6b1bf88abb5f84ea9fb1c1bf9643c4fe2f9
diff --git a/media-gfx/pqiv/metadata.xml b/media-gfx/pqiv/metadata.xml
new file mode 100644
index 000000000000..09572f4b3efe
--- /dev/null
+++ b/media-gfx/pqiv/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <maintainer>
+ <email>phillip.berndt@googlemail.com</email>
+ <name>Phillip Berndt</name>
+ </maintainer>
+ <remote-id type="github">phillipberndt/pqiv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/pqiv/pqiv-2.2.ebuild b/media-gfx/pqiv/pqiv-2.2.ebuild
new file mode 100644
index 000000000000..e30911ee9191
--- /dev/null
+++ b/media-gfx/pqiv/pqiv-2.2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit linux-info toolchain-funcs
+
+DESCRIPTION="Modern rewrite of Quick Image Viewer"
+HOMEPAGE="http://github.com/phillipberndt/pqiv http://www.pberndt.com/Programme/Linux/pqiv/"
+SRC_URI="https://github.com/phillipberndt/pqiv/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="kernel_linux"
+
+RDEPEND=">=dev-libs/glib-2.8:2
+ >=x11-libs/cairo-1.6
+ x11-libs/gtk+:3"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_setup() {
+ if use kernel_linux; then
+ CONFIG_CHECK="~INOTIFY_USER"
+ linux-info_pkg_setup
+ fi
+}
+
+src_configure() {
+ ./configure --prefix=/usr --destdir="${D}" || die
+}
+
+src_compile() {
+ tc-export CC
+ emake CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ default
+ dodoc README.markdown
+}
diff --git a/media-gfx/pqstego/Manifest b/media-gfx/pqstego/Manifest
new file mode 100644
index 000000000000..8c8529dc2d4f
--- /dev/null
+++ b/media-gfx/pqstego/Manifest
@@ -0,0 +1 @@
+DIST pqstego-0.0.1.tar.gz 156170 SHA256 29117bfce9b6d88ab8d9599f95edde62c80a00aafde3c74daa52c81f3f62a216
diff --git a/media-gfx/pqstego/metadata.xml b/media-gfx/pqstego/metadata.xml
new file mode 100644
index 000000000000..6183a8f271b6
--- /dev/null
+++ b/media-gfx/pqstego/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">pqstego</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/pqstego/pqstego-0.0.1.ebuild b/media-gfx/pqstego/pqstego-0.0.1.ebuild
new file mode 100644
index 000000000000..dea12f7c8926
--- /dev/null
+++ b/media-gfx/pqstego/pqstego-0.0.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="Tools for Perturbed Quantization Steganography"
+HOMEPAGE="http://sourceforge.net/projects/pqstego/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-libs/libpqstego
+ virtual/jpeg:0"
+
+src_configure() {
+ econf \
+ --disable-dependency-tracking
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS CHANGES README
+}
diff --git a/media-gfx/printrun/Manifest b/media-gfx/printrun/Manifest
new file mode 100644
index 000000000000..e95b22629137
--- /dev/null
+++ b/media-gfx/printrun/Manifest
@@ -0,0 +1 @@
+DIST printrun-20140730.tar.gz 902029 SHA256 3412882627a82bba0fcd0cdf7639074085d3355e5aef48ccdc91687b027a24fa SHA512 c60d3db1a9255a56aad30a8290e18707cc34774af8cc52be042a3fabe653a64874485a153763886458cb45fff718ba134642e530a9d065fcc42ae0473ee17da8 WHIRLPOOL 1f8c91e867a375df998248d31bda0c5901d1ba52071aee12acea42a53b44393332a86562ea96c58801bde63a961d4af14b05f4defc45cfe1f41061a4ee9438e1
diff --git a/media-gfx/printrun/files/printrun-no-py-in-binaries.patch b/media-gfx/printrun/files/printrun-no-py-in-binaries.patch
new file mode 100644
index 000000000000..250af5fd26ae
--- /dev/null
+++ b/media-gfx/printrun/files/printrun-no-py-in-binaries.patch
@@ -0,0 +1,396 @@
+diff -urN Printrun-printrun-20140730.old/plater Printrun-printrun-20140730/plater
+--- Printrun-printrun-20140730.old/plater 1970-01-01 01:00:00.000000000 +0100
++++ Printrun-printrun-20140730/plater 2014-06-06 12:04:34.000000000 +0200
+@@ -0,0 +1,27 @@
++#!/usr/bin/env python
++
++# This file is part of the Printrun suite.
++#
++# Printrun is free software: you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation, either version 3 of the License, or
++# (at your option) any later version.
++#
++# Printrun is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
++
++import sys
++import wx
++
++from printrun.stlplater import StlPlater
++
++if __name__ == '__main__':
++ app = wx.App(False)
++ main = StlPlater(sys.argv[1:])
++ main.Show()
++ app.MainLoop()
+diff -urN Printrun-printrun-20140730.old/plater.py Printrun-printrun-20140730/plater.py
+--- Printrun-printrun-20140730.old/plater.py 2014-08-10 15:44:04.877086955 +0200
++++ Printrun-printrun-20140730/plater.py 1970-01-01 01:00:00.000000000 +0100
+@@ -1,27 +0,0 @@
+-#!/usr/bin/env python
+-
+-# This file is part of the Printrun suite.
+-#
+-# Printrun is free software: you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 3 of the License, or
+-# (at your option) any later version.
+-#
+-# Printrun is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
+-
+-import sys
+-import wx
+-
+-from printrun.stlplater import StlPlater
+-
+-if __name__ == '__main__':
+- app = wx.App(False)
+- main = StlPlater(sys.argv[1:])
+- main.Show()
+- app.MainLoop()
+diff -urN Printrun-printrun-20140730.old/printcore Printrun-printrun-20140730/printcore
+--- Printrun-printrun-20140730.old/printcore 1970-01-01 01:00:00.000000000 +0100
++++ Printrun-printrun-20140730/printcore 2014-06-06 12:04:34.000000000 +0200
+@@ -0,0 +1,76 @@
++#!/usr/bin/env python
++
++# This file is part of the Printrun suite.
++#
++# Printrun is free software: you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation, either version 3 of the License, or
++# (at your option) any later version.
++#
++# Printrun is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
++
++import time
++import getopt
++import sys
++
++from printrun.printcore import printcore
++from printrun import gcoder
++
++if __name__ == '__main__':
++ baud = 115200
++ loud = False
++ statusreport = False
++ try:
++ opts, args = getopt.getopt(sys.argv[1:], "h,b:,v,s",
++ ["help", "baud", "verbose", "statusreport"])
++ except getopt.GetoptError, err:
++ print str(err)
++ sys.exit(2)
++ for o, a in opts:
++ if o in ('-h', '--help'):
++ # FIXME: Fix help
++ print ("Opts are: --help, -b --baud = baudrate, -v --verbose, "
++ "-s --statusreport")
++ sys.exit(1)
++ if o in ('-b', '--baud'):
++ baud = int(a)
++ if o in ('-v', '--verbose'):
++ loud = True
++ elif o in ('-s', '--statusreport'):
++ statusreport = True
++
++ if len(args) > 1:
++ port = args[-2]
++ filename = args[-1]
++ print "Printing: %s on %s with baudrate %d" % (filename, port, baud)
++ else:
++ print "Usage: python [-h|-b|-v|-s] printcore.py /dev/tty[USB|ACM]x filename.gcode"
++ sys.exit(2)
++ p = printcore(port, baud)
++ p.loud = loud
++ time.sleep(2)
++ gcode = [i.strip() for i in open(filename)]
++ gcode = gcoder.LightGCode(gcode)
++ p.startprint(gcode)
++
++ try:
++ if statusreport:
++ p.loud = False
++ sys.stdout.write("Progress: 00.0%\r")
++ sys.stdout.flush()
++ while p.printing:
++ time.sleep(1)
++ if statusreport:
++ progress = 100 * float(p.queueindex) / len(p.mainqueue)
++ sys.stdout.write("Progress: %02.1f%%\r" % progress)
++ sys.stdout.flush()
++ p.disconnect()
++ sys.exit(0)
++ except:
++ p.disconnect()
+diff -urN Printrun-printrun-20140730.old/printcore.py Printrun-printrun-20140730/printcore.py
+--- Printrun-printrun-20140730.old/printcore.py 2014-08-10 15:44:04.881086932 +0200
++++ Printrun-printrun-20140730/printcore.py 1970-01-01 01:00:00.000000000 +0100
+@@ -1,76 +0,0 @@
+-#!/usr/bin/env python
+-
+-# This file is part of the Printrun suite.
+-#
+-# Printrun is free software: you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 3 of the License, or
+-# (at your option) any later version.
+-#
+-# Printrun is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
+-
+-import time
+-import getopt
+-import sys
+-
+-from printrun.printcore import printcore
+-from printrun import gcoder
+-
+-if __name__ == '__main__':
+- baud = 115200
+- loud = False
+- statusreport = False
+- try:
+- opts, args = getopt.getopt(sys.argv[1:], "h,b:,v,s",
+- ["help", "baud", "verbose", "statusreport"])
+- except getopt.GetoptError, err:
+- print str(err)
+- sys.exit(2)
+- for o, a in opts:
+- if o in ('-h', '--help'):
+- # FIXME: Fix help
+- print ("Opts are: --help, -b --baud = baudrate, -v --verbose, "
+- "-s --statusreport")
+- sys.exit(1)
+- if o in ('-b', '--baud'):
+- baud = int(a)
+- if o in ('-v', '--verbose'):
+- loud = True
+- elif o in ('-s', '--statusreport'):
+- statusreport = True
+-
+- if len(args) > 1:
+- port = args[-2]
+- filename = args[-1]
+- print "Printing: %s on %s with baudrate %d" % (filename, port, baud)
+- else:
+- print "Usage: python [-h|-b|-v|-s] printcore.py /dev/tty[USB|ACM]x filename.gcode"
+- sys.exit(2)
+- p = printcore(port, baud)
+- p.loud = loud
+- time.sleep(2)
+- gcode = [i.strip() for i in open(filename)]
+- gcode = gcoder.LightGCode(gcode)
+- p.startprint(gcode)
+-
+- try:
+- if statusreport:
+- p.loud = False
+- sys.stdout.write("Progress: 00.0%\r")
+- sys.stdout.flush()
+- while p.printing:
+- time.sleep(1)
+- if statusreport:
+- progress = 100 * float(p.queueindex) / len(p.mainqueue)
+- sys.stdout.write("Progress: %02.1f%%\r" % progress)
+- sys.stdout.flush()
+- p.disconnect()
+- sys.exit(0)
+- except:
+- p.disconnect()
+diff -urN Printrun-printrun-20140730.old/pronsole Printrun-printrun-20140730/pronsole
+--- Printrun-printrun-20140730.old/pronsole 1970-01-01 01:00:00.000000000 +0100
++++ Printrun-printrun-20140730/pronsole 2014-06-06 12:04:34.000000000 +0200
+@@ -0,0 +1,33 @@
++#!/usr/bin/env python
++
++# This file is part of the Printrun suite.
++#
++# Printrun is free software: you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation, either version 3 of the License, or
++# (at your option) any later version.
++#
++# Printrun is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
++
++import sys
++import traceback
++from printrun.pronsole import pronsole
++
++if __name__ == "__main__":
++
++ interp = pronsole()
++ interp.parse_cmdline(sys.argv[1:])
++ try:
++ interp.cmdloop()
++ except SystemExit:
++ interp.p.disconnect()
++ except:
++ print _("Caught an exception, exiting:")
++ traceback.print_exc()
++ interp.p.disconnect()
+diff -urN Printrun-printrun-20140730.old/pronsole.py Printrun-printrun-20140730/pronsole.py
+--- Printrun-printrun-20140730.old/pronsole.py 2014-08-10 15:44:04.863087038 +0200
++++ Printrun-printrun-20140730/pronsole.py 1970-01-01 01:00:00.000000000 +0100
+@@ -1,33 +0,0 @@
+-#!/usr/bin/env python
+-
+-# This file is part of the Printrun suite.
+-#
+-# Printrun is free software: you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 3 of the License, or
+-# (at your option) any later version.
+-#
+-# Printrun is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
+-
+-import sys
+-import traceback
+-from printrun.pronsole import pronsole
+-
+-if __name__ == "__main__":
+-
+- interp = pronsole()
+- interp.parse_cmdline(sys.argv[1:])
+- try:
+- interp.cmdloop()
+- except SystemExit:
+- interp.p.disconnect()
+- except:
+- print _("Caught an exception, exiting:")
+- traceback.print_exc()
+- interp.p.disconnect()
+diff -urN Printrun-printrun-20140730.old/pronterface Printrun-printrun-20140730/pronterface
+--- Printrun-printrun-20140730.old/pronterface 1970-01-01 01:00:00.000000000 +0100
++++ Printrun-printrun-20140730/pronterface 2014-06-06 12:04:34.000000000 +0200
+@@ -0,0 +1,40 @@
++#!/usr/bin/env python
++
++# This file is part of the Printrun suite.
++#
++# Printrun is free software: you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation, either version 3 of the License, or
++# (at your option) any later version.
++#
++# Printrun is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
++
++import sys
++
++try:
++ import wx # NOQA
++except:
++ print("wxPython is not installed. This program requires wxPython to run.")
++ if sys.version_info.major >= 3:
++ print("""\
++As you are currently running python3, this is most likely because wxPython is
++not yet available for python3. You should try running with python2 instead.""")
++ sys.exit(-1)
++ else:
++ raise
++
++from printrun.pronterface import PronterApp
++
++if __name__ == '__main__':
++ app = PronterApp(False)
++ try:
++ app.MainLoop()
++ except KeyboardInterrupt:
++ pass
++ del app
+diff -urN Printrun-printrun-20140730.old/pronterface.py Printrun-printrun-20140730/pronterface.py
+--- Printrun-printrun-20140730.old/pronterface.py 2014-08-10 15:44:04.862087044 +0200
++++ Printrun-printrun-20140730/pronterface.py 1970-01-01 01:00:00.000000000 +0100
+@@ -1,40 +0,0 @@
+-#!/usr/bin/env python
+-
+-# This file is part of the Printrun suite.
+-#
+-# Printrun is free software: you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation, either version 3 of the License, or
+-# (at your option) any later version.
+-#
+-# Printrun is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
+-
+-import sys
+-
+-try:
+- import wx # NOQA
+-except:
+- print("wxPython is not installed. This program requires wxPython to run.")
+- if sys.version_info.major >= 3:
+- print("""\
+-As you are currently running python3, this is most likely because wxPython is
+-not yet available for python3. You should try running with python2 instead.""")
+- sys.exit(-1)
+- else:
+- raise
+-
+-from printrun.pronterface import PronterApp
+-
+-if __name__ == '__main__':
+- app = PronterApp(False)
+- try:
+- app.MainLoop()
+- except KeyboardInterrupt:
+- pass
+- del app
+diff -urN Printrun-printrun-20140730.old/setup.py Printrun-printrun-20140730/setup.py
+--- Printrun-printrun-20140730.old/setup.py 2014-08-10 15:44:04.869087003 +0200
++++ Printrun-printrun-20140730/setup.py 2014-08-10 15:44:59.470765212 +0200
+@@ -162,7 +162,7 @@
+ license = "GPLv3",
+ data_files = data_files,
+ packages = ["printrun", "printrun.gl", "printrun.gl.libtatlin", "printrun.gui", "printrun.power"],
+- scripts = ["pronsole.py", "pronterface.py", "plater.py", "printcore.py"],
++ scripts = ["pronsole", "pronterface", "plater", "printcore"],
+ cmdclass = cmdclass,
+ ext_modules = extensions,
+ )
diff --git a/media-gfx/printrun/metadata.xml b/media-gfx/printrun/metadata.xml
new file mode 100644
index 000000000000..b2ffe0a55b80
--- /dev/null
+++ b/media-gfx/printrun/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>3dprint</herd>
+ <maintainer>
+ <email>amynka@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ Printrun is a set of G-code sending applications for RepRap.
+ It consists of printcore (dumb G-code sender), pronsole (featured command line
+ G-code sender), pronterface (featured G-code sender with graphical user
+ interface), and a small collection of helpful scripts.
+</longdescription>
+ <upstream>
+ <remote-id type="github">kliment/Printrun</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/printrun/printrun-20140730.ebuild b/media-gfx/printrun/printrun-20140730.ebuild
new file mode 100644
index 000000000000..e721013ac344
--- /dev/null
+++ b/media-gfx/printrun/printrun-20140730.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="GUI interface for 3D printing on RepRap and other printers"
+HOMEPAGE="https://github.com/kliment/Printrun"
+SRC_URI="https://github.com/kliment/Printrun/archive/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/pyserial
+ dev-python/wxpython
+ dev-python/pyglet
+ dev-python/dbus-python
+ media-gfx/cairosvg"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/printrun-no-py-in-binaries.patch"
+)
+
+S="${WORKDIR}/Printrun-${P}"
diff --git a/media-gfx/propaganda/Manifest b/media-gfx/propaganda/Manifest
new file mode 100644
index 000000000000..74385f8c9f7a
--- /dev/null
+++ b/media-gfx/propaganda/Manifest
@@ -0,0 +1,15 @@
+DIST Propaganda-13.tar.gz 4143608 RMD160 bae9a9c852d4d654125c9a66e82d9cdfb656fdb2 SHA1 e246b9b622c66fdc6277c4bfadbfcbe3c2602148 SHA256 69ec4fa3ce48ad8f775ba9f1fbb4c7fcc8e7046fc7290782f3dc93fc4e2823d9
+DIST Propaganda-14.tar.gz 3734658 RMD160 aff5300e26516162bdbda154c8dff4450f7bfb7c SHA1 1401ee3da5e7ca49387c7eca2356f57dfe2d99d7 SHA256 1b13ba961a029e15e22c63abaeb237f2775a1735405209f97c62890b7982c21d
+DIST Propaganda-For-E.tar.gz 4234559 RMD160 ed0c197a9e9f3a16c59de224eb48ef01e9f611e1 SHA1 1f6f703b90d6b07669b2df2d5fb435717969f416 SHA256 af2eb4c656598cbd3cb1f8356be264eaba63b438bc4fa6b08c5745b44308c49e
+DIST Propaganda-Vol-01.tar.gz 1086117 RMD160 11fbad85da221d467df40441d960db6db45b0b32 SHA1 58d960308da0a221d2e8887efac5787a24dc39a9 SHA256 a859a05f3d9b4c0ed85aeff37fee68b404fc7767400b978f07b0ada16d9680ea
+DIST Propaganda-Vol-02.tar.gz 335094 RMD160 503228608176cf85de7153dedad334481fc0ad28 SHA1 cbc91fb5d1f63036fafdd79bee8cd0dd4eab40e1 SHA256 d5184bcb3a92f984a79087432ebee41bfaaceaa451d58b1e7d7471f08d164595
+DIST Propaganda-Vol-03.tar.gz 1186808 RMD160 f32dec2431754e5f2b4525c0c0025f57fda32e1b SHA1 e5ae9045633e20a1fef43d5eba790809c1f16152 SHA256 f906297306e55398c4335db7cb5154b0c7ef07e40323b7d5698f988b187bd064
+DIST Propaganda-Vol-04.tar.gz 1136867 RMD160 fc52ae115cdec72d3e63e8b9fd54e159eb6370e1 SHA1 b2b4785569834ecad88b2ed80c77a5c834d4063e SHA256 f1b8e04a0935b97540783c67e01942aa72a54609dbd1a8d947f4a03248ed7e8b
+DIST Propaganda-Vol-05.tar.gz 1020372 RMD160 c5b34d3df0832c6f9363569d9a70b7413235f65c SHA1 b2f7451f0a225ade7e2c358c9bd39d73d9235933 SHA256 f886a25a0b2401bdefd62a770afb4221b1385691492dccbe683276a69447ef1d
+DIST Propaganda-Vol-06.tar.gz 1165404 RMD160 1353029f3f35f35000348f02c235a04f59e7a8f9 SHA1 81bc8c73b1638bf9023534516d3fe68037e64b4d SHA256 718ae670c608ff049b0be010bd894529a88702ba399f8502bf60648a3ad6c427
+DIST Propaganda-Vol-07.tar.gz 1736281 RMD160 dc231da85bb2c54b1024283c0ad4bb8b3ea78891 SHA1 975c0daa9491d96de79ea9f4bce68405fbe75f60 SHA256 cc4219992257620d85f34db0e542bd0d8b9932fda42b93fa2a874aa56a3dc113
+DIST Propaganda-Vol-08.tar.gz 1486421 RMD160 3f15d696ac615c2b13f375f1d81e493e4d7f738b SHA1 17677edb92de6d63cffca3a831c13945b822c5de SHA256 34cae16d1cb8ec07c309ab450a5bcdffc0ed02a6ffa3f594c2f50734f6e65895
+DIST Propaganda-Vol-09.tar.gz 1664869 RMD160 228bc3bb5c970f0e5caad4454966138cc68e2892 SHA1 3cf6224e0a273684d73c969cb645306fcaee45b2 SHA256 1029ce133b109eff2e64ee97563488e22e4d0e75e4e0df29e409eec07d665ad9
+DIST Propaganda-Vol-10.tar.gz 6376914 RMD160 5d71c6ff23bdfc315a27240432b4cf0ab7347a4e SHA1 1a5df861d15acd011843ea5abcb6855f502ecaeb SHA256 2a9df4a6af44aa0a4e061412e67cd096cb1d13eddc6fbb3ba7a2b0a2a869cf5c
+DIST Propaganda-Vol-11.tar.gz 3030910 RMD160 db59ecaa598df49546bd7cc7b87565751b262720 SHA1 0ce63c79d57da81e9e1b254a9f09d51921bef470 SHA256 c9aa7e8379b10dd4353e791b3f90aa43543e3d8745c0a1630343aea7ab52c515
+DIST Propaganda-Vol-12.tar.gz 3140955 RMD160 cf9e43e1f34eae0dc9c7728edb5e3eb59d04853f SHA1 c30fa72ff3bf4cd5485baabd8ce5e9feb725577b SHA256 704973ebf106b0e30ecbae211f1a67daddd9f84f880a191d03a726010823d919
diff --git a/media-gfx/propaganda/metadata.xml b/media-gfx/propaganda/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/media-gfx/propaganda/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/propaganda/propaganda-1.0.ebuild b/media-gfx/propaganda/propaganda-1.0.ebuild
new file mode 100644
index 000000000000..9bf71efec081
--- /dev/null
+++ b/media-gfx/propaganda/propaganda-1.0.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+S=${WORKDIR}/Propaganda
+DESCRIPTION="Propaganda Volume 1-14 + E. Tiling images for your desktop"
+HOMEPAGE="http://www.resexcellence.com/propaganda/index.shtml"
+SITE="http://www.resexcellence.com/propaganda/"
+# Point to any required sources; these will be automatically
+# downloaded by Portage.
+SRC_URI="${SITE}Propaganda-Vol-01.tar.gz
+ ${SITE}Propaganda-Vol-02.tar.gz
+ ${SITE}Propaganda-Vol-03.tar.gz
+ ${SITE}Propaganda-Vol-04.tar.gz
+ ${SITE}Propaganda-Vol-05.tar.gz
+ ${SITE}Propaganda-Vol-06.tar.gz
+ ${SITE}Propaganda-Vol-07.tar.gz
+ ${SITE}Propaganda-Vol-08.tar.gz
+ ${SITE}Propaganda-Vol-09.tar.gz
+ ${SITE}Propaganda-Vol-10.tar.gz
+ ${SITE}Propaganda-Vol-11.tar.gz
+ ${SITE}Propaganda-Vol-12.tar.gz
+ ${SITE}Propaganda-13.tar.gz
+ ${SITE}Propaganda-14.tar.gz
+ ${SITE}Propaganda-For-E.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE=""
+
+src_compile() {
+ rm -fr ${S}/../Propaganda-Vol-11/.finderinfo
+ rm -fr ${S}/../Propaganda-Vol-11/.resource
+
+ rm -fr ${S}/../Propaganda-Vol-12/.finderinfo
+ rm -fr ${S}/../Propaganda-Vol-12/.resource
+
+ mv ${S}/../Propaganda-Vol-11 ${S}/Vol11
+ mv ${S}/../Propaganda-Vol-12 ${S}/Vol12
+
+ for NUM in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do
+ chmod -x ${S}/Vol${NUM}/*
+ cd ${S}/Vol${NUM}
+ rm *.html
+ rename JPG jpg *.JPG
+ chmod +x script.perl
+ ./script.perl *.jpg
+ done
+ chmod -x ${S}/Propaganda-For-E/*
+ cd ${S}/Propaganda-For-E/
+ rm *.html
+ rename JPG jpg *.JPG
+ chmod +x script.perl
+ ./script.perl *.jpg
+ cd ${S}
+ pwd
+ rm -f ${S}/Vol2/\@
+ chmod ugo-w -R ${S}
+ chmod ugo+r -R ${S}
+}
+
+src_install() {
+ dodir /usr/share/pixmaps/
+ gunzip magicbg.tar.gz
+ dodoc COPYING READM* magicbg.tar
+ mv -f ${S} ${D}/usr/share/pixmaps || die
+}
diff --git a/media-gfx/psftools/Manifest b/media-gfx/psftools/Manifest
new file mode 100644
index 000000000000..3410e14e6606
--- /dev/null
+++ b/media-gfx/psftools/Manifest
@@ -0,0 +1 @@
+DIST psftools-1.0.7.tar.gz 547537 RMD160 7be57c4a8598e2b442750751cd3304ca5790d9d7 SHA1 4e8b2e7686532a25c18cacaeb90a8f0ed57a30c6 SHA256 d6f83e76efddaff86d69392656a5623b54e79cfe7aa74b75684ae3fef1093baf
diff --git a/media-gfx/psftools/metadata.xml b/media-gfx/psftools/metadata.xml
new file mode 100644
index 000000000000..696065edd338
--- /dev/null
+++ b/media-gfx/psftools/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>fonts</herd>
+</pkgmetadata>
diff --git a/media-gfx/psftools/psftools-1.0.7.ebuild b/media-gfx/psftools/psftools-1.0.7.ebuild
new file mode 100644
index 000000000000..1a6c3beda4aa
--- /dev/null
+++ b/media-gfx/psftools/psftools-1.0.7.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Utilities for manipulation of console fonts in PSF format"
+HOMEPAGE="http://www.seasip.info/Unix/PSF/"
+SRC_URI="http://www.seasip.info/Unix/PSF/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS NEWS TODO doc/*.txt
+}
diff --git a/media-gfx/pstoedit/Manifest b/media-gfx/pstoedit/Manifest
new file mode 100644
index 000000000000..fd14e1b28b13
--- /dev/null
+++ b/media-gfx/pstoedit/Manifest
@@ -0,0 +1,3 @@
+DIST pstoedit-3.61.tar.gz 989480 SHA256 e9935f5510fc5a3227bd31a74e88911f02a4c8516f3e0fe9fbc0dc780f2460db SHA512 fa7ca567ea5acc95000b9d7582c22605725f5893d2f00412f6e9e59ead1efc6cafbbb019df0a4ae4f849ed50df59cf1f4d187fdd3b560d62173287d6f7e3db72 WHIRLPOOL cf7b252afce0c65ccb9d739df5e4c4b419f7f39f9a76a5ad3f1dfc78cb9a0549b4ac0881dde7400fa51d9f75d479aa0669da76d8c01a628c2d4676cbe56e5287
+DIST pstoedit-3.62.tar.gz 1013477 SHA256 8074c44637d48fa1a9253b263b18a61258bab904df473f803d8a639b6a038148 SHA512 f8c8643c873066026d0ef15a845006cf13928410e1c4b822bdd9a727d5d80f703d3ddabbcde249c72395c3b013dd2e1ef020f4a74f239b118035372ba5e4dda4 WHIRLPOOL 1cd36f55786e060bb66b5f41461edd38b40a5222c0abe9442a7b7223b781922f875271cda99397928ddc137725e236ef53cfb15f070510a770364d822df90ec9
+DIST pstoedit-3.70.tar.gz 1013949 SHA256 06b86113f7847cbcfd4e0623921a8763143bbcaef9f9098e6def650d1ff8138c SHA512 63668ea039fdf988ba007bafb8dc1f23f06d4eb430a92b97fb93c71b819f63e2708b99476ec9b096598db2ddd30d29a69101f078e7d4fdfec314677f50293cf9 WHIRLPOOL b1538ddc6fdebd150e79e3c574b41941077863e14eff1b9e74baf0bffe6d4ef8419bff551bf88e6e4e98550648d7a050e18b0df8627373351074ff434de8a571
diff --git a/media-gfx/pstoedit/files/pstoedit-3.60-libdl.patch b/media-gfx/pstoedit/files/pstoedit-3.60-libdl.patch
new file mode 100644
index 000000000000..279ed715f53a
--- /dev/null
+++ b/media-gfx/pstoedit/files/pstoedit-3.60-libdl.patch
@@ -0,0 +1,13 @@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 6b33220..30c9f2e 100755
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -139,7 +139,7 @@ libpstoedit_la_SOURCES = \
+ genericints.h \
+ version.h
+
+-libpstoedit_la_LIBADD = ${CXX_STD_LIB} ${CXX_RUNTIME_LIB} -ldl -lm
++libpstoedit_la_LIBADD = ${CXX_STD_LIB} ${CXX_RUNTIME_LIB} ${LIBLD_LDFLAGS} -lm
+ libpstoedit_la_LDFLAGS = -no-undefined
+
+ pstoedit_SOURCES = cmdmain.cpp
diff --git a/media-gfx/pstoedit/files/pstoedit-3.60-parallel.patch b/media-gfx/pstoedit/files/pstoedit-3.60-parallel.patch
new file mode 100644
index 000000000000..0ad8c7cd9aa8
--- /dev/null
+++ b/media-gfx/pstoedit/files/pstoedit-3.60-parallel.patch
@@ -0,0 +1,49 @@
+--- pstoedit-3.60/src/Makefile.am.orig
++++ pstoedit-3.60/src/Makefile.am
+@@ -87,6 +87,7 @@
+ $(sample_drivers_src)
+ libp2edrvstd_la_LIBADD=libpstoedit.la
+ libp2edrvstd_la_LDFLAGS=-no-undefined -module
++libp2edrvstd_la_DEPENDENCIES = libpstoedit.la
+
+ #libp2edrvplugins_la_SOURCES=drvmif.cpp drvcgm.cpp drvrtf.cpp drvwwmf.cpp
+ #libp2edrvplugins_la_LIBADD=
+@@ -96,25 +97,30 @@
+ libp2edrvlplot_la_SOURCES=drvlplot.cpp drvlplot.h initlibrary.cpp
+ libp2edrvlplot_la_LIBADD=$(LIBPLOTTER_LDFLAGS) libpstoedit.la
+ libp2edrvlplot_la_LDFLAGS=-no-undefined -module
++libp2edrvlplot_la_DEPENDENCIES = libpstoedit.la
+
+ libp2edrvswf_la_SOURCES=drvswf.cpp drvswf.h initlibrary.cpp
+ libp2edrvswf_la_LIBADD=$(LIBMING_LDFLAGS) libpstoedit.la
+ libp2edrvswf_la_LDFLAGS=-no-undefined -module
++libp2edrvswf_la_DEPENDENCIES = libpstoedit.la
+
+ # note the __ stand for ++ - automake treats all no alphanums chars as _
+ libp2edrvmagick___la_SOURCES=drvmagick++.cpp drvmagick++.h initlibrary.cpp
+ libp2edrvmagick___la_LIBADD=${LIBMAGICK_LDFLAGS} libpstoedit.la
+ libp2edrvmagick___la_LDFLAGS=-no-undefined -module
++libp2edrvmagick___la_DEPENDENCIES = libpstoedit.la
+ # moved to configure.ac because needed only for g++ libp2edrvmagick___la_CPPFLAGS=$(LIBMAGICK_CFLAGS) $(AM_CPPFLAGS) -Wno-long-long
+
+ if USE_EMFBYSOURCE
+ libp2edrvwmf_la_SOURCES=emflib.cpp drvwmf.cpp drvwmf.h initlibrary.cpp
+ libp2edrvwmf_la_LIBADD=libpstoedit.la
+ libp2edrvwmf_la_LDFLAGS=-no-undefined -module
++libp2edrvwmf_la_DEPENDENCIES = libpstoedit.la
+ else
+ libp2edrvwmf_la_SOURCES=drvwmf.cpp drvwmf.h initlibrary.cpp
+ libp2edrvwmf_la_LIBADD=$(LIBEMF_LDFLAGS) libpstoedit.la
+ libp2edrvwmf_la_LDFLAGS=-no-undefined -module
++libp2edrvwmf_la_DEPENDENCIES = libpstoedit.la
+ endif
+
+ libpstoedit_la_SOURCES = \
+@@ -139,6 +145,7 @@
+ pstoedit_SOURCES = cmdmain.cpp
+ pstoedit_LDADD = libpstoedit.la ${LIBLD_LDFLAGS}
+ pstoedit_LDFLAGS = -no-undefined
++pstoedit_DEPENDENCIES = libpstoedit.la
+
+ pkginclude_HEADERS = \
+ pstoedit.h \
diff --git a/media-gfx/pstoedit/files/pstoedit-3.62-parallel.patch b/media-gfx/pstoedit/files/pstoedit-3.62-parallel.patch
new file mode 100644
index 000000000000..e20324e2fd81
--- /dev/null
+++ b/media-gfx/pstoedit/files/pstoedit-3.62-parallel.patch
@@ -0,0 +1,54 @@
+--- pstoedit-3.62.orig/src/Makefile.am
++++ pstoedit-3.62/src/Makefile.am
+@@ -92,6 +92,7 @@
+ $(sample_drivers_src)
+ libp2edrvstd_la_LIBADD=libpstoedit.la
+ libp2edrvstd_la_LDFLAGS=-no-undefined -module
++libp2edrvstd_la_DEPENDENCIES = libpstoedit.la
+
+ #libp2edrvplugins_la_SOURCES=drvmif.cpp drvcgm.cpp drvrtf.cpp drvwwmf.cpp
+ #libp2edrvplugins_la_LIBADD=
+@@ -101,29 +102,35 @@
+ libp2edrvlplot_la_SOURCES=drvlplot.cpp drvlplot.h initlibrary.cpp
+ libp2edrvlplot_la_LIBADD=$(LIBPLOTTER_LDFLAGS) libpstoedit.la
+ libp2edrvlplot_la_LDFLAGS=-no-undefined -module
++libp2edrvlplot_la_DEPENDENCIES = libpstoedit.la
+
+ libp2edrvpptx_la_SOURCES=drvpptx.cpp drvpptx.h initlibrary.cpp
+ libp2edrvpptx_la_LIBADD=$(LIBPPTX_LDFLAGS) libpstoedit.la
+ libp2edrvpptx_la_LDFLAGS=-no-undefined -module
++libp2edrvpptx_la_DEPENDENCIES = libpstoedit.la
+
+ libp2edrvswf_la_SOURCES=drvswf.cpp drvswf.h initlibrary.cpp
+ libp2edrvswf_la_LIBADD=$(LIBMING_LDFLAGS) libpstoedit.la
+ libp2edrvswf_la_LDFLAGS=-no-undefined -module
++libp2edrvswf_la_DEPENDENCIES = libpstoedit.la
+
+ # note the __ stand for ++ - automake treats all no alphanums chars as _
+ libp2edrvmagick___la_SOURCES=drvmagick++.cpp drvmagick++.h initlibrary.cpp
+ libp2edrvmagick___la_LIBADD=${LIBMAGICK_LDFLAGS} libpstoedit.la
+ libp2edrvmagick___la_LDFLAGS=-no-undefined -module
++libp2edrvmagick___la_DEPENDENCIES = libpstoedit.la
+ # moved to configure.ac because needed only for g++ libp2edrvmagick___la_CPPFLAGS=$(LIBMAGICK_CFLAGS) $(AM_CPPFLAGS) -Wno-long-long
+
+ if USE_EMFBYSOURCE
+ libp2edrvwmf_la_SOURCES=emflib.cpp drvwmf.cpp drvwmf.h initlibrary.cpp
+ libp2edrvwmf_la_LIBADD=libpstoedit.la
+ libp2edrvwmf_la_LDFLAGS=-no-undefined -module
++libp2edrvwmf_la_DEPENDENCIES = libpstoedit.la
+ else
+ libp2edrvwmf_la_SOURCES=drvwmf.cpp drvwmf.h initlibrary.cpp
+ libp2edrvwmf_la_LIBADD=$(LIBEMF_LDFLAGS) libpstoedit.la
+ libp2edrvwmf_la_LDFLAGS=-no-undefined -module
++libp2edrvwmf_la_DEPENDENCIES = libpstoedit.la
+ endif
+
+ libpstoedit_la_SOURCES = \
+@@ -148,6 +155,7 @@
+ pstoedit_SOURCES = cmdmain.cpp
+ pstoedit_LDADD = libpstoedit.la ${LIBLD_LDFLAGS}
+ pstoedit_LDFLAGS = -no-undefined
++pstoedit_DEPENDENCIES = libpstoedit.la
+
+ pkginclude_HEADERS = \
+ pstoedit.h \
diff --git a/media-gfx/pstoedit/files/pstoedit-3.70-pkgconfig.patch b/media-gfx/pstoedit/files/pstoedit-3.70-pkgconfig.patch
new file mode 100644
index 000000000000..c101077431e5
--- /dev/null
+++ b/media-gfx/pstoedit/files/pstoedit-3.70-pkgconfig.patch
@@ -0,0 +1,14 @@
+LIBPNG_LDFLAGS is never substituted...
+https://bugs.gentoo.org/show_bug.cgi?id=551208
+
+Index: pstoedit-3.70/config/pstoedit.pc.in
+===================================================================
+--- pstoedit-3.70.orig/config/pstoedit.pc.in
++++ pstoedit-3.70/config/pstoedit.pc.in
+@@ -7,5 +7,5 @@ Name: pstoedit
+ Description: converts PostScript(TM) and PDF files to other vector graphic formats
+ Version: @VERSION@.0
+ Requires:
+-Libs: -L@libdir@ -lpstoedit @LIBPNG_LDFLAGS@ @CXX_STD_LIB@ @CXX_RUNTIME_LIB@ @LIBLD_LDFLAGS@
++Libs: -L@libdir@ -lpstoedit @CXX_STD_LIB@ @CXX_RUNTIME_LIB@ @LIBLD_LDFLAGS@
+ Cflags: -I@includedir@
diff --git a/media-gfx/pstoedit/metadata.xml b/media-gfx/pstoedit/metadata.xml
new file mode 100644
index 000000000000..3ce910543639
--- /dev/null
+++ b/media-gfx/pstoedit/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tex</herd>
+ <herd>printing</herd>
+ <use>
+ <flag name="emf">Enable <pkg>media-libs/libemf</pkg> support</flag>
+ <flag name="flash">Enable <pkg>media-libs/ming</pkg> SWF support</flag>
+ <flag name="pptx">Enable support for generating PowerPoint pptx files</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">pstoedit</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/pstoedit/pstoedit-3.61.ebuild b/media-gfx/pstoedit/pstoedit-3.61.ebuild
new file mode 100644
index 000000000000..e4275793fa59
--- /dev/null
+++ b/media-gfx/pstoedit/pstoedit-3.61.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit autotools eutils
+
+DESCRIPTION="Translate PostScript and PDF graphics into other vector formats"
+HOMEPAGE="http://sourceforge.net/projects/pstoedit/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="emf flash imagemagick plotutils"
+
+RDEPEND="
+ >=media-libs/libpng-1.4.3
+ >=media-libs/gd-2.0.35-r1
+ >=app-text/ghostscript-gpl-8.71-r1
+ emf? ( >=media-libs/libemf-1.0.3 )
+ flash? ( >=media-libs/ming-0.4.3 )
+ imagemagick? ( >=media-gfx/imagemagick-6.6.1.2[cxx] )
+ plotutils? ( media-libs/plotutils )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i \
+ -e '/CXXFLAGS="-g"/d' \
+ -e 's:-pedantic::' \
+ configure.ac || die
+
+ epatch "${FILESDIR}"/${PN}-3.60-parallel.patch \
+ "${FILESDIR}"/${PN}-3.60-libdl.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_with emf) \
+ $(use_with imagemagick magick) \
+ $(use_with plotutils libplot) \
+ $(use_with flash swf)
+}
+
+src_install() {
+ default
+ doman doc/pstoedit.1
+ dodoc doc/*.txt
+ dohtml doc/*.htm
+}
diff --git a/media-gfx/pstoedit/pstoedit-3.62.ebuild b/media-gfx/pstoedit/pstoedit-3.62.ebuild
new file mode 100644
index 000000000000..63ada4902991
--- /dev/null
+++ b/media-gfx/pstoedit/pstoedit-3.62.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="Translate PostScript and PDF graphics into other vector formats"
+HOMEPAGE="http://sourceforge.net/projects/pstoedit/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="emf flash imagemagick plotutils pptx static-libs"
+
+RDEPEND="
+ >=media-libs/libpng-1.4.3
+ >=media-libs/gd-2.0.35-r1
+ >=app-text/ghostscript-gpl-8.71-r1
+ emf? ( >=media-libs/libemf-1.0.3 )
+ flash? ( >=media-libs/ming-0.4.3 )
+ imagemagick? ( >=media-gfx/imagemagick-6.6.1.2[cxx] )
+ plotutils? ( media-libs/plotutils )
+ pptx? ( dev-libs/libzip )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i \
+ -e '/CXXFLAGS="-g"/d' \
+ -e 's:-pedantic::' \
+ configure.ac || die
+
+ epatch "${FILESDIR}"/${PN}-3.62-parallel.patch
+ epatch "${FILESDIR}"/${PN}-3.60-libdl.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with emf) \
+ $(use_with imagemagick magick) \
+ $(use_with plotutils libplot) \
+ $(use_with flash swf) \
+ $(use_with pptx)
+}
+
+src_install() {
+ default
+ doman doc/pstoedit.1
+ dodoc doc/*.txt
+ dohtml doc/*.htm
+
+ prune_libtool_files
+}
diff --git a/media-gfx/pstoedit/pstoedit-3.70-r1.ebuild b/media-gfx/pstoedit/pstoedit-3.70-r1.ebuild
new file mode 100644
index 000000000000..b59c595d4658
--- /dev/null
+++ b/media-gfx/pstoedit/pstoedit-3.70-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="Translate PostScript and PDF graphics into other vector formats"
+HOMEPAGE="http://sourceforge.net/projects/pstoedit/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="emf flash imagemagick plotutils pptx static-libs"
+
+RDEPEND="
+ >=media-libs/gd-2.0.35-r1
+ >=app-text/ghostscript-gpl-8.71-r1
+ emf? ( >=media-libs/libemf-1.0.3 )
+ flash? ( >=media-libs/ming-0.4.3 )
+ imagemagick? ( >=media-gfx/imagemagick-6.6.1.2[cxx] )
+ plotutils? ( media-libs/plotutils )
+ pptx? ( dev-libs/libzip )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i \
+ -e '/CXXFLAGS="-g"/d' \
+ -e 's:-pedantic::' \
+ configure.ac || die
+
+ epatch "${FILESDIR}"/${PN}-3.60-libdl.patch
+ epatch "${FILESDIR}"/${PN}-3.70-pkgconfig.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with emf) \
+ $(use_with imagemagick magick) \
+ $(use_with plotutils libplot) \
+ $(use_with flash swf) \
+ $(use_with pptx)
+}
+
+src_install() {
+ default
+ doman doc/pstoedit.1
+ dodoc doc/*.txt
+ dohtml doc/*.htm
+
+ find "${ED}" -name '*.la' -delete
+}
diff --git a/media-gfx/pstoedit/pstoedit-3.70.ebuild b/media-gfx/pstoedit/pstoedit-3.70.ebuild
new file mode 100644
index 000000000000..561c4a1fab82
--- /dev/null
+++ b/media-gfx/pstoedit/pstoedit-3.70.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="Translate PostScript and PDF graphics into other vector formats"
+HOMEPAGE="http://sourceforge.net/projects/pstoedit/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="emf flash imagemagick plotutils pptx static-libs"
+
+RDEPEND="
+ >=media-libs/gd-2.0.35-r1
+ >=app-text/ghostscript-gpl-8.71-r1
+ emf? ( >=media-libs/libemf-1.0.3 )
+ flash? ( >=media-libs/ming-0.4.3 )
+ imagemagick? ( >=media-gfx/imagemagick-6.6.1.2[cxx] )
+ plotutils? ( media-libs/plotutils )
+ pptx? ( dev-libs/libzip )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ sed -i \
+ -e '/CXXFLAGS="-g"/d' \
+ -e 's:-pedantic::' \
+ configure.ac || die
+
+ epatch "${FILESDIR}"/${PN}-3.60-libdl.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable static-libs static) \
+ $(use_with emf) \
+ $(use_with imagemagick magick) \
+ $(use_with plotutils libplot) \
+ $(use_with flash swf) \
+ $(use_with pptx)
+}
+
+src_install() {
+ default
+ doman doc/pstoedit.1
+ dodoc doc/*.txt
+ dohtml doc/*.htm
+
+ find "${ED}" -name '*.la' -delete
+}
diff --git a/media-gfx/pycam/Manifest b/media-gfx/pycam/Manifest
new file mode 100644
index 000000000000..4dad650d0a0e
--- /dev/null
+++ b/media-gfx/pycam/Manifest
@@ -0,0 +1,2 @@
+DIST pycam-0.5.1.tar.gz 1680577 SHA256 e26a6db82efa4761a1db6b81de3165898430d5c14d09614b67321105d67e264c SHA512 f880d960f82eb374465a593f3b27e9f72148b3ceb99fde15bee4ccf1078acc8ef44ddfd9ee12f89e5b5e5ee14706b6e5d76eff7d0334c9526866ff263a057994 WHIRLPOOL 3f78eedcc6d745142578ef3e57141cf026b2ebca1a699a340237e2288c9c7054a1226ad47aa947d5de612c44c4445fd451e8adcfe7c0783b59332cb1a12998b9
+DIST pycam-0.6_pre20130416.tar.gz 5766314 SHA256 d927682785178b8aba57e275b6af0b9203263840b0648b023616f5f6cd5867d6 SHA512 04d0a3328febbe58010cf9ad990b8c059f9fe0a17946d8485979082dfaa0b3b8705ffdcd695dca5887d9892a55285cca7acf774fe7c407240103da2de92dc9a1 WHIRLPOOL d6ca3504bca4e1d9e0830c5bd0f765d6aad0fb869890d07e430f6f05dc50103d209c7c90d8b866a9dee9fc20df739ed38f56005718c67786f318a70cea9b0719
diff --git a/media-gfx/pycam/files/fix-export-toolpath.patch b/media-gfx/pycam/files/fix-export-toolpath.patch
new file mode 100644
index 000000000000..5b8a1f59ce7f
--- /dev/null
+++ b/media-gfx/pycam/files/fix-export-toolpath.patch
@@ -0,0 +1,25 @@
+From fd206b003c0ba494cbdf6192395ec45fd1f706f3 Mon Sep 17 00:00:00 2001
+From: Tobias Schmidt <tobias@isntwork.org>
+Date: Sat, 12 Oct 2013 00:12:52 +0200
+Subject: [PATCH] add Exporters.GCode package to setup.py to fix broken
+ ToolpathExport plugin
+
+---
+ setup.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/setup.py b/setup.py
+index 92feab4..634ff9f 100755
+--- a/setup.py
++++ b/setup.py
+@@ -89,6 +89,7 @@ Windows: select Python 2.5 in the following dialog.
+ "pycam",
+ "pycam.Cutters",
+ "pycam.Exporters",
++ "pycam.Exporters.GCode",
+ "pycam.Geometry",
+ "pycam.Gui",
+ "pycam.Importers",
+--
+1.7.10.4
+
diff --git a/media-gfx/pycam/metadata.xml b/media-gfx/pycam/metadata.xml
new file mode 100644
index 000000000000..fe31eccd192c
--- /dev/null
+++ b/media-gfx/pycam/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>slis@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/pycam/pycam-0.5.1.ebuild b/media-gfx/pycam/pycam-0.5.1.ebuild
new file mode 100644
index 000000000000..ca3598ac7ecd
--- /dev/null
+++ b/media-gfx/pycam/pycam-0.5.1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit distutils-r1 python-r1
+
+DESCRIPTION="Open Source CAM - Toolpath Generation for 3-Axis CNC machining"
+HOMEPAGE="http://pycam.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+
+DEPEND="
+ dev-python/pygtk
+ dev-python/pygtkglext
+ dev-python/pyopengl
+"
+RDEPEND="${DEPEND}"
diff --git a/media-gfx/pycam/pycam-0.6_pre20130416-r1.ebuild b/media-gfx/pycam/pycam-0.6_pre20130416-r1.ebuild
new file mode 100644
index 000000000000..400327f65248
--- /dev/null
+++ b/media-gfx/pycam/pycam-0.6_pre20130416-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1 python-r1
+
+DESCRIPTION="Open Source CAM - Toolpath Generation for 3-Axis CNC machining"
+HOMEPAGE="http://pycam.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~slis/${P}.tar.gz"
+
+LICENSE="GPL-3"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+
+DEPEND="
+ dev-python/pygtk
+ dev-python/pygtkglext
+ dev-python/pyopengl
+"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}/fix-export-toolpath.patch"
+ distutils-r1_src_prepare
+}
diff --git a/media-gfx/pydot/Manifest b/media-gfx/pydot/Manifest
new file mode 100644
index 000000000000..e42ff08eea40
--- /dev/null
+++ b/media-gfx/pydot/Manifest
@@ -0,0 +1 @@
+DIST pydot-1.0.28.tar.gz 19711 SHA256 1eeaff7b104fb8f305a98318dafde0b2d15f1efcdf8b16206465551cd46ed9df SHA512 54b4d7bfb01bbcae9a4832d1c3321d4f453a93f062ee55b35e3d59bee3f8989f4a544afb56c3d16b22bca8e6ef24b6286ac2688c9045b16906ef625999b35055 WHIRLPOOL eb06c22418638351def215e8127af1b3afbd193484dec9a3114e4377f8afcccb25cb7f40e9f29121d086723ddb94dd2fd9ac473f3583a9b782940cce9e208318
diff --git a/media-gfx/pydot/files/pydot-1.0.23-setup.patch b/media-gfx/pydot/files/pydot-1.0.23-setup.patch
new file mode 100644
index 000000000000..c87cc32b30d1
--- /dev/null
+++ b/media-gfx/pydot/files/pydot-1.0.23-setup.patch
@@ -0,0 +1,21 @@
+--- setup.py
++++ setup.py
+@@ -1,9 +1,9 @@
+ #!/usr/bin/env python
+
+ try:
+- from distutils.core import setup
+-except ImportError, excp:
+ from setuptools import setup
++except ImportError, excp:
++ from distutils.core import setup
+
+ import pydot
+ import os
+@@ -31,5 +31,4 @@
+ 'Topic :: Software Development :: Libraries :: Python Modules'],
+ long_description = "\n".join(pydot.__doc__.split('\n')),
+ py_modules = ['pydot', 'dot_parser'],
+- install_requires = ['pyparsing', 'setuptools'],
+- data_files = [('.', ['LICENSE', 'README'])] )
++ install_requires = ['pyparsing', 'setuptools'] )
diff --git a/media-gfx/pydot/files/pydot-1.0.28-pyparsing2fix.patch b/media-gfx/pydot/files/pydot-1.0.28-pyparsing2fix.patch
new file mode 100644
index 000000000000..12a01091223c
--- /dev/null
+++ b/media-gfx/pydot/files/pydot-1.0.28-pyparsing2fix.patch
@@ -0,0 +1,14 @@
+diff -up pydot-1.0.28/dot_parser.py.pyparsing2fix pydot-1.0.28/dot_parser.py
+--- pydot-1.0.28/dot_parser.py.pyparsing2fix 2013-12-09 08:59:24.660145534 -0500
++++ pydot-1.0.28/dot_parser.py 2013-12-09 09:00:10.021222397 -0500
+@@ -25,8 +25,9 @@ from pyparsing import __version__ as pyp
+ from pyparsing import ( nestedExpr, Literal, CaselessLiteral, Word, Upcase, OneOrMore, ZeroOrMore,
+ Forward, NotAny, delimitedList, oneOf, Group, Optional, Combine, alphas, nums,
+ restOfLine, cStyleComment, nums, alphanums, printables, empty, quotedString,
+- ParseException, ParseResults, CharsNotIn, _noncomma, dblQuotedString, QuotedString, ParserElement )
++ ParseException, ParseResults, CharsNotIn, dblQuotedString, QuotedString, ParserElement )
+
++_noncomma = "".join( [ c for c in printables if c != "," ] )
+
+ class P_AttrList:
+
diff --git a/media-gfx/pydot/metadata.xml b/media-gfx/pydot/metadata.xml
new file mode 100644
index 000000000000..b11b15cd9f32
--- /dev/null
+++ b/media-gfx/pydot/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <longdescription>Python bindings for Graphviz</longdescription>
+ <upstream>
+ <remote-id type="google-code">pydot</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/pydot/pydot-1.0.28-r2.ebuild b/media-gfx/pydot/pydot-1.0.28-r2.ebuild
new file mode 100644
index 000000000000..f1be194725e6
--- /dev/null
+++ b/media-gfx/pydot/pydot-1.0.28-r2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Python interface to Graphviz's Dot language"
+HOMEPAGE="http://code.google.com/p/pydot/ http://pypi.python.org/pypi/pydot"
+SRC_URI="http://pydot.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris"
+IUSE=""
+
+RDEPEND="
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ media-gfx/graphviz"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.0.23-setup.patch
+ "${FILESDIR}"/${P}-pyparsing2fix.patch )
diff --git a/media-gfx/qingy-themes/Manifest b/media-gfx/qingy-themes/Manifest
new file mode 100644
index 000000000000..9be5e524cb74
--- /dev/null
+++ b/media-gfx/qingy-themes/Manifest
@@ -0,0 +1,18 @@
+DIST _aquaish_-default.tar.gz 370262 SHA256 44a8f05c881f27e01bf17ba02fa324cbf8bc2a477b23402266da48d177ef9fec
+DIST _biohazard_-default-1.0.tar.gz 273773 SHA256 0e4a822976ad0e83e7a56b489d81a7f376a859845470449d47e102be783537e2
+DIST _casablanca_-default-1.0.tar.gz 129819 SHA256 d27f75ac98d3adb6825b9ce087e29858f032cb5369b2f799c0b60e84141d114c
+DIST _dragonfly_-default.tar.gz 907660 SHA256 5731e7889f29fd8b63b3030e76b51fc592eb613fca7759d8b93c7e50825cfe0b
+DIST _matrix_-default-2.tar.gz 371502 SHA256 d67b801f0146c035d60869284c5336cac2ce622a78c1000baaacc15737365242
+DIST _vendetta_-default.tar.gz 874809 SHA256 7f5445c3b0a12b49139ae29b4bbec41031b25bd7407aab4915b79e49162476f7
+DIST adc-default.tar.gz 361240 SHA256 981df75ddbd237a77841309bed9197737d847e39862e3b38be0341c3c04401d1
+DIST blnkftre-default.tar.gz 49770 SHA256 7ac6969aa2d10a6c8d34d17cd0b291c90217e275104723c90858f48ef156270b
+DIST chaosr-default.tar.gz 402463 SHA256 2c90c861ede0621dd194ef22db0e5c8e0be886d983db0bc39f5db987df4551b0
+DIST computerroom-default.tar.gz 985602 SHA256 335c9b327267c47ad4fdb3e8d2aacf49d953fd16827673d212e3e4fd4a7afe2b
+DIST fgdm-default.tar.gz 206988 SHA256 661c0e4d14868e8d74d5a000539dd41042abc9f87ef9bc0f737f45375c710d82
+DIST fireplace-default.tar.gz 1392742 SHA256 7d17a2cebeb1de12d09fb42b8b54f227844e8621506f8554d56d38c46ea71768
+DIST fkdm-default.tar.gz 226868 SHA256 0ee44e066ecde10f8c1906684560dfdedecd2d419414123e8276cb990374c448
+DIST kitten-default-1.0.tar.gz 103467 SHA256 4270d799c93687811ba4977ed828d184bf98921190f668d8998131f3d7736dec
+DIST lambretta-default.tar.gz 214789 SHA256 d9462603d8b9559d72dbd714158989b13b78002163bcc960a7ffe6d32f1c517a
+DIST macmen-default.tar.gz 313117 SHA256 e3f65f3dad7a08795f38e92472f9690e8dc98f6fc2f3ac755d3b157309159247
+DIST qingy_lila.tar.bz2 433944 SHA256 acbdf26b75096fce253ef426a47b58fc1706b8c7131566257f74fe08fdb5bcbd
+DIST rouge-default.tar.gz 233178 SHA256 a1389912a9d41fa471e0f571cf87edf8da0acc2001600267de6c0e7425448cd3
diff --git a/media-gfx/qingy-themes/metadata.xml b/media-gfx/qingy-themes/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/media-gfx/qingy-themes/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/qingy-themes/qingy-themes-20050816.ebuild b/media-gfx/qingy-themes/qingy-themes-20050816.ebuild
new file mode 100644
index 000000000000..266edd9aed1a
--- /dev/null
+++ b/media-gfx/qingy-themes/qingy-themes-20050816.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="Collection of qingy themes"
+
+HOMEPAGE="http://themes.freshmeat.net/projects/qingy-lila/
+ http://themes.freshmeat.net/projects/kitten/
+ http://themes.freshmeat.net/projects/blnkftre/
+ http://themes.freshmeat.net/projects/fireplace/
+ http://themes.freshmeat.net/projects/_dragonfly_/
+ http://themes.freshmeat.net/projects/computerroom/
+ http://themes.freshmeat.net/projects/_biohazard_/
+ http://themes.freshmeat.net/projects/_casablanca_/
+ http://themes.freshmeat.net/projects/_matrix_/
+ http://themes.freshmeat.net/projects/adc/
+ http://themes.freshmeat.net/projects/rouge/
+ http://themes.freshmeat.net/projects/_aquaish_/
+ http://themes.freshmeat.net/projects/macmen/
+ http://themes.freshmeat.net/projects/lambretta/
+ http://themes.freshmeat.net/projects/_vendetta_/
+ http://themes.freshmeat.net/projects/chaosr/
+ http://themes.freshmeat.net/projects/fgdm/
+ http://themes.freshmeat.net/projects/fkdm/"
+
+THEME_URI="http://download.freshmeat.net/themes"
+
+SRC_URI="http://jefklak.suidzer0.org/downloads/qingy/qingy_lila.tar.bz2
+ ${THEME_URI}/kitten/kitten-default-1.0.tar.gz
+ ${THEME_URI}/blnkftre/blnkftre-default.tar.gz
+ ${THEME_URI}/fireplace/fireplace-default.tar.gz
+ ${THEME_URI}/_dragonfly_/_dragonfly_-default.tar.gz
+ ${THEME_URI}/computerroom/computerroom-default.tar.gz
+ ${THEME_URI}/_biohazard_/_biohazard_-default-1.0.tar.gz
+ ${THEME_URI}/_casablanca_/_casablanca_-default-1.0.tar.gz
+ ${THEME_URI}/_matrix_/_matrix_-default-2.tar.gz
+ ${THEME_URI}/adc/adc-default.tar.gz
+ ${THEME_URI}/rouge/rouge-default.tar.gz
+ ${THEME_URI}/_aquaish_/_aquaish_-default.tar.gz
+ ${THEME_URI}/macmen/macmen-default.tar.gz
+ ${THEME_URI}/lambretta/lambretta-default.tar.gz
+ ${THEME_URI}/_vendetta_/_vendetta_-default.tar.gz
+ ${THEME_URI}/blnkftre/blnkftre-default.tar.gz
+ ${THEME_URI}/chaosr/chaosr-default.tar.gz
+ ${THEME_URI}/fgdm/fgdm-default.tar.gz
+ ${THEME_URI}/fkdm/fkdm-default.tar.gz"
+
+# lila -> freedist
+# all the others -> GPL
+LICENSE="GPL-2 freedist"
+KEYWORDS="amd64 ppc x86"
+
+SLOT="0"
+IUSE=""
+RDEPEND="sys-apps/qingy"
+
+S=${WORKDIR}
+
+src_install()
+{
+ local QINGY_THEMES=/usr/share/qingy/themes
+ dodir ${QINGY_THEMES}
+ cp -dpR * ${D}/${QINGY_THEMES}
+ chown -R root:0 ${D}/${QINGY_THEMES}
+}
diff --git a/media-gfx/qiv/Manifest b/media-gfx/qiv/Manifest
new file mode 100644
index 000000000000..c9236f6658bc
--- /dev/null
+++ b/media-gfx/qiv/Manifest
@@ -0,0 +1,2 @@
+DIST qiv-2.2.4.tgz 98874 SHA256 ed6078dc550c1dc2fe35c1e0f46463c13589a24b83d4f7101b71a7485e51abb7 SHA512 744014ff70c9397d7a90e60740f482976713c9e5ff295a03684ae7b50ae70b86589d9e9066702fd43241bf2767c3537f582aab5ebbde25caea1663ec825f76a5 WHIRLPOOL 4587a9f467bf5bd0cb35040372bb3d445e900f0c93f44f186b939afedd9d2ea0a707c91b63987857c9bf9ead3a943fabb72a87f3e3b9f8256932ec3304dbb213
+DIST qiv-2.3.1.tgz 130621 SHA256 675396b539e6511135fe73c867f9fdd6d912c24c7562797cb047c27d0c2c8ee6 SHA512 5a9b8ac082c78071c903e2f10a98effc412c0b6b940437b6592077978de03b5c7b6192e4d696f0389c12e99e0d3b5ca40c3be54ca2dfa5439121af2415f32812 WHIRLPOOL c890059062ca33886b34ea2cf146854431770af03cf5720c205dfd494023b64297b536decc70fe6b8a8b2a7879a4917f3dfd496d1e207dbb92d28d5114b32d06
diff --git a/media-gfx/qiv/metadata.xml b/media-gfx/qiv/metadata.xml
new file mode 100644
index 000000000000..978159afc5ac
--- /dev/null
+++ b/media-gfx/qiv/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="magic">Use libmagic to determine mimetypes</flag>
+ </use>
+</pkgmetadata>
diff --git a/media-gfx/qiv/qiv-2.2.4.ebuild b/media-gfx/qiv/qiv-2.2.4.ebuild
new file mode 100644
index 000000000000..5acf9ba2f1fb
--- /dev/null
+++ b/media-gfx/qiv/qiv-2.2.4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit toolchain-funcs
+
+DESCRIPTION="Quick Image Viewer"
+HOMEPAGE="http://spiegl.de/qiv/"
+SRC_URI="http://spiegl.de/qiv/download/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86"
+IUSE="xinerama"
+
+RDEPEND=">=x11-libs/gtk+-2.12:2
+ media-libs/imlib2[X]
+ !<media-gfx/pqiv-0.11
+ xinerama? ( x11-libs/libXinerama )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i \
+ -e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' \
+ Makefile || die
+
+ if ! use xinerama; then
+ sed -i \
+ -e 's:-DGTD_XINERAMA::' \
+ Makefile || die
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin qiv
+ doman qiv.1
+ dodoc Changelog qiv-command.example README README.TODO
+}
diff --git a/media-gfx/qiv/qiv-2.3.1.ebuild b/media-gfx/qiv/qiv-2.3.1.ebuild
new file mode 100644
index 000000000000..12fbd0137b7a
--- /dev/null
+++ b/media-gfx/qiv/qiv-2.3.1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit toolchain-funcs eutils fdo-mime gnome2-utils
+
+DESCRIPTION="Quick Image Viewer"
+HOMEPAGE="http://spiegl.de/qiv/"
+SRC_URI="http://spiegl.de/qiv/download/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86"
+IUSE="exif lcms magic"
+
+RDEPEND=">=x11-libs/gtk+-2.12:2
+ media-libs/imlib2[X]
+ exif? ( media-libs/libexif )
+ lcms? ( media-libs/lcms:2 )
+ magic? ( sys-apps/file )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ sed -i \
+ -e 's:$(CC) $(CFLAGS):$(CC) $(LDFLAGS) $(CFLAGS):' \
+ Makefile || die
+
+ if ! use exif ; then
+ sed -i 's/^EXIF =/#\0/' Makefile || die
+ fi
+
+ if ! use lcms ; then
+ sed -i 's/^LCMS =/#\0/' Makefile || die
+ fi
+
+ if ! use magic ; then
+ sed -i 's/^MAGIC =/#\0/' Makefile || die
+ fi
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dobin qiv
+ doman qiv.1
+ dodoc Changelog contrib/qiv-command.example README README.TODO
+
+ domenu qiv.desktop
+ doicon qiv.png
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-gfx/qiviewer/Manifest b/media-gfx/qiviewer/Manifest
new file mode 100644
index 000000000000..f9de04612ee4
--- /dev/null
+++ b/media-gfx/qiviewer/Manifest
@@ -0,0 +1 @@
+DIST qiviewer-0.5.0.tar.bz2 177201 SHA256 99d997ea1b05187794c14773402215178d3a21198231edd95f309badbb73010d SHA512 f9a75020085576f28b1e38e12a0e69d4b5efbedca5602ad1b47583a220eb50f6967f87764658b1d38ac696ed45134d580d3971c1d791a3156f28c55dceaa7fc7 WHIRLPOOL a9a808b22f11d111bfcb1d38ea099e3a95932982387b17f204d5ee7dc85562421057398fa99cab08110075a16f8ef443186a4189cc106b003367c35d58899cf7
diff --git a/media-gfx/qiviewer/files/qiviewer-use-system-webp.patch b/media-gfx/qiviewer/files/qiviewer-use-system-webp.patch
new file mode 100644
index 000000000000..252477f7d84a
--- /dev/null
+++ b/media-gfx/qiviewer/files/qiviewer-use-system-webp.patch
@@ -0,0 +1,41 @@
+--- qiviewer.pro.orig 2012-08-27 15:29:24.435612352 +0400
++++ qiviewer.pro 2012-08-27 15:30:12.286611983 +0400
+@@ -58,24 +58,9 @@
+ message(This feature isn't ready yet, use it carefully!)
+ # rules to execute when myfeature IS defined:
+ DEFINES += WEBP_SUPPORT
+- INCLUDEPATH += . ./3rdparty/webp
+- HEADERS += webpdecoder.h \
+- 3rdparty/webp/dec/bits.h \
+- 3rdparty/webp/dec/vp8i.h \
+- 3rdparty/webp/dec/yuv.h \
+- 3rdparty/webp/webp/decode.h \
+- 3rdparty/webp/webp/decode_vp8.h \
+- 3rdparty/webp/webp/encode.h \
+- 3rdparty/webp/webp/types.h
+- SOURCES += webpdecoder.cpp \
+- 3rdparty/webp/dec/bits.c \
+- 3rdparty/webp/dec/dsp.c \
+- 3rdparty/webp/dec/frame.c \
+- 3rdparty/webp/dec/quant.c \
+- 3rdparty/webp/dec/tree.c \
+- 3rdparty/webp/dec/vp8.c \
+- 3rdparty/webp/dec/webp.c \
+- 3rdparty/webp/dec/yuv.c
++ HEADERS += webpdecoder.h
++ SOURCES += webpdecoder.cpp
++ LIBS += -lwebp
+ }
+
+ # Tell Qt Linguist that we use UTF-8 strings in our sources
+--- webpdecoder.cpp.orig 2012-08-27 15:29:30.110612309 +0400
++++ webpdecoder.cpp 2012-08-27 15:29:49.919612154 +0400
+@@ -2,7 +2,7 @@
+ #include <QPainter>
+ #include <QPixmap>
+ #include "webpdecoder.h"
+-#include "3rdparty/webp/webp/decode.h"
++#include <webp/decode.h>
+
+ WebpDecoder::WebpDecoder(QWidget *parent) : QWidget(parent)
+ {
diff --git a/media-gfx/qiviewer/metadata.xml b/media-gfx/qiviewer/metadata.xml
new file mode 100644
index 000000000000..ca0e4aca4059
--- /dev/null
+++ b/media-gfx/qiviewer/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <maintainer>
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+<use>
+ <flag name="webp">Build support for WEBP image format</flag>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/qiviewer/qiviewer-0.5.0-r1.ebuild b/media-gfx/qiviewer/qiviewer-0.5.0-r1.ebuild
new file mode 100644
index 000000000000..1921592e042b
--- /dev/null
+++ b/media-gfx/qiviewer/qiviewer-0.5.0-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PLOCALES="el es_AR es_ES"
+
+inherit l10n qt4-r2 readme.gentoo
+
+DESCRIPTION="Lightweight image viewer, similar to eog or viewnior for Gnome"
+HOMEPAGE="http://code.google.com/p/qiviewer"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="webp"
+
+DEPEND="dev-qt/qtgui:4
+ webp? ( media-libs/libwebp )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}/src"
+
+DOC_CONTENTS="If you want support for gif and tiff images
+make sure that you build dev-qt/qtgui
+with apropriate USE flags"
+
+src_prepare() {
+ local LOCALE_FILES=""
+ add_locale() {
+ LOCALE_FILES="${LOCALE_FILES} ${1}.ts"
+ }
+
+ # Check for locales added/removed from previous version
+ l10n_find_plocales_changes "${S}/translations" "" '.ts'
+ # Fill list of available locale files
+ l10n_for_each_locale_do add_locale
+ sed -i -e "s:TRANSLATIONS += .\+:TRANSLATIONS = ${LOCALE_FILES}:" translations/locale.pri || die 'locale sed failed'
+ # Fix mime types in desktop file
+ sed -i -e "s:^MimeType=\(.\+\)imaqe/x-xpixrnap;\(.\+\):MimeType=\1\2:" qiviewer.desktop || die 'desktop file sed failed'
+ # Use system libwebp
+ epatch "${FILESDIR}"/${PN}-use-system-webp.patch
+
+ qt4-r2_src_prepare
+}
+
+src_configure() {
+ local _webp=
+ use webp && _webp="CONFIG+=enable-webp"
+ eqmake4 ${PN}.pro $_webp
+}
+
+src_install() {
+ qt4-r2_src_install
+ cd "${WORKDIR}"/"${PN}"
+ dodoc AUTHORS ChangeLog README
+ readme.gentoo_create_doc
+}
diff --git a/media-gfx/qosmic/Manifest b/media-gfx/qosmic/Manifest
new file mode 100644
index 000000000000..8f7c25ca5126
--- /dev/null
+++ b/media-gfx/qosmic/Manifest
@@ -0,0 +1 @@
+DIST qosmic-1.5.0.tar.bz2 367993 SHA256 cf3461d9611092636662c21d601f43ebdac95474e0e049b34cadd6b0ef07b945 SHA512 38f73db991587b0607b5b1670578e4b109af3f54b31ada41e7af57c068fd65250aa7285e1765052059e4d4670ad42c4a5da626e475d17110f1517b2d55a9df4d WHIRLPOOL 10f1a081cc0bb5478a5a3915c49faf86c1bcde8641eeca754439bbf30abe52a86c44e6de6ea0f3c49ec24cab22ee2e0ffcbb2e6ae2b798872384d563ab110cb4
diff --git a/media-gfx/qosmic/metadata.xml b/media-gfx/qosmic/metadata.xml
new file mode 100644
index 000000000000..a1247f0f8286
--- /dev/null
+++ b/media-gfx/qosmic/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <herd>qt</herd>
+ <upstream>
+ <remote-id type="google-code">qosmic</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/qosmic/qosmic-1.5.0.ebuild b/media-gfx/qosmic/qosmic-1.5.0.ebuild
new file mode 100644
index 000000000000..c581de54906c
--- /dev/null
+++ b/media-gfx/qosmic/qosmic-1.5.0.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit qt4-r2
+
+DESCRIPTION="A cosmic recursive flame fractal editor"
+HOMEPAGE="http://code.google.com/p/qosmic/"
+SRC_URI="http://qosmic.googlecode.com/files/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/lua-5.1.4
+ >=media-gfx/flam3-3.0.1
+ || ( ( >=dev-qt/qtgui-4.8.5:4 dev-qt/designer:4 ) <dev-qt/qtgui-4.8.5:4 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS="changes.txt README"
diff --git a/media-gfx/qrencode-python/Manifest b/media-gfx/qrencode-python/Manifest
new file mode 100644
index 000000000000..ad69a6dd31f9
--- /dev/null
+++ b/media-gfx/qrencode-python/Manifest
@@ -0,0 +1,2 @@
+DIST qrencode-python-1.01.tar.gz 2456 SHA256 fd8cdabd743e2db7a1ad332d4f0fe037e5a7807cb2f1d32da3e39439088bb610 SHA512 fc0514038dc78556335744872ad94d48eb68991118f204a6547f2979d62694441d28c5eb67a8a34a096cd686a9ae10ce5f95753a0e3f676f6ad53b3792f6946c WHIRLPOOL d9a0e833437cf1640d6cfb4f84debef936898d88c0c3f5565499a4ef848be45a5c5b1eeeaf2cc8a098c4898183395db688152154d93314c1db693eaccaa285ce
+DIST qrencode-python-1.02_pre140921.tar.gz 2084 SHA256 8c3d5d2c5479f10aa1462a9bf95390b78b47043bf56e0f581ed61a3eb9507ccf SHA512 231c61f98f064d282611d14194de7b3c0a18faff0ed856722e39a6cc25f744442d77bd43418aec117c6e39ddd78a6ea770edee8992aa4e3cfce50254ac6526aa WHIRLPOOL 44009c565bff4c330a416653e7c3863a33b25290a71e4a800f920240b11428fa945ae1c854af5f5c9b5d1d508a915f97bfdbd7c15eee791b27628912f0edd452
diff --git a/media-gfx/qrencode-python/files/qrencode-python-1.01-PIL.patch b/media-gfx/qrencode-python/files/qrencode-python-1.01-PIL.patch
new file mode 100644
index 000000000000..0f0b2d4912e0
--- /dev/null
+++ b/media-gfx/qrencode-python/files/qrencode-python-1.01-PIL.patch
@@ -0,0 +1,14 @@
+ qrencode/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/qrencode/__init__.py b/qrencode/__init__.py
+index 4ca5396..ba0c15e 100644
+--- a/qrencode/__init__.py
++++ b/qrencode/__init__.py
+@@ -1,5 +1,5 @@
+ from qr_encode import encode as _encode
+-import Image
++from PIL import Image
+
+
+ QR_ECLEVEL_L = 0
diff --git a/media-gfx/qrencode-python/metadata.xml b/media-gfx/qrencode-python/metadata.xml
new file mode 100644
index 000000000000..37654b3ecd0d
--- /dev/null
+++ b/media-gfx/qrencode-python/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">qrencode</remote-id>
+ <remote-id type="github">Arachnid/pyqrencode</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/qrencode-python/qrencode-python-1.01-r1.ebuild b/media-gfx/qrencode-python/qrencode-python-1.01-r1.ebuild
new file mode 100644
index 000000000000..2923de9e1599
--- /dev/null
+++ b/media-gfx/qrencode-python/qrencode-python-1.01-r1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="A simple wrapper for the C qrencode library"
+HOMEPAGE="http://pypi.python.org/pypi/qrencode/ https://github.com/Arachnid/pyqrencode/"
+SRC_URI="mirror://pypi/q/qrencode/qrencode-${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+LICENSE="Apache-2.0"
+IUSE=""
+
+RDEPEND="
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ media-gfx/qrencode"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"/qrencode-${PV}
+
+PATCHES=( "${FILESDIR}"/${P}-PIL.patch )
diff --git a/media-gfx/qrencode-python/qrencode-python-1.02_pre140921.ebuild b/media-gfx/qrencode-python/qrencode-python-1.02_pre140921.ebuild
new file mode 100644
index 000000000000..c73293004b68
--- /dev/null
+++ b/media-gfx/qrencode-python/qrencode-python-1.02_pre140921.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1 vcs-snapshot
+
+DESCRIPTION="A simple wrapper for the C qrencode library"
+HOMEPAGE="http://pypi.python.org/pypi/qrencode/ https://github.com/Arachnid/pyqrencode/"
+#SRC_URI="mirror://pypi/q/qrencode/qrencode-${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/Arachnid/pyqrencode/tarball/486bb7b64e3ce5483f65e375a67da0fa6d02ca92 -> ${P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+LICENSE="Apache-2.0"
+IUSE=""
+
+RDEPEND="
+ virtual/python-imaging[${PYTHON_USEDEP}]
+ media-gfx/qrencode"
+DEPEND="${RDEPEND}"
diff --git a/media-gfx/qrencode/Manifest b/media-gfx/qrencode/Manifest
new file mode 100644
index 000000000000..a0b6d9327041
--- /dev/null
+++ b/media-gfx/qrencode/Manifest
@@ -0,0 +1,3 @@
+DIST qrencode-3.3.1.tar.bz2 365432 SHA256 7ad730379a9352051940c3be58cf4c6d548525f378551cb33e9c709c419adb9b SHA512 28eddb96264faefc3ae1e8c45961b685ee76e061f3e8d201661f572aa09661573afdb76596c3c41d6d94bd381898a8d22338c6cee3ffd3fc8fe4c78715922873 WHIRLPOOL b95c7c18b4e2e766ee43c1028c4f1255890a4d56304e3fd372733a1f908d34a5e9793f09b515e49c4f547aaf5f5aa358867f17d717d81bcd41f45cd4f28a2d3c
+DIST qrencode-3.4.3.tar.bz2 370709 SHA256 dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98 SHA512 eba9d6220d0d5e08da614bd05904a08e11c45b7b293c45aa8417345c3267eae8790e83d9338b6cbadbd3fe15ac4579e0fb9e4e23b4f7e1d56e5fb3729afb9cf5 WHIRLPOOL 02b60e306fc2365de0be0f02619f1e5a3dcf783024845872d23940a4b720bf8a2b89255e95898c2a7323a93c8f4210b4362b30c0fc2ff1ae90d4850f344bd675
+DIST qrencode-3.4.4.tar.bz2 369136 SHA256 efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5 SHA512 4835d462542e37e5460635e0dd84e291ff0976a6aec61c63f9950c1e60b446bc913220726e14f6379322bfd32ccd9bcd5fceed9ca10cb95343c952d8472b983d WHIRLPOOL fb5ce83ba422c361717514956e72157b5d611dc7eb33416bc621ec3fb57032ff57c3aa2eb1b1d5780608649d3424ed312c5cf7c15718baa5042542b3a42987fa
diff --git a/media-gfx/qrencode/files/qrencode-3.2.0-pngregenfix.patch b/media-gfx/qrencode/files/qrencode-3.2.0-pngregenfix.patch
new file mode 100644
index 000000000000..09c15eedfbe6
--- /dev/null
+++ b/media-gfx/qrencode/files/qrencode-3.2.0-pngregenfix.patch
@@ -0,0 +1,44 @@
+ Makefile.am | 2 +-
+ configure.ac | 9 +--------
+ 2 files changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 55659c5..a065514 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -27,7 +27,7 @@ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = libqrencode.pc
+
+ EXTRA_DIST = libqrencode.pc.in autogen.sh configure.ac acinclude.m4 \
+- Makefile.am tests/Makefile.am qrencode.spec.in qrencode.spec \
++ Makefile.am qrencode.spec.in qrencode.spec \
+ qrencode.1.in Doxyfile tests/test_all.sh
+
+ if BUILD_TOOLS
+diff --git a/configure.ac b/configure.ac
+index 6fb1409..ca30225 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,7 +30,7 @@ AC_PROG_LIBTOOL
+ AC_PROG_RANLIB
+ PKG_PROG_PKG_CONFIG
+
+-AC_CONFIG_FILES([Makefile libqrencode.pc tests/Makefile qrencode.spec qrencode.1])
++AC_CONFIG_FILES([Makefile libqrencode.pc qrencode.spec qrencode.1])
+
+ AC_CHECK_FUNCS([strdup])
+
+@@ -71,13 +71,6 @@ echo "#define __STATIC static" >>confdefs.h
+ echo "/* #undef WITH_TESTS */" >>confdefs.h
+ fi
+
+-if test x$build_tests = xyes ; then
+- SDL_REQUIRED_VERSION=1.2.0
+- AM_PATH_SDL($SDL_REQUIRED_VERSION,,AC_MSG_WARN([*** SDL $SDL_REQUIRED_VERSION or better is required.]))
+- AC_MSG_NOTICE([SDL check done.])
+- AM_ICONV_LINK
+-fi
+-AM_CONDITIONAL(HAVE_SDL, [test "x$SDL_CFLAGS" != "x" ])
+
+
+ dnl --enable-gprof
diff --git a/media-gfx/qrencode/metadata.xml b/media-gfx/qrencode/metadata.xml
new file mode 100644
index 000000000000..501cd0d4e654
--- /dev/null
+++ b/media-gfx/qrencode/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>joker@gentoo.org</email>
+ <name>Christian Birchinger</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/qrencode/qrencode-3.3.1.ebuild b/media-gfx/qrencode/qrencode-3.3.1.ebuild
new file mode 100644
index 000000000000..9356dc22e7e6
--- /dev/null
+++ b/media-gfx/qrencode/qrencode-3.3.1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+DESCRIPTION="C library for encoding data in a QR Code symbol"
+HOMEPAGE="http://fukuchi.org/works/qrencode/"
+SRC_URI="http://fukuchi.org/works/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="media-libs/libpng"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${PN}-3.2.0-pngregenfix.patch" )
diff --git a/media-gfx/qrencode/qrencode-3.4.3.ebuild b/media-gfx/qrencode/qrencode-3.4.3.ebuild
new file mode 100644
index 000000000000..033cae871a9b
--- /dev/null
+++ b/media-gfx/qrencode/qrencode-3.4.3.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+DESCRIPTION="C library for encoding data in a QR Code symbol"
+HOMEPAGE="http://fukuchi.org/works/qrencode/"
+SRC_URI="http://fukuchi.org/works/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ppc64 sparc x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="media-libs/libpng"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${PN}-3.2.0-pngregenfix.patch" )
diff --git a/media-gfx/qrencode/qrencode-3.4.4.ebuild b/media-gfx/qrencode/qrencode-3.4.4.ebuild
new file mode 100644
index 000000000000..db76626f4be2
--- /dev/null
+++ b/media-gfx/qrencode/qrencode-3.4.4.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+DESCRIPTION="C library for encoding data in a QR Code symbol"
+HOMEPAGE="http://fukuchi.org/works/qrencode/"
+SRC_URI="http://fukuchi.org/works/${PN}/${P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="media-libs/libpng"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}/${PN}-3.2.0-pngregenfix.patch" )
diff --git a/media-gfx/quat/Manifest b/media-gfx/quat/Manifest
new file mode 100644
index 000000000000..d9504ffbf315
--- /dev/null
+++ b/media-gfx/quat/Manifest
@@ -0,0 +1 @@
+DIST quat-1.20.tar.gz 474448 SHA256 0c18262944507559a91615c0e02e3560279817544fd596051d3f1ab452566331
diff --git a/media-gfx/quat/metadata.xml b/media-gfx/quat/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/media-gfx/quat/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/quat/quat-1.20.ebuild b/media-gfx/quat/quat-1.20.ebuild
new file mode 100644
index 000000000000..e609260fddaf
--- /dev/null
+++ b/media-gfx/quat/quat-1.20.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DESCRIPTION="A 3D quaternionic fractal generator"
+HOMEPAGE="http://www.physcip.uni-stuttgart.de/phy11733/quat_e.html"
+SRC_URI="http://www.physcip.uni-stuttgart.de/phy11733/download/quat-1.20.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="X debug"
+
+DEPEND="X? ( =x11-libs/fltk-1*
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXft
+ )
+ >=sys-libs/zlib-1.1.4"
+RDEPEND=""
+
+src_compile() {
+ export FLUID="/usr/bin/fluid" # needed because configure tries an invalid option
+ econf \
+ `use_enable X gui` \
+ `use_enable debug` \
+ `use_enable debug prof` \
+ || die "configure failure"
+ emake || die "make failure"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failure"
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/media-gfx/qvv/Manifest b/media-gfx/qvv/Manifest
new file mode 100644
index 000000000000..36a191859987
--- /dev/null
+++ b/media-gfx/qvv/Manifest
@@ -0,0 +1 @@
+DIST qvv-4.02.tar.gz 1837213 SHA256 94a765027a1c737a845a258c5a2765f8f10e9f21fb9d4588246b5e7dc2b138fa
diff --git a/media-gfx/qvv/metadata.xml b/media-gfx/qvv/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/qvv/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/qvv/qvv-4.02.ebuild b/media-gfx/qvv/qvv-4.02.ebuild
new file mode 100644
index 000000000000..dd68d45237f9
--- /dev/null
+++ b/media-gfx/qvv/qvv-4.02.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils qt4-r2
+
+DESCRIPTION="QVV Image Viewer and Browser"
+HOMEPAGE="http://cade.datamax.bg/qvv/"
+SRC_URI="http://cade.datamax.bg/qvv/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-qt/qtgui:4"
+RDEPEND="${DEPEND}"
+
+src_configure() {
+ eqmake4
+}
+
+src_install() {
+ dobin qvv || die "dobin failed"
+ doicon images/qvv_icon_128x128.png || die "doicon failed"
+ make_desktop_entry qvv QVV qvv_icon_128x128
+ dodoc ANFSCD GPG_README HISTORY README todo.txt || die "dodoc failed"
+}
diff --git a/media-gfx/raw-thumbnailer/Manifest b/media-gfx/raw-thumbnailer/Manifest
new file mode 100644
index 000000000000..82e73e9aa99b
--- /dev/null
+++ b/media-gfx/raw-thumbnailer/Manifest
@@ -0,0 +1 @@
+DIST raw-thumbnailer-0.2.1.tar.gz 89468 RMD160 d9d03922b6cab0e57ccb72fd373c4a51925f4976 SHA1 f34012062c0b1eaa10525722c36bd027b11ade2e SHA256 3a348ac6c74c8bbd4d7379659fa65da9d67b133c1e5c9e2a3aecf3e6e3d568bc
diff --git a/media-gfx/raw-thumbnailer/metadata.xml b/media-gfx/raw-thumbnailer/metadata.xml
new file mode 100644
index 000000000000..7e6529ba09e3
--- /dev/null
+++ b/media-gfx/raw-thumbnailer/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <maintainer>
+ <email>angelos@gentoo.org</email>
+ <name>Christoph Mende</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">raw-thumbnailer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/raw-thumbnailer/raw-thumbnailer-0.2.1.ebuild b/media-gfx/raw-thumbnailer/raw-thumbnailer-0.2.1.ebuild
new file mode 100644
index 000000000000..afbeaa20924c
--- /dev/null
+++ b/media-gfx/raw-thumbnailer/raw-thumbnailer-0.2.1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+DESCRIPTION="A lightweight and fast raw image thumbnailer"
+HOMEPAGE="http://code.google.com/p/raw-thumbnailer"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
+IUSE=""
+
+RDEPEND=">=media-libs/libopenraw-0.0.9[gtk]
+ x11-libs/gtk+:2
+ !media-gfx/gnome-raw-thumbnailer"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+DOCS=( AUTHORS ChangeLog )
diff --git a/media-gfx/rawtherapee/Manifest b/media-gfx/rawtherapee/Manifest
new file mode 100644
index 000000000000..7ed0bc1264ad
--- /dev/null
+++ b/media-gfx/rawtherapee/Manifest
@@ -0,0 +1,6 @@
+DIST rawtherapee-4.0.10.tar.xz 11823324 SHA256 4f80a00b0fe0a69c8cc09fda155aa81cf47dccb516c6c6b249875f3c456d7ac5 SHA512 8e8e94cc50130297137d4d4f8ea057b9d954192fd698c327c88591b5ff1e0c66de5e2a1e1ba0c2b223a3633efa26f06b2ba2004dded3b72d025d8a18fef43481 WHIRLPOOL 6cc3b75fdaf9fcc1af7e2f3a96d56a9a467abb4fb531e32665e22ecbb7526b20905314e5c574b8944a76d02d6f83eea2960298b3f0f7bb7420b34efb66fbb47a
+DIST rawtherapee-4.0.11.tar.xz 14913984 SHA256 8f6f35339c9ec5865641fc4cef060f2cbd32be60054700775951148a26de36f6 SHA512 c31b1c3ef50806d25cdd211d3296b62a1e5fcac66ae0225aa92eaf25ec6470cb946651396b52bb64b247c1be093d2745f0b78bbd5257d61d7b87d53f0bcbac40 WHIRLPOOL a1ea6c442a9e2e75e42a430d5690c1484c37f4f01215a1df34064396772446966eb886312d613cc98b9f398db06324fabb1583d677b184503bb9f86f1141addd
+DIST rawtherapee-4.0.12.tar.xz 15063860 SHA256 6ef923f4a0e39ee487fd50b4e528db3f8ca7e27613284e309b0625cdb86a03d9 SHA512 acb7225565b58f556d0c3fc0257ccb8297fe113a8ea3fec31372514434ae4e6cf99b956bbf4d6a5bb9eaca94553ee44815d981f20ec049bdc93e33bdfb86ef1e WHIRLPOOL 9de7831dba2190ab5422280aa553581e1bffa5a831929f8a5c13cb9e8ba5746117f4b5797a3f5da0921cd2ad61ebd7b27863e02eb28e186d0a63d74e55564d2b
+DIST rawtherapee-4.0.9.tar.xz 40201920 SHA256 4ad49b5d3aae9a178b1cfa5efca653982f0a52763ddd37f89500e8fedfb187d2 SHA512 885414f0becfaa174b6e0d5689259e88cccf779d25bb92e1015fdb562c57eb70621e952681309aa66f05295b249ba39cca9c73459e6c0ad3266c57389e3c9ab9 WHIRLPOOL cb74a9079c513ac7feb5f9cdd09b9f3474462228023b5a529cf779014476401ad2a2ea24489699c6caa5051ea332ded028407a9f50e4744b504ec41e1e137cfe
+DIST rawtherapee-4.1.tar.xz 7670916 SHA256 0a36fe407daca95a06f2d3ee28ec91c9c0c95d62a91214bd67a97fd854938307 SHA512 77f9b6e055c4c2944373dc2abb059da10daace2c503b8f783fe4775161fdcd2b1bacf144065983402eedbd336f65a6a7976008924731e724e9268f39506e8b1b WHIRLPOOL 7fdd4d5b8ca8ce0ebd477ae19a62c11aac37a1f6c8fccddc8fe8688370aaf7003dc76d0ef539877828be98aefcc91a81cf0dc2a97a640a746bafc8eb22451700
+DIST rawtherapee-4.2.tar.xz 7787664 SHA256 fa4c13e8842df096b19d2dabaed5a61f5f9d4547f7b4f0dc6b77f80bdec16479 SHA512 feec61aeb84804cf01ff03fa9d7309f0eb3c04c43818c8397cc6f3ee762aca19484bce7594414d2141248b9740bdd4269fd86f76dcf391c61d4647fa169d48f6 WHIRLPOOL 56cc3e95ae7484cb91cd6c5fd32504b3fbfb17b9d50a38fa490300ff1b096e80a1d5060db3619c34f8b214dd413bfaab57a9748f5a365a87d257e75c753f307a
diff --git a/media-gfx/rawtherapee/files/rawtherapee-4.0.9-desktop.patch b/media-gfx/rawtherapee/files/rawtherapee-4.0.9-desktop.patch
new file mode 100644
index 000000000000..61748428fba3
--- /dev/null
+++ b/media-gfx/rawtherapee/files/rawtherapee-4.0.9-desktop.patch
@@ -0,0 +1,9 @@
+--- rawtherapee-4.0.9/rtdata/icons/rawtherapee.desktop.in
++++ rawtherapee-4.0.9/rtdata/icons/rawtherapee.desktop.in
+@@ -13,5 +13,5 @@
+ Icon=rawtherapee
+ Exec=rawtherapee %f
+ Terminal=false
+-MimeType=image/jpeg;image/png;image/tiff;image/x-adobe-dng;image/x-canon-cr2;image/x-canon-crf;image/x-canon-crw;image/x-fuji-raf;image/x-jpg;image/x-kodak-dcr;image/x-kodak-k25;image/x-kodak-kdc;image/x-mamiya-mef;image/x-minolta-mrw;image/x-nikon-nef;image/x-nikon-nrw;image/x-olympus-orf;image/x-panasonic-raw;image/x-panasonic-rw2;image/x-pentax-pef;image/x-pentax-raw;image/x-raw;image/x-rwz;image/x-samsung-srw;image/x-sony-arw;image/x-sony-sr2;image/x-sony-srf;image/x-tif;inode/directory;
++MimeType=image/jpeg;image/png;image/tiff;image/x-adobe-dng;image/x-canon-cr2;image/x-canon-crf;image/x-canon-crw;image/x-fuji-raf;image/x-jpg;image/x-kodak-dcr;image/x-kodak-k25;image/x-kodak-kdc;image/x-mamiya-mef;image/x-minolta-mrw;image/x-nikon-nef;image/x-nikon-nrw;image/x-olympus-orf;image/x-panasonic-raw;image/x-panasonic-rw2;image/x-pentax-pef;image/x-pentax-raw;image/x-raw;image/x-rwz;image/x-samsung-srw;image/x-sony-arw;image/x-sony-sr2;image/x-sony-srf;image/x-tif;
+ Categories=Photography;Graphics;2DGraphics;RasterGraphics;GTK;
diff --git a/media-gfx/rawtherapee/files/rawtherapee-4.0.9-no-hg.patch b/media-gfx/rawtherapee/files/rawtherapee-4.0.9-no-hg.patch
new file mode 100644
index 000000000000..18009e80a9a0
--- /dev/null
+++ b/media-gfx/rawtherapee/files/rawtherapee-4.0.9-no-hg.patch
@@ -0,0 +1,60 @@
+--- rawtherapee-4.0.9/CMakeLists.txt
++++ rawtherapee-4.0.9/CMakeLists.txt
+@@ -257,35 +257,7 @@
+ find_file(HG_CMD hg PATHS "/opt/local/bin" "/usr/local/bin" "/usr/bin")
+ find_file(HG_CMD hg)
+
+- else (WIN32)
+-
+- add_custom_target (AboutFile ALL
+- COMMAND ${CMAKE_COMMAND}
+- -DSRC_DIR:STRING=${CMAKE_CURRENT_SOURCE_DIR}
+- -DCACHE_NAME_SUFFIX:STRING=${CACHE_NAME_SUFFIX}
+- -DSYSTEM:STRING=Linux
+- -DPROC_LABEL:STRING=\"${PROC_LABEL}\"
+- -DPROC_BIT_DEPTH:STRING=\"${PROC_BIT_DEPTH}\"
+- -DBUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+- -DGTKMM_VERSION:STRING=${GTKMM_VERSION}
+- -DCXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_CMAKE_BUILD_TYPE}}
+- -DLFLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_${UPPER_CMAKE_BUILD_TYPE}}
+- -DOPTION_OMP:STRING=${OPTION_OMP}
+- -DWITH_MYFILE_MMAP:STRING=${WITH_MYFILE_MMAP}
+- -P ${CMAKE_CURRENT_SOURCE_DIR}/AboutThisBuild.cmake
+- COMMENT "Creating the about file"
+- )
+- find_file(HG_CMD hg)
+-
+ endif (WIN32)
+-
+- add_dependencies(AboutFile Debug Release MinSizeRel RelWithDebInfo)
+-
+- if (HG_CMD STREQUAL HG_CMD-NOTFOUND)
+- message(FATAL_ERROR "hg command not found!")
+- else (HG_CMD STREQUAL HG_CMD-NOTFOUND)
+- message(STATUS "hg command found: ${HG_CMD}")
+- endif (HG_CMD STREQUAL HG_CMD-NOTFOUND)
+
+ endif (AUTOMATED_BUILD_SYSTEM)
+
+@@ -352,7 +324,6 @@
+
+ install (FILES AUTHORS.txt DESTINATION ${CREDITSDIR})
+ install (FILES LICENSE.txt DESTINATION ${LICENCEDIR})
+-install (FILES AboutThisBuild.txt DESTINATION ${CREDITSDIR})
+ install (FILES RELEASE_NOTES.txt DESTINATION ${CREDITSDIR} OPTIONAL)
+
+ add_subdirectory (rtexif)
+--- rawtherapee-4.0.9/rtgui/version.h
++++ rawtherapee-4.0.9/rtgui/version.h
+@@ -0,0 +1,11 @@
++// This file is automatically generated by the Makefile - DO NOT EDIT!
++// You can (should) also tell mercurial to ignore it.
++
++#ifndef _VERSION_
++#define _VERSION_
++
++#define VERSION "4.0.9"
++#define TAGDISTANCE 0
++#define CACHEFOLDERNAME "RawTherapee"
++
++#endif
diff --git a/media-gfx/rawtherapee/metadata.xml b/media-gfx/rawtherapee/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/rawtherapee/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/rawtherapee/rawtherapee-4.0.10.ebuild b/media-gfx/rawtherapee/rawtherapee-4.0.10.ebuild
new file mode 100644
index 000000000000..f1e18730f0be
--- /dev/null
+++ b/media-gfx/rawtherapee/rawtherapee-4.0.10.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils toolchain-funcs
+
+DESCRIPTION="A powerful cross-platform raw image processing program"
+HOMEPAGE="http://www.rawtherapee.com/"
+SRC_URI="http://rawtherapee.googlecode.com/files/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bzip2 doc openmp"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ >=dev-cpp/gtkmm-2.12:2.4
+ >=dev-cpp/glibmm-2.16:2
+ dev-libs/expat
+ dev-libs/libsigc++:2
+ media-libs/libcanberra[gtk]
+ media-libs/tiff
+ media-libs/libpng
+ media-libs/libiptcdata
+ media-libs/lcms:2
+ sci-libs/fftw:3.0
+ sys-libs/zlib
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+pkg_setup() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use openmp OPTION_OMP)
+ $(cmake-utils_use_with bzip2 BZIP)
+ -DDOCDIR=/usr/share/doc/${PF}
+ -DCREDITSDIR=/usr/share/${PN}
+ -DLICENCEDIR=/usr/share/${PN}
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc doc/RawTherapeeManual_en.pdf
+}
diff --git a/media-gfx/rawtherapee/rawtherapee-4.0.11.ebuild b/media-gfx/rawtherapee/rawtherapee-4.0.11.ebuild
new file mode 100644
index 000000000000..387994a28c7d
--- /dev/null
+++ b/media-gfx/rawtherapee/rawtherapee-4.0.11.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils toolchain-funcs
+
+DESCRIPTION="A powerful cross-platform raw image processing program"
+HOMEPAGE="http://www.rawtherapee.com/"
+SRC_URI="http://rawtherapee.googlecode.com/files/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bzip2 doc openmp"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ >=dev-cpp/gtkmm-2.12:2.4
+ >=dev-cpp/glibmm-2.16:2
+ dev-libs/expat
+ dev-libs/libsigc++:2
+ media-libs/libcanberra[gtk]
+ media-libs/tiff
+ media-libs/libpng
+ media-libs/libiptcdata
+ media-libs/lcms:2
+ sci-libs/fftw:3.0
+ sys-libs/zlib
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use openmp OPTION_OMP)
+ $(cmake-utils_use_with bzip2 BZIP)
+ -DDOCDIR=/usr/share/doc/${PF}
+ -DCREDITSDIR=/usr/share/${PN}
+ -DLICENCEDIR=/usr/share/${PN}
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc doc/RawTherapeeManual_en.pdf
+}
diff --git a/media-gfx/rawtherapee/rawtherapee-4.0.12.ebuild b/media-gfx/rawtherapee/rawtherapee-4.0.12.ebuild
new file mode 100644
index 000000000000..32c253fd8b49
--- /dev/null
+++ b/media-gfx/rawtherapee/rawtherapee-4.0.12.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils toolchain-funcs
+
+DESCRIPTION="A powerful cross-platform raw image processing program"
+HOMEPAGE="http://www.rawtherapee.com/"
+SRC_URI="http://rawtherapee.com/shared/source/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bzip2 openmp"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ >=dev-cpp/gtkmm-2.12:2.4
+ >=dev-cpp/glibmm-2.16:2
+ dev-libs/expat
+ dev-libs/libsigc++:2
+ media-libs/libcanberra[gtk]
+ media-libs/tiff
+ media-libs/libpng
+ media-libs/libiptcdata
+ media-libs/lcms:2
+ sci-libs/fftw:3.0
+ sys-libs/zlib
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use openmp OPTION_OMP)
+ $(cmake-utils_use_with bzip2 BZIP)
+ -DDOCDIR=/usr/share/doc/${PF}
+ -DCREDITSDIR=/usr/share/${PN}
+ -DLICENCEDIR=/usr/share/${PN}
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-gfx/rawtherapee/rawtherapee-4.0.9-r1.ebuild b/media-gfx/rawtherapee/rawtherapee-4.0.9-r1.ebuild
new file mode 100644
index 000000000000..575a28dae36a
--- /dev/null
+++ b/media-gfx/rawtherapee/rawtherapee-4.0.9-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit cmake-utils toolchain-funcs
+
+DESCRIPTION="A powerful cross-platform raw image processing program"
+HOMEPAGE="http://www.rawtherapee.com/"
+SRC_URI="http://rawtherapee.googlecode.com/files/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bzip2 doc openmp"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ >=dev-cpp/gtkmm-2.12:2.4
+ >=dev-cpp/glibmm-2.16:2
+ dev-libs/expat
+ dev-libs/libsigc++:2
+ media-libs/tiff
+ media-libs/libpng
+ media-libs/libiptcdata
+ media-libs/lcms:2
+ sys-libs/zlib
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-hg.patch
+ "${FILESDIR}"/${P}-desktop.patch
+)
+
+pkg_setup() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use openmp OPTION_OMP)
+ $(cmake-utils_use_with bzip2 BZIP)
+ -DDOCDIR=/usr/share/doc/${PF}
+ -DCREDITSDIR=/usr/share/${PN}
+ -DLICENCEDIR=/usr/share/${PN}
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ use doc && dodoc doc/built/pdf/en/RawTherapeeManual_${PV}.pdf
+}
diff --git a/media-gfx/rawtherapee/rawtherapee-4.1.ebuild b/media-gfx/rawtherapee/rawtherapee-4.1.ebuild
new file mode 100644
index 000000000000..9a609147b5ab
--- /dev/null
+++ b/media-gfx/rawtherapee/rawtherapee-4.1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils toolchain-funcs
+
+DESCRIPTION="A powerful cross-platform raw image processing program"
+HOMEPAGE="http://www.rawtherapee.com/"
+SRC_URI="http://rawtherapee.com/shared/source/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bzip2 openmp"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ >=x11-libs/gtk+-2.24.18:2
+ >=dev-cpp/gtkmm-2.12:2.4
+ >=dev-cpp/glibmm-2.16:2
+ dev-libs/expat
+ dev-libs/libsigc++:2
+ media-libs/libcanberra[gtk]
+ media-libs/tiff
+ media-libs/libpng
+ media-libs/libiptcdata
+ media-libs/lcms:2
+ sci-libs/fftw:3.0
+ sys-libs/zlib
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use openmp OPTION_OMP)
+ $(cmake-utils_use_with bzip2 BZIP)
+ -DDOCDIR=/usr/share/doc/${PF}
+ -DCREDITSDIR=/usr/share/${PN}
+ -DLICENCEDIR=/usr/share/${PN}
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-gfx/rawtherapee/rawtherapee-4.2.ebuild b/media-gfx/rawtherapee/rawtherapee-4.2.ebuild
new file mode 100644
index 000000000000..6ae07a579609
--- /dev/null
+++ b/media-gfx/rawtherapee/rawtherapee-4.2.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils toolchain-funcs
+
+DESCRIPTION="A powerful cross-platform raw image processing program"
+HOMEPAGE="http://www.rawtherapee.com/"
+SRC_URI="http://rawtherapee.com/shared/source/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bzip2 openmp"
+
+RDEPEND="bzip2? ( app-arch/bzip2 )
+ >=x11-libs/gtk+-2.24.18:2
+ >=dev-cpp/gtkmm-2.12:2.4
+ >=dev-cpp/glibmm-2.16:2
+ dev-libs/expat
+ dev-libs/libsigc++:2
+ media-libs/libcanberra[gtk]
+ media-libs/tiff
+ media-libs/libpng
+ media-libs/libiptcdata
+ media-libs/lcms:2
+ sci-libs/fftw:3.0
+ sys-libs/zlib
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig"
+
+pkg_pretend() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use openmp OPTION_OMP)
+ $(cmake-utils_use_with bzip2 BZIP)
+ -DDOCDIR=/usr/share/doc/${PF}
+ -DCREDITSDIR=/usr/share/${PN}
+ -DLICENCEDIR=/usr/share/${PN}
+ -DCACHE_NAME_SUFFIX=""
+ )
+ cmake-utils_src_configure
+}
diff --git a/media-gfx/recoverjpeg/Manifest b/media-gfx/recoverjpeg/Manifest
new file mode 100644
index 000000000000..fa39bcdbf569
--- /dev/null
+++ b/media-gfx/recoverjpeg/Manifest
@@ -0,0 +1,5 @@
+DIST recoverjpeg-2.0.tar.gz 83762 SHA256 0ad2252cb0b843f61b3d91a3f0a4dca440e8a1a25e3a632b8bc80ae14b3815d4
+DIST recoverjpeg-2.1.1.tar.gz 87445 SHA256 e762fd7c6e985ea8ad4a8190a12b3f7f03bdfed9fb735e0f99721c44afed82a0 SHA512 aca4a9cf5403db8c56f357c5f6f12b17e5be428e4846af65add19bfacc990e3e2e2afc27cfaac1635cf4edb9289ab8353a239d32053c570bb8976992d30e721f WHIRLPOOL 1cea50da4fc8ac9c91c997d0e130bf4bf1db99a5d8a2841f6cd19ab33e93270045d718baf780ea2ac79e4d596cca3fc0211650282f4367c75b5aa5c87e64effe
+DIST recoverjpeg-2.2.1.tar.gz 88391 SHA256 d4876a5dd8be2aaeff9dd20149d972c73a47f7562d75324ad0cd28920974d2e8 SHA512 1308542c25cccb0daefa9248f7a41451f59374e33c3ad4a82ad2195aafb66548b98bbc57c56436902a6c5732a5b20f69658567378f0a211a61f258cd62d699b1 WHIRLPOOL fcc49877d0171d89c3a7acf1ba2a09aeeafc472ff6d13c4f3bc6f57ad38a55f80daea5a572b43ca5db8ad90450b528e3d0703b74428bba2e5a5b3c15968e0203
+DIST recoverjpeg-2.2.2.tar.gz 91440 SHA256 476686425637b1971cff6d05554bba81fd76fc21d1aa1f745df3a1ad8820bd8c SHA512 fc609aa47a96b44e10aef4137b92f7b8e99d9f40ab559870225042acd85a97bc745a494cabb29fe21b3b374243c4589eeae8da7ec09a3bacbf9462762782ffc6 WHIRLPOOL fcd1bc5fdccdce82ee6a6c2e6299f64d04873facc2f3e782a70a5cc000f5600adcf4e7f99b8a49832d4539b5987b78c67289a6e89cda0d8a9ba8eed2ed3a8c17
+DIST recoverjpeg-2.2.3.tar.gz 91672 SHA256 99650045a309ae2ffa7a7d19ca356bb7464eaadf8804b4dc68d5ed5239accc8f SHA512 67f923193c9b012302ad4e374141803992bfa4e4ac4c2384c8d44df29927c06a5224caefc936e30cef3fe1ca6dcf9f3544fc5171e4f76d17a83df974d0253c23 WHIRLPOOL dacada2bc903aa282d421de0b7e8ff364cfb7f0aa85c641e3123e9860639ae9ddfd5bbe24b2d90ab4f96018ff0773a53155b80fec6257acb06db3f595e3a590d
diff --git a/media-gfx/recoverjpeg/metadata.xml b/media-gfx/recoverjpeg/metadata.xml
new file mode 100644
index 000000000000..58a826b66ff9
--- /dev/null
+++ b/media-gfx/recoverjpeg/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/recoverjpeg/recoverjpeg-2.0-r1.ebuild b/media-gfx/recoverjpeg/recoverjpeg-2.0-r1.ebuild
new file mode 100644
index 000000000000..085b3d803ba8
--- /dev/null
+++ b/media-gfx/recoverjpeg/recoverjpeg-2.0-r1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base
+
+DESCRIPTION="Recover JPEG pictures from a possibly corrupted disk image"
+HOMEPAGE="http://www.rfc1149.net/devel/recoverjpeg.html"
+SRC_URI="http://www.rfc1149.net/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="media-gfx/exif
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )"
+RDEPEND="${DEPEND}"
+
+DOCS=( README )
diff --git a/media-gfx/recoverjpeg/recoverjpeg-2.1.1.ebuild b/media-gfx/recoverjpeg/recoverjpeg-2.1.1.ebuild
new file mode 100644
index 000000000000..f128be734f86
--- /dev/null
+++ b/media-gfx/recoverjpeg/recoverjpeg-2.1.1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base
+
+DESCRIPTION="Recover JPEG pictures from a possibly corrupted disk image"
+HOMEPAGE="http://www.rfc1149.net/devel/recoverjpeg.html"
+SRC_URI="http://www.rfc1149.net/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-gfx/exif
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ChangeLog )
diff --git a/media-gfx/recoverjpeg/recoverjpeg-2.2.1.ebuild b/media-gfx/recoverjpeg/recoverjpeg-2.2.1.ebuild
new file mode 100644
index 000000000000..13cab70d4fdd
--- /dev/null
+++ b/media-gfx/recoverjpeg/recoverjpeg-2.2.1.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base
+
+DESCRIPTION="Recover JPEG pictures from a possibly corrupted disk image"
+HOMEPAGE="http://www.rfc1149.net/devel/recoverjpeg.html"
+SRC_URI="http://www.rfc1149.net/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="media-gfx/exif
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ChangeLog )
diff --git a/media-gfx/recoverjpeg/recoverjpeg-2.2.2.ebuild b/media-gfx/recoverjpeg/recoverjpeg-2.2.2.ebuild
new file mode 100644
index 000000000000..f128be734f86
--- /dev/null
+++ b/media-gfx/recoverjpeg/recoverjpeg-2.2.2.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base
+
+DESCRIPTION="Recover JPEG pictures from a possibly corrupted disk image"
+HOMEPAGE="http://www.rfc1149.net/devel/recoverjpeg.html"
+SRC_URI="http://www.rfc1149.net/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="media-gfx/exif
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ChangeLog )
diff --git a/media-gfx/recoverjpeg/recoverjpeg-2.2.3.ebuild b/media-gfx/recoverjpeg/recoverjpeg-2.2.3.ebuild
new file mode 100644
index 000000000000..13cab70d4fdd
--- /dev/null
+++ b/media-gfx/recoverjpeg/recoverjpeg-2.2.3.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit base
+
+DESCRIPTION="Recover JPEG pictures from a possibly corrupted disk image"
+HOMEPAGE="http://www.rfc1149.net/devel/recoverjpeg.html"
+SRC_URI="http://www.rfc1149.net/download/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="media-gfx/exif
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )"
+RDEPEND="${DEPEND}"
+
+DOCS=( ChangeLog )
diff --git a/media-gfx/replicatorg/Manifest b/media-gfx/replicatorg/Manifest
new file mode 100644
index 000000000000..676788de2f4b
--- /dev/null
+++ b/media-gfx/replicatorg/Manifest
@@ -0,0 +1,2 @@
+DIST replicatorg-0037-linux.tgz 52627038 SHA256 304d942cc47933953bd4a74e7c88d6137e5ad0a5c4d0a6d0c51fa703d279f4cd SHA512 9fabfe64a6ff6c059abe66404349739cd74bcc244a4f37d020d506fd82d318f5103daeb289f615fe47203c43ea8842487acbe21b6cdbb9cdb4d9b20bfbfd845c WHIRLPOOL 62fa5629366bb9d5b32537834e2fdabf5ab3514282e7c24aeec4c04f8513fb4367514117089b7d7075c12d79f32ec059d1ef59c0f62803e0dbf34d0dccd3cb20
+DIST replicatorg-0040-linux.tgz 45962287 SHA256 9f614c2f0ae4494c73af84fd07937115d3c739bea638acf226419b80d31d2aad SHA512 c2be8679ebcb722a01f46bbd5a3dd771ebda0eb5e5546627f9064b412be0e5ae0b63f9d44dc7f03d9b3fb862c45dbe09edfb15018a075f39ca57d725ca804205 WHIRLPOOL 2088a517b11938f430a100d6f4e41cd14c6cc7db6954c8ce3475e019cdd2e9cb8833632b841affb88445d5b5ad1f99d8d9d85cb03651020e261aa53b05737059
diff --git a/media-gfx/replicatorg/files/replicatorg b/media-gfx/replicatorg/files/replicatorg
new file mode 100755
index 000000000000..2c91bf254346
--- /dev/null
+++ b/media-gfx/replicatorg/files/replicatorg
@@ -0,0 +1,2 @@
+#!/bin/bash
+( cd /opt/replicatorg ; ./replicatorg )
diff --git a/media-gfx/replicatorg/metadata.xml b/media-gfx/replicatorg/metadata.xml
new file mode 100644
index 000000000000..b32219d4b98d
--- /dev/null
+++ b/media-gfx/replicatorg/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>mattm@gentoo.org</email>
+<name>Matthew Marlowe</name>
+</maintainer>
+<longdescription>
+This is the software that will drive your MakerBot Replicator, Thing-O-Matic, CupCake CNC, RepRap machine, or generic CNC machine. You can give it a GCode or STL file to process, and it takes it from there. It's cross platform, easily installed, and is based on the familiar Arduino / Processing environments. ReplicatorG is used by thousands of MakerBot Operators, and has printed tens of thousands of objects and counting.
+</longdescription>
+<use>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/replicatorg/replicatorg-37-r2.ebuild b/media-gfx/replicatorg/replicatorg-37-r2.ebuild
new file mode 100644
index 000000000000..72a35a87ce31
--- /dev/null
+++ b/media-gfx/replicatorg/replicatorg-37-r2.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils versionator user
+
+MY_P="${PN}-00${PV}"
+
+DESCRIPTION="ReplicatorG is a simple, open source 3D printing program"
+HOMEPAGE="http://replicat.org/start"
+SRC_URI="http://replicatorg.googlecode.com/files/${MY_P}-linux.tgz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+
+IUSE=""
+
+COMMON_DEPEND="dev-java/oracle-jre-bin"
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup replicator
+}
+
+pkg_postinst() {
+ elog "Replicatorg requires Sun/Oracle JRE and will not work with OpenJDK."
+ elog
+ elog "Ensure that your user account has permissions to access serial port,"
+ elog "if you plan to connect directly to a 3d printer rather than using"
+ elog "a flash card. Printing directly from replicatorg is preferred."
+ elog
+ elog "The replicator printer will likely show up in /dev as ttyACM0."
+ elog "You may want to autoload the cdc_acm kernel module."
+ elog
+ elog "Note that replicatorg includes its own version of skeinforge."
+ elog "There doesn't seem to be a simple way to depend on an external"
+ elog "version."
+ elog
+ elog "Replicatorg users should add themselves to the replicator group"
+ elog "to avoid upstream warnings about not being able to modify shared"
+ elog "skeinforge scripts."
+ elog
+ chmod -R g+w "${ROOT}"/opt/replicatorg
+ chown -R root:replicator "${ROOT}"/opt/replicatorg
+ chmod 0755 /opt/replicatorg
+}
+
+src_install() {
+ dodir \
+ /opt/replicatorg \
+ /usr/share/replicatorg
+
+ keepdir \
+ /opt/replicatorg \
+ /usr/share/replicatorg
+
+ dobin "${FILESDIR}"/replicatorg
+
+ /bin/cp -R --preserve=mode \
+ docs \
+ examples \
+ lib \
+ lib-i686 \
+ lib-x86_64 \
+ machines \
+ scripts \
+ replicatorg \
+ skein_engines \
+ tools \
+ "${D}"/opt/replicatorg/
+
+ insinto /usr/share/replicatorg
+ doins -r \
+ contributors.txt \
+ license.txt \
+ readme.txt \
+ todo.txt
+
+}
diff --git a/media-gfx/replicatorg/replicatorg-40-r1.ebuild b/media-gfx/replicatorg/replicatorg-40-r1.ebuild
new file mode 100644
index 000000000000..fc5dede1caf0
--- /dev/null
+++ b/media-gfx/replicatorg/replicatorg-40-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils versionator user
+
+MY_P="${PN}-00${PV}"
+
+DESCRIPTION="ReplicatorG is a simple, open source 3D printing program"
+HOMEPAGE="http://replicat.org/start"
+SRC_URI="http://replicatorg.googlecode.com/files/${MY_P}-linux.tgz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS=""
+
+IUSE=""
+
+COMMON_DEPEND="dev-java/oracle-jre-bin"
+RDEPEND="${COMMON_DEPEND}"
+DEPEND="${COMMON_DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ enewgroup replicator
+}
+
+pkg_postinst() {
+ elog "Replicatorg requires Sun/Oracle JRE and will not work with OpenJDK."
+ elog
+ elog "Ensure that your user account has permissions to access serial port,"
+ elog "if you plan to connect directly to a 3d printer rather than using"
+ elog "a flash card. Printing directly from replicatorg is preferred."
+ elog
+ elog "The replicator printer will likely show up in /dev as ttyACM0."
+ elog "You may want to autoload the cdc_acm kernel module."
+ elog
+ elog "Note that replicatorg includes its own version of skeinforge."
+ elog "There doesn't seem to be a simple way to depend on an external"
+ elog "version."
+ elog
+ elog "Replicatorg users should add themselves to the replicator group"
+ elog "to avoid upstream warnings about not being able to modify shared"
+ elog "skeinforge scripts."
+ elog
+ chmod -R g+w "${ROOT}"/opt/replicatorg
+ chown -R root:replicator "${ROOT}"/opt/replicatorg
+ chmod 0755 /opt/replicatorg
+}
+
+src_install() {
+ dodir \
+ /opt/replicatorg \
+ /usr/share/replicatorg
+
+ keepdir \
+ /opt/replicatorg \
+ /usr/share/replicatorg
+
+ dobin "${FILESDIR}"/replicatorg
+
+ /bin/cp -R --preserve=mode \
+ docs \
+ examples \
+ lib \
+ lib-i686 \
+ lib-x86_64 \
+ machines \
+ scripts \
+ replicatorg \
+ skein_engines \
+ tools \
+ "${D}"/opt/replicatorg/
+
+ insinto /usr/share/replicatorg
+ doins -r \
+ contributors.txt \
+ license.txt \
+ readme.txt \
+ todo.txt
+
+}
diff --git a/media-gfx/ristretto/Manifest b/media-gfx/ristretto/Manifest
new file mode 100644
index 000000000000..554fd6c8059f
--- /dev/null
+++ b/media-gfx/ristretto/Manifest
@@ -0,0 +1,2 @@
+DIST ristretto-0.6.3.tar.bz2 499323 SHA256 2b6816de298e9a0d9b95662664690713c4123a9ac813a27bdde4727a03472d79 SHA512 996ed14ab749efd2df702a87e559711791bad71226e8b097c630e9c425059805ca52523ef68e8757849837e89a59bbb580459cc45b4e207785aedcfbaf733166 WHIRLPOOL 402b1f1747dc47b39bc08772e8169130aea2e1826fb0fe01b5a40bc669d1d3d37bdf7f1a21ef19108f70382c9843cdc66d99ce21b5def3eadb83dd3dd8f356c3
+DIST ristretto-0.8.0.tar.bz2 541473 SHA256 71625324cecda7199acbc95a3ea5132d0dcbf808771e7a209ea2b9503ae4f328 SHA512 067d3e7b5ec4fe3537cc796b94e8b999fc99efdb58c52a2a71160405626a3784caa877724e756b363012dce4719ee534f4ce0c92f2f6f2adaf937da8d5abab99 WHIRLPOOL 85b7dbbf7009b5a100f8fa5302f683df2832d448c5580e94ae8e48cd74ec600b9964b101f774cb9610f63786ffe7f11a779a5a4c333ba4778c058ac2f70d35c9
diff --git a/media-gfx/ristretto/files/ristretto-0.8.0-fix-appdata-validation.patch b/media-gfx/ristretto/files/ristretto-0.8.0-fix-appdata-validation.patch
new file mode 100644
index 000000000000..e1266ab547b9
--- /dev/null
+++ b/media-gfx/ristretto/files/ristretto-0.8.0-fix-appdata-validation.patch
@@ -0,0 +1,25 @@
+From 3ae341ba0bbf5c0fefcdb02a3674061a6b73f7db Mon Sep 17 00:00:00 2001
+From: Kevin Fenzi <kevin@scrye.com>
+Date: Mon, 2 Mar 2015 15:41:11 +0300
+Subject: appdata fails validation (Bug #11622)
+
+appstream-util fails with "cannot contain a hyperlink".
+
+Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
+
+diff --git a/ristretto.appdata.xml.in b/ristretto.appdata.xml.in
+index 0ff8b22..ea7a96f 100644
+--- a/ristretto.appdata.xml.in
++++ b/ristretto.appdata.xml.in
+@@ -66,7 +66,7 @@
+ <release version="0.6.0" timestamp="1335662454">
+ <description>
+ <_p>This version comes with several changes such as online documentation on
+- http://docs.xfce.org, the option to limit the maximum image-quality to
++ docs.xfce.org, the option to limit the maximum image-quality to
+ the screen dimensions to improve memory-usage and performance - now ristretto
+ renders at full quality with this option disabled, only one toolbar - instead
+ of two, a quick-launch button on the toolbar to execute an editor, the option
+--
+cgit v0.10.1
+
diff --git a/media-gfx/ristretto/files/ristretto-0.8.0-fix-icon-installation.patch b/media-gfx/ristretto/files/ristretto-0.8.0-fix-icon-installation.patch
new file mode 100644
index 000000000000..79eed6b47b7d
--- /dev/null
+++ b/media-gfx/ristretto/files/ristretto-0.8.0-fix-icon-installation.patch
@@ -0,0 +1,20 @@
+This should normally patch Makefile.am and use autotools.eclass to re-run
+autoreconf. However, this does not work out of the box and pulling out the big
+artillery to fix a simple typo which will be gone in the next release wasn't
+worth the trouble.
+
+See https://bugs.gentoo.org/542604.
+
+Denis Dupeyron <calchan@gentoo.org>
+
+--- icons/128x128/Makefile.in.orig 2015-04-20 21:16:04.376497095 -0600
++++ icons/128x128/Makefile.in 2015-04-20 21:16:23.423138219 -0600
+@@ -337,7 +337,7 @@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-iconsdir = $(datadir)/icons/hicolor/48x48/apps
++iconsdir = $(datadir)/icons/hicolor/128x128/apps
+ icons_DATA = ristretto.png
+ EXTRA_DIST = $(icons_DATA)
+ all: all-am
diff --git a/media-gfx/ristretto/metadata.xml b/media-gfx/ristretto/metadata.xml
new file mode 100644
index 000000000000..008cf479f615
--- /dev/null
+++ b/media-gfx/ristretto/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xfce@gentoo.org</email>
+ <name>XFCE Team</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/ristretto/ristretto-0.6.3.ebuild b/media-gfx/ristretto/ristretto-0.6.3.ebuild
new file mode 100644
index 000000000000..494b8c01a90a
--- /dev/null
+++ b/media-gfx/ristretto/ristretto-0.6.3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit xfconf
+
+DESCRIPTION="A fast and lightweight picture viewer for the Xfce desktop environment"
+HOMEPAGE="http://goodies.xfce.org/projects/applications/ristretto"
+SRC_URI="mirror://xfce/src/apps/${PN}/${PV%.*}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="debug"
+
+RDEPEND=">=dev-libs/dbus-glib-0.98
+ >=dev-libs/glib-2.24
+ media-libs/libexif
+ x11-libs/cairo
+ >=x11-libs/gtk+-2.20:2
+ x11-libs/libX11
+ >=xfce-base/libxfce4ui-4.10
+ >=xfce-base/libxfce4util-4.10
+ >=xfce-base/xfconf-4.10"
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+pkg_setup() {
+ XFCONF=(
+ $(xfconf_use_debug)
+ )
+
+ DOCS=( AUTHORS ChangeLog NEWS TODO )
+}
diff --git a/media-gfx/ristretto/ristretto-0.8.0-r1.ebuild b/media-gfx/ristretto/ristretto-0.8.0-r1.ebuild
new file mode 100644
index 000000000000..0c3e1aca9bc7
--- /dev/null
+++ b/media-gfx/ristretto/ristretto-0.8.0-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit xfconf
+
+DESCRIPTION="A fast and lightweight picture viewer for the Xfce desktop environment"
+HOMEPAGE="http://goodies.xfce.org/projects/applications/ristretto"
+SRC_URI="mirror://xfce/src/apps/${PN}/${PV%.*}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE="debug"
+
+RDEPEND=">=dev-libs/dbus-glib-0.98:0=
+ >=dev-libs/glib-2.24:2=
+ media-libs/libexif:0=
+ x11-libs/cairo:0=
+ >=x11-libs/gtk+-2.20:2=
+ x11-libs/libX11:0=
+ >=xfce-base/libxfce4ui-4.10:0=
+ >=xfce-base/libxfce4util-4.10:0=
+ >=xfce-base/xfconf-4.10:0="
+DEPEND="${RDEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+pkg_setup() {
+ PATCHES=(
+ "${FILESDIR}"/${P}-fix-appdata-validation.patch
+ "${FILESDIR}"/${P}-fix-icon-installation.patch
+ )
+
+ XFCONF=(
+ $(xfconf_use_debug)
+ )
+
+ DOCS=( AUTHORS ChangeLog NEWS TODO )
+}
diff --git a/media-gfx/rotoscope/Manifest b/media-gfx/rotoscope/Manifest
new file mode 100644
index 000000000000..6995588c4cf6
--- /dev/null
+++ b/media-gfx/rotoscope/Manifest
@@ -0,0 +1 @@
+DIST rotoscope_0.2.orig.tar.gz 108147 SHA256 2a78537965c6ff46ce245a16784da7c9d013a567925df5ec9c9fedf52f62860a
diff --git a/media-gfx/rotoscope/metadata.xml b/media-gfx/rotoscope/metadata.xml
new file mode 100644
index 000000000000..57ee4c30506e
--- /dev/null
+++ b/media-gfx/rotoscope/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">rotoscope</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/rotoscope/rotoscope-0.2.ebuild b/media-gfx/rotoscope/rotoscope-0.2.ebuild
new file mode 100644
index 000000000000..4c2071748226
--- /dev/null
+++ b/media-gfx/rotoscope/rotoscope-0.2.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+DESCRIPTION="Graphics program that can be used to give photos a cartoon-like appearance"
+HOMEPAGE="http://www.toonyphotos.com"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2
+ >=gnome-base/libglade-2"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS README
+}
diff --git a/media-gfx/sam2p/Manifest b/media-gfx/sam2p/Manifest
new file mode 100644
index 000000000000..639fc75be5d7
--- /dev/null
+++ b/media-gfx/sam2p/Manifest
@@ -0,0 +1,2 @@
+DIST sam2p-0.49.1.tar.gz 562304 SHA256 d97a270e3ad4ad138378b5fcb10e489e9af48a8150f308458771808dfceb069a SHA512 58565fdcb7c450ad23c2971b70f0362dbf4ecfd8c4dedf19c25b56fc98c8799696c6ecf75d47650bc3b21f88b8454d7c4e6b206f7c0ae0e5de35d608262c1220 WHIRLPOOL 809512e56f7e0b4ac0b8a00be1da1088a1249fbccf1b59470b4e25036ffdaf36884374c7735bad6a3440166e835c02ade7f87dc9eb00b92b84382602884517d5
+DIST sam2p-0.49.2.tar.gz 562733 SHA256 0e75d94bed380f8d8bd629f7797a0ca533b5d0b40eba2dab339146dedc1f79bf SHA512 8e4d629df192381bddf8468687c6a41d459b70788a5e9defc68d5497f855cbae838f2f6f924237b17e4a8e6fbf982fb2709615c8fb1d9c8cec5ec7ecf91ec6ce WHIRLPOOL 90ede2ba7b8f1dbc056cfdcfbaedd3cc995ccb58439050d6b4c51ab24a33f91b022110ea3a72ffe8b72e42f9104e936511fdbcdc1bf579fdac26c145ff2bb949
diff --git a/media-gfx/sam2p/files/sam2p-0.45-cflags.patch b/media-gfx/sam2p/files/sam2p-0.45-cflags.patch
new file mode 100644
index 000000000000..d6636d5308cf
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.45-cflags.patch
@@ -0,0 +1,37 @@
+Index: sam2p-0.45/configure.in
+===================================================================
+--- sam2p-0.45.orig/configure.in
++++ sam2p-0.45/configure.in
+@@ -81,7 +81,7 @@ fi
+ dnl Checks for programs.
+ dnl AC_PROG_CC
+ AC_LANG_CPLUSPLUS
+-CXXFLAGS=" "
++#CXXFLAGS=" "
+ dnl ^^^ set it to non-empty, so AC_PROG_CXX won't include `-g'
+ CCC="$CCC g++"
+ dnl ^^^ check g++ before c++ (see acspecific.m4, grep AC_PROG_CXX)
+@@ -215,7 +215,7 @@ AC_OUTPUT(Makehelp)
+
+ dnl AC_PTS_RUN_OK([perl -x -S ./ccdep.pl $CXX], [], [AC_MSG_ERROR(cannot compute depends)])
+ rm -f Makedep
+-AC_PTS_RUN_OK([make Makedep], [], [AC_MSG_ERROR(cannot compute depends)])
++AC_PTS_RUN_OK([gmake Makedep], [], [AC_MSG_ERROR(cannot compute depends)])
+ AC_PTS_OK
+ echo "configure done. Now you should run: make; make install"
+
+Index: sam2p-0.45/Makefile
+===================================================================
+--- sam2p-0.45.orig/Makefile
++++ sam2p-0.45/Makefile
+@@ -49,8 +49,8 @@ IDE_MODES := release debug
+ IDE_TARGETS_debug := $(patsubst %,%.yes, $(TARGETS))
+ IDE_TARGETS_release := $(TARGETS)
+
+-CXD_assert =$(CXX) -s -O2
+-CXD_no =$(CXX) -s -DNDEBUG -O3
++CXD_assert =$(CXX)
++CXD_no =$(CXX) -DNDEBUG
+ # CXD_yes =$(CXX) $(GFLAG) -lefence
+ CXD_yes =$(CXX) $(GFLAG)
+ CXD_checker=checkerg++ $(GFLAG)
diff --git a/media-gfx/sam2p/files/sam2p-0.45-fbsd.patch b/media-gfx/sam2p/files/sam2p-0.45-fbsd.patch
new file mode 100644
index 000000000000..aed13acf08dd
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.45-fbsd.patch
@@ -0,0 +1,14 @@
+--- gensio.cpp.orig Fri Feb 7 02:24:56 2003
++++ gensio.cpp Fri Feb 7 02:25:11 2003
+@@ -491,11 +491,7 @@
+ /* --- */
+
+
+-#if HAVE_lstat_in_sys_stat
+-# define PTS_lstat lstat
+-#else
+ # define PTS_lstat stat
+-#endif
+
+ /** @param fname must start with '/' (dir separator)
+ * @return true if file successfully created
diff --git a/media-gfx/sam2p/files/sam2p-0.45-nostrip.patch b/media-gfx/sam2p/files/sam2p-0.45-nostrip.patch
new file mode 100644
index 000000000000..d60a77c36207
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.45-nostrip.patch
@@ -0,0 +1,13 @@
+Index: sam2p-0.45/Makefile
+===================================================================
+--- sam2p-0.45.orig/Makefile
++++ sam2p-0.45/Makefile
+@@ -17,7 +17,7 @@ PERL_BADLANG=x
+ export PERL_BADLANG
+
+ CXXX=$(CXD_assert)
+-LDALL=$(LDXX) -s $(LDFLAGS) $(LIBS)
++LDALL=$(LDXX) $(LDFLAGS) $(LIBS)
+ ifeq ($(ENABLE_DEBUG), no)
+ CXXX=$(CXD_no)
+ endif
diff --git a/media-gfx/sam2p/files/sam2p-0.49-glibc-2.20.patch b/media-gfx/sam2p/files/sam2p-0.49-glibc-2.20.patch
new file mode 100644
index 000000000000..f96a97969390
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.49-glibc-2.20.patch
@@ -0,0 +1,18 @@
+https://bugs.gentoo.org/524048
+
+ignore warnings w/newer glibc-2.20
+
+patch by Dmitry Derevyanko
+
+--- a/ccdep.pl
++++ b/ccdep.pl
+@@ -233,6 +233,9 @@
+ } elsif ($S=~/\A([^:]+):\d+:(\d+:)? warning: this is the location of /) {
+ # ^^^ gcc-3.1
+ undef $included_from;
++ } elsif ($S=~/\A([^:]+):\d+:(\d+:)? warning: .*\bdeprecated\b/) {
++ # Example: /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
++ undef $included_from;
+ } elsif ($S=~/: No such file or directory$/) { # Depends on $ENV{LC_ALL}.
+ # ^^^ gcc-3.3
+ undef $included_from;
diff --git a/media-gfx/sam2p/files/sam2p-0.49.1-build.patch b/media-gfx/sam2p/files/sam2p-0.49.1-build.patch
new file mode 100644
index 000000000000..ba421463d536
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.49.1-build.patch
@@ -0,0 +1,42 @@
+--- configure.in
++++ configure.in
+@@ -81,7 +81,7 @@
+ dnl Checks for programs.
+ dnl AC_PROG_CC
+ AC_LANG_CPLUSPLUS
+-CXXFLAGS=" "
++#CXXFLAGS=" "
+ dnl ^^^ set it to non-empty, so AC_PROG_CXX won't include `-g'
+ CCC="$CCC g++"
+ dnl ^^^ check g++ before c++ (see acspecific.m4, grep AC_PROG_CXX)
+@@ -215,7 +215,7 @@
+
+ dnl AC_PTS_RUN_OK([perl -x -S ./ccdep.pl $CXX], [], [AC_MSG_ERROR(cannot compute depends)])
+ rm -f Makedep
+-AC_PTS_RUN_OK([make Makedep], [], [AC_MSG_ERROR(cannot compute depends)])
++AC_PTS_RUN_OK([gmake Makedep], [], [AC_MSG_ERROR(cannot compute depends)])
+ AC_PTS_OK
+ echo "configure done. Now you should run: make; make install"
+
+--- Makefile
++++ Makefile
+@@ -17,7 +17,7 @@
+ export PERL_BADLANG
+
+ CXXX=$(CXD_assert)
+-LDALL=$(LDXX) -s $(LDFLAGS) $(LIBS)
++LDALL=$(LDXX) $(LDFLAGS) $(LIBS)
+ ifeq ($(ENABLE_DEBUG), no)
+ CXXX=$(CXD_no)
+ endif
+@@ -51,8 +51,8 @@
+ IDE_TARGETS_debug := $(patsubst %,%.yes, $(TARGETS))
+ IDE_TARGETS_release := $(TARGETS)
+
+-CXD_assert =$(CXX) -s -O2
+-CXD_no =$(CXX) -s -DNDEBUG -O3
++CXD_assert =$(CXX)
++CXD_no =$(CXX) -DNDEBUG
+ # CXD_yes =$(CXX) $(GFLAG) -lefence
+ CXD_yes =$(CXX) $(GFLAG)
+ CXD_checker=checkerg++ $(GFLAG)
diff --git a/media-gfx/sam2p/files/sam2p-0.49.1-gcc48.patch b/media-gfx/sam2p/files/sam2p-0.49.1-gcc48.patch
new file mode 100644
index 000000000000..d427c2076d3c
--- /dev/null
+++ b/media-gfx/sam2p/files/sam2p-0.49.1-gcc48.patch
@@ -0,0 +1,39 @@
+Index: ccdep.pl
+===================================================================
+--- ccdep.pl (revision 123)
++++ ccdep.pl (revision 125)
+@@ -137,13 +137,20 @@
+
+ my @DS=find_ds();
+ my @DSQ=map{shq$_}@DS;
+-my $R="$GCCP -DOBJDEP -M -MG -E 2>&1 @DSQ";
+-$R=backtick($R);
++my $DIAG=" -fno-diagnostics-show-caret";
++my $Q="$GCCP -DOBJDEP$DIAG -M -MG -E 2>&1 @DSQ";
++my $R=backtick($Q);
++if ($R=~/\berror: .*-fno-diagnostics-show-caret\b/) {
++ # gcc-4.6 and earlier don't have this flag, and they fail.
++ $Q=~s@ -fno-diagnostics-show-caret(?=\s)@@;
++ $DIAG="";
++ $R=backtick($Q);
++}
+
+ if ($R!~/: warning: #warning\b/) {
+ # config2.h:314:4: warning: #warning REQUIRES: c_lgcc3.o
+ # Dat: g++-3.3 ignores #warning with -M -MG -E
+- $R.="\n".backtick("$GCCP -DOBJDEP -E 2>&1 >/dev/null @DSQ");
++ $R.="\n".backtick("$GCCP -DOBJDEP$DIAG -E 2>&1 >/dev/null @DSQ");
+ }
+
+ ## die $R;
+--- rule.hpp 2013-04-18 12:14:20.385333527 +0200
++++ rule.hpp 2013-04-18 12:14:35.818870070 +0200
+@@ -88,7 +88,7 @@
+ PR_PNGAuto=15,
+ PR_PNGAutoMaybe=25,
+ PR_PNGAutoBadUnsigned=45,
+- PR_PNGAutoBadSigned=55,
++ PR_PNGAutoBadSigned=55
+ END_STATIC_ENUM()
+ pr_t Predictor;
+
diff --git a/media-gfx/sam2p/metadata.xml b/media-gfx/sam2p/metadata.xml
new file mode 100644
index 000000000000..8c6fbf3b4e63
--- /dev/null
+++ b/media-gfx/sam2p/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tex</herd>
+ <upstream>
+ <remote-id type="google-code">sam2p</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/sam2p/sam2p-0.49.1.ebuild b/media-gfx/sam2p/sam2p-0.49.1.ebuild
new file mode 100644
index 000000000000..235b7cafa1c3
--- /dev/null
+++ b/media-gfx/sam2p/sam2p-0.49.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="Utility to convert raster images to EPS, PDF and many others"
+HOMEPAGE="http://code.google.com/p/sam2p/"
+SRC_URI="http://sam2p.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="examples gif"
+
+RDEPEND=""
+DEPEND="dev-lang/perl"
+
+RESTRICT="test"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-0.45-fbsd.patch \
+ "${FILESDIR}"/${PN}-0.49.1-build.patch \
+ "${FILESDIR}"/${PN}-0.49.1-gcc48.patch \
+ "${FILESDIR}"/${PN}-0.49-glibc-2.20.patch
+ eautoreconf
+ tc-export CXX
+}
+
+src_configure() {
+ econf --enable-lzw $(use_enable gif)
+}
+
+src_install() {
+ dobin sam2p
+ dodoc README
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*
+ fi
+}
diff --git a/media-gfx/sam2p/sam2p-0.49.2.ebuild b/media-gfx/sam2p/sam2p-0.49.2.ebuild
new file mode 100644
index 000000000000..6f962ef1cadb
--- /dev/null
+++ b/media-gfx/sam2p/sam2p-0.49.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="Utility to convert raster images to EPS, PDF and many others"
+HOMEPAGE="http://code.google.com/p/sam2p/"
+SRC_URI="http://sam2p.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="examples gif"
+
+RDEPEND=""
+DEPEND="dev-lang/perl"
+
+RESTRICT="test"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-0.45-fbsd.patch \
+ "${FILESDIR}"/${PN}-0.49.1-build.patch \
+ "${FILESDIR}"/${PN}-0.49-glibc-2.20.patch
+ eautoreconf
+ tc-export CXX
+}
+
+src_configure() {
+ econf --enable-lzw $(use_enable gif)
+}
+
+src_install() {
+ dobin sam2p
+ dodoc README
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*
+ fi
+}
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
new file mode 100644
index 000000000000..86937900092d
--- /dev/null
+++ b/media-gfx/sane-backends/Manifest
@@ -0,0 +1,2 @@
+DIST sane-backends-1.0.24.tar.gz 5778749 SHA256 27c7085a54f1505d8b551e6f1e69d30e1ee57328b18429bb2225dabf4c45462d SHA512 1e9f962bb9d27f17067eb662dabfc0a1aa0d06e16bec4bd28868124b468578d82f14f6d2c1f5de63d2cec57ca4584ec12d3b2c2b1de20f1199aece581453ebc5 WHIRLPOOL 19b939c920a3c157044c85a941debdc664d8781562fa3fc04f061b9d216b089be80edfd43479069382adf13e68160518fdbd5c84a5f4c506a46f8521d4ed2a1c
+DIST sane-backends-git20150628.tar.gz 5765552 SHA256 4cfd1245df8ade75cbfaedec91b1daaea6d30e0736e5d2f9afcd0a56fc357711 SHA512 8e8160b2337502a0b77724ffaa5bd65a6daaa3fa5587f1b72e2714c9253e8130e96170d7f1de38210e17c5524cbe0953ff0464d29db194354d4e9b7249782eaf WHIRLPOOL d9b9a4f44cb3fcda9c8099d5ed3a9764e0a961f80ae1a89dda4e0ec8e6c24c830ad0feebd13c28af848c133a99e50d21c2f01269e434af31b17164a377edbbff
diff --git a/media-gfx/sane-backends/files/niash_array_index.patch b/media-gfx/sane-backends/files/niash_array_index.patch
new file mode 100644
index 000000000000..236c4598b581
--- /dev/null
+++ b/media-gfx/sane-backends/files/niash_array_index.patch
@@ -0,0 +1,140 @@
+--- backend/niash.c 2010-12-02 00:49:58.000000000 +0100
++++ backend/niash.c.new 2011-09-21 20:09:07.000000000 +0200
+@@ -82,14 +82,7 @@
+ optThreshold,
+
+
+- optLast,
+-/* put temporarily disabled options here after optLast */
+-
+- optGroupMisc,
+- optLamp,
+-
+- optCalibrate,
+- optGamma /* analog gamma = single number */
++ optLast
+ } EOptionIndex;
+
+
+@@ -685,17 +678,6 @@
+ pDesc->size = 0;
+ break;
+
+- case optGamma:
+- pDesc->name = SANE_NAME_ANALOG_GAMMA;
+- pDesc->title = SANE_TITLE_ANALOG_GAMMA;
+- pDesc->desc = SANE_DESC_ANALOG_GAMMA;
+- pDesc->type = SANE_TYPE_FIXED;
+- pDesc->constraint_type = SANE_CONSTRAINT_RANGE;
+- pDesc->constraint.range = &rangeGamma;
+- pDesc->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
+- pVal->w = startUpGamma;
+- break;
+-
+ case optGammaTable:
+ pDesc->name = SANE_NAME_GAMMA_VECTOR;
+ pDesc->title = SANE_TITLE_GAMMA_VECTOR;
+@@ -707,31 +689,6 @@
+ pVal->wa = s->aGammaTable;
+ break;
+
+- case optGroupMisc:
+- pDesc->title = SANE_I18N ("Miscellaneous");
+- pDesc->type = SANE_TYPE_GROUP;
+- pDesc->size = 0;
+- break;
+-
+- case optLamp:
+- pDesc->name = "lamp";
+- pDesc->title = SANE_I18N ("Lamp status");
+- pDesc->desc = SANE_I18N ("Switches the lamp on or off.");
+- pDesc->type = SANE_TYPE_BOOL;
+- pDesc->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
+- /* switch the lamp on when starting for first the time */
+- pVal->w = SANE_TRUE;
+- break;
+-
+- case optCalibrate:
+- pDesc->name = "calibrate";
+- pDesc->title = SANE_I18N ("Calibrate");
+- pDesc->desc = SANE_I18N ("Calibrates for black and white level.");
+- pDesc->type = SANE_TYPE_BUTTON;
+- pDesc->cap = SANE_CAP_SOFT_SELECT;
+- pDesc->size = 0;
+- break;
+-
+ case optGroupMode:
+ pDesc->title = SANE_I18N ("Scan Mode");
+ pDesc->desc = "";
+@@ -1007,7 +964,6 @@
+ /* Get options of type SANE_Word */
+ case optCount:
+ case optDPI:
+- case optGamma:
+ case optTLX:
+ case optTLY:
+ case optBRX:
+@@ -1031,17 +987,6 @@
+ strcpy ((char *) pVal, modeList[s->aValues[optMode].w]);
+ break;
+
+- /* Get options of type SANE_Bool */
+- case optLamp:
+- GetLamp (&s->HWParams, &fLampIsOn);
+- *(SANE_Bool *) pVal = fLampIsOn;
+- break;
+-
+- case optCalibrate:
+- /* although this option has nothing to read,
+- it's added here to avoid a warning when running scanimage --help */
+- break;
+-
+ default:
+ DBG (DBG_MSG, "SANE_ACTION_GET_VALUE: Invalid option (%d)\n", n);
+ }
+@@ -1061,7 +1006,6 @@
+ case optCount:
+ return SANE_STATUS_INVAL;
+
+- case optGamma:
+ case optThreshold:
+ case optDPI:
+
+@@ -1089,15 +1033,7 @@
+ DBG (DBG_MSG,
+ "sane_control_option: SANE_ACTION_SET_VALUE %d = %d\n", n,
+ (int) s->aValues[n].w);
+- if (n == optGamma)
+- {
+- if (!fSame && optLast > optGammaTable)
+- {
+- info |= SANE_INFO_RELOAD_OPTIONS;
+- }
+- _SetScalarGamma (s->aGammaTable, s->aValues[n].w);
+- }
+- break;
++ break;
+
+ case optGammaTable:
+ DBG (DBG_MSG, "Writing gamma table\n");
+@@ -1158,20 +1094,6 @@
+ break;
+
+
+-
+- case optLamp:
+- fVal = *(SANE_Bool *) pVal;
+- DBG (DBG_MSG, "lamp %s\n", fVal ? "on" : "off");
+- if (fVal)
+- _WarmUpLamp (s, WARMUP_INSESSION);
+- else
+- SetLamp (&s->HWParams, SANE_FALSE);
+- break;
+-
+- case optCalibrate:
+-/* SimpleCalib(&s->HWParams); */
+- break;
+-
+ default:
+ DBG (DBG_ERR, "SANE_ACTION_SET_VALUE: Invalid option (%d)\n", n);
+ }
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-automagic_systemd.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-automagic_systemd.patch
new file mode 100644
index 000000000000..7db51b061c1a
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.24-automagic_systemd.patch
@@ -0,0 +1,56 @@
+sent upstream:
+https://lists.alioth.debian.org/pipermail/sane-devel/2015-July/033601.html
+
+From 867c8fcde5cf54afae7f9ae8f855605b891708a7 Mon Sep 17 00:00:00 2001
+From: Christopher Brannon <teiresias@gentoo.org>
+Date: Wed, 8 Jul 2015 06:37:14 -0400
+Subject: [PATCH] add a configure flag to control systemd support
+
+This way people can easily disable systemd support locally.
+---
+ configure.in | 29 ++++++++++++++++++-----------
+ 1 file changed, 18 insertions(+), 11 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 059058b..b539cda 100644
+--- a/configure.in
++++ b/configure.in
+@@ -343,17 +343,24 @@ dnl $as_echo "in order to autodetect network scanners in kodakaio."
+ dnl with_cups="no"
+ dnl fi
+
+-dnl added by llagendijk 12/7/2012 to detect systemd for saned
+-$as_echo_n "Checking for systemd..."
+-if test -e /usr/include/systemd/sd-daemon.h ; then
+- AC_DEFINE(HAVE_SYSTEMD, 1, [Is /usr/include/systemd/sd-daemon.h available?])
+- with_systemd="yes"
+- SYSTEMD_LIBS=" -lsystemd-daemon"
+- AC_SUBST(SYSTEMD_LIBS)
+- $as_echo "yes"
+-else
+- with_systemd="no"
+- $as_echo "no"
++AC_ARG_WITH(systemd,
++ AC_HELP_STRING([--with-systemd], [enable systemd support @<:@default=yes@:>@]))
++if test "x$with_systemd" != xno ; then
++ dnl added by llagendijk 12/7/2012 to detect systemd for saned
++ $as_echo_n "Checking for systemd..."
++ if test -e /usr/include/systemd/sd-daemon.h ; then
++ AC_DEFINE(HAVE_SYSTEMD, 1, [Is /usr/include/systemd/sd-daemon.h available?])
++ have_systemd="yes"
++ SYSTEMD_LIBS=" -lsystemd-daemon"
++ AC_SUBST(SYSTEMD_LIBS)
++ $as_echo "yes"
++ else
++ have_systemd="no"
++ $as_echo "no"
++ if test "x$with_systemd" = xyes; then
++ AC_MSG_ERROR([Systemd support was requested but systemd was not found])
++ fi
++ fi
+ fi
+
+ dnl ***********
+--
+2.4.4
+
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-cross-compile.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-cross-compile.patch
new file mode 100644
index 000000000000..d66edacbae80
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.24-cross-compile.patch
@@ -0,0 +1,30 @@
+sent upstream:
+https://lists.alioth.debian.org/pipermail/sane-devel/2015-July/033600.html
+
+From c8df148e2b9784be1827e33224baa1cb5066a383 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Wed, 8 Jul 2015 06:31:12 -0400
+Subject: [PATCH] fix cross-compiling paths
+
+There's no reason to hardcode -I paths to /usr/local. Doing so breaks
+cross-compiling when incompatible headers live in there or the toolchain
+is set up to throw errors with those flags.
+---
+ configure.in | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 48953d2..059058b 100644
+--- a/configure.in
++++ b/configure.in
+@@ -82,7 +82,6 @@ AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
+ dnl ***********************************************************************
+ dnl set compiler/linker flags
+ dnl ***********************************************************************
+-INCLUDES="${INCLUDES} -I/usr/local/include"
+ AC_SUBST(INCLUDES)
+ SANE_SET_CFLAGS([$is_release])
+ SANE_SET_LDFLAGS
+--
+2.4.4
+
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-kodakaio_avahi.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-kodakaio_avahi.patch
new file mode 100644
index 000000000000..80b12f011218
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.24-kodakaio_avahi.patch
@@ -0,0 +1,105 @@
+taken from upstream
+
+From 37523b867d411c2f82d08128246be7e38bc9812c Mon Sep 17 00:00:00 2001
+From: Paul Newall <quandry@ntlworld.com>
+Date: Mon, 14 Oct 2013 22:22:53 +0100
+Subject: [PATCH] Bugfix in kodakaio.c to fix segfault when non kodak scanners
+ return unexpected data via avahi auto discovery
+
+---
+ ChangeLog | 4 ++++
+ backend/kodakaio.c | 43 +++++++++++++++++++++++++++++++-----------
+ doc/descriptions/kodakaio.desc | 2 +-
+ 3 files changed, 37 insertions(+), 12 deletions(-)
+
+2013-10-14 Paul Newall <quandry@ntlworld.com>
+ * backend/kodakaio.c: fix bug #314301,
+ Segfault when unexpected data returned by avahi auto discovery.
+
+diff --git a/backend/kodakaio.c b/backend/kodakaio.c
+index 8c4583a..b442e50 100644
+--- a/backend/kodakaio.c
++++ b/backend/kodakaio.c
+@@ -127,7 +127,7 @@ for ubuntu 12.10
+
+ #define KODAKAIO_VERSION 02
+ #define KODAKAIO_REVISION 4
+-#define KODAKAIO_BUILD 6
++#define KODAKAIO_BUILD 7
+
+ /* for usb (but also used for net though it's not required). */
+ #define MAX_BLOCK_SIZE 32768
+@@ -2184,6 +2184,7 @@ static void resolve_callback(
+ AvahiLookupResultFlags flags,
+ AVAHI_GCC_UNUSED void* userdata) {
+
++ AvahiStringList *vid_pair_list = NULL, *pid_pair_list = NULL;
+ char *pidkey, *pidvalue;
+ char *vidkey, *vidvalue;
+ size_t valuesize;
+@@ -2204,20 +2205,40 @@ static void resolve_callback(
+ avahi_address_snprint(a, sizeof(a), address);
+
+ /* Output short for Kodak ESP */
+- DBG(min(10,DBG_AUTO), "%s:%u %s ", a,port,host_name);
+- avahi_string_list_get_pair(avahi_string_list_find(txt, "vid"),
+- &vidkey, &vidvalue, &valuesize);
+- DBG(min(10,DBG_AUTO), "%s=%s ", vidkey, vidvalue);
+- avahi_string_list_get_pair(avahi_string_list_find(txt, "pid"),
+- &pidkey, &pidvalue, &valuesize);
+- DBG(min(10,DBG_AUTO), "%s=%s\n", pidkey, pidvalue);
++ DBG(min(10,DBG_AUTO), "%s:%u %s\n", a,port,host_name);
+
++ vid_pair_list = avahi_string_list_find(txt, "vid");
++ if(vid_pair_list != NULL) {
++ avahi_string_list_get_pair(vid_pair_list, &vidkey, &vidvalue, &valuesize);
++ DBG(min(10,DBG_AUTO), "%s=%s ", vidkey, vidvalue);
++ }
++ else DBG(min(10,DBG_AUTO), "failed to find key vid\n");
++
++ pid_pair_list = avahi_string_list_find(txt, "pid");
++ if(pid_pair_list != NULL) {
++ avahi_string_list_get_pair(pid_pair_list, &pidkey, &pidvalue, &valuesize);
++ DBG(min(10,DBG_AUTO), "%s=%s\n", pidkey, pidvalue);
++ }
++ else DBG(min(10,DBG_AUTO), "failed to find key pid\n");
++
++ if(pid_pair_list != NULL && vid_pair_list != NULL) {
+ ProcessAvahiDevice(name, vidvalue, pidvalue, a);
+- avahi_free(vidkey); avahi_free(vidvalue);
+- avahi_free(pidkey); avahi_free(pidvalue);
++ }
++ else DBG(min(10,DBG_AUTO), "didn't call ProcessAvahiDevice\n");
++
++ if(vid_pair_list != NULL) {
++ avahi_free(vidkey);
++ avahi_free(vidvalue);
++ DBG(min(15,DBG_AUTO), "vidkey and vidvalue freed\n");
++ }
++ if(pid_pair_list != NULL) {
++ avahi_free(pidkey);
++ avahi_free(pidvalue);
++ DBG(min(15,DBG_AUTO), "pidkey and pidvalue freed\n");
++ }
+ }
+ }
+-
++ DBG(min(10,DBG_AUTO), "ending resolve_callback\n");
+ avahi_service_resolver_free(r);
+ }
+
+diff --git a/doc/descriptions/kodakaio.desc b/doc/descriptions/kodakaio.desc
+index 7882513..5fb18ed 100644
+--- a/doc/descriptions/kodakaio.desc
++++ b/doc/descriptions/kodakaio.desc
+@@ -1,6 +1,6 @@
+ :backend "kodakaio"
+ :url "http://sourceforge.net/projects/cupsdriverkodak/"
+-:version "2.4.6"
++:version "2.4.7"
+ :manpage "sane-kodakaio"
+ :comment "Backend for Kodak AiO ESP and Hero printers. Also possibly Advent AWL10"
+ :devicetype :scanner
+--
+2.4.4
+
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-saned_pidfile_location.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-saned_pidfile_location.patch
new file mode 100644
index 000000000000..c682961f7c3f
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.24-saned_pidfile_location.patch
@@ -0,0 +1,11 @@
+--- sane-backends-1.0.23/frontend/saned.c
++++ sane-backends-1.0.23/frontend/saned.c
+@@ -221,7 +221,7 @@
+ int numchildren;
+
+ #define SANED_CONFIG_FILE "saned.conf"
+-#define SANED_PID_FILE "/var/run/saned.pid"
++#define SANED_PID_FILE "/var/run/saned/saned.pid"
+
+ #define SANED_SERVICE_NAME "sane-port"
+ #define SANED_SERVICE_PORT 6566
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-systemd_pkgconfig.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-systemd_pkgconfig.patch
new file mode 100644
index 000000000000..b87ca8a30632
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.24-systemd_pkgconfig.patch
@@ -0,0 +1,54 @@
+sent upstream:
+https://lists.alioth.debian.org/pipermail/sane-devel/2015-July/033602.html
+
+From 1dcfb42608a27fbdebdaa721b4e48354850a7dcc Mon Sep 17 00:00:00 2001
+From: Christopher Brannon <teiresias@gentoo.org>
+Date: Wed, 8 Jul 2015 06:38:50 -0400
+Subject: [PATCH] use pkg-config to look up systemd paths
+
+Since systemd has always shipped pkg-config files, we should use them.
+This also fixes cross-compiling by not relying on hardcoded host paths.
+---
+ configure.in | 25 +++++++++++--------------
+ 1 file changed, 11 insertions(+), 14 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index b539cda..5e703a8 100644
+--- a/configure.in
++++ b/configure.in
+@@ -346,21 +346,18 @@ dnl fi
+ AC_ARG_WITH(systemd,
+ AC_HELP_STRING([--with-systemd], [enable systemd support @<:@default=yes@:>@]))
+ if test "x$with_systemd" != xno ; then
+- dnl added by llagendijk 12/7/2012 to detect systemd for saned
+- $as_echo_n "Checking for systemd..."
+- if test -e /usr/include/systemd/sd-daemon.h ; then
+- AC_DEFINE(HAVE_SYSTEMD, 1, [Is /usr/include/systemd/sd-daemon.h available?])
+- have_systemd="yes"
+- SYSTEMD_LIBS=" -lsystemd-daemon"
+- AC_SUBST(SYSTEMD_LIBS)
+- $as_echo "yes"
+- else
+- have_systemd="no"
+- $as_echo "no"
+- if test "x$with_systemd" = xyes; then
+- AC_MSG_ERROR([Systemd support was requested but systemd was not found])
+- fi
++ PKG_CHECK_MODULES(SYSTEMD, [libsystemd], have_systemd=yes, have_systemd=no)
++ if test "x$have_systemd" = xno; then
++ PKG_CHECK_MODULES(SYSTEMD, [libsystemd-daemon], have_systemd=yes, have_systemd=no)
++ fi
++ if test "x$have_systemd" = xyes; then
++ AC_DEFINE(HAVE_SYSTEMD, 1, [Is /usr/include/systemd/sd-daemon.h available?])
++ AC_SUBST(SYSTEMD_LIBS)
++ else
++ if test "x$with_systemd" = xyes; then
++ AC_MSG_ERROR([Systemd support was requested but systemd was not found])
+ fi
++ fi
+ fi
+
+ dnl ***********
+--
+2.4.4
+
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-unused-cups.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-unused-cups.patch
new file mode 100644
index 000000000000..a7c95d991bb4
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.24-unused-cups.patch
@@ -0,0 +1,62 @@
+taken from upstream
+
+From efb04936b8ad3bf313c289a522ae5832e22c1b7e Mon Sep 17 00:00:00 2001
+From: Paul Newall <quandry@ntlworld.com>
+Date: Tue, 15 Oct 2013 22:20:15 +0100
+Subject: [PATCH] detection of cups commented out in configure.in it is no
+ longer used by kodakaio.
+
+---
+ ChangeLog | 4 ++++
+ configure.in | 24 ++++++++++++------------
+ 2 files changed, 16 insertions(+), 12 deletions(-)
+
+2013-10-15 Paul Newall <quandry@ntlworld.com>
+ * configue.in: detection of cups was commented out. Avahi is now used
+ for autodetection in kodakaio so the detection of cups is no longer required.
+
+diff --git a/configure.in b/configure.in
+index e13888c..4365868 100644
+--- a/configure.in
++++ b/configure.in
+@@ -332,17 +332,17 @@ if test -c /dev/urandom ; then
+ AC_DEFINE(HAVE_DEV_URANDOM, 1, [Is /dev/urandom available?])
+ fi
+
+-dnl added by PN 3/2/12 to detect cups
+-$as_echo "checking for cups"
+-if test -e /usr/include/cups/cups.h ; then
+- AC_DEFINE(HAVE_CUPS, 1, [Is /usr/include/cups/cups.h available?])
+- with_cups="yes"
+- LIBS="-lcups $LIBS"
+-else
+- $as_echo "cups.h not found, you may want to install a cups development package"
+- $as_echo "in order to autodetect network scanners in kodakaio."
+- with_cups="no"
+-fi
++dnl added by PN 3/2/12 to detect cups commented out 15/10/13 since avahi is now used instead
++dnl $as_echo "checking for cups"
++dnl if test -e /usr/include/cups/cups.h ; then
++dnl AC_DEFINE(HAVE_CUPS, 1, [Is /usr/include/cups/cups.h available?])
++dnl with_cups="yes"
++dnl LIBS="-lcups $LIBS"
++dnl else
++dnl $as_echo "cups.h not found, you may want to install a cups development package"
++dnl $as_echo "in order to autodetect network scanners in kodakaio."
++dnl with_cups="no"
++dnl fi
+
+ dnl added by llagendijk 12/7/2012 to detect systemd for saned
+ $as_echo_n "Checking for systemd..."
+@@ -816,7 +816,7 @@ fi
+ echo "IPv6 support: `eval eval echo ${ipv6}`"
+ echo "Avahi support: `eval eval echo ${enable_avahi}`"
+ echo "SNMP support: `eval eval echo ${with_snmp}`"
+-echo "CUPS support: `eval eval echo ${with_cups}`"
++dnl echo "CUPS support: `eval eval echo ${with_cups}`" commented out 15/10/13
+ echo "-> The following backends will be built:"
+ for backend in ${BACKENDS} ; do
+ echo $ECHO_N "${backend} "
+--
+2.4.4
+
diff --git a/media-gfx/sane-backends/files/saned b/media-gfx/sane-backends/files/saned
new file mode 100644
index 000000000000..4b3e228eec99
--- /dev/null
+++ b/media-gfx/sane-backends/files/saned
@@ -0,0 +1,10 @@
+service sane-port
+{
+ socket_type = stream
+ server = /usr/sbin/saned
+ protocol = tcp
+ user = saned
+ group = scanner
+ wait = no
+ disable = yes
+}
diff --git a/media-gfx/sane-backends/files/saned.confd b/media-gfx/sane-backends/files/saned.confd
new file mode 100644
index 000000000000..adb1eab2c86b
--- /dev/null
+++ b/media-gfx/sane-backends/files/saned.confd
@@ -0,0 +1,2 @@
+# The user saned should drop its privileges to after startup
+#SANED_USER=""
diff --git a/media-gfx/sane-backends/files/saned.initd b/media-gfx/sane-backends/files/saned.initd
new file mode 100644
index 000000000000..dd07f0a9a8bc
--- /dev/null
+++ b/media-gfx/sane-backends/files/saned.initd
@@ -0,0 +1,12 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+pidfile="/var/run/saned/saned.pid"
+command="/usr/sbin/saned"
+command_args="-a ${SANED_USER:-root}"
+
+start_pre() {
+ checkpath -d -o ${SANED_USER:-root} ${pidfile%/*}
+}
diff --git a/media-gfx/sane-backends/metadata.xml b/media-gfx/sane-backends/metadata.xml
new file mode 100644
index 000000000000..ff62877c67ae
--- /dev/null
+++ b/media-gfx/sane-backends/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/sane-backends/sane-backends-1.0.24-r5.ebuild b/media-gfx/sane-backends/sane-backends-1.0.24-r5.ebuild
new file mode 100644
index 000000000000..75af4141f2a0
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.0.24-r5.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal udev user toolchain-funcs
+
+# gphoto and v4l are handled by their usual USE flags.
+# The pint backend was disabled because I could not get it to compile.
+IUSE_SANE_BACKENDS="
+ abaton
+ agfafocus
+ apple
+ artec
+ artec_eplus48u
+ as6e
+ avision
+ bh
+ canon
+ canon630u
+ canon_dr
+ canon_pp
+ cardscan
+ coolscan
+ coolscan2
+ coolscan3
+ dc210
+ dc240
+ dc25
+ dell1600n_net
+ dmc
+ epjitsu
+ epson
+ epson2
+ fujitsu
+ genesys
+ gt68xx
+ hp
+ hp3500
+ hp3900
+ hp4200
+ hp5400
+ hp5590
+ hpljm1005
+ hpsj5s
+ hs2p
+ ibm
+ kodak
+ kodakaio
+ kvs1025
+ kvs20xx
+ kvs40xx
+ leo
+ lexmark
+ ma1509
+ magicolor
+ matsushita
+ microtek
+ microtek2
+ mustek
+ mustek_pp
+ mustek_usb
+ mustek_usb2
+ nec
+ net
+ niash
+ p5
+ pie
+ pixma
+ plustek
+ plustek_pp
+ pnm
+ qcam
+ ricoh
+ rts8891
+ s9036
+ sceptre
+ sharp
+ sm3600
+ sm3840
+ snapscan
+ sp15c
+ st400
+ stv680
+ tamarack
+ teco1
+ teco2
+ teco3
+ test
+ u12
+ umax
+ umax1220u
+ umax_pp
+ xerox_mfp"
+
+IUSE="avahi doc gphoto2 ipv6 threads usb v4l xinetd snmp systemd"
+
+for backend in ${IUSE_SANE_BACKENDS}; do
+ case ${backend} in
+ # Disable backends that require parallel ports as no one has those anymore.
+ canon_pp|hpsj5s|mustek_pp|\
+ pnm)
+ IUSE+=" -sane_backends_${backend}"
+ ;;
+ mustek_usb2|kvs40xx)
+ IUSE+=" sane_backends_${backend}"
+ ;;
+ *)
+ IUSE+=" +sane_backends_${backend}"
+ esac
+done
+
+REQUIRED_USE="
+ sane_backends_mustek_usb2? ( threads )
+ sane_backends_kvs40xx? ( threads )
+"
+
+DESCRIPTION="Scanner Access Now Easy - Backends"
+HOMEPAGE="http://www.sane-project.org/"
+SRC_URI="https://alioth.debian.org/frs/download.php/file/3958/${P}.tar.gz"
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ sane_backends_dc210? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] )
+ sane_backends_dc240? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] )
+ sane_backends_dell1600n_net? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}]
+ >=media-libs/tiff-3.9.7-r1[${MULTILIB_USEDEP}] )
+ avahi? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
+ sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ usb? ( >=virtual/libusb-1-r1:1[${MULTILIB_USEDEP}] )
+ gphoto2? (
+ >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}]
+ >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}]
+ )
+ v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ xinetd? ( sys-apps/xinetd )
+ snmp? ( net-analyzer/net-snmp )
+ systemd? ( sys-apps/systemd:0= )
+"
+
+DEPEND="${RDEPEND}
+ v4l? ( sys-kernel/linux-headers )
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ )
+ >=sys-apps/sed-4
+
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+# We now use new syntax construct (SUBSYSTEMS!="usb|usb_device)
+RDEPEND="${RDEPEND}
+ !<sys-fs/udev-114
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20140508
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/sane-config
+)
+
+pkg_setup() {
+ enewgroup scanner
+ enewuser saned -1 -1 -1 scanner
+}
+
+src_prepare() {
+ cat >> backend/dll.conf.in <<-EOF
+ # Add support for the HP-specific backend. Needs net-print/hplip installed.
+ hpaio
+ # Add support for the Epson-specific backend. Needs media-gfx/iscan installed.
+ epkowa
+ EOF
+ epatch "${FILESDIR}"/niash_array_index.patch \
+ "${FILESDIR}"/${P}-unused-cups.patch \
+ "${FILESDIR}"/${P}-automagic_systemd.patch \
+ "${FILESDIR}"/${P}-systemd_pkgconfig.patch \
+ "${FILESDIR}"/${P}-kodakaio_avahi.patch \
+ "${FILESDIR}"/${P}-saned_pidfile_location.patch \
+ "${FILESDIR}"/${P}-cross-compile.patch
+ # Fix for "make check".
+ sed -i -e 's/sane-backends 1.0.24git/sane-backends 1.0.24/' testsuite/tools/data/html*
+ AT_NOELIBTOOLIZE=yes eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # the blank is intended - an empty string would result in building ALL backends.
+ local BACKENDS=" "
+
+ use gphoto2 && BACKENDS="gphoto2"
+ use v4l && BACKENDS="${BACKENDS} v4l"
+ for backend in ${IUSE_SANE_BACKENDS}; do
+ if use "sane_backends_${backend}" && [ ${backend} != pnm ]; then
+ BACKENDS="${BACKENDS} ${backend}"
+ fi
+ done
+
+ local myconf=(
+ $(use_enable usb libusb_1_0)
+ $(multilib_native_use_with snmp)
+ )
+
+ # you can only enable this backend, not disable it...
+ if use sane_backends_pnm; then
+ myconf+=( --enable-pnm-backend )
+ fi
+ if ! use doc; then
+ myconf+=( --disable-latex )
+ fi
+ if use sane_backends_mustek_pp; then
+ myconf+=( --enable-parport-directio )
+ fi
+ if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp; }; then
+ myconf+=( sane_cv_use_libieee1284=no )
+ fi
+ # if LINGUAS is set, just use the listed and supported localizations.
+ if [ "${LINGUAS-NoLocalesSet}" != NoLocalesSet ]; then
+ mkdir -p po || die
+ echo > po/LINGUAS
+ for lang in ${LINGUAS}; do
+ if [ -a "${S}"/po/${lang}.po ]; then
+ echo ${lang} >> po/LINGUAS
+ fi
+ done
+ fi
+
+ # relative path must be used for tests to work properly
+ ECONF_SOURCE=../${P} \
+ SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
+ BACKENDS="${BACKENDS}" \
+ econf \
+ $(use_with gphoto2) \
+ $(multilib_native_use_with systemd) \
+ $(use_with v4l) \
+ $(use_enable avahi) \
+ $(use_enable ipv6) \
+ $(use_enable threads pthread) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake VARTEXFONTS="${T}/fonts"
+
+ if use usb; then
+ cd tools/hotplug || die
+ sed -i -e '/^$/d' libsane.usermap || die
+ fi
+
+ if tc-is-cross-compiler; then
+ # The build system sucks and doesn't handle this properly.
+ # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
+ tc-export_build_env BUILD_CC
+ cd "${BUILD_DIR}"/tools || die
+ ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} -I. -I../include -I"${S}"/include \
+ "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
+ "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
+ local dirs=( hal hotplug hotplug-ng udev )
+ local targets=(
+ hal/libsane.fdi
+ hotplug/libsane.usermap
+ hotplug-ng/libsane.db
+ udev/libsane.rules
+ )
+ mkdir -p "${dirs[@]}" || die
+ emake "${targets[@]}"
+ fi
+}
+
+multilib_src_install() {
+ emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
+ docdir="${EPREFIX}"/usr/share/doc/${PF}
+
+ if multilib_is_native_abi; then
+ if use usb; then
+ insinto /etc/hotplug/usb
+ doins tools/hotplug/libsane.usermap
+ fi
+
+ udev_newrules tools/udev/libsane.rules 41-libsane.rules
+ insinto "/usr/share/pkgconfig"
+ doins tools/sane-backends.pc
+ fi
+}
+
+multilib_src_install_all() {
+ keepdir /var/lib/lock/sane
+ fowners root:scanner /var/lib/lock/sane
+ fperms g+w /var/lib/lock/sane
+ dodir /etc/env.d
+
+ if use usb; then
+ exeinto /etc/hotplug/usb
+ doexe tools/hotplug/libusbscanner
+ newdoc tools/hotplug/README README.hotplug
+ fi
+
+ dodoc NEWS AUTHORS ChangeLog* PROBLEMS README README.linux
+ prune_libtool_files --all
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ doins "${FILESDIR}"/saned
+ fi
+
+ newinitd "${FILESDIR}"/saned.initd saned
+ newconfd "${FILESDIR}"/saned.confd saned
+}
+
+pkg_postinst() {
+ if use xinetd; then
+ elog "If you want remote clients to connect, edit"
+ elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
+ fi
+
+ elog "If you are using a USB scanner, add all users who want"
+ elog "to access your scanner to the \"scanner\" group."
+}
diff --git a/media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild b/media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild
new file mode 100644
index 000000000000..f56067ec0d9f
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild
@@ -0,0 +1,336 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal udev user toolchain-funcs
+
+# gphoto and v4l are handled by their usual USE flags.
+# The pint backend was disabled because I could not get it to compile.
+IUSE_SANE_BACKENDS="
+ abaton
+ agfafocus
+ apple
+ artec
+ artec_eplus48u
+ as6e
+ avision
+ bh
+ canon
+ canon630u
+ canon_dr
+ canon_pp
+ cardscan
+ coolscan
+ coolscan2
+ coolscan3
+ dc210
+ dc240
+ dc25
+ dell1600n_net
+ dmc
+ epjitsu
+ epson
+ epson2
+ fujitsu
+ genesys
+ gt68xx
+ hp
+ hp3500
+ hp3900
+ hp4200
+ hp5400
+ hp5590
+ hpljm1005
+ hpsj5s
+ hs2p
+ ibm
+ kodak
+ kodakaio
+ kvs1025
+ kvs20xx
+ kvs40xx
+ leo
+ lexmark
+ ma1509
+ magicolor
+ matsushita
+ microtek
+ microtek2
+ mustek
+ mustek_pp
+ mustek_usb
+ mustek_usb2
+ nec
+ net
+ niash
+ p5
+ pie
+ pixma
+ plustek
+ plustek_pp
+ pnm
+ qcam
+ ricoh
+ rts8891
+ s9036
+ sceptre
+ sharp
+ sm3600
+ sm3840
+ snapscan
+ sp15c
+ st400
+ stv680
+ tamarack
+ teco1
+ teco2
+ teco3
+ test
+ u12
+ umax
+ umax1220u
+ umax_pp
+ xerox_mfp"
+
+IUSE="avahi doc gphoto2 ipv6 nls snmp systemd threads usb v4l xinetd"
+
+for backend in ${IUSE_SANE_BACKENDS}; do
+ case ${backend} in
+ # Disable backends that require parallel ports as no one has those anymore.
+ canon_pp|hpsj5s|mustek_pp|\
+ pnm)
+ IUSE+=" -sane_backends_${backend}"
+ ;;
+ mustek_usb2|kvs40xx)
+ IUSE+=" sane_backends_${backend}"
+ ;;
+ *)
+ IUSE+=" +sane_backends_${backend}"
+ esac
+done
+
+REQUIRED_USE="
+ sane_backends_mustek_usb2? ( threads )
+ sane_backends_kvs40xx? ( threads )
+"
+
+DESCRIPTION="Scanner Access Now Easy - Backends"
+HOMEPAGE="http://www.sane-project.org/"
+if [[ ${PV} == *_pre* ]] ; then
+ MY_P="${PN}-git${PV#*_pre}"
+ SRC_URI="http://www.sane-project.org/snapshots/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}.tar.gz"
+ S=${WORKDIR}/${MY_P}
+else
+ MY_P=${P}
+ SRC_URI="https://alioth.debian.org/frs/download.php/file/3958/${P}.tar.gz"
+fi
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ sane_backends_dc210? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] )
+ sane_backends_dc240? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] )
+ sane_backends_dell1600n_net? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}]
+ >=media-libs/tiff-3.9.7-r1[${MULTILIB_USEDEP}] )
+ avahi? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
+ sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ usb? ( >=virtual/libusb-1-r1:1[${MULTILIB_USEDEP}] )
+ gphoto2? (
+ >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}]
+ >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}]
+ )
+ v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ xinetd? ( sys-apps/xinetd )
+ snmp? ( net-analyzer/net-snmp )
+ systemd? ( sys-apps/systemd:0= )
+"
+
+DEPEND="${RDEPEND}
+ v4l? ( sys-kernel/linux-headers )
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ )
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+# We now use new syntax construct (SUBSYSTEMS!="usb|usb_device)
+RDEPEND="${RDEPEND}
+ !<sys-fs/udev-114
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20140508
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/sane-config
+)
+
+pkg_setup() {
+ enewgroup scanner
+ enewuser saned -1 -1 -1 scanner
+}
+
+src_prepare() {
+ cat >> backend/dll.conf.in <<-EOF
+ # Add support for the HP-specific backend. Needs net-print/hplip installed.
+ hpaio
+ # Add support for the Epson-specific backend. Needs media-gfx/iscan installed.
+ epkowa
+ EOF
+ epatch "${FILESDIR}"/niash_array_index.patch \
+ "${FILESDIR}"/${PN}-1.0.24-automagic_systemd.patch \
+ "${FILESDIR}"/${PN}-1.0.24-systemd_pkgconfig.patch \
+ "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch \
+ "${FILESDIR}"/${PN}-1.0.24-cross-compile.patch
+ # Fix for "make check".
+ sed -i -e 's/sane-backends 1.0.24git/sane-backends 1.0.24/' testsuite/tools/data/html*
+ mv configure.{in,ac} || die
+ AT_NOELIBTOOLIZE=yes eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+
+ # if LINGUAS is set, just use the listed and supported localizations.
+ if [[ ${LINGUAS+set} == "set" ]]; then
+ mkdir -p po || die
+ strip-linguas -u po
+ printf '%s\n' ${LINGUAS} > po/LINGUAS
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # the blank is intended - an empty string would result in building ALL backends.
+ local BACKENDS=" "
+
+ use gphoto2 && BACKENDS="gphoto2"
+ use v4l && BACKENDS="${BACKENDS} v4l"
+ for backend in ${IUSE_SANE_BACKENDS}; do
+ if use "sane_backends_${backend}" && [ ${backend} != pnm ]; then
+ BACKENDS="${BACKENDS} ${backend}"
+ fi
+ done
+
+ local myconf=(
+ $(use_enable usb libusb_1_0)
+ $(multilib_native_use_with snmp)
+ )
+
+ # you can only enable this backend, not disable it...
+ if use sane_backends_pnm; then
+ myconf+=( --enable-pnm-backend )
+ fi
+ if ! use doc; then
+ myconf+=( --disable-latex )
+ fi
+ if use sane_backends_mustek_pp; then
+ myconf+=( --enable-parport-directio )
+ fi
+ if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp; }; then
+ myconf+=( sane_cv_use_libieee1284=no )
+ fi
+
+ # relative path must be used for tests to work properly
+ ECONF_SOURCE=../${MY_P} \
+ SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
+ BACKENDS="${BACKENDS}" \
+ econf \
+ $(use_with gphoto2) \
+ $(multilib_native_use_with systemd) \
+ $(use_with v4l) \
+ $(use_enable avahi) \
+ $(use_enable ipv6) \
+ $(use_enable nls translations) \
+ $(use_enable threads pthread) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake VARTEXFONTS="${T}/fonts"
+
+ if tc-is-cross-compiler; then
+ pushd "${BUILD_DIR}"/tools >/dev/null || die
+
+ # The build system sucks and doesn't handle this properly.
+ # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
+ tc-export_build_env BUILD_CC
+ ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ -I. -I../include -I"${S}"/include \
+ "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
+ "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
+ local dirs=( hal hotplug hotplug-ng udev )
+ local targets=(
+ hal/libsane.fdi
+ hotplug/libsane.usermap
+ hotplug-ng/libsane.db
+ udev/libsane.rules
+ )
+ mkdir -p "${dirs[@]}" || die
+ emake "${targets[@]}"
+
+ popd >/dev/null
+ fi
+
+ if use usb; then
+ sed -i -e '/^$/d' \
+ tools/hotplug/libsane.usermap || die
+ fi
+}
+
+multilib_src_install() {
+ emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
+ docdir="${EPREFIX}"/usr/share/doc/${PF}
+
+ if multilib_is_native_abi; then
+ if use usb; then
+ insinto /etc/hotplug/usb
+ doins tools/hotplug/libsane.usermap
+ fi
+
+ udev_newrules tools/udev/libsane.rules 41-libsane.rules
+ insinto "/usr/share/pkgconfig"
+ doins tools/sane-backends.pc
+ fi
+}
+
+multilib_src_install_all() {
+ keepdir /var/lib/lock/sane
+ fowners root:scanner /var/lib/lock/sane
+ fperms g+w /var/lib/lock/sane
+ dodir /etc/env.d
+
+ if use usb; then
+ exeinto /etc/hotplug/usb
+ doexe tools/hotplug/libusbscanner
+ newdoc tools/hotplug/README README.hotplug
+ fi
+
+ dodoc NEWS AUTHORS ChangeLog* PROBLEMS README README.linux
+ prune_libtool_files --all
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ doins "${FILESDIR}"/saned
+ fi
+
+ newinitd "${FILESDIR}"/saned.initd saned
+ newconfd "${FILESDIR}"/saned.confd saned
+}
+
+pkg_postinst() {
+ if use xinetd; then
+ elog "If you want remote clients to connect, edit"
+ elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
+ fi
+
+ elog "If you are using a USB scanner, add all users who want"
+ elog "to access your scanner to the \"scanner\" group."
+}
diff --git a/media-gfx/sane-frontends/Manifest b/media-gfx/sane-frontends/Manifest
new file mode 100644
index 000000000000..eb9d8792cf6e
--- /dev/null
+++ b/media-gfx/sane-frontends/Manifest
@@ -0,0 +1 @@
+DIST sane-frontends-1.0.14.tar.gz 231892 SHA256 e7839dac1b70b5bb39124615aba8a136f5275d0e78bafd3d52ed76964ffea4a9 SHA512 51b24a9bd6889e99419c1d6abb30cb14d8f89b6196c5147044697bdb1b39ee029bdc0d7c6e1f1e800491988aa26f658bc974b25040c49d008ca8977673c78710 WHIRLPOOL 734abe5322f0726eabfa7e7f6287d98315bcf7e24f9d06a3cf7248c408f0b055438261a73ae29ce102760403d94f1905cf596756eb42f63e747e2a55a4c5b000
diff --git a/media-gfx/sane-frontends/files/MissingCapsFlag.patch b/media-gfx/sane-frontends/files/MissingCapsFlag.patch
new file mode 100644
index 000000000000..4175a87f8e66
--- /dev/null
+++ b/media-gfx/sane-frontends/files/MissingCapsFlag.patch
@@ -0,0 +1,12 @@
+--- src/gtkglue.c 2005-04-16 15:12:07.000000000 +0200
++++ src/gtkglue.c.new 2009-06-24 00:26:46.000000000 +0200
+@@ -1476,8 +1476,7 @@
+ || opt->type == SANE_TYPE_GROUP || !dialog->element[i].widget)
+ continue;
+
+- if (!(opt->cap & SANE_CAP_ALWAYS_SETTABLE))
+- gtk_widget_set_sensitive (dialog->element[i].widget, sensitive);
++ gtk_widget_set_sensitive (dialog->element[i].widget, sensitive);
+ }
+ }
+
diff --git a/media-gfx/sane-frontends/metadata.xml b/media-gfx/sane-frontends/metadata.xml
new file mode 100644
index 000000000000..ff62877c67ae
--- /dev/null
+++ b/media-gfx/sane-frontends/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/sane-frontends/sane-frontends-1.0.14.ebuild b/media-gfx/sane-frontends/sane-frontends-1.0.14.ebuild
new file mode 100644
index 000000000000..bf4e943e7401
--- /dev/null
+++ b/media-gfx/sane-frontends/sane-frontends-1.0.14.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Scanner Access Now Easy"
+HOMEPAGE="http://www.sane-project.org"
+SRC_URI="ftp://ftp.sane-project.org/pub/sane/${P}/${P}.tar.gz
+ ftp://ftp.sane-project.org/pub/sane/old-versions/${P}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc ppc64 sparc x86"
+IUSE="gimp"
+
+DEPEND="media-gfx/sane-backends
+ gimp? ( media-gfx/gimp )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/MissingCapsFlag.patch"
+}
+
+src_compile() {
+ local myconf=""
+ use gimp || myconf="--disable-gimp"
+ use gimp && ! has_version ">=media-gfx/gimp-2" && myconf="--enable-gimp12"
+ econf \
+ --datadir=/usr/share/misc \
+ ${myconf} || die
+ emake || die "emake failed"
+}
+
+src_install() {
+ local gimpplugindir
+ local gimptool
+ emake DESTDIR="${D}" install || die
+ if use gimp; then
+ for gimptool in gimptool gimptool-2.0 gimptool-1.2; do
+ if [ -x /usr/bin/${gimptool} ]; then
+ einfo "Setting plugin link for GIMP version $(/usr/bin/${gimptool} --version)"
+ gimpplugindir=$(/usr/bin/${gimptool} --gimpplugindir)/plug-ins
+ break
+ fi
+ done
+ if [ "/plug-ins" != "${gimpplugindir}" ]; then
+ dodir ${gimpplugindir}
+ dosym /usr/bin/xscanimage ${gimpplugindir}/xscanimage
+ else
+ ewarn "No idea where to find the gimp plugin directory"
+ fi
+ fi
+ dodoc AUTHORS Changelog NEWS PROBLEMS README
+}
diff --git a/media-gfx/scantailor/Manifest b/media-gfx/scantailor/Manifest
new file mode 100644
index 000000000000..919e60172c3e
--- /dev/null
+++ b/media-gfx/scantailor/Manifest
@@ -0,0 +1,2 @@
+DIST scantailor-0.9.10.tar.gz 1124348 SHA256 0b574eabfb65e4dcf3915d00ad3da31d464060458ffaeb49e4257e97301f93a0
+DIST scantailor-0.9.11.1.tar.gz 1190198 SHA256 881647a4172c55a067a7b6687965441cf21176d79d93075b22a373ea9accd8d3 SHA512 cec327fd12144f7cee5043adfee3880c75fb147474e4c3b5166385f7a8f47cb5650ed2df930bbe1f4b8ac2c7229a887ecba1ca105b47b1023f5d3d7d7b54bdb4 WHIRLPOOL c064837bd4d5f4c3fbfa260493f3eccecff59910c934005148975f2f00511539ae0e66535d0a57bbf0458022c8ec249faa7f3df40ed8d89b2683530b885e4f6b
diff --git a/media-gfx/scantailor/files/scantailor-0.9.9-environment_flags.patch b/media-gfx/scantailor/files/scantailor-0.9.9-environment_flags.patch
new file mode 100644
index 000000000000..70d860ec3bef
--- /dev/null
+++ b/media-gfx/scantailor/files/scantailor-0.9.9-environment_flags.patch
@@ -0,0 +1,24 @@
+--- cmake/SetDefaultGccFlags.cmake.orig 2010-06-22 14:39:55.000000000 +0300
++++ cmake/SetDefaultGccFlags.cmake 2010-06-22 14:44:27.000000000 +0300
+@@ -24,21 +24,6 @@
+ ENDIF(visibility_supported_)
+
+ IF(NOT COMPILER_FLAGS_OVERRIDDEN)
+- # Flags common for all build configurations.
+- SET(
+- CMAKE_C_FLAGS
+- "-Wall -Wno-unused -ffast-math"
+- CACHE STRING "Common C flags for all build configurations." FORCE
+- )
+- SET(
+- CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}"
+- CACHE STRING "Common C++ flags for all build configurations." FORCE
+- )
+- SET(
+- CMAKE_EXE_LINKER_FLAGS "" CACHE STRING
+- "Common link flags for all build configurations." FORCE
+- )
+-
+ # Release
+ SET(
+ CMAKE_C_FLAGS_RELEASE
diff --git a/media-gfx/scantailor/files/scantailor-gcc46.patch b/media-gfx/scantailor/files/scantailor-gcc46.patch
new file mode 100644
index 000000000000..8965ab478b1e
--- /dev/null
+++ b/media-gfx/scantailor/files/scantailor-gcc46.patch
@@ -0,0 +1,121 @@
+From a25036fbf37941e241da520fa7fab45e13c9c4a4 Mon Sep 17 00:00:00 2001
+From: Joseph Artsimovich <joseph.artsimovich@gmail.com>
+Date: Sat, 1 Oct 2011 19:37:10 +0100
+Subject: [PATCH] Fix build issues with certain version combinations of boost
+ and gcc.
+
+---
+ ProjectWriter.cpp | 1 +
+ compat/boost_multi_index_foreach_fix.h | 46 ++++++++++++++++++++++++++++++++
+ zones/EditableZoneSet.h | 18 ++++++++++++-
+ 3 files changed, 64 insertions(+), 1 deletions(-)
+ create mode 100644 compat/boost_multi_index_foreach_fix.h
+
+diff --git a/ProjectWriter.cpp b/ProjectWriter.cpp
+index e6e519b..44329d7 100644
+--- a/ProjectWriter.cpp
++++ b/ProjectWriter.cpp
+@@ -25,6 +25,7 @@
+ #include "ImageMetadata.h"
+ #include "AbstractFilter.h"
+ #include "FileNameDisambiguator.h"
++#include "compat/boost_multi_index_foreach_fix.h"
+ #include <QtXml>
+ #include <QFile>
+ #include <QTextStream>
+diff --git a/compat/boost_multi_index_foreach_fix.h b/compat/boost_multi_index_foreach_fix.h
+new file mode 100644
+index 0000000..7800c79
+--- /dev/null
++++ b/compat/boost_multi_index_foreach_fix.h
+@@ -0,0 +1,46 @@
++/*
++ Scan Tailor - Interactive post-processing tool for scanned pages.
++ Copyright (C) Joseph Artsimovich <joseph.artsimovich@gmail.com>
++
++ This program is free software: you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation, either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>.
++*/
++
++#ifndef BOOST_MULTI_INDEX_FOREACH_FIX_H_
++#define BOOST_MULTI_INDEX_FOREACH_FIX_H_
++
++#include <boost/foreach.hpp>
++#include <boost/mpl/bool.hpp>
++#include <boost/multi_index/sequenced_index.hpp>
++
++// BOOST_FOREACH() in boost >= 1.47 has problems with gcc >= 4.6
++// These problems aren't specific to boost::multi_index,
++// but the code below only deals with it.
++// In future versions of boost, they might include equivalent
++// code in boost::multi_index itself, which will lead to build problems.
++// If / when this happens, conditional compilation will be necessary.
++
++namespace boost
++{
++namespace foreach
++{
++
++template<typename SuperMeta, typename TagList>
++struct is_noncopyable<boost::multi_index::detail::sequenced_index<SuperMeta, TagList> > : mpl::true_
++{
++};
++
++} // namespace foreach
++} // namespace boost
++
++#endif
+diff --git a/zones/EditableZoneSet.h b/zones/EditableZoneSet.h
+index 153693d..4ecfd0d 100644
+--- a/zones/EditableZoneSet.h
++++ b/zones/EditableZoneSet.h
+@@ -1,7 +1,7 @@
+ /*
+
+ Scan Tailor - Interactive post-processing tool for scanned pages.
+- Copyright (C) 2007-2009 Joseph Artsimovich <joseph_a@mail.ru>
++ Copyright (C) Joseph Artsimovich <joseph.artsimovich@gmail.com>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -24,6 +24,8 @@
+ #include "PropertySet.h"
+ #include "IntrusivePtr.h"
+ #include <QObject>
++#include <boost/mpl/bool.hpp>
++#include <boost/foreach.hpp>
+ #include <boost/iterator/iterator_facade.hpp>
+ #include <map>
+
+@@ -102,4 +104,18 @@ private:
+ PropertySet m_defaultProps;
+ };
+
++namespace boost
++{
++namespace foreach
++{
++
++// Make BOOST_FOREACH work with the above class (necessary for boost >= 1.46 with gcc >= 4.6)
++template<>
++struct is_noncopyable<EditableZoneSet> : public boost::mpl::true_
++{
++};
++
++} // namespace foreach
++} // namespace boost
++
+ #endif
+--
+1.7.8.rc4
+
diff --git a/media-gfx/scantailor/metadata.xml b/media-gfx/scantailor/metadata.xml
new file mode 100644
index 000000000000..84bf0479f90f
--- /dev/null
+++ b/media-gfx/scantailor/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">scantailor</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/scantailor/scantailor-0.9.10.ebuild b/media-gfx/scantailor/scantailor-0.9.10.ebuild
new file mode 100644
index 000000000000..62ff3ecc8c9a
--- /dev/null
+++ b/media-gfx/scantailor/scantailor-0.9.10.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit cmake-utils eutils virtualx
+
+DESCRIPTION="A interactive post-processing tool for scanned pages"
+HOMEPAGE="http://scantailor.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-3 public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="opengl"
+
+RDEPEND=">=media-libs/libpng-1.2.43
+ >=media-libs/tiff-3.9.4
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/libXrender
+ dev-qt/qtgui:4
+ opengl? ( dev-qt/qtopengl:4 )"
+DEPEND="${RDEPEND}
+ dev-libs/boost"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.9-environment_flags.patch
+ "${FILESDIR}"/${PN}-gcc46.patch
+)
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_enable opengl)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${CMAKE_BUILD_DIR}" || die
+ Xemake test
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newicon resources/appicon.svg ${PN}.svg
+ make_desktop_entry ${PN} "Scan Tailor"
+}
diff --git a/media-gfx/scantailor/scantailor-0.9.11.1.ebuild b/media-gfx/scantailor/scantailor-0.9.11.1.ebuild
new file mode 100644
index 000000000000..1f4f61818d20
--- /dev/null
+++ b/media-gfx/scantailor/scantailor-0.9.11.1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit cmake-utils eutils virtualx toolchain-funcs
+
+DESCRIPTION="A interactive post-processing tool for scanned pages"
+HOMEPAGE="http://scantailor.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 GPL-3 public-domain"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="opengl"
+
+RDEPEND=">=media-libs/libpng-1.2.43
+ >=media-libs/tiff-3.9.4
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/libXrender
+ dev-qt/qtgui:4
+ opengl? ( dev-qt/qtopengl:4 )"
+DEPEND="${RDEPEND}
+ dev-libs/boost"
+
+src_configure() {
+ tc-export CXX
+
+ mycmakeargs=(
+ -DCOMPILER_FLAGS_OVERRIDDEN=ON
+ $(cmake-utils_use_enable opengl)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${CMAKE_BUILD_DIR}" || die
+ Xemake test
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ newicon resources/appicon.svg ${PN}.svg
+ make_desktop_entry ${PN} "Scan Tailor"
+}
diff --git a/media-gfx/scrot/Manifest b/media-gfx/scrot/Manifest
new file mode 100644
index 000000000000..c22426baa848
--- /dev/null
+++ b/media-gfx/scrot/Manifest
@@ -0,0 +1,3 @@
+DIST scrot-0.8.tar.gz 74324 SHA256 613d1cf524c2b62ce3c65f1232ea4f05c7daf248d5e82ff2a6892c98093994f2 SHA512 cba8f589e45758ddbfe4e276399a1ecb0dbe29569be5d85d97733e7f64de2911bd2d03e62700ad0c718a1fc886c2e3def9dee1de5cac884f9e65e772cebe838c WHIRLPOOL 713e21755b7252d8bb32ec499674249ab29015e1896e67e98be02c403f7b20973389617698195f93ebc7f77249e14122e402f9fb4a110ac7bdbdb62c57863cab
+DIST scrot_0.8-13.debian.tar.gz 7943 SHA256 508bb60c9f476d593a49ca0f1bbe0b3d5a742289146c5b33033435fc286e2376 SHA512 3f6d0a8e592088af38a3d90394b6b7246430479f5b0c8451af5eae383725d1896dc4bbf595495f9f2b546f00ef38780123c4ee0e3f06971c55a6ac2dfa5b7d53 WHIRLPOOL d60a42425ea541a18879207d0b5d1b0936a733adc1168aed13793258c2812556e0e6ccf69f834fff59ea326ff9d990c72475f8a2115a609dbdf618a076c10501
+DIST scrot_0.8.orig.tar.gz 74324 SHA256 613d1cf524c2b62ce3c65f1232ea4f05c7daf248d5e82ff2a6892c98093994f2 SHA512 cba8f589e45758ddbfe4e276399a1ecb0dbe29569be5d85d97733e7f64de2911bd2d03e62700ad0c718a1fc886c2e3def9dee1de5cac884f9e65e772cebe838c WHIRLPOOL 713e21755b7252d8bb32ec499674249ab29015e1896e67e98be02c403f7b20973389617698195f93ebc7f77249e14122e402f9fb4a110ac7bdbdb62c57863cab
diff --git a/media-gfx/scrot/files/scrot.bash-completion b/media-gfx/scrot/files/scrot.bash-completion
new file mode 100644
index 000000000000..d7e5729cd849
--- /dev/null
+++ b/media-gfx/scrot/files/scrot.bash-completion
@@ -0,0 +1,40 @@
+# bash-completion script for scrot
+# place this in /etc/bash_completion.d
+
+_scrot() {
+ local cur prev opts
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ opts="-h --help -v --version -b --border -c --count -d --delay -e --exec \
+ -q --quality -m --multidisp -s --select -t --thumb"
+
+ if [[ "${cur}" == -* ]] || [[ ${COMP_CWORD} -eq 1 ]]; then
+ COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
+ fi
+
+ case "${prev}" in
+ -e|--exec)
+ COMPREPLY=($(compgen -A command -- "${cur}"))
+ ;;
+ -h|--help)
+ COMPREPLY=($(compgen -W "${opts/-h --help}" -- "${cur}"))
+ ;;
+ -v|--version)
+ COMPREPLY=($(compgen -W "${opts/-v --version}" -- "${cur}"))
+ ;;
+ -b|--border)
+ COMPREPLY=($(compgen -W "${opts/-b --border}" -- "${cur}"))
+ ;;
+ -c|--count)
+ COMPREPLY=($(compgen -W "${opts/-c --count}" -- "${cur}"))
+ ;;
+ -m|--multidisp)
+ COMPREPLY=($(compgen -W "${opts/-m --multidisp}" -- "${cur}"))
+ ;;
+ -s|--select)
+ COMPREPLY=($(compgen -W "${opts/-s --select}" -- "${cur}"))
+ ;;
+ esac
+}
+complete -F _scrot scrot
diff --git a/media-gfx/scrot/metadata.xml b/media-gfx/scrot/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/scrot/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/scrot/scrot-0.8-r1.ebuild b/media-gfx/scrot/scrot-0.8-r1.ebuild
new file mode 100644
index 000000000000..564d145d8319
--- /dev/null
+++ b/media-gfx/scrot/scrot-0.8-r1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit bash-completion-r1
+
+DESCRIPTION="Screen capture utility using imlib2 library"
+HOMEPAGE="http://www.linuxbrit.co.uk/"
+SRC_URI="http://www.linuxbrit.co.uk/downloads/${P}.tar.gz"
+
+LICENSE="feh LGPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND=">=media-libs/imlib2-1.0.3
+ >=media-libs/giblib-1.2.3"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -r "${D}"/usr/doc
+ dodoc AUTHORS ChangeLog
+
+ newbashcomp "${FILESDIR}/${PN}.bash-completion" ${PN}
+}
diff --git a/media-gfx/scrot/scrot-0.8_p13.ebuild b/media-gfx/scrot/scrot-0.8_p13.ebuild
new file mode 100644
index 000000000000..179ea5f5724c
--- /dev/null
+++ b/media-gfx/scrot/scrot-0.8_p13.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV=${PV/_p/-}
+
+inherit bash-completion-r1 eutils
+
+DESCRIPTION="Screen capture utility using imlib2 library"
+HOMEPAGE="http://scrot.sourcearchive.com/"
+SRC_URI="http://${PN}.sourcearchive.com/downloads/${MY_PV}/${PN}_0.8.orig.tar.gz
+ http://${PN}.sourcearchive.com/downloads/${MY_PV}/${PN}_${MY_PV}.debian.tar.gz"
+
+LICENSE="feh LGPL-2+"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE=""
+
+RDEPEND=">=media-libs/imlib2-1.0.3
+ >=media-libs/giblib-1.2.3"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${PN}-0.8
+
+src_prepare() {
+ local d=${WORKDIR}/debian/patches
+ EPATCH_SOURCE=${d} epatch $(<"${d}"/series)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ rm -r "${D}"/usr/doc
+ dodoc AUTHORS ChangeLog
+
+ newbashcomp "${FILESDIR}"/${PN}.bash-completion ${PN}
+}
diff --git a/media-gfx/sfftobmp/Manifest b/media-gfx/sfftobmp/Manifest
new file mode 100644
index 000000000000..8bfebbb5135e
--- /dev/null
+++ b/media-gfx/sfftobmp/Manifest
@@ -0,0 +1 @@
+DIST sfftobmp3_1_2_src.zip 121478 SHA256 08f8080ead0e0c1fee4cfb0061ea08edfd95dae60f333269337ae17d9562d970 SHA512 3c460dcd60486954f792ecc8e864d109dabbae30b56a6ba4b3228a42dd489fd88793e4d93e2d032e6cd1c552bf5e217bc2afb3eae85a1a4e1db340f7761905b7 WHIRLPOOL bde9c8d2bd9f9b1a25af99fc19e781501764de1715ad7f6be33e53cee88b0672d629de28be2601bf1001eb8be3deb837413e42b72a3125dea01aae3049c4743c
diff --git a/media-gfx/sfftobmp/files/sfftobmp-3.1.1-gcc44-and-boost-1_37.patch b/media-gfx/sfftobmp/files/sfftobmp-3.1.1-gcc44-and-boost-1_37.patch
new file mode 100644
index 000000000000..3ba832afaed6
--- /dev/null
+++ b/media-gfx/sfftobmp/files/sfftobmp-3.1.1-gcc44-and-boost-1_37.patch
@@ -0,0 +1,33 @@
+Only in sfftobmp3_1_1: Makefile.am.orig
+Only in sfftobmp3_1_1: Makefile.am.rej
+diff -ur sfftobmp3_1_1.orig/src/cmdline.cpp sfftobmp3_1_1/src/cmdline.cpp
+--- sfftobmp3_1_1.orig/src/cmdline.cpp 2007-10-07 22:01:21.000000000 +0300
++++ sfftobmp3_1_1/src/cmdline.cpp 2009-05-09 00:33:06.000000000 +0300
+@@ -35,6 +35,7 @@
+
+ ---RCS-Info--------------------------------------------------*/
+
++#include <cstdio>
+ #include <vector>
+ #include <cassert>
+ #include <iostream>
+diff -ur sfftobmp3_1_1.orig/src/common.cpp sfftobmp3_1_1/src/common.cpp
+--- sfftobmp3_1_1.orig/src/common.cpp 2007-10-07 22:01:20.000000000 +0300
++++ sfftobmp3_1_1/src/common.cpp 2009-05-09 00:28:37.000000000 +0300
+@@ -49,6 +49,7 @@
+ #include <sys/utime.h>
+ #endif
+
++#include <cstdio>
+ #include <cassert>
+ #include <iostream>
+
+diff -ur sfftobmp3_1_1.orig/src/Makefile.am sfftobmp3_1_1/src/Makefile.am
+--- sfftobmp3_1_1.orig/src/Makefile.am 2006-10-24 23:14:19.000000000 +0300
++++ sfftobmp3_1_1/src/Makefile.am 2009-05-09 00:27:42.000000000 +0300
+@@ -3,4 +3,4 @@
+ INCLUDES = -I$(top_builddir) -I$(top_srcdir)
+ bin_PROGRAMS = sfftobmp
+ sfftobmp_SOURCES = my_getopt.c cmdline.cpp codes.cpp common.cpp decoder.cpp input.cpp main.cpp output.cpp
+-sfftobmp_LDADD = @TIFF_LIB@ @JPEG_LIB@ -lboost_filesystem
++sfftobmp_LDADD = @TIFF_LIB@ @JPEG_LIB@ -lboost_filesystem -lboost_system
diff --git a/media-gfx/sfftobmp/files/sfftobmp-3.1.2-boost_fs3.patch b/media-gfx/sfftobmp/files/sfftobmp-3.1.2-boost_fs3.patch
new file mode 100644
index 000000000000..f39d157e1972
--- /dev/null
+++ b/media-gfx/sfftobmp/files/sfftobmp-3.1.2-boost_fs3.patch
@@ -0,0 +1,21 @@
+http://bugs.gentoo.org/425364
+
+--- src/cmdline.cpp
++++ src/cmdline.cpp
+@@ -264,14 +264,14 @@
+ }
+ do {
+ if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
+- m_vFiles.push_back( fs::path(fd.cFileName, fs::native) );
++ m_vFiles.push_back( fs::path(fd.cFileName) );
+ }
+ } while (::FindNextFile(hFind, &fd));
+ ::FindClose(hFind);
+ #else
+ int n = optind;
+ while (n < m_argc) {
+- m_vFiles.push_back( fs::path(m_argv[n], fs::native) );
++ m_vFiles.push_back( fs::path(m_argv[n]) );
+ ++n;
+ }
+ #endif
diff --git a/media-gfx/sfftobmp/metadata.xml b/media-gfx/sfftobmp/metadata.xml
new file mode 100644
index 000000000000..39922da90f27
--- /dev/null
+++ b/media-gfx/sfftobmp/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription>sff to bmp converter</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">sfftools</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/sfftobmp/sfftobmp-3.1.2-r1.ebuild b/media-gfx/sfftobmp/sfftobmp-3.1.2-r1.ebuild
new file mode 100644
index 000000000000..0f3103fc1e27
--- /dev/null
+++ b/media-gfx/sfftobmp/sfftobmp-3.1.2-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils flag-o-matic
+
+MY_P=${PN}${PV//./_}
+
+DESCRIPTION="sff to bmp converter"
+HOMEPAGE="http://sfftools.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sfftools/${MY_P}_src.zip"
+
+LICENSE="HPND MIT"
+SLOT="0"
+KEYWORDS="amd64 ~hppa ppc x86"
+IUSE=""
+
+RDEPEND=">=dev-libs/boost-1.49
+ media-libs/tiff:0
+ virtual/jpeg:0"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-3.1.1-gcc44-and-boost-1_37.patch \
+ "${FILESDIR}"/${PN}-3.1.2-boost_fs3.patch
+ append-cppflags -DBOOST_FILESYSTEM_VERSION=3
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc doc/{changes,credits,readme}
+}
diff --git a/media-gfx/shotwell/Manifest b/media-gfx/shotwell/Manifest
new file mode 100644
index 000000000000..aea472b6a97d
--- /dev/null
+++ b/media-gfx/shotwell/Manifest
@@ -0,0 +1,3 @@
+DIST shotwell-0.22.0.tar.xz 1872952 SHA256 01b192c5c1c188ecd11bfdb6143d8f177f313c7eab7fe320bd20ac3ca352f831 SHA512 486f27a1fa06512a925ecae60504f3cbc487d44834f635efd0897dd20cb304a731c08133ab4b04b32a754235fc8c63dc9b05787b1a0c72a98c89ca91c64f452c WHIRLPOOL 8b93b6a92822c26aa7962f30e7402322371db1e6d297d7cd4e612f01f0418bcf2ee3598954e7d2a59d62f7e9704479bb24cb6fcf4263ab5315668c20543445c3
+DIST shotwell-icons.tar.bz2 61397 SHA256 edab0b34992dab8e1d397c30a4dca2ef3dad601c6c75e9c1cc771040089762c2 SHA512 b06ce3bb34728253bc3a3643ff7adde38ed7939961d79e001ae445e71435efc8aaefa94e5a3306a10abb9821511d2421590db7488bf7a95c8e5d6d677ecc712c WHIRLPOOL 783c5d0f354791cc8a9ec47aadda2ab3fdc2c73add236306f641422d02ecd6ff36ee38a45d356cd805cd592358471e24f27b67e8e24694523cf4f6340d7ca8bb
+DIST shotwell.1 1238 SHA256 7f4036f14a6c599835bd121d63705ddc766388aae8c6414eb3a405c85b9a5014 SHA512 8090d5d339a44992d2543ba9ed1bb6e0eb18da8d3fe6ad4f95f917d3aca352e6af0b8c21a7da3a8be9aa1cb04a13e8602d9db8484d4801547cfadc6c40500ad4 WHIRLPOOL cb3c1ef3cb6a577fa94d0aec4dfc06ee84a1f77771268e3217704fed269cd0cd3c220a4e68d270c152b34dc2e438e193d47aee87dd891a39fd8236a6d269eb3b
diff --git a/media-gfx/shotwell/files/shotwell-0.13.1-ldflags.patch b/media-gfx/shotwell/files/shotwell-0.13.1-ldflags.patch
new file mode 100644
index 000000000000..97a9956bf52d
--- /dev/null
+++ b/media-gfx/shotwell/files/shotwell-0.13.1-ldflags.patch
@@ -0,0 +1,28 @@
+Respect LDFLAGS when building C files. Bug #435048
+Patch hasn't been sent upstream yet.
+Index: shotwell-0.13.1/Makefile
+===================================================================
+--- shotwell-0.13.1.orig/Makefile
++++ shotwell-0.13.1/Makefile
+@@ -697,7 +697,7 @@ $(EXPANDED_C_FILES): $(VALA_STAMP)
+ @
+
+ $(EXPANDED_OBJ_FILES): %.o: %.c $(CONFIG_IN) Makefile
+- $(CC) -c $(VALA_CFLAGS) $(CFLAGS) -o $@ $<
++ $(CC) -c $(VALA_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ $(PROGRAM): $(EXPANDED_OBJ_FILES) $(RESOURCES) $(LANG_STAMP) $(THUMBNAILER_BIN)
+ $(CC) $(EXPANDED_OBJ_FILES) $(CFLAGS) $(LDFLAGS) $(RESOURCES) $(VALA_LDFLAGS) $(EXPORT_FLAGS) -o $@
+Index: shotwell-0.13.1/plugins/Makefile.plugin.mk
+===================================================================
+--- shotwell-0.13.1.orig/plugins/Makefile.plugin.mk
++++ shotwell-0.13.1/plugins/Makefile.plugin.mk
+@@ -54,7 +54,7 @@ $(CFILES): .stamp
+ @
+
+ $(OFILES): %.o: %.c $(CFILES)
+- $(CC) -c $(CFLAGS) $(DEFINES) -I../.. $(CFILES)
++ $(CC) -c $(CFLAGS) $(LDFLAGS) $(DEFINES) -I../.. $(CFILES)
+
+ $(PLUGIN).so: $(OFILES)
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared $(OFILES) $(LIBS) -o $@
diff --git a/media-gfx/shotwell/metadata.xml b/media-gfx/shotwell/metadata.xml
new file mode 100644
index 000000000000..a1fa367a4cb8
--- /dev/null
+++ b/media-gfx/shotwell/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <maintainer>
+ <email>jlec@gentoo.org</email>
+ <name>Justin Lecher</name>
+ </maintainer>
+ <longdescription lang="en">
+ Shotwell is a digital photo organizer designed for the GNOME desktop
+ environment. It allows you to import photos from disk or camera, organize
+ them in various ways, view them in full-window or fullscreen mode, and
+ export them to share with others.
+ </longdescription>
+</pkgmetadata>
diff --git a/media-gfx/shotwell/shotwell-0.22.0.ebuild b/media-gfx/shotwell/shotwell-0.22.0.ebuild
new file mode 100644
index 000000000000..366fbda9cdcf
--- /dev/null
+++ b/media-gfx/shotwell/shotwell-0.22.0.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+GCONF_DEBUG="no"
+VALA_MIN_API_VERSION="0.26"
+VALA_MAX_API_VERSION="0.26"
+
+inherit eutils gnome2 multilib toolchain-funcs vala versionator
+
+MY_PV=$(get_version_component_range 1-2)
+DESCRIPTION="Open source photo manager for GNOME"
+HOMEPAGE="https://wiki.gnome.org/Apps/Shotwell"
+SRC_URI="
+ mirror://gnome/sources/${PN}/$(get_version_component_range 1-2)/${P}.tar.xz
+ http://pkgs.fedoraproject.org/cgit/shotwell.git/plain/shotwell.1
+ http://pkgs.fedoraproject.org/cgit/shotwell.git/plain/shotwell-icons.tar.bz2
+ "
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+IUSE=""
+
+CORE_SUPPORTED_LANGUAGES="
+ af ar as ast bg bn bn_IN ca cs da de el en_GB eo es et eu fi fr gd gl gu he
+ hi hr hu ia id it ja kk km kn ko ky lt lv mk ml mr nb nl nn or pa pl pt
+ pt_BR ro ru sk sl sr sv ta te th tr uk vi zh_CN zh_HK zh_TW"
+
+for x in ${CORE_SUPPORTED_LANGUAGES}; do
+ IUSE+="linguas_${x} "
+done
+
+RDEPEND="
+ app-text/gnome-doc-utils
+ >=dev-db/sqlite-3.5.9:3
+ >=dev-libs/dbus-glib-0.80
+ >=dev-libs/glib-2.30.0:2
+ >=dev-libs/json-glib-0.7.6
+ >=dev-libs/libgee-0.8.5:0.8
+ >=dev-libs/libxml2-2.6.32:2
+ >=dev-util/desktop-file-utils-0.13
+ gnome-base/dconf
+ >=media-libs/gexiv2-0.4.90
+ media-libs/gst-plugins-base:1.0
+ media-libs/gst-plugins-good:1.0
+ media-libs/gstreamer:1.0
+ media-libs/lcms:2
+ >=media-libs/libexif-0.6.16:=
+ >=media-libs/libgphoto2-2.4.2:=
+ >=media-libs/libraw-0.13.2:=
+ >=net-libs/libsoup-2.26.0:2.4
+ >=net-libs/rest-0.7:0.7
+ >=net-libs/webkit-gtk-1.4:3
+ virtual/libgudev:=[introspection]
+ >=x11-libs/gtk+-3.12.2:3[X]"
+DEPEND="${RDEPEND}
+ $(vala_depend)
+ >=sys-devel/m4-1.4.13"
+
+DOCS=( AUTHORS MAINTAINERS NEWS README THANKS )
+
+# This probably comes from libraries that
+# shotwell-video-thumbnailer links to.
+# Nothing we can do at the moment. #435048
+QA_FLAGS_IGNORED="/usr/libexec/${PN}/${PN}-video-thumbnailer"
+
+pkg_setup() {
+ tc-export CC
+ G2CONF="${G2CONF}
+ --disable-schemas-compile
+ --disable-desktop-update
+ --disable-icon-update
+ --prefix=/usr
+ --lib=$(get_libdir)"
+}
+
+src_prepare() {
+ vala_src_prepare
+ sed \
+ -e 's|CFLAGS :|CFLAGS +|g' \
+ -i plugins/Makefile.plugin.mk || die
+ epatch \
+ "${FILESDIR}"/${PN}-0.13.1-ldflags.patch
+}
+
+src_configure() {
+ ./configure \
+ ${G2CONF} \
+ || die
+}
+
+src_compile() {
+ local valaver="$(vala_best_api_version)"
+ emake VALAC="$(type -p valac-${valaver})"
+}
+
+src_install() {
+ local res
+ gnome2_src_install
+ for x in ${LANGS}; do
+ if ! has ${x} ${LINGUAS}; then
+ find "${D}"/usr/share/locale/${x} -type f -exec rm {} + || die
+ fi
+ done
+ doman "${DISTDIR}"/${PN}.1
+ for res in 16 22 24 32 48 256; do
+ doicon -s ${res} "${WORKDIR}"/${res}x${res}/*
+ done
+}
diff --git a/media-gfx/simple-scan/Manifest b/media-gfx/simple-scan/Manifest
new file mode 100644
index 000000000000..bf99088cd581
--- /dev/null
+++ b/media-gfx/simple-scan/Manifest
@@ -0,0 +1,3 @@
+DIST simple-scan-3.14.3.tar.xz 483900 SHA256 bb26128b6cce329932209fceed1bf8c21f0847f543aa417946682d413640c01b SHA512 0985c759daef2f08df280b89faf7c3a1b304a4e5b380c68fda2dd36ab480406ecc4e5a9d68e09042f78450ca614726e1b6068ed45342edfe59636d378ccf6e37 WHIRLPOOL 0f4a023effcc0151cf5c2c43efca92b3d517ef6a44fb001f2a214eb66da2694443b0d8e7e8c403b15fc6257190a3d6f2bbd73e3cfc101816452b583005eec17e
+DIST simple-scan-3.16.0.tar.xz 487904 SHA256 8d137e024ea9090941c992040fee30949706bb9f1ca5f04915394605ad8da7d3 SHA512 f4d07fa262f665893825cf4f8a8778db87c51384a82f9151504a9ea9cea1106292ce9b0121b1ccfef315631388991ffa492d556d15a410ee253c5e5c46bcccdf WHIRLPOOL 9a510a02d31d48ad6e009dacaa49338a98f65c7cc255b15c1a321ff05982731edd7c28f08d510f117a0bbf512594039b88d54c79fb4259879b977de557617fb7
+DIST simple-scan-3.16.1.tar.xz 487764 SHA256 f0fdb236336ddaa82390bc4647aa8df0037e8efe87a45ae37e9cb9144c82ee9d SHA512 15be4a3263cc28e027bc1f868f7894a39faf8f622d2f98a24d84704fae34be8526754a9776a8ab87f63ce34ba53871d76bbb452ee4ac16db9cb9a9b9d8d011d5 WHIRLPOOL f61ee901c77f9f0a380dfa4264c53072cb750fdf3e558e12024bb9872001884cdcc319f5f64ae711e62827d8e34e2a9a38adbe08891dfd9b197df1f49def5367
diff --git a/media-gfx/simple-scan/metadata.xml b/media-gfx/simple-scan/metadata.xml
new file mode 100644
index 000000000000..bb5bf432149c
--- /dev/null
+++ b/media-gfx/simple-scan/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>gnome</herd>
+ <longdescription lang="en">
+ A really easy way to scan both documents and photos. You can crop out
+ the bad parts of a photo and rotate it if it is the wrong way round.
+ You can print your scans, export them to pdf, or save them in a range
+ of image formats.
+ </longdescription>
+ <upstream>
+ <remote-id type="launchpad">simple-scan</remote-id>
+ </upstream>
+</pkgmetadata>
+
diff --git a/media-gfx/simple-scan/simple-scan-3.14.3.ebuild b/media-gfx/simple-scan/simple-scan-3.14.3.ebuild
new file mode 100644
index 000000000000..c9ef6950f931
--- /dev/null
+++ b/media-gfx/simple-scan/simple-scan-3.14.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2 versionator
+
+DESCRIPTION="Simple document scanning utility"
+HOMEPAGE="https://launchpad.net/simple-scan"
+
+MY_PV=$(get_version_component_range 1-2)
+SRC_URI="http://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE=""
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.32:2
+ >=media-gfx/sane-backends-1.0.20:=
+ >=sys-libs/zlib-1.2.3.1:=
+ virtual/jpeg:0=
+ virtual/libgudev:=
+ x11-libs/cairo:=
+ >=x11-libs/gtk+-3:3
+ || (
+ >=x11-misc/colord-0.1.24:=[udev]
+ x11-misc/colord:=[scanner] )
+"
+RDEPEND="${COMMON_DEPEND}
+ x11-misc/xdg-utils
+ x11-themes/gnome-icon-theme
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/yelp-tools
+ >=dev-util/intltool-0.35.0
+ virtual/pkgconfig
+"
+
+src_configure() {
+ DOCS="NEWS README.md"
+ gnome2_src_configure \
+ VALAC=$(type -P true)
+}
diff --git a/media-gfx/simple-scan/simple-scan-3.16.0.ebuild b/media-gfx/simple-scan/simple-scan-3.16.0.ebuild
new file mode 100644
index 000000000000..ba27cb3041d5
--- /dev/null
+++ b/media-gfx/simple-scan/simple-scan-3.16.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2 versionator
+
+DESCRIPTION="Simple document scanning utility"
+HOMEPAGE="https://launchpad.net/simple-scan"
+
+MY_PV=$(get_version_component_range 1-2)
+SRC_URI="http://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.32:2
+ >=media-gfx/sane-backends-1.0.20:=
+ >=sys-libs/zlib-1.2.3.1:=
+ virtual/jpeg:0=
+ virtual/libgudev:=
+ x11-libs/cairo:=
+ >=x11-libs/gtk+-3:3
+ || (
+ >=x11-misc/colord-0.1.24:=[udev]
+ x11-misc/colord:=[scanner] )
+"
+RDEPEND="${COMMON_DEPEND}
+ x11-misc/xdg-utils
+ || (
+ x11-themes/adwaita-icon-theme
+ x11-themes/gnome-icon-theme )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/yelp-tools
+ >=dev-util/intltool-0.35.0
+ virtual/pkgconfig
+"
+
+src_configure() {
+ DOCS="NEWS README.md"
+ gnome2_src_configure \
+ VALAC=$(type -P true)
+}
diff --git a/media-gfx/simple-scan/simple-scan-3.16.1.ebuild b/media-gfx/simple-scan/simple-scan-3.16.1.ebuild
new file mode 100644
index 000000000000..7d9be09f2f0c
--- /dev/null
+++ b/media-gfx/simple-scan/simple-scan-3.16.1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+GCONF_DEBUG="no"
+
+inherit gnome2 versionator
+
+DESCRIPTION="Simple document scanning utility"
+HOMEPAGE="https://launchpad.net/simple-scan"
+
+MY_PV=$(get_version_component_range 1-2)
+SRC_URI="http://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${P}.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+COMMON_DEPEND="
+ >=dev-libs/glib-2.32:2
+ >=media-gfx/sane-backends-1.0.20:=
+ >=sys-libs/zlib-1.2.3.1:=
+ virtual/jpeg:0=
+ virtual/libgudev:=
+ x11-libs/cairo:=
+ >=x11-libs/gtk+-3:3
+ >=x11-misc/colord-0.1.24:=[udev]
+"
+RDEPEND="${COMMON_DEPEND}
+ x11-misc/xdg-utils
+ || (
+ x11-themes/adwaita-icon-theme
+ x11-themes/gnome-icon-theme )
+"
+DEPEND="${COMMON_DEPEND}
+ app-text/yelp-tools
+ >=dev-util/intltool-0.35.0
+ virtual/pkgconfig
+"
+
+src_configure() {
+ DOCS="NEWS README.md"
+ gnome2_src_configure \
+ VALAC=$(type -P true)
+}
diff --git a/media-gfx/skencil/Manifest b/media-gfx/skencil/Manifest
new file mode 100644
index 000000000000..be3a13e96180
--- /dev/null
+++ b/media-gfx/skencil/Manifest
@@ -0,0 +1,2 @@
+DIST skencil-0.6.18_pre20080519.tar.bz2 858436 SHA256 493bd7c3ec9d80542f4d926497ca31aceb9a9dede7989332cee0539f417a7d53 SHA512 3b59b29ff20994687b03daa089f19a9d12552de9620e4b610946210a2fc2cede97db69c92f54ced8853a479759695d9df2722797d8de67acc2534f5036bda266 WHIRLPOOL dadf374db142aa4248767f7fcd4f0306c3c5e461c6c82fcca2eb01fc5964414f290c4989f7d5c1361311e29c9da7b09a0e724ffd65982dd589b825abf86a798e
+DIST skencil-1.0alpha_rev784.tar.gz 947398 SHA256 8794f361c8ee0ca86e9d237646db03ab57214cf452663fde23c66e0430523a60 SHA512 ec14370f3df12fb33e638ba4d4f33d6b37aec95a10c516358e363bbe69b858f86486e3761f730e3f866cb7d314f74caa38132203e2e3e184aa6008f0acb7480d WHIRLPOOL 6aab25bd54c0b2e308ebd1c930e401553ec5feeb64fc73faa435d87fc046433685292291886e17ce0212582d4a6baa3c870774fe339e632428e560fc33c978a5
diff --git a/media-gfx/skencil/files/skencil-0.6.17-setup.py.patch b/media-gfx/skencil/files/skencil-0.6.17-setup.py.patch
new file mode 100644
index 000000000000..ca0bafd02e86
--- /dev/null
+++ b/media-gfx/skencil/files/skencil-0.6.17-setup.py.patch
@@ -0,0 +1,11 @@
+--- setup.py.orig+ 2007-12-27 23:40:59.000000000 +0100
++++ setup.py 2007-12-27 23:41:40.000000000 +0100
+@@ -255,7 +255,7 @@ def configure_tkinter(configs, flags):
+ # possible version suffixes. Some systems use dots in the suffixes
+ # (e.g. debian), some don't (e.g. OpenBSD) so we try both.
+ versions = []
+- for version in ["8.4", "8.3", "8.2", "8.1", "8.0"]:
++ for version in ["8.5", "8.4", "8.3", "8.2", "8.1", "8.0"]:
+ versions.append(version)
+ versions.append(version[0] + version[-1])
+
diff --git a/media-gfx/skencil/files/skencil-configure-without-nls.diff b/media-gfx/skencil/files/skencil-configure-without-nls.diff
new file mode 100644
index 000000000000..7cec4d4929c4
--- /dev/null
+++ b/media-gfx/skencil/files/skencil-configure-without-nls.diff
@@ -0,0 +1,11 @@
+--- skencil-0.6/setup.py 2007-04-21 04:10:05.000000000 +0200
++++ skencil-0.6-1/setup.py 2007-05-09 06:47:17.000000000 +0200
+@@ -642,6 +642,8 @@
+ flags['sketch']['imaging-include'] = value
+ elif arg == '--with-nls':
+ flags['intl']['files'] = 'intl intl.c'
++ elif arg == '--without-nls':
++ flags['intl']['files'] = ''
+ elif arg == '--tk-flags':
+ flags['tk']['flags'] = value
+ elif arg == '--tk-autoconf':
diff --git a/media-gfx/skencil/metadata.xml b/media-gfx/skencil/metadata.xml
new file mode 100644
index 000000000000..e68a5e6d4d3b
--- /dev/null
+++ b/media-gfx/skencil/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hanno@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="google-code">sk1</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/skencil/skencil-0.6.18_pre20080519.ebuild b/media-gfx/skencil/skencil-0.6.18_pre20080519.ebuild
new file mode 100644
index 000000000000..2111a7b9aa00
--- /dev/null
+++ b/media-gfx/skencil/skencil-0.6.18_pre20080519.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="tk"
+RESTRICT_PYTHON_ABIS="*-jython 2.7-pypy-*"
+
+inherit eutils multilib python
+
+DESCRIPTION="Interactive X11 vector drawing program"
+HOMEPAGE="http://www.skencil.org/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ppc64 sparc x86"
+IUSE="nls"
+
+DEPEND="virtual/python-imaging
+ dev-python/pyxml
+ dev-python/reportlab
+ dev-lang/tk
+ nls? ( sys-devel/gettext )"
+RDEPEND="${DEPEND}
+ !elibc_glibc? ( nls? ( sys-devel/gettext ) )"
+
+S="${WORKDIR}/${PN}-0.6"
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/skencil-configure-without-nls.diff"
+ epatch "${FILESDIR}/skencil-0.6.17-setup.py.patch"
+
+ # Fix hardcoded libdir
+ sed -i -e "s:lib/:$(get_libdir)/:" \
+ -e "s:lib':$(get_libdir)':" \
+ "${S}"/{Pax,Filter,Sketch/Modules}/Makefile.pre.in \
+ "${S}"/Plugins/Objects/Lib/multilinetext/{TextEditor,styletext}.py \
+ "${S}"/setup.py || die "sed failed"
+}
+
+src_compile() {
+ ./setup.py configure `use_with nls` || die
+ BLDSHARED='gcc -shared' ./setup.py build || die
+}
+
+src_install () {
+ ./setup.py install --prefix=/usr --dest-dir="${D}"
+ assert "setup.py install failed"
+
+ newdoc Pax/README README.pax
+ newdoc Filter/README README.filter
+ dodoc Examples Doc Misc
+ dodoc README INSTALL BUGS CREDITS TODO PROJECTS FAQ NEWS
+}
diff --git a/media-gfx/skencil/skencil-1.0_alpha784.ebuild b/media-gfx/skencil/skencil-1.0_alpha784.ebuild
new file mode 100644
index 000000000000..307cd1188ba3
--- /dev/null
+++ b/media-gfx/skencil/skencil-1.0_alpha784.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+PYTHON_DEPEND="2"
+PYTHON_USE_WITH="tk"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
+
+inherit distutils
+
+DESCRIPTION="Interactive X11 vector drawing program"
+HOMEPAGE="http://www.skencil.org/"
+SRC_URI="http://sk1.googlecode.com/files/${P/_alpha/alpha_rev}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+DEPEND="virtual/python-imaging
+ dev-python/pyxml
+ dev-python/reportlab
+ dev-lang/tk
+ sys-devel/gettext"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}-1.0alpha"
+
+DOCS="README"
diff --git a/media-gfx/smile/Manifest b/media-gfx/smile/Manifest
new file mode 100644
index 000000000000..fa3c295c288f
--- /dev/null
+++ b/media-gfx/smile/Manifest
@@ -0,0 +1 @@
+DIST smile-1.0.tar.gz 15103785 SHA256 d6a6f5a2c7bce2dff174c4cb7f09a6326a926416c1ea47c6bdfc592b9cece9bf
diff --git a/media-gfx/smile/files/fix_docs-0.9.10.patch b/media-gfx/smile/files/fix_docs-0.9.10.patch
new file mode 100644
index 000000000000..92eed5150557
--- /dev/null
+++ b/media-gfx/smile/files/fix_docs-0.9.10.patch
@@ -0,0 +1,18 @@
+Index: smile/helpfrm.cpp
+===================================================================
+--- smile.orig/helpfrm.cpp
++++ smile/helpfrm.cpp
+@@ -26,11 +26,11 @@ helpfrm::helpfrm(QWidget *parent) : QDia
+ qDebug() << "LOADING HELP LANGUAGE ... " + wlpack.left(2);
+ if ( wlpack.left(2) == "fr" )
+ {
+- webhelp->load(QUrl(wg_tmp_002 + "/BIB_ManSlide/Help/doc_fr.html"));
++ webhelp->load(QUrl("/usr/share/doc/smile-0.9.10/doc_fr.html"));
+ }
+ else
+ {
+- webhelp->load(QUrl(wg_tmp_002 + "/BIB_ManSlide/Help/doc_en.html"));
++ webhelp->load(QUrl("/usr/share/doc/smile-0.9.10/doc_en.html"));
+ }
+ }
+ configfile.close();
diff --git a/media-gfx/smile/files/fix_installation.patch b/media-gfx/smile/files/fix_installation.patch
new file mode 100644
index 000000000000..54311c92eb29
--- /dev/null
+++ b/media-gfx/smile/files/fix_installation.patch
@@ -0,0 +1,122 @@
+diff -ru smile.ori/mainfrm.cpp smilei/mainfrm.cpp
+--- smile.orig/mainfrm.cpp
++++ smile/mainfrm.cpp
+@@ -187,14 +187,15 @@
+ QString wlpack = QLocale::system().name();
+ qDebug() << "LOADING LANGUAGE ... smile_" + wlpack.left(2);
+ QTranslator *qtTranslator = new QTranslator(this);
+- if (qtTranslator->load("smile_" + wlpack.left(2), qApp->applicationDirPath()) == true )
++ if (qtTranslator->load("/usr/share/smile/translations/smile_" + wlpack.left(2), qApp->applicationDirPath()) == true )
+ {
+ qApp->installTranslator(qtTranslator);
+ }
+ else
+ {
+- if (qtTranslator->load("smile_en", qApp->applicationDirPath()) == true )
++ if (qtTranslator->load("/usr/share/smile/translations/smile_en", qApp->applicationDirPath()) == true )
+ {
++ qDebug() << "LOADING FALLBACK (EN) LANGUAGE...";
+ qApp->installTranslator(qtTranslator);
+ }
+ }
+@@ -1639,7 +1640,7 @@
+ void mainfrm::f_splash_load()
+ {
+ QDir tmpdir;
+- tmpdir.setPath(wg_library + "/BIB_ManSlide/Eff_sup/");
++ tmpdir.setPath("/usr/share/smile/BIB_ManSlide/Eff_sup/");
+ QStringList filters;
+ filters << "*.mng" << "*.MNG" << "*.gif" << "*.GIF" << "*.png" << "*.PNG";
+ tmpdir.setNameFilters(filters);
+@@ -1649,11 +1650,11 @@
+ foreach (wlfile, tmpdir.entryList(QDir::Files))
+ {
+ comboeffets->insertItem(positem, wlfile);
+- comboeffets->setItemIcon(positem, QIcon(wg_library + "/BIB_ManSlide/Eff_sup/" + wlfile));
++ comboeffets->setItemIcon(positem, QIcon("/usr/share/smile/BIB_ManSlide/Eff_sup/" + wlfile));
+ positem++;
+ }
+ //
+- tmpdir.setPath(wg_library + "/BIB_ManSlide/Luma/");
++ tmpdir.setPath("/usr/share/smile/BIB_ManSlide/Luma/");
+ //filters << "MINI*.png";
+ //tmpdir.setNameFilters(filters);
+ positem = 2;
+@@ -1672,14 +1673,14 @@
+ if ( wlfile != "crossfade.png" )
+ {
+ nametra = wlfile.mid(0,wlfile.length() - 4);
+- transpix.load(wg_library + "/BIB_ManSlide/Luma/" + wlfile);
++ transpix.load("/usr/share/smile/BIB_ManSlide/Luma/" + wlfile);
+ transpix = transpix.scaledToWidth( 128, Qt::FastTransformation );
+ lst_transitions->insertItem(positem,nametra);
+ lst_transitions->setItemIcon(positem, QIcon(transpix));
+ lst_transitions_2->insertItem(positem+1,nametra);
+ lst_transitions_2->setItemIcon(positem+1, QIcon(transpix));
+- table_transitions[positem] = wg_library + "/BIB_ManSlide/Luma/" + nametra + ".png";
+- loadtra.load(wg_library + "/BIB_ManSlide/Luma/" + nametra + ".png");
++ table_transitions[positem] = "/usr/share/smile/BIB_ManSlide/Luma/" + nametra + ".png";
++ loadtra.load("/usr/share/smile/BIB_ManSlide/Luma/" + nametra + ".png");
+ table_image_transition[positem-2] = loadtra;
+ ++positem;
+ }
+@@ -1895,9 +1896,9 @@
+ int result = QMessageBox::information(this, "SMILE", tr("Voulez vous vraiment supprimer cet effet : ") + comboeffets->currentText() , tr("Oui"), tr("Non"), 0, 1 );
+ if (result == 0)
+ {
+- if ( QFile::remove(wg_library + "BIB_ManSlide/Eff_sup/" + comboeffets->currentText()) == false )
++ if ( QFile::remove("/usr/share/smile/BIB_ManSlide/Eff_sup/" + comboeffets->currentText()) == false )
+ {
+- qDebug() << "ERROR REMOVING EFFECT FILE : " << wg_library + "BIB_ManSlide/Eff_sup/" + comboeffets->currentText();
++ qDebug() << "ERROR REMOVING EFFECT FILE : " << "/usr/share/smile/BIB_ManSlide/Eff_sup/" + comboeffets->currentText();
+ }
+ f_reload();
+ comboeffets->setCurrentIndex(0);
+@@ -1961,7 +1962,7 @@
+ {
+ int i = wmyfic.lastIndexOf( '/' );
+ outfilename = wmyfic.mid(i + 1, wmyfic.length() - (i + 1));
+- QFile::copy ( wmyfic, wg_library + "BIB_ManSlide/Eff_sup/" + outfilename );
++ QFile::copy ( wmyfic, "/usr/share/smile/BIB_ManSlide/Eff_sup/" + outfilename );
+ f_reload();
+ }
+ }
+@@ -1969,7 +1970,7 @@
+ void mainfrm::f_reload()
+ {
+ QDir tmpdir;
+- tmpdir.setPath(wg_library + "BIB_ManSlide/Eff_sup/");
++ tmpdir.setPath("/usr/share/smile/BIB_ManSlide/Eff_sup/");
+ QStringList filters;
+ filters << "*.mng" << "*.MNG" << "*.gif" << "*.GIF" << "*.png" << "*.PNG";
+ tmpdir.setNameFilters(filters);
+@@ -1980,7 +1981,7 @@
+ foreach (wlfile, tmpdir.entryList(QDir::Files))
+ {
+ comboeffets->insertItem(positem, wlfile);
+- comboeffets->setItemIcon(positem, QIcon(wg_library + "/BIB_ManSlide/Eff_sup/" + wlfile));
++ comboeffets->setItemIcon(positem, QIcon("/usr/share/smile/BIB_ManSlide/Eff_sup/" + wlfile));
+ positem++;
+ }
+ }
+diff -ru smile.ori/tetrahedron.cpp smile/tetrahedron.cpp
+--- smile.orig/tetrahedron.cpp
++++ smile/tetrahedron.cpp
+@@ -344,7 +344,7 @@
+ {
+ iseffect = 1;
+ delete movie;
+- movie = new QMovie(wg_tet_library + "/BIB_ManSlide/Eff_sup/" + nomeffet);
++ movie = new QMovie("/usr/share/smile/BIB_ManSlide/Eff_sup/" + nomeffet);
+ if ( movie->isValid() == true )
+ {
+ movie->setCacheMode( QMovie::CacheAll );
+@@ -382,7 +382,7 @@
+ }
+ else
+ {
+- qDebug() << "ERROR LOADING EFFECT TEXTURE - INIT POSITION - " << wg_tet_library + "/BIB_ManSlide/Eff_sup/" + nomeffet;
++ qDebug() << "ERROR LOADING EFFECT TEXTURE - INIT POSITION - " << "/usr/share/smile/BIB_ManSlide/Eff_sup/" + nomeffet;
+ }
+ }
+ }
diff --git a/media-gfx/smile/metadata.xml b/media-gfx/smile/metadata.xml
new file mode 100644
index 000000000000..a40624fba8f0
--- /dev/null
+++ b/media-gfx/smile/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/smile/smile-1.0.ebuild b/media-gfx/smile/smile-1.0.ebuild
new file mode 100644
index 000000000000..0fdac7c28147
--- /dev/null
+++ b/media-gfx/smile/smile-1.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+LANGS="de en it pl pt ru"
+
+inherit eutils qt4-r2
+
+DESCRIPTION="Slideshow Maker In Linux Environement"
+HOMEPAGE="http://smile.tuxfamily.org/"
+SRC_URI="http://download.tuxfamily.org/smiletool/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="amd64 x86"
+IUSE="debug"
+
+DEPEND="media-sound/sox
+ media-video/mplayer
+ dev-qt/qtgui:4[debug?]
+ dev-qt/qtopengl:4[debug?]
+ dev-qt/qtwebkit:4[debug?]
+ || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/fix_installation.patch"
+ "${FILESDIR}/fix_docs-0.9.10.patch"
+)
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ qt4-r2_src_prepare
+ # fix version string on applied patch
+ sed -i "s/${PN}-0.9.10/${P}/" "${S}"/helpfrm.cpp \
+ || die "failed to fix docs path"
+}
+
+src_install() {
+ dobin smile || die "dobin failed"
+ doicon Interface/Theme/${PN}.png || die "doicon failed"
+ make_desktop_entry smile Smile smile "Qt;AudioVideo;Video"
+
+ dodoc BIB_ManSlide/Help/doc_en.html
+ dodoc BIB_ManSlide/Help/doc_fr.html
+ insinto /usr/share/doc/${PF}/
+ doins -r BIB_ManSlide/Help/images
+ doins -r BIB_ManSlide/Help/images_en
+ doins -r BIB_ManSlide/Help/images_fr
+ #translations
+ insinto /usr/share/${PN}/translations/
+ for lang in ${LINGUAS};do
+ for x in ${LANGS};do
+ if [[ ${lang} == ${x} ]];then
+ doins ${PN}_${x}.qm || die "failed to install ${x} translation"
+ fi
+ done
+ done
+}
diff --git a/media-gfx/splash-themes-gentoo/Manifest b/media-gfx/splash-themes-gentoo/Manifest
new file mode 100644
index 000000000000..35553c0b233d
--- /dev/null
+++ b/media-gfx/splash-themes-gentoo/Manifest
@@ -0,0 +1,4 @@
+DIST fbsplash-theme-emerge-world-1.0.tar.bz2 3963650 SHA256 a00ee0364842b276389eb09c95fa3ee16ad3fa15017998fe6765d45167015d7d SHA512 a77f0a97cc97c60159dfa3f445de827c26c261d7194a7716277a8ae5c197ffd31cc7c703aec053fc59fad5e855e049d65ad3eb313789d7e1524c574fedc2ec7b WHIRLPOOL 5f3f0ce84cc959632110507ce90b329a9c0ac23ec8b93d63b4d8155b7aa3e166020e526609072844b1a8b9005f7bf6fa22cfde08fb492e7b4c6222060280ad01
+DIST fbsplash-theme-emergence-r2.tar.bz2 4794297 SHA256 77eda040aa858b19c822549bb1478dbb66a5e68f5ce3dade727ef36ae9121d92 SHA512 eefb2c1e09e9efbe6f574d007633a85d83227a526711845f5ede36b4664d781c2de05f3a79ba8d710114dd98559328aaee816983a5dc486cce089e4afb0dd260 WHIRLPOOL 341d35ab37e2489620419c5c644891518c2a2b83422d40f0636190608fa25b3cb1ed2d2afc0ead333950c2bcf4eec3f237d6f9bb27ce00a4290abf2a83a15ac2
+DIST fbsplash-theme-gentoo-r2.tar.bz2 5605891 SHA256 30bc1e5a13d978c0c3ad4b9c25576897018053d3e9d573e7af0a8865bc2f3f82 SHA512 eb7b90f8e3821e76ca75706841cd6a170a3bcdc0bfff6e876eb5425f211e3501ad78479e7b8f232eb1e221dfacf450620ffd10191790173359ee053ab9843eea WHIRLPOOL eceaef29d6029199b987125237b4f93e335119228f92b1cd85955ca2b49e3fa2a5992c7f161be3428137f09d352354f25b2b92a5f3cf199985781590f0c30bc8
+DIST natural_gentoo-9.0-r2.tar.bz2 433306 SHA256 9f31569123854dbeff596e40edcdb88dcb953a90d936ff6c9e177cf52d3825a2 SHA512 ba24da013d2f9c63d7974d443c8529bdd10b552b02006ee107b0b4b1f1034c27448754f220ae153557058f1b359061036c83e687ead2a179392f9239f9fcf686 WHIRLPOOL 5b99a7a5ae4f54907bb2c21f47c0ac3986c38774a8ce11d0a632d6ce239aa1a7c4504a2fb1629cc844e16b8b147a133cc9e7cdbed9e311ab39f1a58cb2067990
diff --git a/media-gfx/splash-themes-gentoo/metadata.xml b/media-gfx/splash-themes-gentoo/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/media-gfx/splash-themes-gentoo/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/splash-themes-gentoo/splash-themes-gentoo-20101212-r1.ebuild b/media-gfx/splash-themes-gentoo/splash-themes-gentoo-20101212-r1.ebuild
new file mode 100644
index 000000000000..df633601bb74
--- /dev/null
+++ b/media-gfx/splash-themes-gentoo/splash-themes-gentoo-20101212-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="A collection of Gentoo themes for splashutils"
+HOMEPAGE="http://dev.gentoo.org/~spock/"
+SRC_URI="mirror://gentoo/fbsplash-theme-emergence-r2.tar.bz2
+ mirror://gentoo/fbsplash-theme-gentoo-r2.tar.bz2
+ mirror://gentoo/fbsplash-theme-emerge-world-1.0.tar.bz2
+ http://fbsplash.berlios.de/themes/repo/natural_gentoo-9.0-r2.tar.bz2"
+
+LICENSE="freedist"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+
+RDEPEND=">=media-gfx/splashutils-1.1.9.5[png]"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+RESTRICT="binchecks strip"
+
+src_prepare() {
+ sed -i -e 's/natural-gentoo/natural_gentoo/g' natural_gentoo/*.cfg || die 'sed failed'
+}
+
+src_install() {
+ insinto /etc/splash
+ doins -r *
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The upstream tarball for the 'Natural Gentoo' theme also contains a GRUB"
+ elog "splash image which is not installed by this ebuild. See:"
+ elog " http://www.kde-look.org/content/show.php?content=49074"
+ elog "if you are interested in this."
+ fi
+}
diff --git a/media-gfx/splash-themes-gentoo/splash-themes-gentoo-20101212-r2.ebuild b/media-gfx/splash-themes-gentoo/splash-themes-gentoo-20101212-r2.ebuild
new file mode 100644
index 000000000000..92fc8e78b933
--- /dev/null
+++ b/media-gfx/splash-themes-gentoo/splash-themes-gentoo-20101212-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+DESCRIPTION="A collection of Gentoo themes for splashutils"
+HOMEPAGE="http://dev.gentoo.org/~spock/"
+SRC_URI="mirror://gentoo/fbsplash-theme-emergence-r2.tar.bz2
+ mirror://gentoo/fbsplash-theme-gentoo-r2.tar.bz2
+ mirror://gentoo/fbsplash-theme-emerge-world-1.0.tar.bz2
+ http://fbsplash.berlios.de/themes/repo/natural_gentoo-9.0-r2.tar.bz2"
+
+LICENSE="freedist"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+RDEPEND=">=media-gfx/splashutils-1.1.9.5[png]"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}"
+RESTRICT="binchecks strip"
+
+src_prepare() {
+ sed -i -e 's/natural-gentoo/natural_gentoo/g' natural_gentoo/*.cfg || die 'sed failed'
+}
+
+src_install() {
+ # They need to be executable, bug #470100
+ insinto /etc/splash
+ doins -r *
+
+ # They need to be executable, bug #470100
+ fperms +x /etc/splash/emerge-world/scripts/svc_started-pre
+ fperms +x /etc/splash/emerge-world/scripts/svc_start-pre
+ fperms +x /etc/splash/emerge-world/scripts/svc_stopped-pre
+ fperms +x /etc/splash/emerge-world/scripts/svc_stop-pre
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The upstream tarball for the 'Natural Gentoo' theme also contains a GRUB"
+ elog "splash image which is not installed by this ebuild. See:"
+ elog " http://www.kde-look.org/content/show.php?content=49074"
+ elog "if you are interested in this."
+ fi
+}
diff --git a/media-gfx/splash-themes-livecd/Manifest b/media-gfx/splash-themes-livecd/Manifest
new file mode 100644
index 000000000000..ceabdb4b06d7
--- /dev/null
+++ b/media-gfx/splash-themes-livecd/Manifest
@@ -0,0 +1,7 @@
+DIST gentoo-livecd-2005.0-0.9.1.tar.bz2 4887028 SHA256 433e9b2b1a4d3e03c000c56b91b01de9355b7fb8e3f3fcd1302c018a1001b424 SHA512 5728363564a8d98d62c478b9b196e7d7e596da66f8640fddd68b161ad6d037e5f3be9f16d84ecbbd97b9dcbd7f30b40cbc69774aa354f58d9619cfb6e313cf85 WHIRLPOOL 286cde88548797946082018cdb7b389b2c2619d0dc34455a06eb20735c0e63587445d4f2b1c5f9c4dc67dcf1f14dbfaa4866de234f3cd96e8c06a0de4fc7b71c
+DIST gentoo-livecd-2005.1-0.9.2.tar.bz2 13000381 SHA256 5b9c4c20af8efefa987608957bd57e1c8dd788360f7d7660e9394bd74a419234
+DIST gentoo-livecd-2006.0-0.9.3.tar.bz2 3207382 SHA256 f6cd2120a2c139a5a0607151efd7a62f71e9fb915c46d1abebc2b894b0adda5a SHA512 79f0007f6c4d3b0056ca8d1d1ed6f021140ffefb5cdaa651483f2c4d8cfbd0b001cf27ab96474c17eeb61ffb72cb8d9d003db8bfa6fc7b737071c46ed9c6aca1 WHIRLPOOL 68d9c9329c8fef42f43fb69fa6dbea0fe8654d6cfca599f63b6ea06fef96b6b886ca7df637556a6ebeee797bc6a1ab82816f16c9682ef37fe8011c98ec96659a
+DIST gentoo-livecd-2006.1-0.9.4.tar.bz2 3447608 SHA256 8d87c4bd6d2677ff11566aee6bfadfbbf12f9dabc60c7c9b76eeaac5c86cbaa3
+DIST gentoo-livecd-2007.0-0.9.5.tar.bz2 4760038 SHA256 58b6ef88458996dddd47567cbc6b1fb4ffe2c4cd5ff0f637b3b3155cd936ae4b
+DIST gentoo-livecd-2007.0-0.9.6.tar.bz2 4760433 SHA256 ed6a097cf1e33c55cb1f98dda1f7ae33be8e785e12ba00df82d497f04131e01f SHA512 a5a1ef2f10c9880d546184772108c56d5c700707199408ae63389a5bd7bec9c526f73631dfe782cceb88242ab8e8a56d14755552500c589fe1958e75e8b5015d WHIRLPOOL 7d7b3ddc3ad97a80917e52c483ceb0d53264dba9aed999e59d1b4245b7df16d56c9877fc5d89fd33cec1bc1b81394ad5fad05d91b791f9a3163a7d548d0d10d8
+DIST splash-themes-livecd-2004.3.tar.bz2 1790707 SHA256 9b14e8c9a2124e3f1683fd6b3aa9a39ba9d090984c86ec7fcc3c7b1bf0e0b511 SHA512 75c897965cec7173c09027a8578e5047f7121e4b64f09f169ab40616bda412d555e5a4e42375082d685dd73d2d1026e18788408b36e9a690c41a0ba83759498f WHIRLPOOL 84b0a23771a7e85784551deab87cbb42a155581096f7e0b102b878f99495ed54847d9e68f2984ccb742febcfe2eca81db2065409237f58259c3508897caf8211
diff --git a/media-gfx/splash-themes-livecd/files/splash-themes-livecd-2007.0-rounding.patch b/media-gfx/splash-themes-livecd/files/splash-themes-livecd-2007.0-rounding.patch
new file mode 100644
index 000000000000..9239d37d551e
--- /dev/null
+++ b/media-gfx/splash-themes-livecd/files/splash-themes-livecd-2007.0-rounding.patch
@@ -0,0 +1,12 @@
+diff -Naurp gentoo-livecd-2007.0-orig/scripts/rc_init-pre gentoo-livecd-2007.0/scripts/rc_init-pre
+--- gentoo-livecd-2007.0-orig/scripts/rc_init-pre 2007-09-08 11:43:00.000000000 +0200
++++ gentoo-livecd-2007.0/scripts/rc_init-pre 2007-09-08 11:43:17.000000000 +0200
+@@ -89,7 +89,7 @@ fi
+ P_RESOLUTION="$($C_FBRES)"
+ if [ -n "${P_RESOLUTION}" -a -n "${P_ICONW}" -a -n "${P_ICONH}" ]; then
+ P_ICONX="$(($((${P_RESOLUTION%x*} / 2)) - $((${P_ICONW} / 2))))"
+- P_ICONY="$(echo "" | awk "{f=${P_RESOLUTION#*x};ih=${P_ICONH};print ((f/2)+((f/2)-(ih/3))/2)}")"
++ P_ICONY="$(echo "" | awk "{f=${P_RESOLUTION#*x};ih=${P_ICONH};print int((f/2)+((f/2)-(ih/3))/2)}")"
+ else
+ log err "failed to configure resolution and icon positioning"
+ exit "${E_RESOLUTION}"
diff --git a/media-gfx/splash-themes-livecd/metadata.xml b/media-gfx/splash-themes-livecd/metadata.xml
new file mode 100644
index 000000000000..88653ddd7172
--- /dev/null
+++ b/media-gfx/splash-themes-livecd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>livecd</herd>
+</pkgmetadata>
diff --git a/media-gfx/splash-themes-livecd/splash-themes-livecd-2004.3.ebuild b/media-gfx/splash-themes-livecd/splash-themes-livecd-2004.3.ebuild
new file mode 100644
index 000000000000..965444bed72e
--- /dev/null
+++ b/media-gfx/splash-themes-livecd/splash-themes-livecd-2004.3.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+S="${WORKDIR}/livecd-${PV}"
+DESCRIPTION="Gentoo theme for gensplash consoles"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="http://dev.gentoo.org/~wolf31o2/sources/${PN}/${PF}.tar.bz2"
+
+SLOT=${PV}
+LICENSE="GPL-2"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+RESTRICT="binchecks strip"
+
+DEPEND="media-gfx/splashutils"
+
+src_install() {
+ dodir /etc/splash/livecd-${PV}
+ cp -r "${S}"/* "${D}"/etc/splash/livecd-${PV}
+}
diff --git a/media-gfx/splash-themes-livecd/splash-themes-livecd-2005.0.ebuild b/media-gfx/splash-themes-livecd/splash-themes-livecd-2005.0.ebuild
new file mode 100644
index 000000000000..b702b26f01e8
--- /dev/null
+++ b/media-gfx/splash-themes-livecd/splash-themes-livecd-2005.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P="gentoo-livecd-${PV}"
+MY_REV="0.9.1"
+DESCRIPTION="Gentoo theme for gensplash consoles"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="http://dev.gentoo.org/~wolf31o2/sources/${PN}/${MY_P}-${MY_REV}.tar.bz2"
+
+SLOT=${PV}
+LICENSE="Artistic GPL-2 BitstreamVera"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+RESTRICT="binchecks strip"
+
+DEPEND=">=media-gfx/splashutils-0.9.1"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i -e 's-/sbin/functions.sh-/etc/init.d/functions.sh-' scripts/rc_init-pre scripts/list_svc.sh
+}
+
+src_install() {
+ dodir /etc/splash/livecd-${PV}
+ cp -r "${S}"/* "${D}"/etc/splash/livecd-${PV}
+}
diff --git a/media-gfx/splash-themes-livecd/splash-themes-livecd-2005.1.ebuild b/media-gfx/splash-themes-livecd/splash-themes-livecd-2005.1.ebuild
new file mode 100644
index 000000000000..51f2aaf90a8d
--- /dev/null
+++ b/media-gfx/splash-themes-livecd/splash-themes-livecd-2005.1.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P="gentoo-livecd-${PV}"
+MY_REV="0.9.2"
+DESCRIPTION="Gentoo theme for gensplash consoles"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="http://dev.gentoo.org/~wolf31o2/sources/${PN}/${MY_P}-${MY_REV}.tar.bz2"
+
+SLOT=${PV}
+LICENSE="Artistic GPL-2 BitstreamVera"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+RESTRICT="binchecks strip"
+
+DEPEND=">=media-gfx/splashutils-1.1.9.7"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i -e '/^\/bin\/umount -l "\/etc\/splash\/${SPLASH_THEME}"$/s/^\(.*\)$/\1 \&>\/dev\/null/' scripts/rc_exit-post
+ sed -i -e 's-/sbin/functions.sh-/etc/init.d/functions.sh-' scripts/rc_init-pre
+}
+
+src_install() {
+ dodir /etc/splash/livecd-${PV}
+ cp -r "${S}"/* "${D}"/etc/splash/livecd-${PV}
+}
diff --git a/media-gfx/splash-themes-livecd/splash-themes-livecd-2006.0.ebuild b/media-gfx/splash-themes-livecd/splash-themes-livecd-2006.0.ebuild
new file mode 100644
index 000000000000..2a163ef764ba
--- /dev/null
+++ b/media-gfx/splash-themes-livecd/splash-themes-livecd-2006.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P="gentoo-livecd-${PV}"
+MY_REV="0.9.3"
+DESCRIPTION="Gentoo theme for gensplash consoles"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="http://dev.gentoo.org/~wolf31o2/sources/${PN}/${MY_P}-${MY_REV}.tar.bz2"
+
+SLOT=${PV}
+LICENSE="Artistic GPL-2 BitstreamVera"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+RESTRICT="binchecks strip"
+
+DEPEND=">=media-gfx/splashutils-1.1.9.7"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i -e 's-/sbin/functions.sh-/etc/init.d/functions.sh-' scripts/rc_init-pre
+}
+
+src_install() {
+ dodir /etc/splash/livecd-${PV}
+ cp -r "${S}"/* "${D}"/etc/splash/livecd-${PV}
+}
diff --git a/media-gfx/splash-themes-livecd/splash-themes-livecd-2006.1.ebuild b/media-gfx/splash-themes-livecd/splash-themes-livecd-2006.1.ebuild
new file mode 100644
index 000000000000..98a16765ebc3
--- /dev/null
+++ b/media-gfx/splash-themes-livecd/splash-themes-livecd-2006.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+MY_P="gentoo-livecd-${PV}"
+MY_REV="0.9.4"
+DESCRIPTION="Gentoo theme for gensplash consoles"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="http://dev.gentoo.org/~wolf31o2/sources/${PN}/${MY_P}-${MY_REV}.tar.bz2"
+
+SLOT=${PV}
+LICENSE="Artistic GPL-2 BitstreamVera"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+RESTRICT="binchecks strip"
+
+DEPEND=">=media-gfx/splashutils-1.1.9.10-r1"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i -e 's-/sbin/functions.sh-/etc/init.d/functions.sh-' scripts/rc_init-pre
+}
+
+src_install() {
+ dodir /etc/splash/livecd-${PV}
+ cp -r "${S}"/* "${D}"/etc/splash/livecd-${PV}
+}
diff --git a/media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0-r1.ebuild b/media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0-r1.ebuild
new file mode 100644
index 000000000000..2ad571a6aec2
--- /dev/null
+++ b/media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_P="gentoo-livecd-${PV}"
+MY_REV="0.9.5"
+DESCRIPTION="Gentoo theme for gensplash consoles"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="http://dev.gentoo.org/~wolf31o2/sources/${PN}/${MY_P}-${MY_REV}.tar.bz2"
+
+SLOT=${PV}
+LICENSE="Artistic GPL-2 BitstreamVera"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+RESTRICT="binchecks strip"
+
+DEPEND=">=media-gfx/splashutils-1.4.1"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if ! built_with_use media-gfx/splashutils mng
+ then
+ ewarn "MNG support is missing from splashutils. You will not see the"
+ ewarn "service icons as services are starting."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i -e 's-/sbin/functions.sh-/etc/init.d/functions.sh-' \
+ scripts/rc_init-pre
+ epatch "${FILESDIR}"/${P}-rounding.patch
+}
+
+src_install() {
+ dodir /etc/splash/livecd-${PV}
+ cp -r "${S}"/* "${D}"/etc/splash/livecd-${PV}
+}
diff --git a/media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0-r2.ebuild b/media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0-r2.ebuild
new file mode 100644
index 000000000000..9fc6b419fba6
--- /dev/null
+++ b/media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0-r2.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils
+
+MY_P="gentoo-livecd-${PV}"
+MY_REV="0.9.6"
+DESCRIPTION="Gentoo theme for gensplash consoles"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="mirror://gentoo/${PN}/${MY_P}-${MY_REV}.tar.bz2"
+
+SLOT=${PV}
+LICENSE="Artistic GPL-2 BitstreamVera"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+RESTRICT="binchecks strip"
+
+RDEPEND=">=media-gfx/splashutils-1.5.4[png]"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if ! built_with_use media-gfx/splashutils mng
+ then
+ ewarn "MNG support is missing from splashutils. You will not see the"
+ ewarn "service icons as services are starting."
+ fi
+}
+
+src_install() {
+ dodir /etc/splash/livecd-${PV}
+ cp -r "${S}"/* "${D}"/etc/splash/livecd-${PV}
+}
diff --git a/media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0.ebuild b/media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0.ebuild
new file mode 100644
index 000000000000..95c4b9ae4294
--- /dev/null
+++ b/media-gfx/splash-themes-livecd/splash-themes-livecd-2007.0.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+MY_P="gentoo-livecd-${PV}"
+MY_REV="0.9.5"
+DESCRIPTION="Gentoo theme for gensplash consoles"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="http://dev.gentoo.org/~wolf31o2/sources/${PN}/${MY_P}-${MY_REV}.tar.bz2"
+
+SLOT=${PV}
+LICENSE="Artistic GPL-2 BitstreamVera"
+KEYWORDS="amd64 ~ppc x86"
+IUSE=""
+RESTRICT="binchecks strip"
+
+DEPEND=">=media-gfx/splashutils-1.4.1"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if ! built_with_use media-gfx/splashutils mng
+ then
+ ewarn "MNG support is missing from splashutils. You will not see the"
+ ewarn "service icons as services are starting."
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i -e 's-/sbin/functions.sh-/etc/init.d/functions.sh-' scripts/rc_init-pre
+}
+
+src_install() {
+ dodir /etc/splash/livecd-${PV}
+ cp -r "${S}"/* "${D}"/etc/splash/livecd-${PV}
+}
diff --git a/media-gfx/splash-themes-livedvd/Manifest b/media-gfx/splash-themes-livedvd/Manifest
new file mode 100644
index 000000000000..48eabe93125d
--- /dev/null
+++ b/media-gfx/splash-themes-livedvd/Manifest
@@ -0,0 +1 @@
+DIST splash-themes-livedvd-12.0.tar.bz2 5416705 SHA256 549442466cb2cb280d21c59c94d9ff3ea23e34e490f8efd3c691226b4ecde5b0 SHA512 ba0cd1cba44793a48a6aae1b91248fb699389e26d30b851ecb2d809857e0d1159c5f190c5b35390aa394cf14d5c7df39811b2ba6018ae8f10c7e886636c92686 WHIRLPOOL 3c9ba9e725be19825e7daa144d50b497daf663862e8d13d28514cda43d5eff70ce82b91b639842e4704e456d0330d49dbb032b5c081223d1108c86b3ca9e2597
diff --git a/media-gfx/splash-themes-livedvd/metadata.xml b/media-gfx/splash-themes-livedvd/metadata.xml
new file mode 100644
index 000000000000..fd827a8640da
--- /dev/null
+++ b/media-gfx/splash-themes-livedvd/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<longdescription lang="en">
+A collection of Gentoo themes for splashutils.
+</longdescription>
+<maintainer>
+ <email>email@missionaccomplish.com</email>
+ <name>Fernando Orocu</name>
+</maintainer>
+<herd>proxy-maintainers</herd>
+</pkgmetadata>
diff --git a/media-gfx/splash-themes-livedvd/splash-themes-livedvd-12.0-r1.ebuild b/media-gfx/splash-themes-livedvd/splash-themes-livedvd-12.0-r1.ebuild
new file mode 100644
index 000000000000..3cda6036726d
--- /dev/null
+++ b/media-gfx/splash-themes-livedvd/splash-themes-livedvd-12.0-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Gentoo theme for gensplash consoles"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI="http://dev.gentoo.org/~tampakrap/tarballs/${P}.tar.bz2"
+
+LICENSE="Artistic GPL-2 BitstreamVera"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RESTRICT="binchecks strip"
+
+DEPEND=">=media-gfx/splashutils-1.4.1[png]"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e 's:/sbin/functions.sh:/etc/init.d/functions.sh:' scripts/rc_init-pre
+}
+
+src_install() {
+ dodir /etc/splash/livedvd-${PV}
+ insinto /etc/splash/livedvd-${PV}
+ doins -r *
+ insopts -m 0755
+ doins -r scripts
+}
diff --git a/media-gfx/splashutils/Manifest b/media-gfx/splashutils/Manifest
new file mode 100644
index 000000000000..ac1a36e7a119
--- /dev/null
+++ b/media-gfx/splashutils/Manifest
@@ -0,0 +1,7 @@
+DIST freetype-2.3.12.tar.bz2 1453034 SHA256 3b96438f016a62b676c1d2089c00ca777f710d19f6aefa66ccf068d360db3e92 SHA512 becb0f138ee13181513d3f03b943f0a474e492cab151992fa78d0c84127819dc91ec6d2bd1528af7e111ab150b3a29104f2f7ab79650cebc35ce4d966b19f34b WHIRLPOOL 1a7363b8e1cc1b4597077e6cdf7e978b80cc76e1428124312d139ee81fe5247eed5ec0243352b721c28a25a179bceb901700d0766c1a5110b19f8fe53c303a89
+DIST jpegsrc.v8a.tar.gz 962018 SHA256 bf86a5eaafa79b5d60feb27bee08df2db4c9ca2fb40d453e7a2080f7663a713b SHA512 4020e82e16b99189b1a50bad18b09616775559740b94a988692aa33f9302d4b5abe3ccaa30895b49e6950fb3d9a830deeb7df750d128ec5c7e1844583db4524d WHIRLPOOL 46e0c98f30c8d975b85b8e86b69e9c5c64632f579502b1b3c54902706d7e08b86582a85b49a0d3bfffd03cd90946fbd20171324504a5ff521eb89e6ce11d568b
+DIST libpng-1.4.3.tar.bz2 658335 SHA256 2b022f39f4788505ad62a4b1f4a33286228d544719680da40f3626393ecde4a2 SHA512 aaa137ebc2312805d58caf19702d24a34ee81593d4250c4e807ce66ba7edb829926919cd0a2b0e5975421451c8eb6674798c06dbaf745175b16c9d3c92b63f61 WHIRLPOOL d383e01e6080166816991650183b47d15938aa269c0a85e234846b9c5a7ec04a1ba7620779b4ddae639ca64440772ce8dd1b3a596f6eb32124c4d6c55592fb0a
+DIST miscsplashutils-0.1.8.tar.bz2 91997 SHA256 38e8434c7266126477237c4d9e6cbeca152089ab33c14a7761089b7970f8d336 SHA512 fa017e264249feda45839030728e90c82f775354c3f2c29a88362938c4a31b19e6d61f967512305642f8b96575f4d756ba197e672a361760e40080c23ec0442a WHIRLPOOL c418ee425bf323fc0e00388be4547232207fd6cac10a2e8cafeef8c8aabcd014052307533bd015e61dc483ab45edd9fbd59a3005549b7bee4a4b90bf3297394a
+DIST splashutils-gentoo-1.0.17.tar.bz2 15814 SHA256 6877263d0b6f5a3532db0d6a531cd4d41fbc6c45a16c5d10050e9048ecc1af81 SHA512 75f1fbfdf165f571b0bf09235235827f370e1b940f1717c4faf5b223caba0b80f853a910ba492c776512aecfafa6e74fd964239bbc6cf412620143d5ffc74167 WHIRLPOOL de9e1ca86a87c169f0a2f7844ab9a68b29cc46c208daca4d13cf7d552b35c05b6e266d66724078cf1f6eea3d41496fdf4fd7b3219697b2032520ad2b9a5ec5c9
+DIST splashutils-lite-1.5.4.4.tar.bz2 441340 SHA256 bc0e22293d4550281d2289672da3acb42594c18a75b9d00ba75526e05162ec6b SHA512 1a78216a1de1fdccff514494d7301640e447c65466e1fe02428e5114485507f67fe4394094880d927d074a8ab2d9c786ba03f9fb0371eb7ab6ef4e3b01aa4613 WHIRLPOOL f861a1673fd9e1fe32e417da48be8c472c5c3cc06844eb0886a66b498ca38cb04a6e51708821eefe3e15f66004bb6a4ef76df7242643b34090035bffdf1f87d7
+DIST zlib-1.2.3.tar.bz2 425209 SHA256 e3b9950851a19904d642c4dec518623382cf4d2ac24f70a76510c944330d28ca SHA512 edae735960279d92acf58e1f4095c6392a7c2059b8f1d2c46648fc608a0fb06b392db2d073f4973f5762c034ea66596e769b95b3d26ad963a086b9b2d09825f2 WHIRLPOOL e874b123296f5d77daf60617501b30f4beebccb64b3910c2539f75f6c194a2cf4885dc7a3904bf790e1651120ec33b55c48e95970dd6bfd6c4d0a2ea48d7d0f4
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.4-bzip2.patch b/media-gfx/splashutils/files/splashutils-1.5.4.4-bzip2.patch
new file mode 100644
index 000000000000..e821c16ee240
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.4-bzip2.patch
@@ -0,0 +1,43 @@
+ core/configure.ac | 6 ++++++
+ core/src/Makefile.am | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/core/configure.ac b/core/configure.ac
+index c5fbb84..ae9e235 100644
+--- a/core/configure.ac
++++ b/core/configure.ac
+@@ -616,6 +616,7 @@ AS_IF(
+ AC_SUBST([PNG_CFLAGS])
+ AC_SUBST([PNG_LIBS])
+
++BZ2_LIBS=
+ AS_IF(
+ [test "x${config_ttf}" = "xyes"],
+ [
+@@ -625,8 +626,13 @@ AS_IF(
+ ,
+ [AC_MSG_ERROR([freetype was not found.])]
+ )
++ AC_CHECK_LIB([bz2], [BZ2_bzDecompress],
++ [BZ2_LIBS="${BZ2_LIBS} -lbz2"],
++ [AC_MSG_ERROR(['libbz2' library was not found.])]
++ )
+ ]
+ )
++AC_SUBST([BZ2_LIBS])
+
+ AH_TOP([#ifndef __SPLASH_CONFIG_H
+ #define __SPLASH_CONFIG_H])
+diff --git a/core/src/Makefile.am b/core/src/Makefile.am
+index d6ce315..349b5e7 100644
+--- a/core/src/Makefile.am
++++ b/core/src/Makefile.am
+@@ -190,7 +190,7 @@ fbsplashctl_SOURCES = $(fbsplashd_SOURCES) $(splash_util_SOURCES) fbspla
+ fbsplashctl_CFLAGS = $(AM_CFLAGS) $(PTHREAD_STATIC_CFLAGS) $(RT_CFLAGS) $(libfbsplashrender_la_CFLAGS) -DUNIFIED_BUILD
+ fbsplashctl_CPPFLAGS = $(fbsplashd_CPPFLAGS) $(splash_util_CPPFLAGS)
+ fbsplashctl_LDFLAGS = $(AM_LDFLAGS) -all-static
+-fbsplashctl_LDADD = libfbsplashrender.la libfbsplash.la $(PTHREAD_STATIC_LIBS) $(RT_LIBS) $(GPM_LIBS)
++fbsplashctl_LDADD = libfbsplashrender.la libfbsplash.la $(PTHREAD_STATIC_LIBS) $(RT_LIBS) $(GPM_LIBS) $(BZ2_LIBS)
+
+ if CONFIG_FBCON_DECOR
+ fbsplashctl_SOURCES += $(fbcondecor_ctl_SOURCES)
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2.patch b/media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2.patch
new file mode 100644
index 000000000000..3438fd523b2a
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.4-freetype-bz2.patch
@@ -0,0 +1,15 @@
+=== modified file 'fbtruetype/Makefile'
+--- fbtruetype/Makefile 2011-10-01 14:10:17 +0000
++++ fbtruetype/Makefile 2011-10-01 14:15:02 +0000
+@@ -23,8 +23,8 @@
+ OBJECTS = fbtruetype.o messages.o console.o ttf.o luxisri.o
+
+ LDFLAGS += -L$(LIBDIR)
+-LIBSS = $(LIBDIR)/libfreetype.a $(LIBDIR)/libz.a -lm
+-LIBSD = -lfreetype -lm
++LIBSS = $(shell pkg-config freetype2 --libs --static) -lm
++LIBSD = $(shell pkg-config freetype2 --libs) -lm
+
+ CFLAGS += -I/usr/include/freetype2
+ COMPILE = $(CC) $(CFLAGS)
+
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.4-ft25.patch b/media-gfx/splashutils/files/splashutils-1.5.4.4-ft25.patch
new file mode 100644
index 000000000000..b5194d5499a8
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.4-ft25.patch
@@ -0,0 +1,42 @@
+Gentoo-bug: https://bugs.gentoo.org/506124
+Signed-off-by: Lars Wendler (Polynomial-C)
+Modified-by: Sergey Popov (Pinkbyte)
+--- miscsplashutils-0.1.8/fbtruetype/ttf.c
++++ miscsplashutils-0.1.8/fbtruetype/ttf.c
+@@ -13,8 +13,8 @@
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+ /* #include <freetype/freetype.h> */
+-#include <freetype/ftoutln.h>
+-#include <freetype/ttnameid.h>
++#include FT_OUTLINE_H
++#include FT_TRUETYPE_IDS_H
+
+ #include "ttf.h"
+
+--- splashutils-1.5.4.4/src/ttf.c 2015-02-01 11:35:04.330595381 +0300
++++ splashutils-1.5.4.4/src/ttf.c 2015-02-01 11:35:24.287596342 +0300
+@@ -25,8 +25,8 @@
+ #include <assert.h>
+
+ #include <ft2build.h>
+-#include <freetype/ftoutln.h>
+-#include <freetype/ttnameid.h>
++#include FT_OUTLINE_H
++#include FT_TRUETYPE_IDS_H
+
+ #include "common.h"
+ #include "render.h"
+--- splashutils-1.5.4.4/src/ttf.h 2015-02-01 11:38:33.852605470 +0300
++++ splashutils-1.5.4.4/src/ttf.h 2015-02-01 11:38:52.504606368 +0300
+@@ -1,8 +1,8 @@
+ #ifndef _TTF_H
+ #define _TTF_H
+ #include <ft2build.h>
+-#include <freetype/ftoutln.h>
+-#include <freetype/ttnameid.h>
++#include FT_OUTLINE_H
++#include FT_TRUETYPE_IDS_H
+
+ #define CACHED_METRICS 0x10
+ #define CACHED_BITMAP 0x01
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.4-gentoo-typo-fix.patch b/media-gfx/splashutils/files/splashutils-1.5.4.4-gentoo-typo-fix.patch
new file mode 100644
index 000000000000..4b8d51375e71
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.4-gentoo-typo-fix.patch
@@ -0,0 +1,19 @@
+commit 74dda8291efae78f00bb781148c8fd4fccaeb764
+Author: Michał Januszewski <spock@gentoo.org>
+Date: Tue Jun 14 23:23:33 2011 +0200
+
+ Fix typo in the Gentoo initscript.
+
+diff --git a/gentoo/init-fbcondecor b/gentoo/init-fbcondecor
+index b66f40a..ce921b6 100755
+--- a/gentoo/init-fbcondecor
++++ b/gentoo/init-fbcondecor
+@@ -12,7 +12,7 @@ start() {
+ splash_setup
+
+ if [ -z "${FBCONDECOR_TTYS}" ]; then
+- FBCONDECOR_TTYS=$(seq 1 "${rc_tty_number:-${RC_TTY_NUMBER}:-12}")
++ FBCONDECOR_TTYS=$(seq 1 "${rc_tty_number:-${RC_TTY_NUMBER:-12}}")
+ fi
+
+ local err=0
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.4-multi-keyboard.patch b/media-gfx/splashutils/files/splashutils-1.5.4.4-multi-keyboard.patch
new file mode 100644
index 000000000000..23f15fd8f9c5
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.4-multi-keyboard.patch
@@ -0,0 +1,381 @@
+diff -ru a/core/src/common.h b/core/src/common.h
+--- a/core/src/common.h 2013-01-11 06:35:35.000000000 +0200
++++ b/core/src/common.h 2013-01-11 06:34:08.000000000 +0200
+@@ -34,6 +34,10 @@
+ #define PATH_PROC FBSPLASH_DIR"/proc"
+ #endif
+
++/* Maximum number of keyboard connected to a machine.
++ * The number is big (8) to be on the safe side */
++#define MAX_KBDS 8
++
+ /* Useful short-named types */
+ typedef u_int8_t u8;
+ typedef u_int16_t u16;
+diff -ru a/core/src/daemon.c b/core/src/daemon.c
+--- a/core/src/daemon.c 2013-01-11 06:35:35.000000000 +0200
++++ b/core/src/daemon.c 2013-01-11 06:34:08.000000000 +0200
+@@ -20,6 +20,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/wait.h>
+ #include <sys/mman.h>
++#include <sys/select.h>
+ #include <pthread.h>
+ #include <errno.h>
+ #include <dirent.h>
+@@ -29,6 +30,8 @@
+ #include "common.h"
+ #include "daemon.h"
+
++#define EV_BUF_SIZE 8
++
+ /* Threading structures */
+ pthread_mutex_t mtx_tty = PTHREAD_MUTEX_INITIALIZER;
+ pthread_mutex_t mtx_paint = PTHREAD_MUTEX_INITIALIZER;
+@@ -41,7 +44,8 @@
+ int ctty = CTTY_VERBOSE;
+
+ /* File descriptors */
+-int fd_evdev = -1;
++int fd_evdevs[MAX_KBDS];
++int evdev_count = 0;
+ #ifdef CONFIG_GPM
+ int fd_gpm = -1;
+ #endif
+@@ -51,7 +55,6 @@
+
+ /* Misc settings */
+ char *notify[2];
+-char *evdev = NULL;
+
+ /* Service list */
+ list svcs = { NULL, NULL };
+@@ -400,56 +403,83 @@
+ }
+ }
+
++__u16 get_ev_key_pressed(int fd_evdev, int ev_buf_size,
++ struct input_event *ev_buf) {
++ size_t rb;
++ int i;
++ rb = read(fd_evdev, ev_buf, sizeof(struct input_event) * ev_buf_size);
++ if (rb < (int) sizeof(struct input_event))
++ return 0;
++
++ for (i = 0; i < (int) (rb / sizeof(struct input_event)); i++) {
++ if (ev_buf[i].type != EV_KEY || ev_buf[i].value != 0)
++ continue;
++ return ev_buf[i].code;
++ }
++}
++
+ /*
+ * Event device monitor thread.
+ */
+ void* thf_switch_evdev(void *unused)
+ {
+- int i, h, oldstate;
+- size_t rb;
+- struct input_event ev[8];
++ int i, h, oldstate, nfds, retval, fd_evdev;
++ fd_set rfds;
++ struct input_event ev_buf[EV_BUF_SIZE];
++ __u16 key_pressed = 0;
+
+ while (1) {
+- rb = read(fd_evdev, ev, sizeof(struct input_event)*8);
+- if (rb < (int) sizeof(struct input_event))
+- continue;
++ nfds = 0, fd_evdev = -1;
++ FD_ZERO(&rfds);
++ for (i = 0;i < evdev_count;i++) {
++ FD_SET(fd_evdevs[i], &rfds);
++ nfds = max(nfds, fd_evdevs[i]);
++ }
+
+- for (i = 0; i < (int) (rb / sizeof(struct input_event)); i++) {
+- if (ev[i].type != EV_KEY || ev[i].value != 0)
+- continue;
++ nfds++;
+
+- switch (ev[i].code) {
+- case KEY_F2:
+- pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate);
+- pthread_mutex_lock(&mtx_paint);
+- if (ctty == CTTY_SILENT) {
+- h = config.tty_v;
+- } else {
+- h = config.tty_s;
++ retval = select(nfds, &rfds, NULL, NULL, NULL);
++ if (retval == -1)
++ perror("select()");
++ else if (retval) {
++ for (i = 0;i < evdev_count;i++) {
++ if (FD_ISSET(fd_evdevs[i], &rfds)) {
++ fd_evdev = fd_evdevs[i];
++ break;
+ }
+- pthread_mutex_unlock(&mtx_paint);
+- pthread_setcancelstate(oldstate, NULL);
++ }
++ key_pressed = get_ev_key_pressed(fd_evdev, EV_BUF_SIZE, ev_buf);
++ if (key_pressed == -1)
++ continue;
++ switch (key_pressed) {
++ case KEY_F2:
++ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldstate);
++ pthread_mutex_lock(&mtx_paint);
++ h = (ctty == CTTY_SILENT) ? config.tty_v : config.tty_s;
++ pthread_mutex_unlock(&mtx_paint);
++ pthread_setcancelstate(oldstate, NULL);
++
++ /* Switch to the new tty. This ioctl has to be done on
++ * the silent tty. Sometimes init will mess with the
++ * settings of the verbose console which will prevent
++ * console switching from working properly.
++ *
++ * Don't worry about fd_tty[config.tty_s]
++ * not being protected by a mutex --
++ * this thread is always killed before any changes
++ * are made to fd_tty[config.tty_s].
++ */
++ ioctl(fd_tty[config.tty_s], VT_ACTIVATE, h);
++ break;
+
+- /* Switch to the new tty. This ioctl has to be done on
+- * the silent tty. Sometimes init will mess with the
+- * settings of the verbose console which will prevent
+- * console switching from working properly.
+- *
+- * Don't worry about fd_tty[config.tty_s] not being protected by a
+- * mutex -- this thread is always killed before any changes
+- * are made to fd_tty[config.tty_s].
+- */
+- ioctl(fd_tty[config.tty_s], VT_ACTIVATE, h);
+- break;
+-
+- case KEY_F3:
+- config.textbox_visible = !config.textbox_visible;
+- invalidate_textbox(theme, config.textbox_visible);
+- cmd_paint(NULL);
+- break;
++ case KEY_F3:
++ config.textbox_visible = !config.textbox_visible;
++ invalidate_textbox(theme, config.textbox_visible);
++ cmd_paint(NULL);
++ break;
+ }
+- }
+- }
++ } /* end of else if (retval) */
++ } /* end of while(1) */
+
+ pthread_exit(NULL);
+ }
+@@ -519,7 +549,7 @@
+
+ /* Do we have to start a monitor thread? */
+ if (update & UPD_MON) {
+- if (fd_evdev != -1) {
++ if (evdev_count >= 0) {
+ if (pthread_create(&th_switchmon, NULL, &thf_switch_evdev, NULL)) {
+ iprint(MSG_ERROR, "Evdev monitor thread creation failed.\n");
+ exit(3);
+diff -ru a/core/src/daemon.h b/core/src/daemon.h
+--- a/core/src/daemon.h 2013-01-11 06:35:35.000000000 +0200
++++ b/core/src/daemon.h 2013-01-11 06:34:08.000000000 +0200
+@@ -40,13 +40,13 @@
+ extern int fd_tty_s, fd_tty1, fd_tty0;
+
+ /*
+- * Event device on which the daemon listens for F2 keypresses.
+- * The proper device has to be detected by an external program and
++ * Event devices on which the daemon listens for F2 keypresses.
++ * The proper devices have to be detected by an external program and
+ * then enabled by sending an appropriate command to the splash
+ * daemon.
+ */
+-extern int fd_evdev;
+-extern char *evdev;
++extern int fd_evdevs[];
++extern int evdev_count;
+
+ #ifdef CONFIG_GPM
+ #include <gpm.h>
+diff -ru a/core/src/daemon_cmd.c b/core/src/daemon_cmd.c
+--- a/core/src/daemon_cmd.c 2013-01-11 06:35:35.000000000 +0200
++++ b/core/src/daemon_cmd.c 2013-01-11 06:34:08.000000000 +0200
+@@ -239,18 +239,35 @@
+ */
+ int cmd_set_event_dev(void **args)
+ {
+- if (evdev)
+- free(evdev);
+-
+- evdev = strdup(args[0]);
++ char *evdevs;
++ char *evdev;
++ int i, j, fd_evdev = -1;
+
+ pthread_cancel(th_switchmon);
++ for (i = 0;i < evdev_count;i++) {
++ close(fd_evdevs[i]);
++ }
++ evdevs = strdup(args[1]);
++ evdev_count = *(int*)args[0];
++ j = 0;
++ for (i = 0;i < evdev_count;i++, evdevs = NULL) {
++ evdev = strtok(evdevs, ",");
++ fd_evdev = open(evdev, O_RDONLY);
++ if (fd_evdev != -1) {
++ fd_evdevs[j] = fd_evdev;
++ j++;
++ } else {
++ perror("failed to open event device");
++ }
++ }
++ if (j == 0) { /* all input devices failed to open */
++ evdev_count = -1;
++ free(evdevs);
++ return -1;
++ }
+
+- if (fd_evdev != -1)
+- close(fd_evdev);
+-
+- fd_evdev = open(evdev, O_RDONLY);
+-
++ evdev_count = j;
++ free(evdevs);
+ switchmon_start(UPD_MON, config.tty_s);
+
+ return 0;
+@@ -524,8 +541,8 @@
+
+ { .cmd = "set event dev",
+ .handler = cmd_set_event_dev,
+- .args = 1,
+- .specs = "s"
++ .args = 2,
++ .specs = "ds"
+ },
+
+ { .cmd = "set message",
+@@ -628,7 +645,7 @@
+ continue;
+
+ for (j = 0; j < known_cmds[i].args; j++) {
+- for (; buf[k] == ' '; buf[k] = 0, k++);
++ for (; buf[k] == ' '; buf[k] = '\0', k++);
+ if (!buf[k]) {
+ args[j] = NULL;
+ continue;
+diff -ru a/core/src/libfbsplash.c b/core/src/libfbsplash.c
+--- a/core/src/libfbsplash.c 2013-01-11 06:35:35.000000000 +0200
++++ b/core/src/libfbsplash.c 2013-01-11 06:34:08.000000000 +0200
+@@ -588,6 +588,8 @@
+ return -1;
+ }
+
++#define EVDV_BUF_LEN 128
++
+ /**
+ * Try to set the event device for the splash daemon.
+ *
+@@ -595,10 +597,14 @@
+ */
+ int fbsplash_set_evdev(void)
+ {
+- char buf[128];
++ char buf[EVDV_BUF_LEN];
++ char evdev_devs[EVDV_BUF_LEN * MAX_KBDS];
+ FILE *fp;
+ int i, j;
+-
++ int kbd_count;
++ int max_chars, chars_left, dev_path_len;
++ char dev_path[] = PATH_DEV "/input/";
++ dev_path_len = strlen(dev_path);
+ char *evdev_cmds[] = {
+ "/bin/grep -Hsi keyboard " PATH_SYS "/class/input/input*/name | /bin/sed -e 's#.*input\\([0-9]*\\)/name.*#event\\1#'",
+ "/bin/grep -Hsi keyboard " PATH_SYS "/class/input/event*/device/driver/description | /bin/grep -o 'event[0-9]\\+'",
+@@ -608,22 +614,43 @@
+
+ /* Try to activate the event device interface so that F2 can
+ * be used to switch from verbose to silent. */
+- buf[0] = 0;
+- for (i = 0; i < sizeof(evdev_cmds)/sizeof(char*); i++) {
++ buf[0] = '\0';
++ kbd_count = 0;
++ max_chars = sizeof(evdev_devs) / sizeof(char*);
++ chars_left = max_chars - 1;
++ evdev_devs[0] = '\0';
++ for (i = 0; i < sizeof(evdev_cmds) / sizeof(char*); i++) {
+ fp = popen(evdev_cmds[i], "r");
+ if (fp) {
+- fgets(buf, 128, fp);
+- if ((j = strlen(buf)) > 0) {
+- if (buf[j-1] == '\n')
+- buf[j-1] = 0;
+- break;
++ while (fgets(buf, 128, fp) && kbd_count < MAX_KBDS) {
++ if ((j = strlen(buf)) > 0) {
++ if (buf[j-1] == '\n')
++ buf[j-1] = ',';
++ if (chars_left < (j + dev_path_len)) {
++ break;
++ }
++ kbd_count++;
++ strncat(evdev_devs, dev_path, chars_left);
++ chars_left -= dev_path_len;
++ strncat(evdev_devs, buf, chars_left);
++ chars_left -= j;
++ }
++ }
++ /* replace the last ',' with '\n' */
++ if (chars_left > 0 && evdev_devs[0] != '\0') {
++ j = strlen(evdev_devs);
++ if (j > 2) {
++ evdev_devs[j - 1] = '\n';
++ }
+ }
+ pclose(fp);
+ }
++ if (kbd_count > 0)
++ break;
+ }
+
+- if (buf[0] != 0) {
+- fbsplash_send("set event dev " PATH_DEV "/input/%s\n", buf);
++ if (evdev_devs[0] != '\0') {
++ fbsplash_send("set event dev %d %s", kbd_count, evdev_devs);
+ return 0;
+ } else {
+ return -1;
+@@ -661,6 +688,8 @@
+ return 0;
+ }
+
++#define MAX_CMD 2048
++
+ /**
+ * Send stuff to the splash daemon using the splash FIFO.
+ *
+@@ -668,7 +697,7 @@
+ */
+ int fbsplash_send(const char *fmt, ...)
+ {
+- char cmd[256];
++ char cmd[MAX_CMD];
+ va_list ap;
+
+ if (!fp_fifo) {
+@@ -690,7 +719,7 @@
+ }
+
+ va_start(ap, fmt);
+- vsnprintf(cmd, 256, fmt, ap);
++ vsnprintf(cmd, MAX_CMD, fmt, ap);
+ va_end(ap);
+
+ fprintf(fp_fifo, cmd);
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.4-r3-bzip2.patch b/media-gfx/splashutils/files/splashutils-1.5.4.4-r3-bzip2.patch
new file mode 100644
index 000000000000..13626df802df
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.4-r3-bzip2.patch
@@ -0,0 +1,53 @@
+ core/configure.ac | 6 ++++++
+ core/src/Makefile.am | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/core/configure.ac b/core/configure.ac
+index c5fbb84..ae9e235 100644
+--- a/core/configure.ac
++++ b/core/configure.ac
+@@ -616,6 +616,7 @@ AS_IF(
+ AC_SUBST([PNG_CFLAGS])
+ AC_SUBST([PNG_LIBS])
+
++BZ2_LIBS=
+ AS_IF(
+ [test "x${config_ttf}" = "xyes"],
+ [
+@@ -625,8 +626,13 @@ AS_IF(
+ ,
+ [AC_MSG_ERROR([freetype was not found.])]
+ )
++ AC_CHECK_LIB([bz2], [BZ2_bzDecompress],
++ [BZ2_LIBS="${BZ2_LIBS} -lbz2"],
++ [AC_MSG_ERROR(['libbz2' library was not found.])]
++ )
+ ]
+ )
++AC_SUBST([BZ2_LIBS])
+
+ AH_TOP([#ifndef __SPLASH_CONFIG_H
+ #define __SPLASH_CONFIG_H])
+diff --git a/core/src/Makefile.am b/core/src/Makefile.am
+index d6ce315..349b5e7 100644
+--- a/core/src/Makefile.am
++++ b/core/src/Makefile.am
+@@ -121,6 +121,9 @@
+ libfbsplashrender_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(libfbsplashrender_version)
+ libfbsplashrender_la_LIBADD = libfbsplash.la
+
++libfbsplashrender_la_CFLAGS += $(BZ2_CFLAGS)
++libfbsplashrender_la_LIBADD += $(BZ2_LIBS)
++
+ libfbsplashrender_la_CFLAGS += $(JPEG_CFLAGS)
+ libfbsplashrender_la_LIBADD += $(JPEG_LIBS)
+
+@@ -190,7 +193,7 @@
+ fbsplashctl_CFLAGS = $(AM_CFLAGS) $(PTHREAD_STATIC_CFLAGS) $(RT_CFLAGS) $(libfbsplashrender_la_CFLAGS) -DUNIFIED_BUILD
+ fbsplashctl_CPPFLAGS = $(fbsplashd_CPPFLAGS) $(splash_util_CPPFLAGS)
+ fbsplashctl_LDFLAGS = $(AM_LDFLAGS) -all-static
+-fbsplashctl_LDADD = libfbsplashrender.la libfbsplash.la $(PTHREAD_STATIC_LIBS) $(RT_LIBS) $(GPM_LIBS)
++fbsplashctl_LDADD = libfbsplashrender.la libfbsplash.la $(PTHREAD_STATIC_LIBS) $(RT_LIBS) $(GPM_LIBS) $(BZ2_LIBS)
+
+ if CONFIG_FBCON_DECOR
+ fbsplashctl_SOURCES += $(fbcondecor_ctl_SOURCES)
diff --git a/media-gfx/splashutils/files/splashutils-1.5.4.4-sys-queue.patch b/media-gfx/splashutils/files/splashutils-1.5.4.4-sys-queue.patch
new file mode 100644
index 000000000000..8ede7322c0d1
--- /dev/null
+++ b/media-gfx/splashutils/files/splashutils-1.5.4.4-sys-queue.patch
@@ -0,0 +1,8 @@
+--- splash.c 2011-06-13 04:45:59.000000000 +0700
++++ splash.c 2014-11-14 20:04:43.000000000 +0700
+@@ -21,4 +21,5 @@
+ #include <sys/wait.h>
+ #include <sys/ioctl.h>
++#include <sys/queue.h>
+ #include <linux/kd.h>
+ #include <linux/fb.h>
diff --git a/media-gfx/splashutils/metadata.xml b/media-gfx/splashutils/metadata.xml
new file mode 100644
index 000000000000..bd1cf9583173
--- /dev/null
+++ b/media-gfx/splashutils/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>asaf.gery@gmail.com</email>
+ </maintainer>
+ <use>
+ <flag name="fbcondecor">
+ Support for the fbcondecor kernel patch.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">freetype</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/splashutils/splashutils-1.5.4.4-r5.ebuild b/media-gfx/splashutils/splashutils-1.5.4.4-r5.ebuild
new file mode 100644
index 000000000000..3d4e941e1834
--- /dev/null
+++ b/media-gfx/splashutils/splashutils-1.5.4.4-r5.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils multilib toolchain-funcs
+
+MISCSPLASH="miscsplashutils-0.1.8"
+GENTOOSPLASH="splashutils-gentoo-1.0.17"
+V_JPEG="8a"
+V_PNG="1.4.3"
+V_ZLIB="1.2.3"
+V_FT="2.3.12"
+
+ZLIBSRC="libs/zlib-${V_ZLIB}"
+LPNGSRC="libs/libpng-${V_PNG}"
+JPEGSRC="libs/jpeg-${V_JPEG}"
+FT2SRC="libs/freetype-${V_FT}"
+
+RESTRICT="test"
+IUSE="hardened +png +truetype gpm fbcondecor"
+
+DESCRIPTION="Framebuffer splash utilities"
+HOMEPAGE="http://sourceforge.net/projects/fbsplash.berlios/"
+SRC_URI="
+ mirror://sourceforge/fbsplash.berlios/${PN}-lite-${PV}.tar.bz2
+ mirror://sourceforge/fbsplash.berlios/${GENTOOSPLASH}.tar.bz2
+ mirror://gentoo/${MISCSPLASH}.tar.bz2
+ mirror://sourceforge/libpng/libpng-${V_PNG}.tar.bz2
+ ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v${V_JPEG}.tar.gz
+ mirror://sourceforge/freetype/freetype-${V_FT}.tar.bz2
+ http://www.gzip.org/zlib/zlib-${V_ZLIB}.tar.bz2
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86"
+
+RDEPEND="
+ gpm? ( sys-libs/gpm[static-libs(+)] )
+ truetype? (
+ >=media-libs/freetype-2[static-libs]
+ app-arch/bzip2[static-libs(+)]
+ sys-libs/zlib[static-libs(+)]
+ )
+ png? (
+ >=media-libs/libpng-1.4.3[static-libs]
+ sys-libs/zlib[static-libs(+)]
+ )
+ virtual/jpeg:0[static-libs]
+ app-arch/cpio
+ media-gfx/fbgrab
+ !sys-apps/lcdsplash"
+
+DEPEND="${RDEPEND}
+ >=dev-libs/klibc-1.5
+ virtual/pkgconfig
+"
+
+S="${WORKDIR}/${P/_/-}"
+SG="${WORKDIR}/${GENTOOSPLASH}"
+SM="${WORKDIR}/${MISCSPLASH}"
+
+pkg_setup() {
+ if use hardened; then
+ ewarn "Due to problems with klibc, it is currently impossible to compile splashutils"
+ ewarn "with 'hardened' GCC flags. As a workaround, the package will be compiled with"
+ ewarn "-fno-stack-protector. Hardened GCC features will not be used while building"
+ ewarn "the splash kernel helper."
+ fi
+}
+
+src_prepare() {
+ mv "${WORKDIR}"/{libpng-${V_PNG},jpeg-${V_JPEG},zlib-${V_ZLIB},freetype-${V_FT}} "${S}/libs"
+
+ # We need to delete the Makefile and let it be rebuilt when splashutils
+ # is being configured. Either that, or we end up with a segfaulting kernel
+ # helper.
+ rm "${S}/libs/zlib-${V_ZLIB}/Makefile"
+
+ cd "${SG}"
+ epatch "${FILESDIR}/splashutils-1.5.4.4-gentoo-typo-fix.patch"
+ epatch "${FILESDIR}/splashutils-1.5.4.4-sys-queue.patch"
+
+ if use truetype ; then
+ cd "${SM}"
+ epatch "${FILESDIR}/splashutils-1.5.4.4-freetype-bz2.patch"
+ cd "${WORKDIR}"
+ epatch "${FILESDIR}/splashutils-1.5.4.4-ft25.patch"
+ fi
+
+ cd "${S}"
+ ln -sf "${S}/src" "${WORKDIR}/core"
+
+ epatch "${FILESDIR}/${P}-bzip2.patch"
+ epatch "${FILESDIR}/${P}-multi-keyboard.patch"
+
+ if ! tc-is-cross-compiler && \
+ has_version "sys-devel/gcc:$(gcc-version)[vanilla]" ; then
+ ewarn "Your GCC was built with the 'vanilla' flag set. If you can't compile"
+ ewarn "splashutils, you're on your own, as this configuration is not supported."
+ else
+ # This should make splashutils compile on systems with hardened GCC.
+ sed -e 's@K_CFLAGS =@K_CFLAGS = -fno-stack-protector@' -i "${S}/Makefile.in"
+ fi
+
+ if ! use truetype ; then
+ sed -i -e 's/fbtruetype kbd/kbd/' "${SM}/Makefile"
+ fi
+
+ # Latest version of klibc defined its own version of ferror, so there is
+ # not need for the hack in klibc_compat.h
+ if has_version ">=dev-libs/klibc-1.5.20"; then
+ echo > "libs/klibc_compat.h"
+ fi
+
+ rm -f m4/*
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ tc-export CC
+ cd "${SM}"
+ emake CC="${CC}" LIB=$(get_libdir) STRIP=true
+
+ cd "${S}"
+ econf \
+ $(use_with png) \
+ --without-mng \
+ $(use_with gpm) \
+ $(use_with truetype ttf) \
+ $(use_with truetype ttf-kernel) \
+ $(use_enable fbcondecor) \
+ --docdir=/usr/share/doc/${PF} \
+ --with-freetype2-src=${FT2SRC} \
+ --with-jpeg-src=${JPEGSRC} \
+ --with-lpng-src=${LPNGSRC} \
+ --with-zlib-src=${ZLIBSRC} \
+ --with-essential-libdir=/$(get_libdir)
+}
+
+src_compile() {
+ emake CC="${CC}" STRIP="true"
+
+ cd "${SG}"
+ emake LIB=$(get_libdir)
+}
+
+src_install() {
+ local LIB=$(get_libdir)
+
+ cd "${SM}"
+ emake DESTDIR="${D}" LIB=${LIB} install
+
+ cd "${S}"
+ emake DESTDIR="${D}" STRIP="true" install
+
+ mv "${D}"/usr/${LIB}/libfbsplash.so* "${D}"/${LIB}/
+ gen_usr_ldscript libfbsplash.so
+
+ echo 'CONFIG_PROTECT_MASK="/etc/splash"' > 99splash
+ doenvd 99splash
+
+ if use fbcondecor ; then
+ newinitd "${SG}"/init-fbcondecor fbcondecor
+ newconfd "${SG}"/fbcondecor.conf fbcondecor
+ fi
+ newconfd "${SG}"/splash.conf splash
+
+ insinto /usr/share/${PN}
+ doins "${SG}"/initrd.splash
+
+ insinto /etc/splash
+ doins "${SM}"/fbtruetype/luxisri.ttf
+
+ cd "${SG}"
+ make DESTDIR="${D}" LIB=${LIB} install
+ prune_libtool_files
+
+ sed -i -e "s#/lib/splash#/${LIB}/splash#" "${D}"/sbin/splash-functions.sh
+ keepdir /${LIB}/splash/{tmp,cache,bin,sys}
+ dosym /${LIB}/splash/bin/fbres /sbin/fbres
+}
+
+pkg_preinst() {
+ has_version "<${CATEGORY}/${PN}-1.0"
+ previous_less_than_1_0=$?
+
+ has_version "<${CATEGORY}/${PN}-1.5.3"
+ previous_less_than_1_5_3=$?
+}
+
+pkg_postinst() {
+ if has_version sys-fs/devfsd || ! has_version virtual/udev ; then
+ elog "This package has been designed with udev in mind. Other solutions, such as"
+ elog "devfs or a static /dev tree might work, but are generally discouraged and"
+ elog "not supported. If you decide to switch to udev, you might want to have a"
+ elog "look at 'The Gentoo udev Guide', which can be found at"
+ elog " http://wiki.gentoo.org/wiki/Udev"
+ elog ""
+ fi
+
+ if [[ $previous_less_than_1_0 = 0 ]] ; then
+ elog "Since you are upgrading from a pre-1.0 version, please make sure that you"
+ elog "rebuild your initrds. You can use the splash_geninitramfs script to do that."
+ elog ""
+ fi
+
+ if [[ $previous_less_than_1_5_3 = 0 ]] && ! use fbcondecor ; then
+ elog "Starting with splashutils-1.5.3, support for the fbcondecor kernel patch"
+ elog "is optional and dependent on the the 'fbcondecor' USE flag. If you wish"
+ elog "to use fbcondecor, run:"
+ elog " echo \"media-gfx/splashutils fbcondecor\" >> /etc/portage/package.use"
+ elog "and re-emerge splashutils."
+ fi
+
+ if ! test -f /proc/cmdline ||
+ ! egrep -q '(console=tty1|CONSOLE=/dev/tty1)' /proc/cmdline ; then
+ elog "It is required that you add 'console=tty1' to your kernel"
+ elog "command line parameters."
+ elog ""
+ elog "After these modifications, the relevant part of the kernel command"
+ elog "line might look like:"
+ elog " splash=silent,fadein,theme:emergence console=tty1"
+ elog ""
+ fi
+
+ if ! has_version 'media-gfx/splash-themes-livecd' &&
+ ! has_version 'media-gfx/splash-themes-gentoo'; then
+ elog "The sample Gentoo themes (emergence, gentoo) have been removed from the"
+ elog "core splashutils package. To get some themes you might want to emerge:"
+ elog " media-gfx/splash-themes-livecd"
+ elog " media-gfx/splash-themes-gentoo"
+ fi
+}
diff --git a/media-gfx/springgraph/Manifest b/media-gfx/springgraph/Manifest
new file mode 100644
index 000000000000..a44fba0f5336
--- /dev/null
+++ b/media-gfx/springgraph/Manifest
@@ -0,0 +1,2 @@
+DIST springgraph.pl.88 29818 SHA256 7e9eac0301d93a0f3e63e7a2ebd305434195313497e81574fced9ce3114ccd3f
+DIST springgraph_0.82-5.diff.gz 3110 SHA256 6085f6037b6c7a4c2b1ad4449e1c6b68502e40a172b1c7626d939811e3e3d22f
diff --git a/media-gfx/springgraph/metadata.xml b/media-gfx/springgraph/metadata.xml
new file mode 100644
index 000000000000..1f8a87a2f6dd
--- /dev/null
+++ b/media-gfx/springgraph/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+<longdescription> Springgraph will read in a .dot file description of a graph,
+ which, for each node, specifies its name and which other nodes it is
+ connected to, and then renders a graph. Each node is drawn as an ellipse,
+ and each connection is drawn as an arrow. The node placement is a result of
+ all of the nodes moving away from each other, while all nodes which are
+ connected move toward each other. This movement is repeated until it
+ stabilizes.</longdescription>
+</pkgmetadata>
diff --git a/media-gfx/springgraph/springgraph-88.ebuild b/media-gfx/springgraph/springgraph-88.ebuild
new file mode 100644
index 000000000000..d0780ac92dcb
--- /dev/null
+++ b/media-gfx/springgraph/springgraph-88.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils
+
+DESCRIPTION="Generate spring graphs from graphviz input files"
+HOMEPAGE="http://www.chaosreigns.com/code/springgraph"
+MY_PV="0.${PV}"
+MY_P="${PN}_${MY_PV}"
+SRC_FILE="${MY_P}.orig.tar.gz"
+SRC_DEBIAN_PATCH="${PN}_0.82-5.diff.gz"
+SRC_URI="http://www.chaosreigns.com/code/springgraph/dl/${PN}.pl.${PV}
+ mirror://debian/pool/main/${PN:0:1}/${PN}/${SRC_DEBIAN_PATCH}"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ~ppc64 sparc x86"
+IUSE=""
+DEPEND=""
+RDEPEND="dev-perl/GD"
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_unpack() {
+ mkdir -p ${S}
+ cp ${DISTDIR}/${PN}.pl.${PV} ${S}/${PN}
+ EPATCH_OPTS="-p1 -d ${S}" epatch ${DISTDIR}/${SRC_DEBIAN_PATCH}
+}
+
+src_compile() {
+ # nothing to do
+ :
+}
+
+src_install() {
+ into /usr
+ dobin ${PN}
+ doman debian/${PN}.1
+}
diff --git a/media-gfx/structure-synth/Manifest b/media-gfx/structure-synth/Manifest
new file mode 100644
index 000000000000..606002fcfbb5
--- /dev/null
+++ b/media-gfx/structure-synth/Manifest
@@ -0,0 +1 @@
+DIST StructureSynth-Source-v1.5.0.zip 1922583 SHA256 6b713da8e3e96ebbee047279712a9956a0cfb3475be52fcd57291c437aad2ace
diff --git a/media-gfx/structure-synth/metadata.xml b/media-gfx/structure-synth/metadata.xml
new file mode 100644
index 000000000000..f40803ba438d
--- /dev/null
+++ b/media-gfx/structure-synth/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">structuresynth</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/structure-synth/structure-synth-1.5.0.ebuild b/media-gfx/structure-synth/structure-synth-1.5.0.ebuild
new file mode 100644
index 000000000000..10c1a094d092
--- /dev/null
+++ b/media-gfx/structure-synth/structure-synth-1.5.0.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+MY_P="StructureSynth-Source-v${PV}"
+DESCRIPTION="A program to generate 3D structures by specifying a design grammar"
+HOMEPAGE="http://structuresynth.sourceforge.net/"
+SRC_URI="mirror://sourceforge/structuresynth/${MY_P}.zip"
+
+LICENSE="|| ( LGPL-2.1 GPL-3 )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="virtual/opengl
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qtscript:4"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S="${WORKDIR}/Structure Synth Source Code"
+
+src_prepare() {
+ qmake -project -o ${PN}.pro -after "CONFIG+=opengl" \
+ -after "QT+=xml opengl script" || die "qmake failed"
+}
+
+src_install() {
+ dobin ${PN}
+ dodoc roadmap.txt changelog.txt bugs.txt
+ domenu ${PN}.desktop
+ newicon images/structuresynth.png ${PN}.png
+}
diff --git a/media-gfx/svg2rlg/Manifest b/media-gfx/svg2rlg/Manifest
new file mode 100644
index 000000000000..21197bf63dd1
--- /dev/null
+++ b/media-gfx/svg2rlg/Manifest
@@ -0,0 +1 @@
+DIST svg2rlg-0.3.tar.gz 490908 SHA256 05db4480b90e912e08727d4cb24385fe33e8436def079b8f149b61a350638bee SHA512 44efebe7d978a46ab26b4bc332ad08db9236a86b160d73fc1fdc2b54c44bb2604147ae458eea1fe81c579c7f94e39869459567a6b6b3a551d6db6132816c4723 WHIRLPOOL 257bd5c50f86578b75b510c9ebc78d32155d73d321e40c83c64ddbe644d37c7a49d28660f0d7a509caaa1760f7715e405cc197eb4ef4b43f5d05fc9445625799
diff --git a/media-gfx/svg2rlg/files/svg2rlg-issue-3.patch b/media-gfx/svg2rlg/files/svg2rlg-issue-3.patch
new file mode 100644
index 000000000000..df70bf345aa8
--- /dev/null
+++ b/media-gfx/svg2rlg/files/svg2rlg-issue-3.patch
@@ -0,0 +1,19 @@
+commit e5aa6784a10717641bc5b6d9d77a5029f815654a
+Author: yac <yac@blesmrt.net>
+Date: Wed May 8 04:59:17 2013 +0200
+
+ fix #3
+
+ remove windows only function which is useless anyway
+
+diff --git a/svg2rlg.py b/svg2rlg.py
+index 1c5f80c..2b35c62 100644
+--- a/svg2rlg.py
++++ b/svg2rlg.py
+@@ -1574,5 +1574,3 @@ if __name__ == "__main__":
+
+ drawing = svg2rlg(source)
+ drawing.save(formats=['pdf'],outDir='.',fnRoot=name)
+-
+- os.startfile(name + '.pdf')
+\ No newline at end of file
diff --git a/media-gfx/svg2rlg/files/svg2rlg-issue-6.patch b/media-gfx/svg2rlg/files/svg2rlg-issue-6.patch
new file mode 100644
index 000000000000..6ca750e79193
--- /dev/null
+++ b/media-gfx/svg2rlg/files/svg2rlg-issue-6.patch
@@ -0,0 +1,47 @@
+commit e42661b9cd6d7b71ce5e7674ac8eff25c74db07a
+Author: yac <yac@blesmrt.net>
+Date: Wed May 8 05:00:32 2013 +0200
+
+ use entry_point fixes #6
+
+diff --git a/setup.py b/setup.py
+index 9e00fba..512fa79 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,6 +1,6 @@
+ #!/usr/bin/python
+ # -*- coding: utf-8 -*-
+-from distutils.core import setup
++from setuptools import setup
+
+ setup(
+ name = 'svg2rlg',
+@@ -12,6 +12,8 @@ setup(
+ url = 'http://code.google.com/p/svg2rlg/',
+ download_url = 'http://pypi.python.org/pypi/svg2rlg/',
+ requires = ['reportlab'],
++ entry_points = {
++ 'console_scripts': ['svg2rlg = svg2rlg:main']},
+
+ classifiers=[
+ 'Environment :: Console',
+@@ -30,4 +32,4 @@ The authors motivation was to have a more robust handling of
+ SVG files in the **rst2pdf** tool. Specific to be able to handle
+ the quirks needed to include SVG export from matplotlib.
+ '''
+-)
+\ No newline at end of file
++)
+diff --git a/svg2rlg.py b/svg2rlg.py
+index 2b35c62..cc812b2 100644
+--- a/svg2rlg.py
++++ b/svg2rlg.py
+@@ -1562,7 +1562,7 @@ def svg2rlg(filename):
+
+ return renderer.render(xml)
+
+-if __name__ == "__main__":
++def main():
+ import sys
+ import os
+
diff --git a/media-gfx/svg2rlg/files/svg2rlg-issue-7.patch b/media-gfx/svg2rlg/files/svg2rlg-issue-7.patch
new file mode 100644
index 000000000000..8145f416f804
--- /dev/null
+++ b/media-gfx/svg2rlg/files/svg2rlg-issue-7.patch
@@ -0,0 +1,16 @@
+commit c30b4f90cac69934761e44bf59a8ba8a3827d647
+Author: yac <yac@blesmrt.net>
+Date: Wed May 8 05:44:00 2013 +0200
+
+ fix #7
+
+diff --git a/svg2rlg.py b/svg2rlg.py
+index cc812b2..80d72de 100644
+--- a/svg2rlg.py
++++ b/svg2rlg.py
+@@ -1573,4 +1573,4 @@ def main():
+ name, ext = os.path.splitext(filename)
+
+ drawing = svg2rlg(source)
+- drawing.save(formats=['pdf'],outDir='.',fnRoot=name)
++ drawing.save(formats=['pdf'],outDir=os.getcwd(),fnRoot=name)
diff --git a/media-gfx/svg2rlg/metadata.xml b/media-gfx/svg2rlg/metadata.xml
new file mode 100644
index 000000000000..edf9479ddd04
--- /dev/null
+++ b/media-gfx/svg2rlg/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <longdescription lang="en">
+ The tool can be used as a console application to convert SVG to PDF
+ files.
+ </longdescription>
+ <upstream>
+ <remote-id type="pypi">svg2rlg</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/svg2rlg/svg2rlg-0.3.ebuild b/media-gfx/svg2rlg/svg2rlg-0.3.ebuild
new file mode 100644
index 000000000000..66fee9a7225d
--- /dev/null
+++ b/media-gfx/svg2rlg/svg2rlg-0.3.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="svg2rlg is a python tool to convert SVG files to reportlab
+graphics"
+HOMEPAGE="http://code.google.com/p/svg2rlg/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ppc ~ppc64 x86"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ dev-python/reportlab[${PYTHON_USEDEP}]"
+
+PATCHES=( "${FILESDIR}/${PN}-issue-3.patch" "${FILESDIR}/${PN}-issue-6.patch"
+ "${FILESDIR}/${PN}-issue-7.patch")
+
+python_test() {
+ ${EPYTHON} test_svg2rlg.py
+}
+
+python_prepare_all() {
+ tmp=`mktemp` || die "mktemp failed"
+ for i in `find -name '*.py'`; do
+ tr -d '\r' < $i >$tmp || die "tr failed"
+ mv $tmp $i || die "mv failed"
+ done
+
+ distutils-r1_python_prepare_all
+}
diff --git a/media-gfx/swftools/Manifest b/media-gfx/swftools/Manifest
new file mode 100644
index 000000000000..41291ee7dc67
--- /dev/null
+++ b/media-gfx/swftools/Manifest
@@ -0,0 +1 @@
+DIST swftools-0.9.2.tar.gz 2675939 SHA256 bf6891bfc6bf535a1a99a485478f7896ebacbe3bbf545ba551298080a26f01f1 SHA512 91bbd48914f9a8a1cdf85532b371721b01982c5f88648b908fbe99fbf4e17e9893ce575e4fd699927e9bc1c79d846f6bcd4f1d868578fb17403467cc1e28259b WHIRLPOOL a0c4699db82f488e464ad2246840de616595025e0f5f35880db2972b438deb503a5a702f911dd997e85e3ccc61e90515391090b5ec7289d1370f35bf00e36bf3
diff --git a/media-gfx/swftools/files/swftools-0.9.2_general.patch b/media-gfx/swftools/files/swftools-0.9.2_general.patch
new file mode 100644
index 000000000000..f49fcb0d2f64
--- /dev/null
+++ b/media-gfx/swftools/files/swftools-0.9.2_general.patch
@@ -0,0 +1,28 @@
+diff -urB swftools-0.9.2.old/src/png2swf.c swftools-0.9.2.jo/src/png2swf.c
+--- swftools-0.9.2.old/src/png2swf.c 2012-04-08 19:25:26.000000000 +0200
++++ swftools-0.9.2.jo/src/png2swf.c 2012-04-11 23:29:08.569700175 +0200
+@@ -777,7 +777,7 @@
+ printf("-q , --quiet Omit normal log messages, only log errors\n");
+ printf("-C , --cgi For use as CGI- prepend http header, write to stdout\n");
+ printf("-V , --version Print version information and exit\n");
+- printf("-s , --scale <percent> Scale image to <percent>% size.\n");
++ printf("-s , --scale <percent> Scale image to <percent>%% size.\n");
+ printf("\n");
+ }
+
+diff -urB swftools-0.9.2.old/swfs/Makefile.in swftools-0.9.2.jo/swfs/Makefile.in
+--- swftools-0.9.2.old/swfs/Makefile.in 2012-04-08 19:25:26.000000000 +0200
++++ swftools-0.9.2.jo/swfs/Makefile.in 2012-04-11 23:29:08.573699972 +0200
+@@ -41,10 +41,8 @@
+ $(INSTALL_DATA) ./PreLoaderTemplate.swf $(pkgdatadir)/swfs/PreLoaderTemplate.swf
+ $(INSTALL_DATA) ./tessel_loader.swf $(pkgdatadir)/swfs/tessel_loader.swf
+ $(INSTALL_DATA) ./swft_loader.swf $(pkgdatadir)/swfs/swft_loader.swf
+- rm -f $(pkgdatadir)/swfs/default_viewer.swf -o -L $(pkgdatadir)/swfs/default_viewer.swf
+- $(LN_S) $(pkgdatadir)/swfs/simple_viewer.swf $(pkgdatadir)/swfs/default_viewer.swf
+- rm -f $(pkgdatadir)/swfs/default_loader.swf -o -L $(pkgdatadir)/swfs/default_loader.swf
+- $(LN_S) $(pkgdatadir)/swfs/tessel_loader.swf $(pkgdatadir)/swfs/default_loader.swf
++ cd $(pkgdatadir)/swfs; ${LN_S} simple_viewer.swf default_viewer.swf
++ cd $(pkgdatadir)/swfs; ${LN_S} tessel_loader.swf default_loader.swf
+
+ uninstall:
+ $(UNINSTALL_DATA) $(pkgdatadir)/swfs/simple_viewer.swf
diff --git a/media-gfx/swftools/files/swftools-0.9.2_giflib.patch b/media-gfx/swftools/files/swftools-0.9.2_giflib.patch
new file mode 100644
index 000000000000..913b5e3b08d1
--- /dev/null
+++ b/media-gfx/swftools/files/swftools-0.9.2_giflib.patch
@@ -0,0 +1,89 @@
+From 05c1df6a6da28734533722dc0ac99ea5b206a492 Mon Sep 17 00:00:00 2001
+From: Matthias Kramm <kramm@quiss.org>
+Date: Sat, 6 Jul 2013 12:09:53 -0700
+Subject: [PATCH] applied giflib patch from Jan Engelhardt
+
+---
+ src/gif2swf.c | 28 ++++++++++++++++++++++++----
+ 1 file changed, 24 insertions(+), 4 deletions(-)
+
+diff --git a/src/gif2swf.c b/src/gif2swf.c
+index 2359da5..5e52ea8 100644
+--- a/src/gif2swf.c
++++ b/src/gif2swf.c
+@@ -222,6 +222,7 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int id, int imgidx)
+
+ GifFileType *gft;
+ FILE *fi;
++ int ret;
+
+ if ((fi = fopen(sname, "rb")) == NULL) {
+ if (VERBOSE(1))
+@@ -230,13 +231,24 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int id, int imgidx)
+ }
+ fclose(fi);
+
+- if ((gft = DGifOpenFileName(sname)) == NULL) {
++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5
++ gft = DGifOpenFileName(sname, NULL);
++#else
++ gft = DGifOpenFileName(sname);
++#endif
++ if (gft == NULL) {
+ fprintf(stderr, "%s is not a GIF file!\n", sname);
+ return t;
+ }
+
+- if (DGifSlurp(gft) != GIF_OK) {
++ if ((ret = DGifSlurp(gft)) != GIF_OK) {
++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2
++ fprintf(stderr, "GIF-LIB: %s\n", GifErrorString());
++#elif defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5
++ fprintf(stderr, "GIF-LIB: %s\n", GifErrorString(ret));
++#else
+ PrintGifError();
++#endif
+ return t;
+ }
+
+@@ -465,6 +475,7 @@ int CheckInputFile(char *fname, char **realname)
+ FILE *fi;
+ char *s = malloc(strlen(fname) + 5);
+ GifFileType *gft;
++ int ret;
+
+ if (!s)
+ exit(2);
+@@ -488,7 +499,12 @@ int CheckInputFile(char *fname, char **realname)
+ }
+ fclose(fi);
+
+- if ((gft = DGifOpenFileName(s)) == NULL) {
++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5
++ gft = DGifOpenFileName(s, NULL);
++#else
++ gft = DGifOpenFileName(s);
++#endif
++ if (gft == NULL) {
+ fprintf(stderr, "%s is not a GIF file!\n", fname);
+ return -1;
+ }
+@@ -498,8 +514,14 @@ int CheckInputFile(char *fname, char **realname)
+ if (global.max_image_height < gft->SHeight)
+ global.max_image_height = gft->SHeight;
+
+- if (DGifSlurp(gft) != GIF_OK) {
++ if ((ret = DGifSlurp(gft)) != GIF_OK) {
++#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2
++ fprintf(stderr, "GIF-LIB: %s\n", GifErrorString());
++#elif defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5
++ fprintf(stderr, "GIF-LIB: %s\n", GifErrorString(ret));
++#else
+ PrintGifError();
++#endif
+ return -1;
+ }
+ // After DGifSlurp() call, gft->ImageCount become available
+--
+1.8.4
+
diff --git a/media-gfx/swftools/files/swftools-0.9.2_nopdf.patch b/media-gfx/swftools/files/swftools-0.9.2_nopdf.patch
new file mode 100644
index 000000000000..9dc6c2ac2560
--- /dev/null
+++ b/media-gfx/swftools/files/swftools-0.9.2_nopdf.patch
@@ -0,0 +1,40 @@
+diff -urB swftools-0.9.2.old/lib/Makefile.in swftools-0.9.2.jo/lib/Makefile.in
+--- swftools-0.9.2.old/lib/Makefile.in 2011-10-07 05:35:18.000000000 +0200
++++ swftools-0.9.2.jo/lib/Makefile.in 2012-04-11 23:33:53.299308801 +0200
+@@ -3,7 +3,8 @@
+ top_srcdir = @top_srcdir@
+ include ../Makefile.common
+
+-all: librfxswf$(A) libgfxpdf$(A) libbase$(A) libgfx$(A) libgfxswf$(A) libocr$(A)
++#all: librfxswf$(A) libgfxpdf$(A) libbase$(A) libgfx$(A) libgfxswf$(A) libocr$(A)
++all: librfxswf$(A) libbase$(A) libgfx$(A) libgfxswf$(A) libocr$(A)
+
+ lame_objects = lame/psymodel.$(O) lame/fft.$(O) lame/newmdct.$(O) lame/quantize.$(O) lame/takehiro.$(O) lame/reservoir.$(O) lame/quantize_pvt.$(O) lame/vbrquantize.$(O) lame/encoder.$(O) lame/id3tag.$(O) lame/version.$(O) lame/tables.$(O) lame/util.$(O) lame/bitstream.$(O) lame/set_get.$(O) lame/VbrTag.$(O) lame/lame.$(O)
+ lame_in_source = @lame_in_source@
+diff -urB swftools-0.9.2.old/Makefile.in swftools-0.9.2.jo/Makefile.in
+--- swftools-0.9.2.old/Makefile.in 2012-04-08 19:25:26.000000000 +0200
++++ swftools-0.9.2.jo/Makefile.in 2012-04-11 23:33:53.299308801 +0200
+@@ -8,8 +8,8 @@
+ cd m4;$(MAKE) $@
+ @echo making $@ in lib...
+ cd lib;$(MAKE) $@
+- @echo making $@ in lib/pdf...
+- cd lib/pdf;$(MAKE) $@
++# @echo making $@ in lib/pdf...
++# cd lib/pdf;$(MAKE) $@
+ @echo making $@ in lib...
+ cd lib;$(MAKE) $@
+ @echo making $@ in lib/python...
+diff -urB swftools-0.9.2.old/src/Makefile.in swftools-0.9.2.jo/src/Makefile.in
+--- swftools-0.9.2.old/src/Makefile.in 2011-10-07 05:20:17.000000000 +0200
++++ swftools-0.9.2.jo/src/Makefile.in 2012-04-11 23:33:53.299308801 +0200
+@@ -3,7 +3,8 @@
+ top_srcdir = @top_srcdir@
+ include ../Makefile.common
+
+-install_programs = wav2swf$(E) @PNG2SWF@ swfcombine$(E) swfstrings$(E) swfextract$(E) swfdump$(E) swfc$(E) @JPEG2SWF@ @GIF2SWF@ swfbbox$(E) font2swf$(E) swfrender$(E) as3compile$(E) @PDF2SWF@ @PDF2PDF@
++#install_programs = wav2swf$(E) @PNG2SWF@ swfcombine$(E) swfstrings$(E) swfextract$(E) swfdump$(E) swfc$(E) @JPEG2SWF@ @GIF2SWF@ swfbbox$(E) font2swf$(E) swfrender$(E) as3compile$(E) @PDF2SWF@ @PDF2PDF@
++install_programs = wav2swf$(E) @PNG2SWF@ swfcombine$(E) swfstrings$(E) swfextract$(E) swfdump$(E) swfc$(E) @JPEG2SWF@ @GIF2SWF@ swfbbox$(E) font2swf$(E) swfrender$(E) as3compile$(E) @PDF2PDF@
+ programs = $(install_programs) swfbytes$(E) ttftool$(E)
+
+ all: $(programs)
diff --git a/media-gfx/swftools/metadata.xml b/media-gfx/swftools/metadata.xml
new file mode 100644
index 000000000000..58236c941bbb
--- /dev/null
+++ b/media-gfx/swftools/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>proxy-maintainers</herd>
+<maintainer>
+ <email>dblaci@dblaci.hu</email>
+ <description>Please assign bugs</description>
+</maintainer>
+<maintainer>
+ <email>pacho@gentoo.org</email>
+ <description>proxy-maintainer, please CC on bugs</description>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/swftools/swftools-0.9.2.ebuild b/media-gfx/swftools/swftools-0.9.2.ebuild
new file mode 100644
index 000000000000..8f0cd433c7d0
--- /dev/null
+++ b/media-gfx/swftools/swftools-0.9.2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+DESCRIPTION="SWF Tools is a collection of SWF manipulation and generation utilities"
+HOMEPAGE="http://www.swftools.org/"
+SRC_URI="http://www.swftools.org/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND="
+ app-text/poppler
+ >=media-libs/t1lib-1.3.1
+ media-libs/freetype
+ virtual/jpeg
+"
+DEPEND="${RDEPEND}
+ !<media-libs/ming-0.4.0_rc2
+"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}_nopdf.patch
+ epatch "${FILESDIR}"/${P}_general.patch
+ epatch "${FILESDIR}"/${P}_giflib.patch
+}
+
+src_configure() {
+ econf --enable-poppler
+ # disable the python interface; there's no configure switch; bug 118242
+ echo "all install uninstall clean:" > lib/python/Makefile
+}
+
+src_compile() {
+ emake FLAGS="${CFLAGS}"
+}
+
+src_install() {
+ einstall
+ dodoc AUTHORS ChangeLog
+}
diff --git a/media-gfx/sxiv/Manifest b/media-gfx/sxiv/Manifest
new file mode 100644
index 000000000000..d2db0a8d1d77
--- /dev/null
+++ b/media-gfx/sxiv/Manifest
@@ -0,0 +1,4 @@
+DIST sxiv-1.1.1.tar.gz 37251 SHA256 30569b7cb1568a7f60d102f6eb21f25c93de42243a1c8ac3c1a521d58b08281f SHA512 066264b3388114b022d11377c3dae5b04d5f4d6916c78276c478550f3194e0dc80cd8158a366689d4415cef94521ad018b5183dd2ae66c320770033b082094ad WHIRLPOOL 65e643a1f6aad84aa06bf7373ad74409dd552dbeb16ae961711341f8b5d7a1861d4142f8b80536e31f09c8a56130ea06c8ce501819cdfe9dd55af766ac925f6b
+DIST sxiv-1.2.tar.gz 47775 SHA256 ac76b69e4889137f2ce531ec4dc5ce9c4916bc575a30d351ebc7b0a684ef8cf3 SHA512 6058a8f89c540083549d91fe469f8f9d1a4acf60a19dc1d7115b7fe9a807143c9f8c0e8320e7695f7b6afe8d9ae040e9daaa09a976219228afb929133c8a6957 WHIRLPOOL f610805192379c31bd682c32c41a04ccf5e15aee1604577810df0e6a4ef21283635da92ce6c20c6f063f9da3e96611947341ca8e4e33f4714a5142315fd41334
+DIST sxiv-1.3.1.tar.gz 47171 SHA256 9a30a1b036e1c17212128554709da3f2d65d3beaef2e0a73097af5e35cf11d0e SHA512 a3ffeea7fb85188c844ec8fabf8a162aa6c4f695674b44db7c60a4608956051ff5963cb85aba86cd4f16ab63a0cf84cd2309c325e22075537175bf1b65327b77 WHIRLPOOL c38815c882a198152bde4c6b4a790ddcfb8a895a1cb1be20a2cb384d3c22a3bded2c50534a9ba9fc2633cc6f7d4ce3f153f1b6004b33725b3a40e3117070a425
+DIST sxiv-1.3.tar.gz 48995 SHA256 4c9d6dfa0c914ea20a80dff6cb376834ab1c765623496b8266f6a882a6b80708 SHA512 ca7ea9894808b1ba2752d7b53701cf2c6c8039eb170aa9e0ee6c2b90743f20870670d986a9a7465d230f6c1e6a05bc40bebd7f8b1151066cbabe8da1a937e828 WHIRLPOOL 5c4fc1d7628cdcaf205f626587975d7a14cc6379163fa3b13110f8ac8633ce0c8aa8939141b52fb212dfe24ef3875f9e94569eb624a245c3509984c3b2482a16
diff --git a/media-gfx/sxiv/files/sxiv-1.1-makefile.patch b/media-gfx/sxiv/files/sxiv-1.1-makefile.patch
new file mode 100644
index 000000000000..159173d2ff81
--- /dev/null
+++ b/media-gfx/sxiv/files/sxiv-1.1-makefile.patch
@@ -0,0 +1,14 @@
+--- sxiv-1.1/Makefile
++++ sxiv-1.1/Makefile
+@@ -3,9 +3,8 @@
+ PREFIX = /usr/local
+ MANPREFIX = $(PREFIX)/share/man
+
+-CC = gcc
+-CFLAGS = -std=c99 -Wall -pedantic -O2 -I$(PREFIX)/include -DHAVE_GIFLIB
+-LDFLAGS = -L$(PREFIX)/lib
++CC ?= gcc
++CFLAGS += -std=c99 -Wall -pedantic -DHAVE_GIFLIB
+ LIBS = -lX11 -lImlib2 -lgif
+
+ SRC = commands.c exif.c image.c main.c options.c thumbs.c util.c window.c
diff --git a/media-gfx/sxiv/files/sxiv-1.2-makefile.patch b/media-gfx/sxiv/files/sxiv-1.2-makefile.patch
new file mode 100644
index 000000000000..333f4cd54b24
--- /dev/null
+++ b/media-gfx/sxiv/files/sxiv-1.2-makefile.patch
@@ -0,0 +1,16 @@
+--- sxiv-1.2/Makefile
++++ sxiv-1.2/Makefile
+@@ -3,10 +3,9 @@
+ PREFIX = /usr/local
+ MANPREFIX = $(PREFIX)/share/man
+
+-CC = gcc
+-CFLAGS = -std=c99 -Wall -pedantic -O2
+-CPPFLAGS = -I$(PREFIX)/include -D_XOPEN_SOURCE=500 -DHAVE_GIFLIB
+-LDFLAGS = -L$(PREFIX)/lib
++CC ?= gcc
++CFLAGS += -std=c99 -Wall -pedantic -O2
++CPPFLAGS += -D_XOPEN_SOURCE=500 -DHAVE_GIFLIB
+ LIBS = -lX11 -lImlib2 -lgif
+
+ SRC = commands.c exif.c image.c main.c options.c thumbs.c util.c window.c
diff --git a/media-gfx/sxiv/files/sxiv-1.3-makefile.patch b/media-gfx/sxiv/files/sxiv-1.3-makefile.patch
new file mode 100644
index 000000000000..0640bf71af92
--- /dev/null
+++ b/media-gfx/sxiv/files/sxiv-1.3-makefile.patch
@@ -0,0 +1,30 @@
+--- sxiv-1.3/Makefile
++++ sxiv-1.3/Makefile
+@@ -3,10 +3,9 @@
+ PREFIX = /usr/local
+ MANPREFIX = $(PREFIX)/share/man
+
+-CC = gcc
+-CFLAGS = -std=c99 -Wall -pedantic -O2
+-CPPFLAGS = -I$(PREFIX)/include -D_XOPEN_SOURCE=500 -DHAVE_LIBEXIF -DHAVE_GIFLIB
+-LDFLAGS = -L$(PREFIX)/lib
++CC ?= gcc
++CFLAGS += -std=c99 -Wall -pedantic
++CPPFLAGS += -I$(PREFIX)/include -D_XOPEN_SOURCE=500 -DHAVE_LIBEXIF -DHAVE_GIFLIB
+ LIBS = -lX11 -lImlib2 -lexif -lgif
+
+ SRC = commands.c image.c main.c options.c thumbs.c util.c window.c
+@@ -18,11 +17,11 @@
+
+ depend: .depend
+
+-.depend: $(SRC)
++.depend: $(SRC) config.h
+ rm -f ./.depend
+ $(CC) $(CFLAGS) -MM $^ >./.depend
+
+-include .depend
++-include .depend
+
+ .c.o:
+ $(CC) $(CFLAGS) $(CPPFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
diff --git a/media-gfx/sxiv/metadata.xml b/media-gfx/sxiv/metadata.xml
new file mode 100644
index 000000000000..1a6425684731
--- /dev/null
+++ b/media-gfx/sxiv/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="github">muennich/sxiv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/sxiv/sxiv-1.1.1.ebuild b/media-gfx/sxiv/sxiv-1.1.1.ebuild
new file mode 100644
index 000000000000..c26d605394bb
--- /dev/null
+++ b/media-gfx/sxiv/sxiv-1.1.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils savedconfig toolchain-funcs
+
+DESCRIPTION="Simple (or small or suckless) X Image Viewer"
+HOMEPAGE="https://github.com/muennich/sxiv/"
+SRC_URI="https://github.com/muennich/sxiv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+
+RDEPEND="media-libs/giflib
+ media-libs/imlib2[X]
+ x11-libs/libX11"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.1-makefile.patch
+ tc-export CC
+
+ restore_config config.h
+}
+
+src_install() {
+ emake DESTDIR="${ED}" PREFIX=/usr install
+ dodoc README.md
+
+ save_config config.h
+}
diff --git a/media-gfx/sxiv/sxiv-1.2.ebuild b/media-gfx/sxiv/sxiv-1.2.ebuild
new file mode 100644
index 000000000000..fbaa76d607ee
--- /dev/null
+++ b/media-gfx/sxiv/sxiv-1.2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils savedconfig toolchain-funcs
+
+DESCRIPTION="Simple (or small or suckless) X Image Viewer"
+HOMEPAGE="https://github.com/muennich/sxiv/"
+SRC_URI="https://github.com/muennich/sxiv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="media-libs/giflib
+ media-libs/imlib2[X]
+ x11-libs/libX11"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ tc-export CC
+
+ restore_config config.h
+}
+
+src_install() {
+ emake DESTDIR="${ED}" PREFIX=/usr install
+ dodoc README.md
+
+ save_config config.h
+}
diff --git a/media-gfx/sxiv/sxiv-1.3.1.ebuild b/media-gfx/sxiv/sxiv-1.3.1.ebuild
new file mode 100644
index 000000000000..e07a5dd9aa71
--- /dev/null
+++ b/media-gfx/sxiv/sxiv-1.3.1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit savedconfig toolchain-funcs
+
+DESCRIPTION="Simple (or small or suckless) X Image Viewer"
+HOMEPAGE="https://github.com/muennich/sxiv/"
+SRC_URI="https://github.com/muennich/sxiv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ media-libs/libexif
+ media-libs/giflib
+ media-libs/imlib2[X]
+ x11-libs/libX11
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i '/^LDFLAGS/d' Makefile || die
+ tc-export CC
+
+ restore_config config.h
+}
+
+src_install() {
+ emake DESTDIR="${ED}" PREFIX=/usr install
+ dodoc README.md
+
+ save_config config.h
+}
diff --git a/media-gfx/sxiv/sxiv-1.3.ebuild b/media-gfx/sxiv/sxiv-1.3.ebuild
new file mode 100644
index 000000000000..8a3ace3bf25b
--- /dev/null
+++ b/media-gfx/sxiv/sxiv-1.3.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils savedconfig toolchain-funcs
+
+DESCRIPTION="Simple (or small or suckless) X Image Viewer"
+HOMEPAGE="https://github.com/muennich/sxiv/"
+SRC_URI="https://github.com/muennich/sxiv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ media-libs/libexif
+ media-libs/giflib
+ media-libs/imlib2[X]
+ x11-libs/libX11
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-makefile.patch
+ tc-export CC
+
+ restore_config config.h
+}
+
+src_install() {
+ emake DESTDIR="${ED}" PREFIX=/usr install
+ dodoc README.md
+
+ save_config config.h
+}
diff --git a/media-gfx/symboleditor/Manifest b/media-gfx/symboleditor/Manifest
new file mode 100644
index 000000000000..e7a76816255f
--- /dev/null
+++ b/media-gfx/symboleditor/Manifest
@@ -0,0 +1 @@
+DIST SymbolEditor-1.5.0-1.tar.bz2 779158 SHA256 707da2874dcd08101b218b7a60f1ec3ed5ba056d6221a1dd472821737c545db0 SHA512 5fe18b649ed78e6ab3c61ce80a0b159941a65065801cdc6a44f1187aa40a2816cbc7888ea9e120cad8089e3e8e7831cedfd3242de5092cea58eb5cf898de022c WHIRLPOOL b3219bd30fbf993b7bd1c998e068e9f462ce312d0e6038b7706324b15810a9a1933ddedf39e6c33ac92deb2d38802807c1c3094fd1733321248b4362a22749e5
diff --git a/media-gfx/symboleditor/files/symboleditor-1.5.0-cflags.patch b/media-gfx/symboleditor/files/symboleditor-1.5.0-cflags.patch
new file mode 100644
index 000000000000..177fd180d56a
--- /dev/null
+++ b/media-gfx/symboleditor/files/symboleditor-1.5.0-cflags.patch
@@ -0,0 +1,25 @@
+From a495671be994a32f4b52840f7e5c358916a378dc Mon Sep 17 00:00:00 2001
+From: Michael Palimaka <kensington@gentoo.org>
+Date: Tue, 26 Aug 2014 20:17:22 +1000
+Subject: [PATCH] Respect user-defined CFLAGS.
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3166676..50786be 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -43,7 +43,7 @@ kde4_add_executable (SymbolEditor ${SymbolEditor_SRCS})
+
+ target_link_libraries (SymbolEditor ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
+
+-set (CMAKE_CXX_FLAGS "-DQT_NO_COMPAT -DKDE_NO_COMPAT")
++set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -DQT_NO_COMPAT -DKDE_NO_COMPAT")
+
+ install (TARGETS SymbolEditor DESTINATION ${BIN_INSTALL_DIR})
+ install (FILES SymbolEditorui.rc DESTINATION ${DATA_INSTALL_DIR}/SymbolEditor)
+--
+1.8.5.5
+
diff --git a/media-gfx/symboleditor/metadata.xml b/media-gfx/symboleditor/metadata.xml
new file mode 100644
index 000000000000..a23f444b67d6
--- /dev/null
+++ b/media-gfx/symboleditor/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>kde</herd>
+</pkgmetadata>
diff --git a/media-gfx/symboleditor/symboleditor-1.5.0.ebuild b/media-gfx/symboleditor/symboleditor-1.5.0.ebuild
new file mode 100644
index 000000000000..489a18bf0450
--- /dev/null
+++ b/media-gfx/symboleditor/symboleditor-1.5.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+KDE_DOC_DIRS="doc-translations/%lingua_${PN}"
+KDE_HANDBOOK="optional"
+KDE_LINGUAS="ca cs da de en_GB es et lt nl pl pt pt_BR sk sv uk"
+MY_P="SymbolEditor-${PV}"
+inherit kde4-base
+
+DESCRIPTION="Program to create libraries of QPainterPath objects with hints on how to render them"
+HOMEPAGE="http://userbase.kde.org/SymbolEditor"
+SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${MY_P}-1.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="~amd64"
+IUSE="debug"
+
+DEPEND="sys-devel/gettext"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=( "${FILESDIR}/${P}-cflags.patch" )
diff --git a/media-gfx/tachyon/Manifest b/media-gfx/tachyon/Manifest
new file mode 100644
index 000000000000..6e5fe00b87ec
--- /dev/null
+++ b/media-gfx/tachyon/Manifest
@@ -0,0 +1,2 @@
+DIST tachyon-0.98.9.tar.gz 3273086 SHA256 c6a3298ded4dc3e9390447819e1dac59b62c3d2d46d4154312ffe71549ee40d7 SHA512 b314914ed0e0f547ab5392f23a008adc208a4d541b0d4bfe571325abe7ba9927b208df8be1b0fd62bda5513b4c050b31e2fb0785c171b1f2645415cecb7f8ce9 WHIRLPOOL 9e1e5ac2139159697addeb704b78367cff86dc7ffc64135cc496e2ee1ca983e3f579171cb432a02ed5cd9246fb18f066c777607fc00368aac9c788f16fcbc30e
+DIST tachyon-0.99b6.tar.gz 2981568 SHA256 f4dcaf9c76a4f49310f56254390f9611c22e353947a1745a8c623e8bc8119b97 SHA512 4d0d707bf46528b87bfe1a05f490f40bcbee8f21271c5212247d4fd25956a27ad8a40b4621817a3f1c03495f1ba9eeb99b152929fdcd92c7118a35ef116f3f33 WHIRLPOOL b8f12422ff2ca0199b37f12cd4dde09401e7c7d5aa238b8f16f742d34af382e613cf91d1e6e2827dfc585b46ade56ec100fcad9d625a3e6c32882549b6fcb490
diff --git a/media-gfx/tachyon/files/0.98.9-ldflags.patch b/media-gfx/tachyon/files/0.98.9-ldflags.patch
new file mode 100644
index 000000000000..99d5b8bfb664
--- /dev/null
+++ b/media-gfx/tachyon/files/0.98.9-ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/unix/Makefile b/unix/Makefile
+index 8dd0846..d2fe1ac 100644
+--- a/unix/Makefile
++++ b/unix/Makefile
+@@ -121,7 +121,7 @@ ${MGFLIB} : ../libmgf/Makefile
+ };
+
+ ${ARCHDIR}/tachyon : ${RAYLIB} ${PARSELIB} ${OBJDIR}/main.o ${OBJDIR}/getargs.o ${OBJDIR}/parse.o ${OBJDIR}/nffparse.o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o ${PARSEOBJS}
+- ${CC} ${CFLAGS} ${DEMOINC} -o ${ARCHDIR}/tachyon ${OBJDIR}/main.o ${OBJDIR}/getargs.o ${OBJDIR}/parse.o ${OBJDIR}/nffparse.o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o ${PARSEOBJS} -L${RAYLIBDIR} ${PARSELIBS} ${LIBS}
++ ${CC} ${CFLAGS} ${LDFLAGS} ${DEMOINC} -o ${ARCHDIR}/tachyon ${OBJDIR}/main.o ${OBJDIR}/getargs.o ${OBJDIR}/parse.o ${OBJDIR}/nffparse.o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o ${PARSEOBJS} -L${RAYLIBDIR} ${PARSELIBS} ${LIBS}
+ ${STRIP} ${ARCHDIR}/tachyon
+
+ ${ARCHDIR}/animray : ${RAYLIB} ${OBJDIR}/mainanim.o
diff --git a/media-gfx/tachyon/files/tachyon-0.99_beta6-ldflags.patch b/media-gfx/tachyon/files/tachyon-0.99_beta6-ldflags.patch
new file mode 100644
index 000000000000..99d5b8bfb664
--- /dev/null
+++ b/media-gfx/tachyon/files/tachyon-0.99_beta6-ldflags.patch
@@ -0,0 +1,13 @@
+diff --git a/unix/Makefile b/unix/Makefile
+index 8dd0846..d2fe1ac 100644
+--- a/unix/Makefile
++++ b/unix/Makefile
+@@ -121,7 +121,7 @@ ${MGFLIB} : ../libmgf/Makefile
+ };
+
+ ${ARCHDIR}/tachyon : ${RAYLIB} ${PARSELIB} ${OBJDIR}/main.o ${OBJDIR}/getargs.o ${OBJDIR}/parse.o ${OBJDIR}/nffparse.o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o ${PARSEOBJS}
+- ${CC} ${CFLAGS} ${DEMOINC} -o ${ARCHDIR}/tachyon ${OBJDIR}/main.o ${OBJDIR}/getargs.o ${OBJDIR}/parse.o ${OBJDIR}/nffparse.o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o ${PARSEOBJS} -L${RAYLIBDIR} ${PARSELIBS} ${LIBS}
++ ${CC} ${CFLAGS} ${LDFLAGS} ${DEMOINC} -o ${ARCHDIR}/tachyon ${OBJDIR}/main.o ${OBJDIR}/getargs.o ${OBJDIR}/parse.o ${OBJDIR}/nffparse.o ${OBJDIR}/glwin.o ${OBJDIR}/spaceball.o ${OBJDIR}/trackball.o ${PARSEOBJS} -L${RAYLIBDIR} ${PARSELIBS} ${LIBS}
+ ${STRIP} ${ARCHDIR}/tachyon
+
+ ${ARCHDIR}/animray : ${RAYLIB} ${OBJDIR}/mainanim.o
diff --git a/media-gfx/tachyon/files/tachyon-0.99_beta6-shared.patch b/media-gfx/tachyon/files/tachyon-0.99_beta6-shared.patch
new file mode 100644
index 000000000000..dd23fe301675
--- /dev/null
+++ b/media-gfx/tachyon/files/tachyon-0.99_beta6-shared.patch
@@ -0,0 +1,179 @@
+diff -up tachyon/unix/Makefile.shared tachyon/unix/Makefile
+--- tachyon/unix/Makefile.shared 2011-02-07 16:14:38.000000000 +0100
++++ tachyon/unix/Makefile 2011-07-23 20:23:51.000000000 +0200
+@@ -22,7 +22,7 @@ OBJDIR=${ARCHDIR}/libtachyon
+ #
+ # Name of raytracing library file to create
+ #
+-RAYLIB=${ARCHDIR}/libtachyon.a
++RAYLIB=${ARCHDIR}/libtachyon.so
+ RAYLIBDIR=${ARCHDIR}
+
+ #
+@@ -251,124 +251,125 @@ RAYOBJS= ${OBJDIR}/api.o \
+ ${OBJDIR}/tgafile.o \
+ ${OBJDIR}/winbmp.o
+
++VERSION=$(shell grep TACHYON_VERSION_STRING ../src/tachyon.h | cut -d\" -f 2)
++${RAYLIB} : DIRNAME=tachyon-${VERSION}
+ ${RAYLIB} : ${RAYOBJS}
+- rm -f ${RAYLIB}
+- ${AR} ${ARFLAGS} ${RAYLIB} ${RAYOBJS}
+- ${RANLIB} ${RAYLIB}
++ ${CC} ${LDFLAGS} -shared -Wl,-soname,libtachyon.so.${VERSION} -o ${RAYLIBDIR}/libtachyon.so.${VERSION} ${CFLAGS} -fPIC ${RAYOBJS} ${PNGLIB} -lm -lpthread ${JPEGLIB}
++ ln -s libtachyon.so.${VERSION} ${RAYLIBDIR}/libtachyon.so
+
+ ${OBJDIR}/vol.o : ${SRCDIR}/vol.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/vol.c -o ${OBJDIR}/vol.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/vol.c -o ${OBJDIR}/vol.o
+
+ ${OBJDIR}/extvol.o : ${SRCDIR}/extvol.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/extvol.c -o ${OBJDIR}/extvol.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/extvol.c -o ${OBJDIR}/extvol.o
+
+ ${OBJDIR}/winbmp.o : ${SRCDIR}/winbmp.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/winbmp.c -o ${OBJDIR}/winbmp.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/winbmp.c -o ${OBJDIR}/winbmp.o
+
+ ${OBJDIR}/vector.o : ${SRCDIR}/vector.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/vector.c -o ${OBJDIR}/vector.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/vector.c -o ${OBJDIR}/vector.o
+
+ ${OBJDIR}/triangle.o : ${SRCDIR}/triangle.c ${OBJDEPS} ${SRCDIR}/triangle.h
+- ${CC} ${CFLAGS} -c ${SRCDIR}/triangle.c -o ${OBJDIR}/triangle.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/triangle.c -o ${OBJDIR}/triangle.o
+
+ ${OBJDIR}/trace.o : ${SRCDIR}/trace.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/trace.c -o ${OBJDIR}/trace.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/trace.c -o ${OBJDIR}/trace.o
+
+ ${OBJDIR}/threads.o : ${SRCDIR}/threads.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/threads.c -o ${OBJDIR}/threads.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/threads.c -o ${OBJDIR}/threads.o
+
+ ${OBJDIR}/tgafile.o : ${SRCDIR}/tgafile.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/tgafile.c -o ${OBJDIR}/tgafile.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/tgafile.c -o ${OBJDIR}/tgafile.o
+
+ ${OBJDIR}/util.o : ${SRCDIR}/util.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/util.c -o ${OBJDIR}/util.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/util.c -o ${OBJDIR}/util.o
+
+ ${OBJDIR}/ui.o : ${SRCDIR}/ui.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/ui.c -o ${OBJDIR}/ui.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/ui.c -o ${OBJDIR}/ui.o
+
+ ${OBJDIR}/texture.o : ${SRCDIR}/texture.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/texture.c -o ${OBJDIR}/texture.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/texture.c -o ${OBJDIR}/texture.o
+
+ ${OBJDIR}/sphere.o : ${SRCDIR}/sphere.c ${OBJDEPS} ${SRCDIR}/sphere.h
+- ${CC} ${CFLAGS} -c ${SRCDIR}/sphere.c -o ${OBJDIR}/sphere.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/sphere.c -o ${OBJDIR}/sphere.o
+
+ ${OBJDIR}/sgirgb.o : ${SRCDIR}/sgirgb.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/sgirgb.c -o ${OBJDIR}/sgirgb.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/sgirgb.c -o ${OBJDIR}/sgirgb.o
+
+ ${OBJDIR}/shade.o : ${SRCDIR}/shade.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/shade.c -o ${OBJDIR}/shade.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/shade.c -o ${OBJDIR}/shade.o
+
+ ${OBJDIR}/ring.o : ${SRCDIR}/ring.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/ring.c -o ${OBJDIR}/ring.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/ring.c -o ${OBJDIR}/ring.o
+
+ ${OBJDIR}/render.o : ${SRCDIR}/render.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/render.c -o ${OBJDIR}/render.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/render.c -o ${OBJDIR}/render.o
+
+ ${OBJDIR}/quadric.o : ${SRCDIR}/quadric.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/quadric.c -o ${OBJDIR}/quadric.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/quadric.c -o ${OBJDIR}/quadric.o
+
+ ${OBJDIR}/jpeg.o : ${SRCDIR}/jpeg.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/jpeg.c -o ${OBJDIR}/jpeg.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/jpeg.c -o ${OBJDIR}/jpeg.o
+
+ ${OBJDIR}/pngfile.o : ${SRCDIR}/pngfile.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/pngfile.c -o ${OBJDIR}/pngfile.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/pngfile.c -o ${OBJDIR}/pngfile.o
+
+ ${OBJDIR}/ppm.o : ${SRCDIR}/ppm.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/ppm.c -o ${OBJDIR}/ppm.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/ppm.c -o ${OBJDIR}/ppm.o
+
+ ${OBJDIR}/psd.o : ${SRCDIR}/psd.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/psd.c -o ${OBJDIR}/psd.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/psd.c -o ${OBJDIR}/psd.o
+
+ ${OBJDIR}/plane.o : ${SRCDIR}/plane.c ${OBJDEPS} ${SRCDIR}/plane.h
+- ${CC} ${CFLAGS} -c ${SRCDIR}/plane.c -o ${OBJDIR}/plane.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/plane.c -o ${OBJDIR}/plane.o
+
+ ${OBJDIR}/parallel.o : ${SRCDIR}/parallel.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/parallel.c -o ${OBJDIR}/parallel.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/parallel.c -o ${OBJDIR}/parallel.o
+
+ ${OBJDIR}/objbound.o : ${SRCDIR}/objbound.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/objbound.c -o ${OBJDIR}/objbound.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/objbound.c -o ${OBJDIR}/objbound.o
+
+ ${OBJDIR}/light.o : ${SRCDIR}/light.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/light.c -o ${OBJDIR}/light.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/light.c -o ${OBJDIR}/light.o
+
+ ${OBJDIR}/intersect.o : ${SRCDIR}/intersect.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/intersect.c -o ${OBJDIR}/intersect.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/intersect.c -o ${OBJDIR}/intersect.o
+
+ ${OBJDIR}/imageio.o : ${SRCDIR}/imageio.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/imageio.c -o ${OBJDIR}/imageio.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/imageio.c -o ${OBJDIR}/imageio.o
+
+ ${OBJDIR}/imap.o : ${SRCDIR}/imap.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/imap.c -o ${OBJDIR}/imap.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/imap.c -o ${OBJDIR}/imap.o
+
+ ${OBJDIR}/grid.o : ${SRCDIR}/grid.c ${SRCDIR}/grid.h ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/grid.c -o ${OBJDIR}/grid.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/grid.c -o ${OBJDIR}/grid.o
+
+ ${OBJDIR}/global.o : ${SRCDIR}/global.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/global.c -o ${OBJDIR}/global.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/global.c -o ${OBJDIR}/global.o
+
+ ${OBJDIR}/hash.o : ${SRCDIR}/hash.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/hash.c -o ${OBJDIR}/hash.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/hash.c -o ${OBJDIR}/hash.o
+
+ ${OBJDIR}/cylinder.o : ${SRCDIR}/cylinder.c ${OBJDEPS} ${SRCDIR}/cylinder.h
+- ${CC} ${CFLAGS} -c ${SRCDIR}/cylinder.c -o ${OBJDIR}/cylinder.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/cylinder.c -o ${OBJDIR}/cylinder.o
+
+ ${OBJDIR}/coordsys.o : ${SRCDIR}/coordsys.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/coordsys.c -o ${OBJDIR}/coordsys.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/coordsys.c -o ${OBJDIR}/coordsys.o
+
+ ${OBJDIR}/camera.o : ${SRCDIR}/camera.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/camera.c -o ${OBJDIR}/camera.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/camera.c -o ${OBJDIR}/camera.o
+
+ ${OBJDIR}/box.o : ${SRCDIR}/box.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/box.c -o ${OBJDIR}/box.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/box.c -o ${OBJDIR}/box.o
+
+ ${OBJDIR}/bndbox.o : ${SRCDIR}/bndbox.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/bndbox.c -o ${OBJDIR}/bndbox.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/bndbox.c -o ${OBJDIR}/bndbox.o
+
+ ${OBJDIR}/apigeom.o : ${SRCDIR}/apigeom.c ${OBJDEPS}
+- ${CC} ${CFLAGS} -c ${SRCDIR}/apigeom.c -o ${OBJDIR}/apigeom.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/apigeom.c -o ${OBJDIR}/apigeom.o
+
+ ${OBJDIR}/api.o : ${SRCDIR}/api.c ${OBJDEPS} ${SRCDIR}/sphere.h ${SRCDIR}/plane.h ${SRCDIR}/triangle.h ${SRCDIR}/cylinder.h
+- ${CC} ${CFLAGS} -c ${SRCDIR}/api.c -o ${OBJDIR}/api.o
++ ${CC} ${CFLAGS} -fPIC -c ${SRCDIR}/api.c -o ${OBJDIR}/api.o
+
+ clean :
+ @echo "Cleaning object files, binaries etc."
diff --git a/media-gfx/tachyon/metadata.xml b/media-gfx/tachyon/metadata.xml
new file mode 100644
index 000000000000..e7b28c02178f
--- /dev/null
+++ b/media-gfx/tachyon/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <maintainer>
+ <email>alexxy@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/tachyon/tachyon-0.98.9-r2.ebuild b/media-gfx/tachyon/tachyon-0.98.9-r2.ebuild
new file mode 100644
index 000000000000..9bc8819bcb00
--- /dev/null
+++ b/media-gfx/tachyon/tachyon-0.98.9-r2.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A portable, high performance parallel ray tracing system"
+HOMEPAGE="http://jedi.ks.uiuc.edu/~johns/raytracer/"
+SRC_URI="http://jedi.ks.uiuc.edu/~johns/raytracer/files/${PV}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~ppc ~x86 ~x64-macos ~x86-macos"
+IUSE="doc examples jpeg mpi +opengl png threads"
+
+CDEPEND="
+ jpeg? ( virtual/jpeg:0 )
+ mpi? ( virtual/mpi )
+ opengl? (
+ virtual/glu
+ virtual/opengl )
+ png? ( media-libs/libpng:0 )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}"
+
+REQUIRED_USE="^^ ( opengl mpi )"
+
+S="${WORKDIR}/${PN}/unix"
+
+# TODO: Test on alpha, ia64, ppc
+# TODO: add other architectures
+# TODO: X, Motif, MBOX, Open Media Framework, Spaceball I/O, MGF ?
+
+TACHYON_MAKE_TARGET=
+
+pkg_setup() {
+ local ostarget
+ case ${CHOST} in
+ powerpc*-darwin*) ostarget=macosx ;;
+ *86*-darwin*) ostarget=macosx-x86 ;;
+ *) ostarget=linux ;;
+ esac
+
+ if use threads ; then
+ if use opengl ; then
+ TACHYON_MAKE_TARGET=${ostarget}-thr-ogl
+ elif use mpi ; then
+ TACHYON_MAKE_TARGET=${ostarget}-mpi-thr
+ else
+ TACHYON_MAKE_TARGET=${ostarget}-thr
+ fi
+
+ # TODO: Support for linux-athlon-thr ?
+ else
+ if use mpi ; then
+ TACHYON_MAKE_TARGET=${ostarget}-mpi
+ else
+ TACHYON_MAKE_TARGET=${ostarget}
+ fi
+ fi
+
+ if [[ -z "${TACHYON_MAKE_TARGET}" ]]; then
+ die "No target found, check use flags"
+ else
+ einfo "Using target: ${TACHYON_MAKE_TARGET}"
+ fi
+}
+
+src_prepare() {
+ if use jpeg ; then
+ sed -i \
+ -e "s:USEJPEG=:USEJPEG=-DUSEJPEG:g" \
+ -e "s:JPEGLIB=:JPEGLIB=-ljpeg:g" Make-config \
+ || die "sed failed"
+ fi
+
+ if use png ; then
+ sed -i \
+ -e "s:USEPNG=:USEPNG=-DUSEPNG:g" \
+ -e "s:PNGINC=:PNGINC=$(pkg-config libpng --cflags):g" \
+ -e "s:PNGLIB=:PNGLIB=$(pkg-config libpng --libs):g" Make-config \
+ || die "sed failed"
+ fi
+
+ if use mpi ; then
+ sed -i "s:MPIDIR=:MPIDIR=/usr:g" Make-config || die "sed failed"
+ sed -i "s:linux-lam:linux-mpi:g" Make-config || die "sed failed"
+ fi
+ sed -i \
+ -e "s:-O3::g;s:-g::g;s:-pg::g" \
+ -e "s:-m32:${CFLAGS}:g" \
+ -e "s:-m64:${CFLAGS}:g" \
+ -e "s:-ffast-math::g" \
+ -e "s:STRIP = strip:STRIP = touch:g" \
+ -e "s:CC = *cc:CC = $(tc-getCC):g" \
+ -e "s:-fomit-frame-pointer::g" Make-arch || die "sed failed"
+
+ epatch "${FILESDIR}"/${PV}-ldflags.patch
+}
+
+src_compile() {
+ emake ${TACHYON_MAKE_TARGET}
+}
+
+src_install() {
+ cd ..
+ dodoc Changes README
+
+ use doc && dohtml docs/tachyon/*
+
+ cd compile/${TACHYON_MAKE_TARGET}
+
+ dobin ${PN}
+
+ if use examples; then
+ cd "${S}/../scenes"
+ insinto "/usr/share/${PN}/examples"
+ doins *
+ fi
+}
diff --git a/media-gfx/tachyon/tachyon-0.99_beta6.ebuild b/media-gfx/tachyon/tachyon-0.99_beta6.ebuild
new file mode 100644
index 000000000000..26203a4f3ca4
--- /dev/null
+++ b/media-gfx/tachyon/tachyon-0.99_beta6.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+MY_PV=${PV/_beta/b}
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="A portable, high performance parallel ray tracing system"
+HOMEPAGE="http://jedi.ks.uiuc.edu/~johns/raytracer/"
+SRC_URI="http://jedi.ks.uiuc.edu/~johns/raytracer/files/${MY_PV}/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~ppc ~x86 ~x64-macos ~x86-macos"
+IUSE="doc examples jpeg mpi +opengl png threads"
+
+CDEPEND="
+ jpeg? ( virtual/jpeg:0= )
+ mpi? ( virtual/mpi )
+ opengl? (
+ virtual/glu
+ virtual/opengl
+ )
+ png? ( media-libs/libpng:0= )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}"
+
+REQUIRED_USE="^^ ( opengl mpi )"
+
+S="${WORKDIR}/${PN}/unix"
+
+pkg_setup() {
+ local ostarget
+
+ # TODO: Test on alpha, ia64
+ # TODO: add other architectures
+ # TODO: X, Motif, MBOX, Open Media Framework, Spaceball I/O, MGF ?
+ TACHYON_MAKE_TARGET=
+
+ case ${CHOST} in
+ powerpc*-darwin*) ostarget=macosx ;;
+ *86*-darwin*) ostarget=macosx-x86 ;;
+ *) ostarget=linux ;;
+ esac
+
+ if use threads ; then
+ if use opengl ; then
+ TACHYON_MAKE_TARGET=${ostarget}-thr-ogl
+ elif use mpi ; then
+ TACHYON_MAKE_TARGET=${ostarget}-mpi-thr
+ else
+ TACHYON_MAKE_TARGET=${ostarget}-thr
+ fi
+
+ # TODO: Support for linux-athlon-thr ?
+ else
+ if use mpi ; then
+ TACHYON_MAKE_TARGET=${ostarget}-mpi
+ else
+ TACHYON_MAKE_TARGET=${ostarget}
+ fi
+ fi
+
+ if [[ -z "${TACHYON_MAKE_TARGET}" ]]; then
+ die "No target found, check use flags"
+ else
+ einfo "Using target: ${TACHYON_MAKE_TARGET}"
+ fi
+}
+
+src_prepare() {
+ emakeconf=()
+ use jpeg && \
+ emakeconf+=(
+ USEJPEG=-DUSEJPEG
+ JPEGLIB=-ljpeg
+ )
+
+ use png && \
+ emakeconf+=(
+ USEPNG=-DUSEPNG
+ PNGINC="$($(tc-getPKG_CONFIG) --cflags libpng)"
+ PNGLIB="$($(tc-getPKG_CONFIG) --libs libpng)"
+ )
+
+ if use mpi ; then
+ sed \
+ -e "s:MPIDIR=:MPIDIR=/usr:g" \
+ -e "s:linux-lam:linux-mpi:g" \
+ -i Make-config || die "sed failed"
+ fi
+ sed -i \
+ -e "s:-O3::g;s:-g::g;s:-pg::g" \
+ -e "s:-m32:${CFLAGS}:g" \
+ -e "s:-m64:${CFLAGS}:g" \
+ -e "s:-ffast-math::g" \
+ -e "s:STRIP = strip:STRIP = touch:g" \
+ -e "s:CC = *cc:CC = $(tc-getCC):g" \
+ -e "s:-fomit-frame-pointer::g" Make-arch || die "sed failed"
+
+ epatch \
+ "${FILESDIR}"/${P}-ldflags.patch \
+ "${FILESDIR}"/${P}-shared.patch
+}
+
+src_compile() {
+ emake ${TACHYON_MAKE_TARGET} "${emakeconf[@]}" VERSION=${PV}
+}
+
+src_install() {
+ cd .. || die
+ dodoc Changes README
+
+ insinto /usr/include/${PN}
+ doheader src/*.h
+
+ use doc && dohtml docs/tachyon/*
+
+ cd compile/${TACHYON_MAKE_TARGET} || die
+
+ dobin ${PN}
+ dolib.so lib${PN}.so*
+
+ if use examples; then
+ cd "${S}/../scenes" || die
+ insinto "/usr/share/${PN}/examples"
+ doins *
+ fi
+}
diff --git a/media-gfx/tgif/Manifest b/media-gfx/tgif/Manifest
new file mode 100644
index 000000000000..66abf341ea15
--- /dev/null
+++ b/media-gfx/tgif/Manifest
@@ -0,0 +1 @@
+DIST tgif-QPL-4.2.5.tar.gz 3093619 SHA256 2f24e9fecafae6e671739bd80691a06c9d032bdd1973ca164823e72ab1c567ba SHA512 7b007620190883e30216407bf31c4142493bbd270b4babc282994dec37d221d79f0b1cadc9efda9bc337eb323254e69beee2d4c4873877e7321df41922f456ef WHIRLPOOL 26ddcd8c669335c8147acd57f478b5fb395acf4fcea0cdcb5180b8ee5869122be1a1098ad7ba8abff84af71d414e89acfb43a5c2acb1147d7da45e259675842e
diff --git a/media-gfx/tgif/metadata.xml b/media-gfx/tgif/metadata.xml
new file mode 100644
index 000000000000..d9cd2cad66c2
--- /dev/null
+++ b/media-gfx/tgif/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/media-gfx/tgif/tgif-4.2.5.ebuild b/media-gfx/tgif/tgif-4.2.5.ebuild
new file mode 100644
index 000000000000..890fe710af1c
--- /dev/null
+++ b/media-gfx/tgif/tgif-4.2.5.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=1
+AUTOTOOLS_IN_SOURCE_BUILD=1
+inherit autotools-utils eutils flag-o-matic
+
+MY_P="${PN}-QPL-${PV}"
+
+DESCRIPTION="Xlib base 2-D drawing facility under X11"
+HOMEPAGE="http://bourbon.usc.edu/tgif/index.html"
+SRC_URI="ftp://bourbon.usc.edu/pub/${PN}/${MY_P}.tar.gz"
+
+LICENSE="QPL-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE=""
+
+DEPEND="sys-libs/zlib
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ x11-proto/xproto"
+RDEPEND="${DEPEND}
+ media-libs/netpbm"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS=( AUTHORS ChangeLog HISTORY NEWS README )
+
+src_prepare() {
+ sed -i \
+ -e 's/^CFLAGS=/CFLAGS+=/' \
+ -e 's:^TGIFDIR.*:TGIFDIR = $(datadir)/tgif:' \
+ Makefile.am || die 'sed on Makefile.am failed'
+
+ append-cppflags -D_DONT_USE_MKTEMP -DHAS_STREAMS_SUPPORT
+
+ autotools-utils_src_prepare
+}
diff --git a/media-gfx/tic98/Manifest b/media-gfx/tic98/Manifest
new file mode 100644
index 000000000000..de7688b04325
--- /dev/null
+++ b/media-gfx/tic98/Manifest
@@ -0,0 +1 @@
+DIST tic98-1.01.tar.bz2 99145 SHA256 0e65a851ccc6fb45652ed03760e5973bac494ac2f07a9a7cccc0e7ccafe06fa2 SHA512 3bb6c72f0a9ed199f2eb1ceb53a5552b384510a9f6ecdfabf7f79e815cb0511cf880a00bddf5b88b49ea416fbcf7fed5e84af1ee2fbed7c313b39ee042efa797 WHIRLPOOL 047dd5e382fef34c67c80cc91f968f6ce34c31ae2d308e7a0f9d6ebd8e1c486c2221052bc33e18111df91277451c0602d0ee6630c5005d40cbbc5b5ee589c887
diff --git a/media-gfx/tic98/files/tic98-1.01-gentoo.diff b/media-gfx/tic98/files/tic98-1.01-gentoo.diff
new file mode 100644
index 000000000000..880dfa059545
--- /dev/null
+++ b/media-gfx/tic98/files/tic98-1.01-gentoo.diff
@@ -0,0 +1,205 @@
+diff -Nru tic98/Makefile tic98.gentoo/Makefile
+--- tic98/Makefile 1999-06-22 05:00:58.000000000 -0400
++++ tic98.gentoo/Makefile 2002-10-19 18:20:55.000000000 -0400
+@@ -1,4 +1,4 @@
+-BIN=/home/singlis/linux/bin
++BIN=/usr/bin
+ IMAGES=/home/ml/singlis
+ LIBTIC=
+ LIBS= -lm #-L/home/singlis/linux/lib -lccmalloc -ldl
+@@ -180,4 +180,4 @@
+ boundary.o getopt.o windowing.o
+ $(CC) -o $@ $^ $(LIBS)
+
+-
+\ No newline at end of file
++
+diff -Nru tic98/arithcode.c tic98.gentoo/arithcode.c
+--- tic98/arithcode.c 1999-06-21 21:48:40.000000000 -0400
++++ tic98.gentoo/arithcode.c 2002-10-19 18:19:20.000000000 -0400
+@@ -610,7 +610,7 @@
+ bits_to_go = 0;
+ }
+
+-#ifdef 0
++#ifdef none
+ void
+ arith_encode( unsigned int lbnd, unsigned int hbnd, unsigned int totl )
+ /* Arithmetically encode the range. */
+@@ -645,7 +645,7 @@
+ }
+
+
+-#ifdef 0
++#ifdef none
+ void arith_decode( unsigned int lbnd, unsigned int hbnd, unsigned int totl )
+ /* Arithmetically decode the range. */
+ {
+@@ -726,7 +726,7 @@
+
+
+
+-#ifdef 0
++#ifdef none
+
+ void
+ EncodeGammaSigned (int snum, int *pos, int *neg)
+diff -Nru tic98/b_gamma.c tic98.gentoo/b_gamma.c
+--- tic98/b_gamma.c 1999-06-21 21:48:41.000000000 -0400
++++ tic98.gentoo/b_gamma.c 2002-10-19 18:18:43.000000000 -0400
+@@ -187,7 +187,7 @@
+ }
+ }
+
+-#ifdef 0
++#ifdef none
+ void
+ b_gamma_encode_64(unsigned long num)
+ {
+diff -Nru tic98/docstrum.c tic98.gentoo/docstrum.c
+--- tic98/docstrum.c 1999-07-01 15:58:37.000000000 -0400
++++ tic98.gentoo/docstrum.c 2002-10-19 18:19:39.000000000 -0400
+@@ -672,7 +672,7 @@
+ calc_docstrum_spacing(list,neighs,0,&within,&between);
+
+ prune_neighbours_distance(neighs,len, 3*between);
+-#ifdef 0
++#ifdef none
+ prune_neighbours_angle_distance(neighs,len, 0,30, 6*within/*MIN(6*within,sqrt(2.0)*between)*/);
+ #endif
+
+diff -Nru tic98/ppmd_model.c tic98.gentoo/ppmd_model.c
+--- tic98/ppmd_model.c 1999-06-21 21:48:42.000000000 -0400
++++ tic98.gentoo/ppmd_model.c 2002-10-19 18:20:33.000000000 -0400
+@@ -496,7 +496,7 @@
+ arithmetic_encode( lbnd, hbnd, totl );
+ }
+
+-#ifdef 0
++#ifdef none
+ unsigned int
+ arith_decode_target (unsigned int totl)
+ /* Arithmetically decodes the target. */
+diff -Nru tic98.orig/page_features.c tic98/page_features.c
+--- tic98.orig/page_features.c 1999-06-22 03:48:42.000000000 +0200
++++ tic98/page_features.c 2005-08-02 19:47:09.485681960 +0200
+@@ -37,18 +37,17 @@
+ void
+ dump_header()
+ {
+- fprintf(stdout,"@arff 3
+-@relation features
+-@attribute 'Number' real
+-@attribute 'Area' real
+-@attribute 'Avg_area' real
+-@attribute 'Density' real
+-@attribute 'Aspect' real
+-@attribute 'Holes' real
+-@attribute 'Edges' real
+-@attribute 'class' string range ( {?} )
+-@data
+-");
++ fprintf(stdout,"@arff 3"
++"@relation features"
++"@attribute 'Number' real"
++"@attribute 'Area' real"
++"@attribute 'Avg_area' real"
++"@attribute 'Density' real"
++"@attribute 'Aspect' real"
++"@attribute 'Holes' real"
++"@attribute 'Edges' real"
++"@attribute 'class' string range ( {?} )"
++"@data");
+
+
+ }
+diff -ru tic98/main_tic.c tic98-new/main_tic.c
+--- tic98/main_tic.c Thu Jul 1 21:02:56 1999
++++ tic98-new/main_tic.c Fri Mar 16 11:43:56 2001
+@@ -11,6 +11,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <errno.h>
+
+ #include "arithcode.h"
+ #include "globals.h"
+@@ -96,8 +97,10 @@
+ marklistptr list=NULL,list2=NULL;
+ marktype copy;
+
+- if(marktype_readnamed(fn, image)!=0)
++ if(marktype_readnamed(fn, image)!=0) {
++ fprintf(stderr, "imagefn_to_list(): bad input file %s\n", fn);
+ return NULL;
++ }
+
+ *w=image->w;
+ *h=image->h;
+@@ -495,7 +498,10 @@
+
+ TimerStart(1);
+
+- freopen(outfilename[0],"wb",stdout);
++ if (! freopen(outfilename[0],"wb",stdout)) {
++ fprintf(stderr, "failed to open %s for writing: %s\n",
++ outfilename[0], strerror(errno));
++ }
+
+ tic98_init(&t);
+ tic98_start_encoding();
+@@ -503,8 +509,11 @@
+ for(i=0;i<num_in;i++){
+ int w,h,xx,yy,ok=0;
+ marktype image;
+- list=imagefn_to_list(&image,infilename[i], &w, &h);
+-
++ if (! (list=imagefn_to_list(&image,infilename[i], &w, &h))) {
++ fprintf(stderr, "cannot read file %s\n", infilename[i]);
++ exit(1);
++ }
++
+ tic98_num_encode(&t,NEW_PAGE);
+
+ for(xx=0;xx<image.w;xx++)
+@@ -560,7 +569,10 @@
+ newoutname=(char*)malloc(sizeof(char)*(strlen(outfilename[0])+10));
+ assert(newoutname);
+
+- freopen(infilename[0],"rb",stdin);
++ if (! freopen(infilename[0],"rb",stdin)) {
++ fprintf(stderr, "failed to open %s for reading: %s\n",
++ infilename[0], strerror(errno));
++ }
+
+ tic98_init(&t);
+ tic98_start_decoding();
+diff -ru tic98/marklist.c tic98-new/marklist.c
+--- tic98/marklist.c Thu Jul 1 21:56:19 1999
++++ tic98-new/marklist.c Fri Mar 16 11:44:20 2001
+@@ -94,11 +94,11 @@
+ magic = magic_popnamed (fn, &err) >> 16; /* only interested in first 2 bytes */
+
+ if (err != 0) {
+- return 1; /* failure */
+ fprintf (stderr, "error - can't open file '%s'\n", fn);
+- return 1;
++ return 1; /* failure */
+ }
+ if (!((magic == MAGIC_P1) || (magic == MAGIC_P4))) {
++ fprintf (stderr, "bad magic in file '%s'\n", fn);
+ return 1;
+ }
+ if (fn2) {
+diff -ru tic98/utils.c tic98-new/utils.c
+--- tic98/utils.c Tue Jun 22 02:48:43 1999
++++ tic98-new/utils.c Fri Mar 16 11:23:57 2001
+@@ -117,7 +117,7 @@
+ }
+ else{
+ *err=1;
+-/* error("magic_popnamed","can't open file",fn);*/
++ error("magic_popnamed","can't open file",fn);
+ return 0;
+ }
+ }
diff --git a/media-gfx/tic98/files/tic98-1.01-glibc-2.10.patch b/media-gfx/tic98/files/tic98-1.01-glibc-2.10.patch
new file mode 100644
index 000000000000..32caf5e43477
--- /dev/null
+++ b/media-gfx/tic98/files/tic98-1.01-glibc-2.10.patch
@@ -0,0 +1,20 @@
+--- tic98.orig/ppmd_enc.c 2009-07-05 14:15:53.000000000 +0200
++++ tic98/ppmd_enc.c 2009-07-05 14:18:47.000000000 +0200
+@@ -63,7 +63,7 @@
+ }
+
+ int
+-getline (FILE *fp, char *s, int max)
++tic98_getline (FILE *fp, char *s, int max)
+ /* Read line from FP into S; return its length (maximum length = MAX). */
+ {
+ int i;
+@@ -111,7 +111,7 @@
+ ppm_start_encoding (max_order, max_symbol);
+
+ /* Read in the integers */
+- while ((len = getline (fp, line, MAX_LINE)) != EOF)
++ while ((len = tic98_getline (fp, line, MAX_LINE)) != EOF)
+ {
+ count++;
+ if ((debugProgress) && ((count % debugProgress) == 0))
diff --git a/media-gfx/tic98/files/tic98-1.01-macos.patch b/media-gfx/tic98/files/tic98-1.01-macos.patch
new file mode 100644
index 000000000000..607e76f9416a
--- /dev/null
+++ b/media-gfx/tic98/files/tic98-1.01-macos.patch
@@ -0,0 +1,26 @@
+--- tic98/ppmd_hash.c.orig 2005-11-03 11:09:22.000000000 +0100
++++ tic98/ppmd_hash.c 2005-11-03 11:09:49.000000000 +0100
+@@ -2,7 +2,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <assert.h>
++#ifndef __APPLE__
+ #include <malloc.h>
++#endif
+ #include "ppmd_hash.h"
+
+ #define HASH_NULL 0
+--- tic98/ppmd_model.c.orig 2005-11-03 11:07:09.000000000 +0100
++++ tic98/ppmd_model.c 2005-11-03 11:09:04.000000000 +0100
+@@ -1,7 +1,11 @@
+ /* PPM* model for arithmetic encoder. */
+ #include <stdio.h>
+ #include <assert.h>
++#ifndef __APPLE__
+ #include <malloc.h>
++#else
++#include <stdlib.h>
++#endif
+ #include "arithcode.h"
+ #include "ppmd_hash.h"
+
diff --git a/media-gfx/tic98/metadata.xml b/media-gfx/tic98/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/tic98/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/tic98/tic98-1.01-r3.ebuild b/media-gfx/tic98/tic98-1.01-r3.ebuild
new file mode 100644
index 000000000000..51b0d9e9d30d
--- /dev/null
+++ b/media-gfx/tic98/tic98-1.01-r3.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="compressor for black-and-white images, in particular scanned documents"
+HOMEPAGE="http://membled.com/work/mirror/tic98/"
+SRC_URI="http://membled.com/work/mirror/tic98/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE=""
+
+RESTRICT="test"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-macos.patch
+ epatch "${FILESDIR}"/${P}-gentoo.diff
+ epatch "${FILESDIR}"/${P}-glibc-2.10.patch
+
+ # respect CFLAGS and LDFLAGS
+ sed -i -e "s:CFLAGS= -O -Wall -Wno-unused:CFLAGS=${CFLAGS}:" \
+ -e "s:LIBS= -lm #-L/home/singlis/linux/lib -lccmalloc -ldl:LIBS= -lm ${LDFLAGS}:" \
+ -e "s:CC= gcc -pipe :CC=$(tc-getCC):" \
+ -e "s:CPP= gcc -pipe:CPP=$(tc-getCPP):" \
+ Makefile || die
+}
+
+src_compile() {
+ emake all
+ emake all2
+}
+
+src_install() {
+ dodir /usr/bin
+ emake BIN="${ED}"usr/bin install
+
+ # collision with media-gfx/netpbm, see bug #207534
+ rm "${ED}"/usr/bin/pbmclean || die
+}
diff --git a/media-gfx/tif22pnm/Manifest b/media-gfx/tif22pnm/Manifest
new file mode 100644
index 000000000000..0077dad4ee3c
--- /dev/null
+++ b/media-gfx/tif22pnm/Manifest
@@ -0,0 +1 @@
+DIST tif22pnm-0.14.tar.gz 108047 RMD160 5f9600ce4e0eec9592717747a117219031a90508 SHA1 e6fd68a66866acb8d338b38e58b1f9a2a9fe0abb SHA256 d59ea3f1fdd6802e66a44fbfa8979d4e61c9fd021de36675249a877392378e01
diff --git a/media-gfx/tif22pnm/files/tif22pnm-0.14-gentoo.patch b/media-gfx/tif22pnm/files/tif22pnm-0.14-gentoo.patch
new file mode 100644
index 000000000000..f71c751bd1a5
--- /dev/null
+++ b/media-gfx/tif22pnm/files/tif22pnm-0.14-gentoo.patch
@@ -0,0 +1,44 @@
+--- configure.in
++++ configure.in
+@@ -21,7 +21,6 @@
+ dnl Checks for programs.
+ AC_PROG_CC
+ AC_LANG_C
+-CFLAGS=" "
+ dnl ^^^ set it to non-empty, so AC_PROG_CXX won't include `-g'
+ dnl AC_PROG_CXX
+ dnl AC_PTS_PROG_CFLAGS(fs, -fsigned-char)
+--- do.sh
++++ do.sh
+@@ -35,8 +35,8 @@
+ if [ x"$CMD" != x ]; then echo "Executing: $CMD"; fi
+
+ if [ "$CMD" = fast ]; then
+- L_CC="$CC -s -O3 -DNDEBUG"
+- L_LD="$LD -s"
++ L_CC="$CC -DNDEBUG"
++ L_LD="$LD"
+ elif [ "$CMD" = debug ]; then
+ L_CC="$CC $GFLAG"
+ L_LD="$LD"
+@@ -47,14 +47,14 @@
+ L_CC="checkergcc $GFLAG"
+ L_LD="checkergcc"
+ elif [ "$CMD" = small ]; then
+- L_CC="$CC -Os -DNDEBUG"
+- L_LD="$LD -s"
++ L_CC="$CC -DNDEBUG"
++ L_LD="$LD"
+ elif [ "$CMD" = final ]; then
+- L_CC="$CC -O2 -DNDEBUG"
+- L_LD="$LD -s"
++ L_CC="$CC -DNDEBUG"
++ L_LD="$LD"
+ elif [ "$CMD" = asserted ]; then
+- L_CC="$CC -O2"
+- L_LD="$LD -s"
++ L_CC="$CC"
++ L_LD="$LD"
+ elif [ "$CMD" = clean ]; then
+ rm -f *.o core DEADJOE tif22pnm png22pnm
+ exit
diff --git a/media-gfx/tif22pnm/metadata.xml b/media-gfx/tif22pnm/metadata.xml
new file mode 100644
index 000000000000..8c6fbf3b4e63
--- /dev/null
+++ b/media-gfx/tif22pnm/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>tex</herd>
+ <upstream>
+ <remote-id type="google-code">sam2p</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/tif22pnm/tif22pnm-0.14.ebuild b/media-gfx/tif22pnm/tif22pnm-0.14.ebuild
new file mode 100644
index 000000000000..d8b31e92699e
--- /dev/null
+++ b/media-gfx/tif22pnm/tif22pnm-0.14.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit autotools eutils
+
+DESCRIPTION="tif22pnm and png22pnm command-line converters"
+HOMEPAGE="http://pts.szit.bme.hu/ http://code.google.com/p/sam2p/"
+SRC_URI="http://sam2p.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=media-libs/libpng-1.2:0
+ media-libs/tiff:0"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+ eautoreconf
+}
+
+src_install() {
+ dobin png22pnm tif22pnm
+ dodoc README
+}
diff --git a/media-gfx/tintii/Manifest b/media-gfx/tintii/Manifest
new file mode 100644
index 000000000000..dd07a46e7108
--- /dev/null
+++ b/media-gfx/tintii/Manifest
@@ -0,0 +1,3 @@
+DIST tintii-2.8.0.tar.gz 411148 SHA256 898b202ae00a023fd6e50f0075d9861a00e2a37d4234dda91e625a4e90165aa1 SHA512 6510ebad55f0df8c352daa541a8af828fdd83c09134a106b07c4a21b75b63ad1d2d33cdf73855540214ba99c4c5e5ae20ed5f9fcace165b5bbc1fd9312c3f149 WHIRLPOOL 4f895b45740bd7fa450511c62ba6f24bfda695054f1d49d3f68468de3e241bfbb0ab1682be9e37edc0e4e15c34a3f77db9840958bb88e2aa73080c2b9262c53c
+DIST tintii-2.8.2.tar.gz 504650 SHA256 2018aea9337a1a631ab70d8f17feddad1d573825a852586faacc53f3732494f8 SHA512 c58b44f734a2b8bde6363d21dbff17593234fd90e72ec3f5e5526d06acb6a118210167e0519db93e00b4074d55831623c0fe16d6e17a9033d5f432f2a249ab7a WHIRLPOOL f4ba829706a6ee38cba480c8df862f96244c060d811e20b19d3e3c89297f267dd9bdd24826d47b347b13a6dfdb80ebfca830509f45090234901f4b212f0ff8d8
+DIST tintii-2.9.0.tar.gz 506063 SHA256 d95036d9ede5c2ff28cb4f2899f3bd1f3a09cebeff70d54f9d4f5ff209d15539 SHA512 ce31199038cb1b096ce1cebe88292749add4d2a40c74ea7182e6458ebbef9ce09bb7241609e59d9a1700ba677ae9c4f5f2013fa6299e9a7f75afd7c525d93df9 WHIRLPOOL aa4368ba15227a970a11b97be9615688d1c79b78b0d790164940f5844ba538368cb086ecdf50e2a2d69da2ba5266258a723d244d3590aaa5cfadd1088e7f48dc
diff --git a/media-gfx/tintii/metadata.xml b/media-gfx/tintii/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/tintii/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/tintii/tintii-2.8.0.ebuild b/media-gfx/tintii/tintii-2.8.0.ebuild
new file mode 100644
index 000000000000..ce239970142b
--- /dev/null
+++ b/media-gfx/tintii/tintii-2.8.0.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+WX_GTK_VER="2.8"
+
+inherit autotools wxwidgets
+
+DESCRIPTION="A photo editor for selective color, saturation, and hue shift adjustments"
+HOMEPAGE="http://www.indii.org/software/tintii"
+SRC_URI="http://www.indii.org/files/tint/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X]"
+DEPEND="${RDEPEND}
+ dev-libs/boost:="
+
+src_prepare() {
+ sed -i 's/^\(AM_CXXFLAGS = $(DEPS_CXXFLAGS)\).*/\1/' Makefile.am
+ eautoreconf
+}
diff --git a/media-gfx/tintii/tintii-2.8.2.ebuild b/media-gfx/tintii/tintii-2.8.2.ebuild
new file mode 100644
index 000000000000..0e6dd5ee7b17
--- /dev/null
+++ b/media-gfx/tintii/tintii-2.8.2.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+WX_GTK_VER="3.0"
+
+inherit autotools wxwidgets
+
+DESCRIPTION="A photo editor for selective color, saturation, and hue shift adjustments"
+HOMEPAGE="http://www.indii.org/software/tintii"
+SRC_URI="http://www.indii.org/files/tint/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X]"
+DEPEND="${RDEPEND}
+ dev-libs/boost"
+
+src_prepare() {
+ sed -i 's/^\(AM_CXXFLAGS = $(DEPS_CXXFLAGS)\).*/\1/' Makefile.am || die
+ eautoreconf
+}
diff --git a/media-gfx/tintii/tintii-2.9.0.ebuild b/media-gfx/tintii/tintii-2.9.0.ebuild
new file mode 100644
index 000000000000..0e6dd5ee7b17
--- /dev/null
+++ b/media-gfx/tintii/tintii-2.9.0.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+WX_GTK_VER="3.0"
+
+inherit autotools wxwidgets
+
+DESCRIPTION="A photo editor for selective color, saturation, and hue shift adjustments"
+HOMEPAGE="http://www.indii.org/software/tintii"
+SRC_URI="http://www.indii.org/files/tint/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="x11-libs/wxGTK:${WX_GTK_VER}[X]"
+DEPEND="${RDEPEND}
+ dev-libs/boost"
+
+src_prepare() {
+ sed -i 's/^\(AM_CXXFLAGS = $(DEPS_CXXFLAGS)\).*/\1/' Makefile.am || die
+ eautoreconf
+}
diff --git a/media-gfx/transfig/Manifest b/media-gfx/transfig/Manifest
new file mode 100644
index 000000000000..ba4354a31574
--- /dev/null
+++ b/media-gfx/transfig/Manifest
@@ -0,0 +1,3 @@
+DIST fig2mpdf-1.1.2.tar.bz2 191438 SHA256 35f02293592244d5ff4a7a60e00023696c05dec855495871226c67669ba4daf3 SHA512 36dea40008371386b47a4451e2f311cc2540ab063e3b61e628a535775d62a8840c5cc20c37b80465184bf041c6e583aaf3e5156079e72211d0a87ff3346d2980 WHIRLPOOL 73f98e0c8f26a0a9f5a06ba38169a107587dd09ecce69c69d251d46274697db7a1923479030693bf9079705820ce67b3df62d0de54492039acd0ac71f4f22fa7
+DIST transfig.3.2.5d.tar.gz 497451 SHA256 ae81214177fb05f91f6e43b0b42633b6e0024570cbc6591a3858e12100ce8aaa SHA512 6e9b9551bf3bff7a94d6a0d8bac336c36b2721f9babc4cf38472737ac737afd27f93dcb012e510d6c439c6aaeed95ba03b19508b4229386915c0dc0751daac10 WHIRLPOOL ca503a9ba228f54d20a6771dfca9dd0e6bb127618db8bc94bf1a62149e007627786fe2eee8f15a47723781d8381950cfac97264b5846550f7c669a8d8c82a1f2
+DIST transfig.3.2.5e.tar.gz 531256 SHA256 8ec5a8f13254dd155622ed3ee0fda1382b1e2b5882d83b9aca1871f12a3e7744 SHA512 ed1379f1112514d90a4b3eecd3222baad311d804b5090e8e66867ec299e4f9a5f8d83ef8939aa6ecaa85a18143b8fb9b97f78e078ac5eeb934a158c55de6bb1e WHIRLPOOL a781dd6fd85ff7ff12219444a8fbc91fc8c7f6fe1b4628cc1fd6bb3feae29392edc62a8f3a4db0945bdf2e67a67af7046864826024acdbaa8a8581a873cdb82f
diff --git a/media-gfx/transfig/files/transfig-3.2.5-solaris.patch b/media-gfx/transfig/files/transfig-3.2.5-solaris.patch
new file mode 100644
index 000000000000..680a0591f1cf
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-3.2.5-solaris.patch
@@ -0,0 +1,12 @@
+Fixes complation error on both Darwin and Solaris
+
+--- fig2dev/fig2dev.h
++++ fig2dev/fig2dev.h
+@@ -20,6 +20,7 @@
+ #include "patchlevel.h"
+ #include <math.h>
+ #include <sys/file.h>
++#include <sys/stat.h>
+ #include <signal.h>
+ #include <string.h>
+ #include <pwd.h>
diff --git a/media-gfx/transfig/files/transfig-3.2.5c-maxfontsize.patch b/media-gfx/transfig/files/transfig-3.2.5c-maxfontsize.patch
new file mode 100644
index 000000000000..9ce105fe9355
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-3.2.5c-maxfontsize.patch
@@ -0,0 +1,44 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 09_maxfontsize.dpatch by Roland Rosenfeld <roland@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: For fonts >=42pt use the given font size in TeX instead of
+## DP: restricting this to 42pt. This allows to create posters using
+## DP: \usepackage{type1cm}. See
+## DP: http://linuxgazette.vlsm.org/issue96/artime.html and Bug#343139
+
+@DPATCH@
+diff -urNad transfig~/LATEX.AND.XFIG transfig/LATEX.AND.XFIG
+--- transfig~/LATEX.AND.XFIG
++++ transfig/LATEX.AND.XFIG
+@@ -55,7 +55,7 @@
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LaTeX Preamble %%%%%%%%%%%%%%%%%%%%%%%%%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-\documentstyle[12pt,bezier,amstex]{article} % include bezier curves
++\documentclass[12pt,bezier,amstex]{article} % include bezier curves
+ \renewcommand\baselinestretch{1.0} % single space
+ \pagestyle{empty} % no headers and page numbers
+ \oddsidemargin -10 true pt % Left margin on odd-numbered pages.
+@@ -72,7 +72,9 @@
+ \usepackage{epsfig}
+
+ \usepackage{graphicx} % Graphics package
+-
++
++\usepackage{type1cm} % Necessary for fonts bigger than 42pt
++
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Document Beginning %%%%%%%%%%%%%%%%%%%%%
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+diff -urNad transfig~/fig2dev/dev/texfonts.h transfig/fig2dev/dev/texfonts.h
+--- transfig~/fig2dev/dev/texfonts.h
++++ transfig/fig2dev/dev/texfonts.h
+@@ -86,6 +86,7 @@
+
+ #define TEXFONTSIZE(S) (texfontsizes[((S) <= MAXFONTSIZE) ? (int)(round(S))\
+ : (MAXFONTSIZE-1)])
++#define TEXFONTSIZE(S) (((S) <= MAXFONTSIZE) ? texfontsizes[(int)(round(S))] : (S))
+ #define TEXFONTMAG(T) TEXFONTSIZE(T->size*(rigid_text(T) ? 1.0 : fontmag))
+
+ void setfigfont( F_text *text ); /* genepic.c */
diff --git a/media-gfx/transfig/files/transfig-3.2.5d-MAXWIDTH.patch b/media-gfx/transfig/files/transfig-3.2.5d-MAXWIDTH.patch
new file mode 100644
index 000000000000..3ac14818655a
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-3.2.5d-MAXWIDTH.patch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 23_MAXWIDTH.dpatch by Roland Rosenfeld <roland@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Increasese MAXWIDTH of embedded images from 8K to 16K (Closes: #610466)
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' transfig~/fig2dev/dev/psencode.c transfig/fig2dev/dev/psencode.c
+--- transfig~/fig2dev/dev/psencode.c
++++ transfig/fig2dev/dev/psencode.c
+@@ -18,7 +18,7 @@
+
+ #include "fig2dev.h"
+
+-#define MAXWIDTH 8192
++#define MAXWIDTH 16384
+
+ #define put_string nc=strlen(s); for(i=0;i<nc;i++) (putc((s[i]),tfp)); Nbyte += nc
+
diff --git a/media-gfx/transfig/files/transfig-3.2.5d-fig2mpdf-r1.patch b/media-gfx/transfig/files/transfig-3.2.5d-fig2mpdf-r1.patch
new file mode 100644
index 000000000000..879b4471254c
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-3.2.5d-fig2mpdf-r1.patch
@@ -0,0 +1,1425 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 14_fig2mpdf.dpatch by Michael Pfeiffer <p3fff@web.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+
+## DP: creating multilayered or singlelayer PDF or EPS figures for
+## DP: including into LaTeX documents.
+## DP: http://p3f.gmxhome.de/fig2mpdf/fig2mpdf.html
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' transfig~/doc/fig2dev.1 transfig/doc/fig2dev.1
+--- transfig~/doc/fig2dev.1
++++ transfig/doc/fig2dev.1
+@@ -53,8 +53,8 @@
+ \fBbox, cgm, epic, eepic, eepicemu, emf, eps, gbx (Gerber beta driver), gif, ibmgl, jpeg,
+ latex, map (HTML image map), mf (MetaFont),
+ mp (MetaPost), mmp (Multi-MetaPost),
+-pcx, pdf, pdftex, pdftex_t, pic, pictex, png, ppm, ps,
+-pstex, pstex_t, pstricks, ptk (Perl/tk),
++pcx, pdf, pdftex, pdftex_t, pdftex_p, pic, pictex, png, ppm, ps,
++pstex, pstex_t, pstex_p, pstricks, ptk (Perl/tk),
+ shape (LaTeX shaped paragraphs), sld (AutoCad slide format),
+ svg (beta driver), textyl,
+ tiff, tk (tcl/tk), tpic, xbm and
+@@ -1062,6 +1062,62 @@
+ font. Option 1 sets LaTeX font size only. Option 2 issues no font
+ commands at all.
+
++.SH PSTEX_P and PDFTEX_P OPTIONS
++The \fBpstex_p\fR language has the same intention as
++the combination of \fBpstex\fR and \fBpstex_t\fR.
++The only reason to use \fBpstex_p\fR is that you have partially overlayed texts.
++\fBpstex_p\fR splits the Fig file concerning the depths of existing texts. Because
++of it's necessary to get the resulting size of the figure for the pdf document
++you have to specify the target document format
++(i.e. using \fBpstex_p\fR rsp. \fBpdftex_p\fR).
++.br
++Two files results by using this language:
++.br
++.HP +.3i
++1) A bash script for creating and removing the necessary graphics files.
++Extension: \fB.create\fR
++.HP +.3i
++.HP +.3i
++2) The latex code which includes all graphics files and special texts. Content is
++put to stdout.
++
++.TP
++The \fBpstex_p\fR driver has the following special options:
++
++.TP
++.B \-p basename
++specifies the basename of the files to be created (see (1) above). This option
++is mandatory.
++.TP
++.B "\-d dmag"
++Set a separate magnification for the length of line dashes to
++.I dmag.
++.TP
++.B \-E num
++Set encoding for latex text translation (0 no translation, 1 ISO-8859-1, 2 ISO-8859-2)
++.TP
++.B "\-l lwidth"
++Sets the threshold between LaTeX thin and thick lines to
++.I lwidth
++pixels.
++LaTeX supports only two different line width: \\thinlines and \\thicklines.
++Lines of width greater than
++.I lwidth
++pixels are drawn as \\thicklines.
++Also affects the size of dots in dotted line style.
++The default is 1.
++.TP
++.B \-v
++Verbose mode.
++.TP
++.B \-F
++Don't set the font face, series, and style; only set it's size and the
++baselineskip. By default, fig2dev sets all 5 font parameters when it
++puts some text. The disadvantage is that you can't set the font from your
++LaTeX document. With this option on, you can set the font from your LaTeX
++document (like "\fB\\sfshape \\input picture.eepic\fR").
++
++
+ .SH TK and PTK OPTIONS (tcl/tk and Perl/tk)
+ .TP
+ .B \-l dummy_arg
+@@ -1107,6 +1163,13 @@
+ .PP
+ Rotated text is only supported in the IBM-GL (HP/GL) and PostScript (including eps)
+ languages.
++.PP
++In \fBpdftex_p\fR language \fIfig2dev\fR can not determine the exact sizes of
++the special texts set by pdflatex afterwards. If these texts are bigger than
++expected the calculated bounding box might be too small so that some texts passes
++over the figure boundaries. If this happen you have to put an invisible
++rectangle (line width 0) around the text or the entire figure.
++
+ .SH COPYRIGHT
+ Copyright (c) 1991 Micah Beck
+ .br
+@@ -1187,3 +1250,7 @@
+ The GBX (Gerber) driver was written by
+ .br
+ Edward Grace (ej.grace@imperial.ac.uk).
++.sp
++The PSTEX_P and PDFTEX_P drivers (overlayed LaTeX texts) was written by
++.br
++Michael Pfeiffer (p3f@gmx.de)
+diff -urNad '--exclude=CVS' '--exclude=.svn' transfig~/fig2dev/dev/genpstex.c transfig/fig2dev/dev/genpstex.c
+--- transfig~/fig2dev/dev/genpstex.c
++++ transfig/fig2dev/dev/genpstex.c
+@@ -70,7 +70,307 @@
+ genps_end ();
+
+ static char pstex_file[1000] = "";
++static int iObjectsRead = 0;
++static int iTextRead = 0;
++static int iObjectsFileNumber = 0;
++static int iStartDepth;
++static int iLastDepth;
++static FILE * ptCreateFile;
++static char szFileName[1000];
++static int iLength;
++static int iPdfOutputs = 0;
++
++#ifdef never
++static double unitlength;
++static double dash_mag = 1.0;
++
++static int (*translate_coordinates)() = NULL;
++static int (*translate_coordinates_d)() = NULL;
++#else
++extern double unitlength;
++extern double dash_mag;
++
++extern int (*translate_coordinates)();
++extern int (*translate_coordinates_d)();
++#endif
++
++#define TOP 840
++#define SWAP(x,y) {tmp=x; x=y; y=tmp;}
++#define TRANS(x,y) (*translate_coordinates)(&x,&y)
++#define TRANS2(x1,y1,x2,y2) (*translate_coordinates)(&x1,&y1); \
++ (*translate_coordinates)(&x2,&y2)
++#define TRANSD(x,y) (*translate_coordinates_d)(&x,&y)
++
++static void genpstex_p_finalize_objects(int depth);
++
++/*************************************************************************
++ *************************************************************************/
++static
++translate2(xp, yp)
++ int *xp, *yp;
++{
++ *xp = *xp + 1;
++ *yp = (double)(TOP - *yp -1);
++ }
++
++static
++translate1_d(xp, yp)
++ double *xp, *yp;
++{
++ *xp = *xp + 1.0;
++ *yp = *yp + 1.0;
++ }
++
++static
++translate2_d(xp, yp)
++ double *xp, *yp;
++{
++ *xp = *xp + 1.0;
++ *yp = (double)TOP - *yp -1.0;
++ }
++
++/*************************************************************************
++ *************************************************************************/
++void genpstex_p_option(opt, optarg)
++char opt, *optarg;
++{
++ if (opt == 'p')
++ {
++ strcpy(pstex_file, optarg);
++ }
++ else
++ genlatex_option(opt, optarg);
++}
++
++
++/*************************************************************************
++ *************************************************************************/
++void genpstex_p_start(objects)
++ F_compound *objects;
++{
++ int tmp;
++ struct stat tStat;
++ long lUnitLength;
++
++ if (*pstex_file == '\0')
++ {
++ put_msg("Argument -p is mandatory to pstex_p.");
++ exit(1);
++ }
++
++ strncpy(szFileName, pstex_file, 900);
++ iLength = strlen(szFileName);
++
++ sprintf(szFileName + iLength, ".create");
++ ptCreateFile = fopen (szFileName, "wb");
++
++ if ( ! ptCreateFile)
++ {
++ put_msg("Couldn't open %s for writing", szFileName);
++ exit(1);
++ }
++ fstat(fileno(ptCreateFile), & tStat);
++ fchmod (fileno(ptCreateFile), tStat.st_mode | ((tStat.st_mode & (S_IRUSR | S_IRGRP | S_IROTH)) >> 2));
++ fprintf(ptCreateFile, "#!/bin/bash\n\n", szFileName);
++
++ fprintf(ptCreateFile, "while getopts \"r\" Option\n");
++ fprintf(ptCreateFile, "do\n");
++ fprintf(ptCreateFile, " case $Option in\n");
++ fprintf(ptCreateFile, " r) iOptRemove=1;;\n");
++ fprintf(ptCreateFile, " *) echo \"illegal option -$Option\"\n");
++ fprintf(ptCreateFile, " esac\n");
++ fprintf(ptCreateFile, "done\n");
++ fprintf(ptCreateFile, "shift $(($OPTIND - 1))\n");
++
++ texfontsizes[0] = texfontsizes[1] =
++ TEXFONTSIZE(font_size != 0.0? font_size : DEFAULT_FONT_SIZE);
++
++ unitlength = mag/ppi;
++ dash_mag /= unitlength*80.0;
++
++ translate_coordinates = translate2;
++ translate_coordinates_d = translate2_d;
++
++ TRANS2(llx, lly, urx, ury);
++ if (llx > urx) SWAP(llx, urx)
++ if (lly > ury) SWAP(lly, ury)
++
++ /* LaTeX start */
++
++ /* print any whole-figure comments prefixed with "%" */
++ if (objects->comments) {
++ fprintf(tfp,"%%\n");
++ print_comments("% ",objects->comments, "");
++ fprintf(tfp,"%%\n");
++ }
++
++ lUnitLength = (long) (round(4736286.72*unitlength));
++ fprintf(tfp, "\\setlength{\\unitlength}{%lisp}%%\n",
++ lUnitLength);
++ /* define the SetFigFont macro */
++ define_setfigfont(tfp);
++
++ sprintf(szFileName + iLength, ".size");
++ fprintf(ptCreateFile, "if [ \"$iOptRemove\" == \"\" ]; then\n");
++ if (iPdfOutputs)
++ fprintf(ptCreateFile, " echo \"\\setlength\\pdfpagewidth{%3.2fpt}\\setlength\\pdfpageheight{%3.2fpt}\" > %s\n",
++ (float) lUnitLength / 65536 * (urx - llx), (float) lUnitLength / 65536 * (ury - lly), szFileName);
++ else
++ fprintf(ptCreateFile, "echo -n\"\" > %s\n", szFileName);
++ fprintf(ptCreateFile, "else\n rm -f %s\nfi\n", szFileName);
++}
++
++/*************************************************************************
++ *************************************************************************/
++void genpdftex_p_start(objects)
++ F_compound *objects;
++{
++ iPdfOutputs = 1;
++ genpstex_p_start(objects);
++}
++
++
++/*************************************************************************
++ *************************************************************************/
++int genpstex_p_end()
++{
++ if (iTextRead)
++ {
++ fprintf(tfp, "\\end{picture}%%\n");
++ iTextRead = 0;
++ }
++ if (iObjectsRead)
++ {
++ genpstex_p_finalize_objects(iLastDepth);
++ iObjectsRead = 0;
++ }
++
++ /* LaTeX ending */
++ fprintf(tfp, "\\begin{picture}(%d,%d)\n", urx-llx, ury-lly);
++ fprintf(tfp, "\\end{picture}%%\n");
++
++ fclose(ptCreateFile);
++
++ /* all ok */
++ return 0;
++}
++
++
++/*************************************************************************
++ *************************************************************************/
++void genpstex_p_finalize_objects(depth)
++int depth;
++{
++ char szFileName[1000];
++ int iLength;
++
++ strncpy(szFileName, pstex_file, 900);
++ iLength = strlen(szFileName);
++
++
++ sprintf(szFileName + iLength, "%03d", iObjectsFileNumber++);
++ fprintf(ptCreateFile, "if [ \"$iOptRemove\" == \"\" ]; then\n");
++ if (iPdfOutputs)
++ {
++ fprintf(ptCreateFile, " %s -L pstex -D +%d,%d %s", prog, depth, iStartDepth, from, szFileName);
++ fprintf(ptCreateFile, " | epstopdf -f > %s.pdf\n", szFileName, szFileName);
++ }
++ else
++ fprintf(ptCreateFile, "%s -L pstex -D +%d,%d %s %s.eps\n", prog, depth, iStartDepth, from, szFileName);
++ fprintf(ptCreateFile, "else\n rm -f %s.", szFileName);
++ if (iPdfOutputs)
++ fprintf(ptCreateFile, "pdf");
++ else
++ fprintf(ptCreateFile, "eps");
++ fprintf(ptCreateFile, "\nfi\n");
++
++ fprintf(tfp, "\\begin{picture}(0,0)%%\n");
++/* newer includegraphics directive suggested by Stephen Harker 1/13/99 */
++#if defined(LATEX2E_GRAPHICS)
++# if defined(EPSFIG)
++ fprintf(tfp, "\\epsfig{file=%s.eps}%%\n",szFileName);
++# else
++ fprintf(tfp, "\\includegraphics{%s}%%\n",szFileName);
++# endif
++#else
++ fprintf(tfp, "\\special{psfile=%s.eps}%%\n",szFileName);
++#endif
++ fprintf(tfp, "\\end{picture}%%\n");
++}
++
++/*************************************************************************
++ *************************************************************************/
++void genpstex_p_object(depth)
++int depth;
++{
++ if (iTextRead)
++ {
++ fprintf(tfp, "\\end{picture}%%\n");
++ iTextRead = 0;
++ }
++ if (iObjectsRead == 0)
++ {
++ iStartDepth = depth;
++ iObjectsRead = 1;
++ }
++ iLastDepth = depth;
++
++}
+
++void genpstex_p_arc(obj)
++F_arc *obj;
++{
++ genpstex_p_object(obj->depth);
++}
++
++
++void genpstex_p_ellipse(obj)
++F_ellipse *obj;
++{
++ genpstex_p_object(obj->depth);
++}
++
++void genpstex_p_line(obj)
++F_line *obj;
++{
++ genpstex_p_object(obj->depth);
++}
++
++void genpstex_p_spline(obj)
++F_spline *obj;
++{
++ genpstex_p_object(obj->depth);
++}
++
++
++
++/*************************************************************************
++ *************************************************************************/
++void genpstex_p_text(t)
++F_text *t;
++{
++
++ if (!special_text(t))
++ genpstex_p_object(t->depth);
++ else
++ {
++ if (iObjectsRead)
++ {
++ genpstex_p_finalize_objects(iLastDepth);
++ iObjectsRead = 0;
++ }
++ if (iTextRead == 0)
++ {
++ fprintf(tfp, "\\begin{picture}(0,0)(%d,%d)\n", llx, lly);
++ iTextRead = 1;
++ }
++ genlatex_text(t);
++ }
++
++}
++
++/*************************************************************************
++ *************************************************************************/
+ void genpstex_t_option(opt, optarg)
+ char opt, *optarg;
+ {
+@@ -112,6 +412,8 @@
+ else genlatex_text(t);
+ }
+
++/*************************************************************************
++ *************************************************************************/
+ void genpstex_text(t)
+ F_text *t;
+ {
+@@ -128,6 +430,32 @@
+ genlatex_option(opt, optarg);
+ }
+
++struct driver dev_pstex_p = {
++ genpstex_p_option,
++ genpstex_p_start,
++ gendev_null,
++ genpstex_p_arc,
++ genpstex_p_ellipse,
++ genpstex_p_line,
++ genpstex_p_spline,
++ genpstex_p_text,
++ genpstex_p_end,
++ INCLUDE_TEXT
++};
++
++struct driver dev_pdftex_p = {
++ genpstex_p_option,
++ genpdftex_p_start,
++ gendev_null,
++ genpstex_p_arc,
++ genpstex_p_ellipse,
++ genpstex_p_line,
++ genpstex_p_spline,
++ genpstex_p_text,
++ genpstex_p_end,
++ INCLUDE_TEXT
++};
++
+ struct driver dev_pstex_t = {
+ genpstex_t_option,
+ genpstex_t_start,
+diff -urNad '--exclude=CVS' '--exclude=.svn' transfig~/fig2dev/drivers.h transfig/fig2dev/drivers.h
+--- transfig~/fig2dev/drivers.h
++++ transfig/fig2dev/drivers.h
+@@ -30,8 +30,10 @@
+ extern struct driver dev_pdf;
+ extern struct driver dev_pdftex;
+ extern struct driver dev_pdftex_t;
++extern struct driver dev_pdftex_p;
+ extern struct driver dev_pstex;
+ extern struct driver dev_pstex_t;
++extern struct driver dev_pstex_p;
+ extern struct driver dev_pstricks;
+ extern struct driver dev_textyl;
+ extern struct driver dev_tk;
+@@ -75,6 +77,7 @@
+ {"pdf", &dev_pdf},
+ {"pdftex", &dev_pdftex},
+ {"pdftex_t", &dev_pdftex_t},
++ {"pdftex_p", &dev_pdftex_p},
+ {"pic", &dev_pic},
+ {"pictex", &dev_pictex},
+ {"png", &dev_bitmaps},
+@@ -82,6 +85,7 @@
+ {"ps", &dev_ps},
+ {"pstex", &dev_pstex},
+ {"pstex_t", &dev_pstex_t},
++ {"pstex_p", &dev_pstex_p},
+ {"pstricks", &dev_pstricks},
+ {"ptk", &dev_ptk},
+ {"shape", &dev_shape},
+diff -urNad '--exclude=CVS' '--exclude=.svn' transfig~/fig2dev/fig2dev.c transfig/fig2dev/fig2dev.c
+--- transfig~/fig2dev/fig2dev.c
++++ transfig/fig2dev/fig2dev.c
+@@ -651,6 +651,18 @@
+ #endif /* NFSS */
+ printf(" -p name name of the PostScript file to be overlaid\n");
+
++ printf("PSTEX_P and PDFTEX_P Options:\n");
++ printf(" -p name basename of the files to be created\n");
++#ifdef NFSS
++ printf(" -F don't set font family/series/shape, so you can\n");
++ printf(" set it from latex\n");
++#endif /* NFSS */
++ printf(" -d dmag set separate magnification for length of line dashes to dmag\n");
++ printf(" -E num set encoding for text translation (0 no translation,\n");
++ printf(" 1 ISO-8859-1, 2 ISO-8859-2)\n");
++ printf(" -l lwidth set threshold between thin and thick lines to lwidth\n");
++ printf(" -v verbose mode\n");
++
+ printf("SHAPE (ShapePar driver) Options:\n");
+ printf(" -n name Set basename of the macro (e.g. \"face\" gives faceshape and facepar)\n");
+ printf("Tcl/Tk (tk) and Perl/Tk (ptk) Options:\n");
+@@ -778,6 +790,12 @@
+ int rec_comp(r1, r2)
+ struct obj_rec *r1, *r2;
+ {
++ if (r2->depth == r1->depth)
++ {
++ if ((r1->gendev == dev->text) ^ (r2->gendev == dev->text))
++ return ((r1->gendev == dev->text) * 2 - 1);
++ return (0);
++ }
+ return (r2->depth - r1->depth);
+ }
+
+diff -urNad '--exclude=CVS' '--exclude=.svn' transfig~/fig2mpdf/copyright.txt transfig/fig2mpdf/copyright.txt
+--- transfig~/fig2mpdf/copyright.txt
++++ transfig/fig2mpdf/copyright.txt
+@@ -0,0 +1,25 @@
++The following files contain copyright and license info for
++the code they contain:
++fig2mpdf, fig2mpdf.1, transfig.3.2.4.patch, transfig-3.2.5-alpha7.patch
++
++-- fig2mpdf copyright begins here --
++
++ fig2mpdf/pdftex_p and pstex_p driver of fig2dev
++ Copyright (C) 2006 Michael Pfeiffer -- p3fff@web.de
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; either version 2 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++
++ (Author's note: the license is in the file gpl.txt, which is included
++ in the archive.)
+diff -urNad '--exclude=CVS' '--exclude=.svn' transfig~/fig2mpdf/fig2mpdf transfig/fig2mpdf/fig2mpdf
+--- transfig~/fig2mpdf/fig2mpdf
++++ transfig/fig2mpdf/fig2mpdf
+@@ -0,0 +1,653 @@
++#!/bin/sh
++
++unset POSIXLY_CORRECT
++
++gawk '
++#########################################################################
++#########################################################################
++BEGIN {
++
++ cmdGawk = "gawk";
++ cmdCat = "cat";
++ cmdLess = "less";
++ cmdRm = "rm"
++ cmdMv = "mv"
++ cmdLatex = "latex";
++ cmdPdftex = "pdflatex";
++ cmdEpsToPdf = "epstopdf";
++ cmdDvips = "dvips";
++ cmdFig2dev = "fig2dev";
++ cmdTouch = "touch";
++
++ szVersion = "1.1.2";
++ iError = 0;
++ iGapWidth = 1;
++
++
++ # get the options
++ szOptString = "&l%e&m$p%i%I$s$H$g%G%v%V%d";
++ getopt(szOptString);
++
++ if (aOptions["d"])
++ {
++ aOptions["v"] = "-";
++ for (iI = 0; iI < ARGC; iI++)
++ printf("ARGV[%d]=%s\n", iI, ARGV[iI]);
++
++ iDim = split(szOptString, aOpts, "[$%&]");
++ for (iI = 2; iI <= iDim; iI++)
++ debug("aOptions[%s] = >%s<\n", aOpts[iI], aOptions[aOpts[iI]]);
++ }
++
++
++
++ if (aOptions["V"] != "")
++ {
++ printf("fig2mpdf: version %s\n", szVersion);
++ iError = 1;
++ exit(0);
++ }
++
++ szTmpPrefix = "_fig2mpdf"
++
++ iLine = -1;
++ iInString = 0;
++ iDepths = 1;
++
++ iInvalidDepth = -2
++ iAdminDepth = 2000
++
++ szBase = ARGV[1];
++ szOrigFile = ARGV[1];
++ szOrigPath = ARGV[1];
++
++ # set default switch state
++ iDoMultiLayer = 0;
++ iDoLatex = 0;
++ iDoPdftex = 1;
++ iIncludeLowestRange = 1;
++
++ # set iDoLatex and iDoMultiLayer concerning the given suffix
++ match(szBase, /\.[^\.\/]+$/);
++ if (RLENGTH != -1)
++ {
++ szSuffix = substr(szBase, RSTART);
++ if (szSuffix == ".lfig")
++ iDoLatex = 1;
++ else if (szSuffix == ".mfig")
++ iDoMultiLayer = 1;
++ else if ((szSuffix == ".mlfig") || (szSuffix == ".lmfig"))
++ {
++ iDoLatex = 1;
++ iDoMultiLayer = 1;
++ }
++ }
++
++ ################################
++ # evalutate options
++
++ # set toggle latex
++ if (aOptions["l"] == "-")
++ iDoLatex = 1;
++ if (aOptions["l"] == "+")
++ iDoLatex = 0;
++
++ # set multilayer flag
++ if (aOptions["m"] == "-")
++ iDoMultiLayer = 1;
++ if (aOptions["m"] == "+")
++ iDoMultiLayer = 0;
++
++ # set toggle pdftex
++ if (aOptions["e"] == "-")
++ iDoPdftex = 0;
++
++ # evaluate do not include lowest layer in all figs
++ iIncludeLowestRange = (aOptions["i"] == "-");
++
++ # evaluate include all lower ranges in the sub figs
++ iIncludeAllLowerRanges = (aOptions["I"] != "-");
++
++ # check consistencies
++ # if there are ranges given -> do multilayer
++ if (aOptions["p"] != "")
++ iDoMultiLayer = 1;
++
++
++ if (aOptions["g"] != "")
++ {
++ if ( ! match (aOptions["g"], /^[0-9]+$/))
++ usage();
++
++ iGapWidth = aOptions["g"] + 1;
++ }
++
++ # get the basename of the source
++ gsub(/\.[^\/]+$/, "", szBase);
++ gsub(/^.*\//, "", szBase);
++
++ # get the path to the original
++ gsub(/[^\/]+$/, "", szOrigPath);
++}
++#########################################################################
++#########################################################################
++
++( iInString != 0) {
++ aszLine[iLine] = sprintf("%s\n%s", aszLine[iLine], $0);
++ iInString = (match($0, "\\\\001$") == 0);
++ iSubLine++;
++ next;
++}
++
++/^[135][ ]/ {
++ iCmd = $1;
++ iSubCmd = -1;
++ iSubLine = 0;
++ aiDepth[++iLine] = fnGetDepth($1);
++ aszLine[iLine] = $0;
++ next;
++}
++
++/^[2][ ]/ {
++ iCmd = $1;
++ iSubCmd = $2;
++ iSubLine = 0;
++ aiDepth[++iLine] = fnGetDepth($1);
++ aszLine[iLine] = $0;
++ next;
++}
++
++
++/^[4][ ]/ {
++ iCmd = $1;
++ iSubCmd = $2;
++ iSubLine = 0;
++ aiDepth[++iLine] = fnGetDepth($1);
++ aszLine[iLine] = $0;
++ iInString = (match($0, "\\\\001$") == 0);
++ next;
++}
++
++/^(6[ ])|(-6)/ {
++ iCmd = $1;
++ iSubCmd = -1;
++ iSubLine = 0;
++ next;
++}
++
++/^[^ ]/ {
++ iCmd = -1;
++ aiDepth[++iLine] = fnGetDepth("A");
++ iSubLine = 0;
++ aszLine[iLine] = $0;
++ next;
++}
++
++/^[ ]/ {
++ iSubLine++;
++ if ((iCmd == 2) && (iSubCmd == 5) && (iSubLine == 1))
++ {
++ if (match($0, "^\t[01] "))
++ {
++ szFileName = substr($0, RSTART + RLENGTH);
++ if ( ! match(szFileName, /^\//))
++ szFileName = sprintf("%s%s", szOrigPath, szFileName);
++ aszLine[iLine] = sprintf("%s\n\t%s %s", aszLine[iLine], $1, szFileName);
++ }
++ else
++ aszLine[iLine] = sprintf("%s\n%s", aszLine[iLine], $0);
++ }
++ else
++ aszLine[iLine] = sprintf("%s\n%s", aszLine[iLine], $0);
++}
++
++
++END {
++ iLine++;
++ iLowestLayer = 0;
++ iFirstRange = 0;
++
++ if (iError == 0)
++ {
++
++
++ if (iDoMultiLayer)
++ {
++ asort(aiDepths, aiSortedDepth);
++
++ # check for ranges as options
++ if (aOptions["p"] != "")
++ {
++ # we have explicit ranges
++ gsub(/-/, ":", aOptions["p"]);
++ iRanges = split(aOptions["p"], aszRanges, ",");
++ }
++ else
++ {
++ if (iDepths < 4)
++ {
++ iRanges = 1;
++ aszRanges[1] = "1:999";
++ }
++ else
++ {
++ iRanges = 0;
++ iLastRange = aiSortedDepth[iDepths - 2] + 0;
++ iRangeStart = iLastRange;
++ for (iI = iDepths - 3; iI > 0; iI--)
++ {
++ aiSortedDepth[iI] += 0;
++ if ((aiSortedDepth[iI] < iLastRange - iGapWidth) || (iI == 1))
++ {
++ if (aiSortedDepth[iI] >= iLastRange - iGapWidth)
++ iLastRange = aiSortedDepth[iI];
++
++ if (iLastRange != iRangeStart)
++ aszRanges[++iRanges] = sprintf("%d:%d", iLastRange, iRangeStart);
++ else
++ aszRanges[++iRanges] = sprintf("%d", iRangeStart);
++ iRangeStart = aiSortedDepth[iI];
++
++ if ((iI == 1) && (aiSortedDepth[iI] < iLastRange - iGapWidth))
++ aszRanges[++iRanges] = sprintf("%d", aiSortedDepth[iI]);
++ }
++ iLastRange = aiSortedDepth[iI];
++ }
++ }
++ }
++
++
++ # check for a multilayer file with only one range
++ if ((iRanges == 1) && iIncludeLowestRange)
++ {
++ iIncludeLowestRange = 0;
++ }
++
++ szInitRangeList = " -D ";
++ szSep = "";
++
++ if (iIncludeLowestRange)
++ {
++ szInitRangeList = sprintf("%s+%s", szInitRangeList, aszRanges[1]);
++ szSep = ",";
++ }
++ szRangeList = szInitRangeList;
++
++ # step through the ranges
++ for (iI = iIncludeLowestRange; iI < iRanges; iI++)
++ {
++ szFileBase = sprintf("%s-%d", szBase, iI - iIncludeLowestRange);
++
++ if (aOptions["I"])
++ {
++ szRangeList = sprintf("%s%s+%s", szRangeList, szSep, aszRanges[iI + 1]);
++ szSep = ",";
++ }
++ else
++ szRangeList = sprintf("%s%s+%s", szInitRangeList, szSep, aszRanges[iI + 1]);
++
++
++ if (iDoLatex)
++ szTargetFile = fnDoTexFig(szFileBase, szOrigFile, szRangeList, (iDoPdftex != 0));
++ else
++ szTargetFile = fnDoNormalFig(szFileBase, szOrigFile, szRangeList, (iDoPdftex != 0));
++
++
++ if (aOptions["G"])
++ {
++ match(szTargetFile, /\.[^.]*$/);
++ szCommand = sprintf("%s %s %s.page%d%s", cmdMv, szTargetFile, szBase, iI - iIncludeLowestRange, substr(szTargetFile, RSTART, RLENGTH));
++ debug("%s\n", szCommand);
++ system(szCommand);
++ }
++ }
++ }
++ else
++ {
++ szRangeList = "";
++
++ if (iDoLatex)
++ szTargetFile = fnDoTexFig(szBase, szOrigFile, szRangeList, (iDoPdftex != 0));
++ else
++ szTargetFile = fnDoNormalFig(szBase, szOrigFile, szRangeList, (iDoPdftex != 0));
++ }
++ }
++}
++
++
++
++#########################################################################
++#########################################################################
++function debug(str, arg0, arg1, arg2, arg3, arg4)
++{
++ if (aOptions["v"])
++ printf (str, arg0, arg1, arg2, arg3, arg4);
++}
++
++#########################################################################
++#########################################################################
++function fnGetDepth (iControl)
++{
++
++ if (iControl == 1)
++ {
++ iReturn = sprintf("%04d", $7);
++ }
++ else if (iControl == 2)
++ {
++ iReturn = sprintf("%04d", $7);
++ }
++ else if (iControl == 3)
++ {
++ iReturn = sprintf("%04d", $7);
++ }
++ else if (iControl == 4)
++ {
++ iReturn = sprintf("%04d", $4);
++ }
++ else if (iControl == 5)
++ {
++ iReturn = sprintf("%04d", $7);
++ }
++ else if ((iControl == 6) || (iControl == -6))
++ {
++ iReturn = sprintf("%04d", iInvalidDepth);
++ }
++ else
++ {
++ iReturn = sprintf("%04d", iAdminDepth);
++ }
++
++ if (iReturn >= 0)
++ {
++ if (ahDepths[iReturn] == 0)
++ {
++ ahDepths[iReturn] = 1;
++ aiDepths[iDepths++] = iReturn;
++ }
++ }
++
++ return (iReturn);
++
++}
++
++#########################################################################
++#########################################################################
++function fnDoNormalFig(szFileNameBase, szFigFile, szRangeList, iPdf,
++ szEpsFile, szPdfFile, szTargetFile, szCommand)
++{
++
++ debug("FileNameBase >%s< FigFile >%s< Pdf:%d\n", szFileNameBase, szFigFile, iPdf);
++
++ if (iPdf)
++ szEpsFile = sprintf("%s%s.eps", szTmpPrefix, szFileNameBase);
++ else
++ {
++ szEpsFile = sprintf("%s.eps", szFileNameBase);
++ szTargetFile = szEpsFile;
++ }
++
++ szCommand = sprintf("%s -L eps %s %s %s 2> /dev/null", cmdFig2dev, szRangeList, szFigFile, szEpsFile);
++ debug("%s\n", szCommand);
++ system(szCommand);
++
++ if (iPdf)
++ {
++ szPdfFile = sprintf("%s.pdf", szFileNameBase);
++ szTargetFile = szPdfFile;
++ szCommand = sprintf("%s --outfile=%s %s", cmdEpsToPdf, szPdfFile, szEpsFile);
++ debug("%s\n", szCommand);
++ system(szCommand);
++
++
++ if ( ! aOptions["d"])
++ {
++ szCommand = sprintf("%s -f %s", cmdRm, szEpsFile);
++ debug("%s\n", szCommand);
++ system(szCommand);
++ }
++ }
++
++
++ return (szTargetFile);
++}
++
++
++#########################################################################
++#########################################################################
++function fnDoTexFig(szFileNameBase, szFigFile, szRangeList, iPdf,
++ szEpsFile, szPdfFile, szTexDoc, szTexPdf, szTexLog, szTexAux, szTexInp, szTmpPs, szTmpPdf, szTexSiz, szTmpEps, szCommand, szHeader)
++{
++
++ debug("FileNameBase >%s< FigFile >%s< Pdf:%d\n", szFileNameBase, szFigFile, iPdf);
++
++ szEpsFile = sprintf("%s.eps", szFileNameBase);
++ szPdfFile = sprintf("%s.pdf", szFileNameBase);
++ szTexDoc = sprintf("%s%s_doc.tex", szTmpPrefix, szFileNameBase);
++ szTexPdf = sprintf("%s%s_doc.pdf", szTmpPrefix, szFileNameBase);
++ szTexDvi = sprintf("%s%s_doc.dvi", szTmpPrefix, szFileNameBase);
++ szTexLog = sprintf("%s%s_doc.log", szTmpPrefix, szFileNameBase);
++ szTexAux = sprintf("%s%s_doc.aux", szTmpPrefix, szFileNameBase);
++ szTexInpPref = sprintf("%s%s_inp", szTmpPrefix, szFileNameBase);
++ szTexInp = sprintf("%s.tex", szTexInpPref);
++ szTexCreator = sprintf("%s.create", szTexInpPref);
++ szTexSiz = sprintf("%s.size", szTexInpPref);
++
++ if (iPdf)
++ szCommand = sprintf("%s -L pdftex_p %s -p %s %s %s", cmdFig2dev, szRangeList, szTexInpPref, szFigFile, szTexInp);
++ else
++ szCommand = sprintf("%s -L pstex_p %s -p %s %s %s", cmdFig2dev, szRangeList, szTexInpPref, szFigFile, szTexInp);
++ debug("%s\n", szCommand);
++ system(szCommand);
++
++ szCommand = sprintf("./%s", szTexCreator);
++ debug("%s\n", szCommand);
++ system(szCommand);
++
++ # check if there is an own hederfile to include
++ if (aOptions["s"] == "")
++ aOptions["s"] = "times";
++
++ if (aOptions["H"] == "")
++ {
++ szHeader = sprintf("\\documentclass{article}\n\
++\\usepackage{german,amssymb,amsmath}\n\
++\\usepackage{%s}", aOptions["s"]);
++ }
++ else
++ szHeader = sprintf("\\input{%s}\n", aOptions["H"]);
++
++ szHeader = sprintf("%s\n\
++\\usepackage{color}\n\
++\\usepackage{ifpdf}\n\
++\\setlength{\\textwidth}{100cm}\n\
++\\setlength{\\textheight}{100cm}\n\
++\\setlength{\\topmargin}{-1in}\n\
++\\setlength{\\headsep}{0pt}\n\
++\\setlength{\\headheight}{0pt}\n\
++\\setlength{\\oddsidemargin}{-1in}\n\
++\\parindent=0cm\n\
++\\ifpdf\n\
++\\usepackage[pdftex]{graphicx}\n\
++\\DeclareGraphicsExtensions{.pdf,.png,.jpg}\n\
++\\usepackage{epsfig}\n\
++\\input{%s}\n\
++\\else\n\
++\\usepackage{graphicx}\n\
++\\usepackage{epsfig}\n\
++\\fi\n\
++", szHeader, szTexSiz);
++
++ szCommand = sprintf("%s > %s << EOF\n\
++%s\\begin{document}\n\
++\\pagestyle{empty}\n\
++\\input{%s}\n\
++\\end{document}\n\
++EOF", cmdCat, szTexDoc, szHeader, szTexInp);
++ if (aOptions["d"] != "")
++ debug("%s\n", szCommand);
++ system(szCommand);
++
++ if (iPdf)
++ {
++
++ szCommand = sprintf("%s -interaction batchmode %s", cmdPdftex, szTexDoc);
++ debug("%s\n", szCommand);
++ iReturn = system(szCommand);
++
++ if (iReturn)
++ {
++ szCommand = sprintf("%s %s | %s +G", cmdCat, szTexLog, cmdLess);
++ system (szCommand);
++ }
++ else
++ {
++ szCommand = sprintf("%s %s %s", cmdMv, szTexPdf, szPdfFile);
++ debug("%s\n", szCommand);
++ system(szCommand);
++ }
++
++ }
++ else
++ {
++ szCommand = sprintf("%s -interaction batchmode %s", cmdLatex, szTexDoc);
++ debug("%s\n", szCommand);
++ iReturn = system(szCommand);
++ if (iReturn)
++ {
++ szCommand = sprintf("%s %s | %s +G", cmdCat, szTexLog, cmdLess);
++ system (szCommand);
++ }
++ else
++ {
++ szCommand = sprintf("%s -q -E %s -o %s 2>&1 > /dev/null", cmdDvips, szTexDvi, szEpsFile);
++ debug("%s\n", szCommand);
++ system(szCommand);
++ }
++ }
++
++ if ( ! aOptions["d"])
++ {
++ szCommand = sprintf("./%s -r", szTexCreator);
++ debug("%s\n", szCommand);
++ system(szCommand);
++ }
++
++ if ( ! aOptions["d"])
++ {
++ szCommand = sprintf("%s -f %s %s %s %s %s %s %s", cmdRm, szTexDoc, szTexLog, szTexAux, szTexDvi, szTexInp, szTexCreator, szTexPdf);
++ debug("%s\n", szCommand);
++ system(szCommand);
++ }
++
++ if (iPdf)
++ return (szPdfFile);
++ else
++ return (szEpsFile);
++}
++
++
++#########################################################################
++#########################################################################
++function getopt(sOptions, n, m, fHuntParam, iSearchMinus, iSPos, iCLen, iHuntSwitches, szSwChar, szOptChar) {
++# Options: Flagoptions: %f
++# Parameter: $p
++
++ n = 1; # index in argv
++ m = 1; # processed entries in argv finally it points to the firs$
++ iSearchMinus = 1; # indicate that a switch leading sign minus is expected
++
++ # check for initial -- to separate the gawk switches from the script switches
++ if (ARGV[n] == "--")
++ n++;
++
++
++ while (n < ARGC)
++ {
++ iHuntSwitches = 0;
++ iCLen = length(ARGV[n]);
++
++ szSwChar = substr(ARGV[n], 1, 1);
++ if ((szSwChar == "-") || (szSwChar == "+"))
++ {
++ if ((iSearchMinus == 0) || fHuntParam)
++ usage();
++ iHuntSwitches = 1;
++ iSPos = 2;
++ fHuntParam = 0;
++ }
++ else
++ {
++ iSPos = 1;
++
++ if (fHuntParam == 0)
++ iSearchMinus = 0;
++ }
++
++ while (iSPos <= iCLen)
++ {
++ if (iHuntSwitches)
++ {
++ szOptChar = substr(ARGV[n], iSPos, 1);
++ iOPos = index(sOptions, szOptChar);
++ if (iOPos == 0)
++ {
++ printf("unknown option \"%s\"\n", szOptChar);
++ usage();
++ }
++ if ((substr(sOptions, iOPos - 1, 1) == "&") || ((substr(sOptions, iOPos - 1, 1) == "%") && (szSwChar == "-")))
++ {
++ aOptions[szOptChar] = szSwChar;
++ iSPos = iSPos + 1;
++ }
++ else if ((substr(sOptions, iOPos - 1, 1) == "$") && (szSwChar == "-"))
++ {
++ fHuntParam = 1;
++ iHuntSwitches = 0;
++ iSPos = iSPos + 1;
++ }
++ else
++ usage();
++
++ }
++ else if (fHuntParam)
++ {
++ fHuntParam = 0;
++ aOptions[szOptChar] = substr(ARGV[n], iSPos, iCLen + 1 - iSPos);
++ iSPos = iCLen + 1;
++ }
++ else
++ {
++ ARGV[m++] = ARGV[n];
++ iSPos = iCLen + 1;
++ }
++ }
++ n = n + 1;
++ }
++ ARGC = m;
++}
++
++
++#########################################################################
++#########################################################################
++function usage() {
++ print "usage: fig2mpdf [-|+lm] [-eiIGvV] [-p <ranges>] [-g <gapwidth>] [-s <style>] [-H <headerfile>] file\n\
++\n\
++ -|+l set|reset latex call\n\
++ -e create an eps file instead of a pdf\n\
++ -|+m set|reset multilayer creation\n\
++ -p <ranges> colon separated list of layer ranges a-b,c,d-e,...\n\
++ -i do include the deepest range in all figures\n\
++ (the one with the higest level number)\n\
++ -I include all lower ranges (pyramide mode)\n\
++ -g <gap> set layer gapwidth for automatically detecting ranges (default:0)\n\
++ -s <style> replace \\usepackage{times} by \\usepackage{<style>} in the latex commands\n\
++ -H <header> use file <header> for creating tex documents (only\n\
++ \\begin{document}...\\end{document} is set by fig2mpdf)\n\
++ -G name multilayer files in PGF file name format <name>.page<no>.<ext>\n\
++ -v be verbose\n\
++ -V print out the version of fig2mpdf\n";
++ exit 1;
++}
++' -- $*
++
+diff -urNad '--exclude=CVS' '--exclude=.svn' transfig~/fig2mpdf/fig2mpdf.1 transfig/fig2mpdf/fig2mpdf.1
+--- transfig~/fig2mpdf/fig2mpdf.1
++++ transfig/fig2mpdf/fig2mpdf.1
+@@ -0,0 +1,208 @@
++.TH fig2mpdf 1 "Jun 2006" "" "Including xfig figures into LaTeX documents"
++.SH NAME
++fig2mpdf \- creation of multilayer pdf or eps figures from fig files using latex for typesetting
++.SH SYNOPSIS
++.B fig2mpdf
++[\fIOPTION\fR]... \fIFILE\fR
++.SH DESCRIPTION
++.PP
++This tool can create pdf or eps figures using fig files as source. For beamer
++presentations, for example, you can use the multilayer mode to create
++multiple figures that can be overlayed to get a dynamic figure. For
++proper appearance you can use latex to typeset some or all texts,
++possibly containing formulas.
++
++The default interpretation of the given fig \fIFILE\fR depends on its suffix.
++.TP
++\fIfig\fR
++Normal conversion of a fig file. All texts are interpreted as postscript
++texts and all elements of the figure are included in the resulting figure.
++.TP
++\fIlfig\fR
++LaTeX interpretation of the file. All texts of the input file that have the
++special bit set are typeset by pdflatex resp. latex (see: Option \fB\-|+l\fR).
++.TP
++\fImfig\fR
++Multilayer file interpretation. Depending on the used depths of the
++figure it is split into multiple parts. For each part an output file is
++created (see: section \fBMultiLayerOutput\fR).
++.TP
++\fImlfig\fR or \fIlmfig\fR
++Combination of multilayer and LaTeX interpretation of the input (see: Suffix
++\fIlfig\fR and \fImfig\fR).
++.PP
++The default interpretation of the input can be changed by using the options below.
++.SH OPTIONS
++.PP
++.TP
++\fB\-e\fR
++produce an eps output file. Instead of creating a pdf file (the default)
++an eps figure is produced.
++.TP
++\fB\-|+l\fR
++force calling (pdf)latex (-) or do not use (pdf)latex (+) for
++typesetting the text marked with the special flag. With this option you
++can change the default behavior given by the input file suffix.
++.TP
++\fB\-|+m\fR
++force set (-) or unset (+) the multilayer interpretation (see:
++\fBMultiLayerOutput\fR below) which was previously set by the input
++file suffix.
++.TP
++\fB\-p\fR \fIranges\fR
++explicitly set the ranges of depths for splitting the input figure in
++multilayer mode. \fIranges\fR is a colon separated list of ranges of
++the form \fIupper-lower\fR or \fIdepth\fR where \fIupper\fR is the
++top and \fIlower\fR the bottom depth in the range. If you use the
++\fIdepth\fR form the range consist of just that depth.
++.TP
++\fB\-i\fR
++include the the bottommost range (that is, the one with the highest depth) into
++all output figures. This is for compatibility to older versions of this
++tool.
++.TP
++\fB\-I\fR
++turn on pyramid mode. The figure of a corresponding range in multilayer
++mode includes all lower ranges too.
++.TP
++\fB\-g\fR \fIgapwidth\fR
++set the allowed gapwidth between two used depths to decide if these
++depths should be grouped together in one range. With this option you get
++more flexibility to insert objects with new depths. The default width is
++zero (no gap = consecutively numbered depths are grouped together).
++.TP
++\fB\-s\fR \fIstyle\fR
++replace the default style for selecting a font family in LaTeX mode.
++If this option is omitted the style `times' is set by default.
++.TP
++\fB\-H\fR \fIheader\fR
++replace the default header sequence for creating temporary
++LaTeX documents in LaTeX mode. To get maximum flexibility you can
++set the entire document header in the file \fIheader\fR (see:
++\fBCustomized Headers\fR below).
++.TP
++\fB\-G\fR
++in multilayer mode change the default output file pattern to the PDF
++format which is <name>.page<no>.<ext>
++.TP
++\fB\-v\fR
++be verbose and print out all executed commands
++.TP
++\fB\-V\fR
++print out the version of \fBfig2mpdf\fR
++.PP
++.SH "MultiLayerOutput"
++In xfig you can assign an individual depth to all objects of the
++figure. These depths are normally used to determine the order of
++printing the objects. \fBfig2mpdf\fR uses these depths to group the
++objects into ranges in automatic mode (if the ranges option is
++omitted). In the list of used depths, consecutively numbered depths are
++grouped into one range. That is, all gaps between used depths are used
++to logically split the figure. With \fB\-g\fR you can set the
++gapwidth which doesn't split the figure (default: zero).
++.PP
++The resulting list of ranges determines the number of output files. In
++default mode all objects with depths assigned to one range are
++collected and put into the corresponding output file. The contents of
++the output files can be changed with the two Options \fB\-i\fR and
++\fB\-I\fR.
++.PP
++The \fB\-i\fR option reduces the number of output files by one. The
++bottommost range, that is the range which consist of the highest depths
++of the figure, is included into all output files.
++.PP
++In pyramid mode, activated by the option \fB\-I\fR, the output files
++contain additionally all lower ranges. With this mode you can
++get stand alone figures that don't have to be overlayed to have
++meaningful content.
++.PP
++\fBExample 1\fR
++.PD 0
++.PP
++Assume that you have a fig file \fIfoo.fig\fR which contains the three ranges
++.IR "230-233",
++.IR "455-460"
++and
++.IR "499-500".
++.PD
++.PP
++With no options set you get three output files, one per range. But if you
++set the \fB\-i\fR option you get the following two files where the
++bottommost range is included in both of the files:
++.PD 0
++.PP
++ \fIfoo-0.pdf\fR with ranges \fI455-460\fR and \fI499-500\fR
++.PP
++ \fIfoo-1.pdf\fR with ranges \fI230-233\fR and \fI499-500\fR.
++.PD
++.PP
++\fBExample 2\fR
++.PD 0
++.PP
++The pyramid mode, activated by the option \fB\-I\fR, will produce the
++following files from the source file of \fBExample 1\fR:
++.PP
++ \fIfoo-0.pdf\fR with ranges \fI499-500\fR
++.PP
++ \fIfoo-1.pdf\fR with ranges \fI455-460\fR and \fI499-500\fR
++.PP
++ \fIfoo-2.pdf\fR with ranges \fI230-233\fR, \fI455-460\fR and \fI499-500\fR.
++.PD
++.PP
++\fBExample 3\fR
++.PD 0
++.PP
++If both options are set you will get just two files with the following
++contents:
++.PP
++ \fIfoo-0.pdf\fR with ranges \fI455-460\fR and \fI499-500\fR
++.PP
++ \fIfoo-1.pdf\fR with ranges \fI230-233\fR, \fI455-460\fR and \fI499-500\fR.
++.PD
++.PP
++.SH "Customized Headers"
++For various reasons you might want to change the standard latex generation,
++e.g., if you want to change the default font family. The following
++example represents a valid header file.
++
++The usage of this example file changes the font family to sans serif
++and adds an additional search path for includegraphics to the `figures'
++subdirectory.
++
++.PD 0
++ \\documentclass{article}
++.PP
++ \\usepackage{german,amssymb,amsmath}
++.PP
++ \\renewcommand{\\familydefault}{\\sfdefault}
++.PP
++ \\AtBeginDocument{\\graphicspath{{figures/}}}
++.PD
++
++The following packages are generally used: \fBcolor\fR, \fBgraphicx\fR and \fBepsfig\fR.
++.SH "Tex errors"
++Sometimes it might happen that latex generates an error while processing
++your special texts. To keep you informed about the occurrence of that
++error and about what has happened, in this case the log file is shown
++by invoking a less command.
++.SH "Files"
++In single layer mode for the resulting files the suffix fig is replaced
++by pdf (resp. eps) (i.e. foo.fig -> foo.pdf).
++.PP
++.PD 0
++In multilayer mode the base name of the source fig files is extended
++by '-<range>' and the suffix is set to pdf (resp. eps).
++.PP
++(i.e., foo.fig -> foo-0.pdf, foo-1.pdf, foo-2.pdf, ...
++.PP
++ or foo.fig -> foo.page0.pdf, foo.page1.pdf, foo.page2.pdf, ...
++.PP
++ if the option \fB\-G\fR is set).
++.PD
++.SH "SEE ALSO"
++.IR xfig(1)
++.IR fig2dev(1)
++.IR gawk(1)
++.IR pdflatex(1)
++.IR latex(1)
++.IR dvips(1)
diff --git a/media-gfx/transfig/files/transfig-3.2.5d-fig2mpdf.patch b/media-gfx/transfig/files/transfig-3.2.5d-fig2mpdf.patch
new file mode 100644
index 000000000000..b04478f87970
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-3.2.5d-fig2mpdf.patch
@@ -0,0 +1,522 @@
+=== modified file 'doc/fig2dev.1'
+--- doc/fig2dev.1 2010-09-28 13:22:38 +0000
++++ doc/fig2dev.1 2010-09-28 13:28:26 +0000
+@@ -53,8 +53,8 @@
+ \fBbox, cgm, epic, eepic, eepicemu, emf, eps, gbx (Gerber beta driver), gif, ibmgl, jpeg,
+ latex, map (HTML image map), mf (MetaFont),
+ mp (MetaPost), mmp (Multi-MetaPost),
+-pcx, pdf, pdftex, pdftex_t, pic, pictex, png, ppm, ps,
+-pstex, pstex_t, pstricks, ptk (Perl/tk),
++pcx, pdf, pdftex, pdftex_t, pdftex_p, pic, pictex, png, ppm, ps,
++pstex, pstex_t, pstex_p, pstricks, ptk (Perl/tk),
+ shape (LaTeX shaped paragraphs), sld (AutoCad slide format),
+ svg (beta driver), textyl,
+ tiff, tk (tcl/tk), tpic, xbm and
+@@ -1062,6 +1062,62 @@
+ font. Option 1 sets LaTeX font size only. Option 2 issues no font
+ commands at all.
+
++.SH PSTEX_P and PDFTEX_P OPTIONS
++The \fBpstex_p\fR language has the same intention as
++the combination of \fBpstex\fR and \fBpstex_t\fR.
++The only reason to use \fBpstex_p\fR is that you have partially overlayed texts.
++\fBpstex_p\fR splits the Fig file concerning the depths of existing texts. Because
++of it's necessary to get the resulting size of the figure for the pdf document
++you have to specify the target document format
++(i.e. using \fBpstex_p\fR rsp. \fBpdftex_p\fR).
++.br
++Two files results by using this language:
++.br
++.HP +.3i
++1) A bash script for creating and removing the necessary graphics files.
++Extension: \fB.create\fR
++.HP +.3i
++.HP +.3i
++2) The latex code which includes all graphics files and special texts. Content is
++put to stdout.
++
++.TP
++The \fBpstex_p\fR driver has the following special options:
++
++.TP
++.B \-p basename
++specifies the basename of the files to be created (see (1) above). This option
++is mandatory.
++.TP
++.B "\-d dmag"
++Set a separate magnification for the length of line dashes to
++.I dmag.
++.TP
++.B \-E num
++Set encoding for latex text translation (0 no translation, 1 ISO-8859-1, 2 ISO-8859-2)
++.TP
++.B "\-l lwidth"
++Sets the threshold between LaTeX thin and thick lines to
++.I lwidth
++pixels.
++LaTeX supports only two different line width: \\thinlines and \\thicklines.
++Lines of width greater than
++.I lwidth
++pixels are drawn as \\thicklines.
++Also affects the size of dots in dotted line style.
++The default is 1.
++.TP
++.B \-v
++Verbose mode.
++.TP
++.B \-F
++Don't set the font face, series, and style; only set it's size and the
++baselineskip. By default, fig2dev sets all 5 font parameters when it
++puts some text. The disadvantage is that you can't set the font from your
++LaTeX document. With this option on, you can set the font from your LaTeX
++document (like "\fB\\sfshape \\input picture.eepic\fR").
++
++
+ .SH TK and PTK OPTIONS (tcl/tk and Perl/tk)
+ .TP
+ .B -l dummy_arg
+@@ -1107,6 +1163,13 @@
+ .PP
+ Rotated text is only supported in the IBM-GL (HP/GL) and PostScript (including eps)
+ languages.
++.PP
++In \fBpdftex_p\fR language \fIfig2dev\fR can not determine the exact sizes of
++the special texts set by pdflatex afterwards. If these texts are bigger than
++expected the calculated bounding box might be too small so that some texts passes
++over the figure boundaries. If this happen you have to put an invisible
++rectangle (line width 0) around the text or the entire figure.
++
+ .SH COPYRIGHT
+ Copyright (c) 1991 Micah Beck
+ .br
+@@ -1187,3 +1250,7 @@
+ The GBX (Gerber) driver was written by
+ .br
+ Edward Grace (ej.grace@imperial.ac.uk).
++.sp
++The PSTEX_P and PDFTEX_P drivers (overlayed LaTeX texts) was written by
++.br
++Michael Pfeiffer (p3f@gmx.de)
+
+=== modified file 'fig2dev/dev/genpstex.c'
+--- fig2dev/dev/genpstex.c 2010-09-28 13:22:38 +0000
++++ fig2dev/dev/genpstex.c 2010-09-28 13:26:39 +0000
+@@ -70,7 +70,307 @@
+ genps_end ();
+
+ static char pstex_file[1000] = "";
+-
++static int iObjectsRead = 0;
++static int iTextRead = 0;
++static int iObjectsFileNumber = 0;
++static int iStartDepth;
++static int iLastDepth;
++static FILE * ptCreateFile;
++static char szFileName[1000];
++static int iLength;
++static int iPdfOutputs = 0;
++
++#ifdef never
++static double unitlength;
++static double dash_mag = 1.0;
++
++static int (*translate_coordinates)() = NULL;
++static int (*translate_coordinates_d)() = NULL;
++#else
++extern double unitlength;
++extern double dash_mag;
++
++extern int (*translate_coordinates)();
++extern int (*translate_coordinates_d)();
++#endif
++
++#define TOP 840
++#define SWAP(x,y) {tmp=x; x=y; y=tmp;}
++#define TRANS(x,y) (*translate_coordinates)(&x,&y)
++#define TRANS2(x1,y1,x2,y2) (*translate_coordinates)(&x1,&y1); \
++ (*translate_coordinates)(&x2,&y2)
++#define TRANSD(x,y) (*translate_coordinates_d)(&x,&y)
++
++static void genpstex_p_finalize_objects(int depth);
++
++/*************************************************************************
++ *************************************************************************/
++static
++translate2(xp, yp)
++ int *xp, *yp;
++{
++ *xp = *xp + 1;
++ *yp = (double)(TOP - *yp -1);
++ }
++
++static
++translate1_d(xp, yp)
++ double *xp, *yp;
++{
++ *xp = *xp + 1.0;
++ *yp = *yp + 1.0;
++ }
++
++static
++translate2_d(xp, yp)
++ double *xp, *yp;
++{
++ *xp = *xp + 1.0;
++ *yp = (double)TOP - *yp -1.0;
++ }
++
++/*************************************************************************
++ *************************************************************************/
++void genpstex_p_option(opt, optarg)
++char opt, *optarg;
++{
++ if (opt == 'p')
++ {
++ strcpy(pstex_file, optarg);
++ }
++ else
++ genlatex_option(opt, optarg);
++}
++
++
++/*************************************************************************
++ *************************************************************************/
++void genpstex_p_start(objects)
++ F_compound *objects;
++{
++ int tmp;
++ struct stat tStat;
++ long lUnitLength;
++
++ if (*pstex_file == '\0')
++ {
++ put_msg("Argument -p is mandatory to pstex_p.");
++ exit(1);
++ }
++
++ strncpy(szFileName, pstex_file, 900);
++ iLength = strlen(szFileName);
++
++ sprintf(szFileName + iLength, ".create");
++ ptCreateFile = fopen (szFileName, "wb");
++
++ if ( ! ptCreateFile)
++ {
++ put_msg("Couldn't open %s for writing", szFileName);
++ exit(1);
++ }
++ fstat(fileno(ptCreateFile), & tStat);
++ fchmod (fileno(ptCreateFile), tStat.st_mode | ((tStat.st_mode & (S_IRUSR | S_IRGRP | S_IROTH)) >> 2));
++ fprintf(ptCreateFile, "#!/bin/bash\n\n", szFileName);
++
++ fprintf(ptCreateFile, "while getopts \"r\" Option\n");
++ fprintf(ptCreateFile, "do\n");
++ fprintf(ptCreateFile, " case $Option in\n");
++ fprintf(ptCreateFile, " r) iOptRemove=1;;\n");
++ fprintf(ptCreateFile, " *) echo \"illegal option -$Option\"\n");
++ fprintf(ptCreateFile, " esac\n");
++ fprintf(ptCreateFile, "done\n");
++ fprintf(ptCreateFile, "shift $(($OPTIND - 1))\n");
++
++ texfontsizes[0] = texfontsizes[1] =
++ TEXFONTSIZE(font_size != 0.0? font_size : DEFAULT_FONT_SIZE);
++
++ unitlength = mag/ppi;
++ dash_mag /= unitlength*80.0;
++
++ translate_coordinates = translate2;
++ translate_coordinates_d = translate2_d;
++
++ TRANS2(llx, lly, urx, ury);
++ if (llx > urx) SWAP(llx, urx)
++ if (lly > ury) SWAP(lly, ury)
++
++ /* LaTeX start */
++
++ /* print any whole-figure comments prefixed with "%" */
++ if (objects->comments) {
++ fprintf(tfp,"%%\n");
++ print_comments("% ",objects->comments, "");
++ fprintf(tfp,"%%\n");
++ }
++
++ lUnitLength = (long) (round(4736286.72*unitlength));
++ fprintf(tfp, "\\setlength{\\unitlength}{%lisp}%%\n",
++ lUnitLength);
++ /* define the SetFigFont macro */
++ define_setfigfont(tfp);
++
++ sprintf(szFileName + iLength, ".size");
++ fprintf(ptCreateFile, "if [ \"$iOptRemove\" == \"\" ]; then\n");
++ if (iPdfOutputs)
++ fprintf(ptCreateFile, " echo \"\\setlength\\pdfpagewidth{%3.2fpt}\\setlength\\pdfpageheight{%3.2fpt}\" > %s\n",
++ (float) lUnitLength / 65536 * (urx - llx), (float) lUnitLength / 65536 * (ury - lly), szFileName);
++ else
++ fprintf(ptCreateFile, "echo -n\"\" > %s\n", szFileName);
++ fprintf(ptCreateFile, "else\n rm -f %s\nfi\n", szFileName);
++}
++
++/*************************************************************************
++ *************************************************************************/
++void genpdftex_p_start(objects)
++ F_compound *objects;
++{
++ iPdfOutputs = 1;
++ genpstex_p_start(objects);
++}
++
++
++/*************************************************************************
++ *************************************************************************/
++int genpstex_p_end()
++{
++ if (iTextRead)
++ {
++ fprintf(tfp, "\\end{picture}%%\n");
++ iTextRead = 0;
++ }
++ if (iObjectsRead)
++ {
++ genpstex_p_finalize_objects(iLastDepth);
++ iObjectsRead = 0;
++ }
++
++ /* LaTeX ending */
++ fprintf(tfp, "\\begin{picture}(%d,%d)\n", urx-llx, ury-lly);
++ fprintf(tfp, "\\end{picture}%%\n");
++
++ fclose(ptCreateFile);
++
++ /* all ok */
++ return 0;
++}
++
++
++/*************************************************************************
++ *************************************************************************/
++void genpstex_p_finalize_objects(depth)
++int depth;
++{
++ char szFileName[1000];
++ int iLength;
++
++ strncpy(szFileName, pstex_file, 900);
++ iLength = strlen(szFileName);
++
++
++ sprintf(szFileName + iLength, "%03d", iObjectsFileNumber++);
++ fprintf(ptCreateFile, "if [ \"$iOptRemove\" == \"\" ]; then\n");
++ if (iPdfOutputs)
++ {
++ fprintf(ptCreateFile, " %s -L pstex -D +%d:%d %s", prog, depth, iStartDepth, from, szFileName);
++ fprintf(ptCreateFile, " | epstopdf -f --outfile %s.pdf\n", szFileName, szFileName);
++ }
++ else
++ fprintf(ptCreateFile, "%s -L pstex -D +%d:%d %s %s.eps\n", prog, depth, iStartDepth, from, szFileName);
++ fprintf(ptCreateFile, "else\n rm -f %s.", szFileName);
++ if (iPdfOutputs)
++ fprintf(ptCreateFile, "pdf");
++ else
++ fprintf(ptCreateFile, "eps");
++ fprintf(ptCreateFile, "\nfi\n");
++
++ fprintf(tfp, "\\begin{picture}(0,0)%%\n");
++/* newer includegraphics directive suggested by Stephen Harker 1/13/99 */
++#if defined(LATEX2E_GRAPHICS)
++# if defined(EPSFIG)
++ fprintf(tfp, "\\epsfig{file=%s.eps}%%\n",szFileName);
++# else
++ fprintf(tfp, "\\includegraphics{%s}%%\n",szFileName);
++# endif
++#else
++ fprintf(tfp, "\\special{psfile=%s.eps}%%\n",szFileName);
++#endif
++ fprintf(tfp, "\\end{picture}%%\n");
++}
++
++/*************************************************************************
++ *************************************************************************/
++void genpstex_p_object(depth)
++int depth;
++{
++ if (iTextRead)
++ {
++ fprintf(tfp, "\\end{picture}%%\n");
++ iTextRead = 0;
++ }
++ if (iObjectsRead == 0)
++ {
++ iStartDepth = depth;
++ iObjectsRead = 1;
++ }
++ iLastDepth = depth;
++
++}
++
++void genpstex_p_arc(obj)
++F_arc *obj;
++{
++ genpstex_p_object(obj->depth);
++}
++
++
++void genpstex_p_ellipse(obj)
++F_ellipse *obj;
++{
++ genpstex_p_object(obj->depth);
++}
++
++void genpstex_p_line(obj)
++F_line *obj;
++{
++ genpstex_p_object(obj->depth);
++}
++
++void genpstex_p_spline(obj)
++F_spline *obj;
++{
++ genpstex_p_object(obj->depth);
++}
++
++
++
++/*************************************************************************
++ *************************************************************************/
++void genpstex_p_text(t)
++F_text *t;
++{
++
++ if (!special_text(t))
++ genpstex_p_object(t->depth);
++ else
++ {
++ if (iObjectsRead)
++ {
++ genpstex_p_finalize_objects(iLastDepth);
++ iObjectsRead = 0;
++ }
++ if (iTextRead == 0)
++ {
++ fprintf(tfp, "\\begin{picture}(0,0)(%d,%d)\n", llx, lly);
++ iTextRead = 1;
++ }
++ genlatex_text(t);
++ }
++
++}
++
++/*************************************************************************
++ *************************************************************************/
+ void genpstex_t_option(opt, optarg)
+ char opt, *optarg;
+ {
+@@ -112,6 +412,8 @@
+ else genlatex_text(t);
+ }
+
++/*************************************************************************
++ *************************************************************************/
+ void genpstex_text(t)
+ F_text *t;
+ {
+@@ -128,6 +430,32 @@
+ genlatex_option(opt, optarg);
+ }
+
++struct driver dev_pstex_p = {
++ genpstex_p_option,
++ genpstex_p_start,
++ gendev_null,
++ genpstex_p_arc,
++ genpstex_p_ellipse,
++ genpstex_p_line,
++ genpstex_p_spline,
++ genpstex_p_text,
++ genpstex_p_end,
++ INCLUDE_TEXT
++};
++
++struct driver dev_pdftex_p = {
++ genpstex_p_option,
++ genpdftex_p_start,
++ gendev_null,
++ genpstex_p_arc,
++ genpstex_p_ellipse,
++ genpstex_p_line,
++ genpstex_p_spline,
++ genpstex_p_text,
++ genpstex_p_end,
++ INCLUDE_TEXT
++};
++
+ struct driver dev_pstex_t = {
+ genpstex_t_option,
+ genpstex_t_start,
+
+=== modified file 'fig2dev/drivers.h'
+--- fig2dev/drivers.h 2010-09-28 13:22:38 +0000
++++ fig2dev/drivers.h 2010-09-28 13:29:46 +0000
+@@ -30,8 +30,10 @@
+ extern struct driver dev_pdf;
+ extern struct driver dev_pdftex;
+ extern struct driver dev_pdftex_t;
++extern struct driver dev_pdftex_p;
+ extern struct driver dev_pstex;
+ extern struct driver dev_pstex_t;
++extern struct driver dev_pstex_p;
+ extern struct driver dev_pstricks;
+ extern struct driver dev_textyl;
+ extern struct driver dev_tk;
+@@ -75,6 +77,7 @@
+ {"pdf", &dev_pdf},
+ {"pdftex", &dev_pdftex},
+ {"pdftex_t", &dev_pdftex_t},
++ {"pdftex_p", &dev_pdftex_p},
+ {"pic", &dev_pic},
+ {"pictex", &dev_pictex},
+ {"png", &dev_bitmaps},
+@@ -82,6 +85,7 @@
+ {"ps", &dev_ps},
+ {"pstex", &dev_pstex},
+ {"pstex_t", &dev_pstex_t},
++ {"pstex_p", &dev_pstex_p},
+ {"pstricks", &dev_pstricks},
+ {"ptk", &dev_ptk},
+ {"shape", &dev_shape},
+
+=== modified file 'fig2dev/fig2dev.c'
+--- fig2dev/fig2dev.c 2010-09-28 13:22:38 +0000
++++ fig2dev/fig2dev.c 2010-09-28 13:26:39 +0000
+@@ -649,6 +649,18 @@
+ #endif /* NFSS */
+ printf(" -p name name of the PostScript file to be overlaid\n");
+
++ printf("PSTEX_P and PDFTEX_P Options:\n");
++ printf(" -p name basename of the files to be created\n");
++#ifdef NFSS
++ printf(" -F don't set font family/series/shape, so you can\n");
++ printf(" set it from latex\n");
++#endif /* NFSS */
++ printf(" -d dmag set separate magnification for length of line dashes to dmag\n");
++ printf(" -E num set encoding for text translation (0 no translation,\n");
++ printf(" 1 ISO-8859-1, 2 ISO-8859-2)\n");
++ printf(" -l lwidth set threshold between thin and thick lines to lwidth\n");
++ printf(" -v verbose mode\n");
++
+ printf("SHAPE (ShapePar driver) Options:\n");
+ printf(" -n name Set basename of the macro (e.g. \"face\" gives faceshape and facepar)\n");
+ printf("Tcl/Tk (tk) and Perl/Tk (ptk) Options:\n");
+@@ -776,6 +788,12 @@
+ int rec_comp(r1, r2)
+ struct obj_rec *r1, *r2;
+ {
++ if (r2->depth == r1->depth)
++ {
++ if ((r1->gendev == dev->text) ^ (r2->gendev == dev->text))
++ return ((r1->gendev == dev->text) * 2 - 1);
++ return (0);
++ }
+ return (r2->depth - r1->depth);
+ }
+
+
diff --git a/media-gfx/transfig/files/transfig-3.2.5d-leadspace.patch b/media-gfx/transfig/files/transfig-3.2.5d-leadspace.patch
new file mode 100644
index 000000000000..d222cf6590e6
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-3.2.5d-leadspace.patch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 25_PIC_leadspace.dpatch by Roger Leigh <rleigh@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Avoid wrong leading spaces in PIC text (Closes: #611977).
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' transfig~/fig2dev/dev/genpic.c transfig/fig2dev/dev/genpic.c
+--- transfig~/fig2dev/dev/genpic.c
++++ transfig/fig2dev/dev/genpic.c
+@@ -443,7 +443,7 @@
+ size = PICFONTMAG(t);
+ if (!OptNoUnps) {
+ unpsfont(t);
+- fprintf(tfp, "\"\\s%d\\f%s ", size, PICFONT(t->font));
++ fprintf(tfp, "\"\\s%d\\f%s", size, PICFONT(t->font));
+ } else {
+ fprintf(tfp, ".ps\n.ps %d\n", size );
+ fprintf(tfp, ".ft\n.ft %s\n", PICPSFONT(t) );
diff --git a/media-gfx/transfig/files/transfig-3.2.5d-libpng-1.5.patch b/media-gfx/transfig/files/transfig-3.2.5d-libpng-1.5.patch
new file mode 100644
index 000000000000..e6f15e43e93c
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-3.2.5d-libpng-1.5.patch
@@ -0,0 +1,39 @@
+http://bugs.gentoo.org/show_bug.cgi?id=356751
+
+Index: transfig.3.2.5d/fig2dev/dev/readpng.c
+===================================================================
+--- transfig.3.2.5d.orig/fig2dev/dev/readpng.c
++++ transfig.3.2.5d/fig2dev/dev/readpng.c
+@@ -62,7 +62,7 @@ read_png(file,filetype,pic,llx,lly)
+ }
+
+ /* set long jump here */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* if we get here there was a problem reading the file */
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ return 0;
+@@ -78,15 +78,17 @@ read_png(file,filetype,pic,llx,lly)
+ png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type,
+ &interlace_type, &compression_type, &filter_type);
+
+- if (info_ptr->valid & PNG_INFO_gAMA)
+- png_set_gamma(png_ptr, 2.2, info_ptr->gamma);
+- else
+- png_set_gamma(png_ptr, 2.2, 0.45);
++ png_fixed_point gamma = 0.45;
++ png_get_gAMA_fixed(png_ptr,info_ptr,&gamma);
++ png_set_gamma(png_ptr, 2.2, gamma);
+
+- if (info_ptr->valid & PNG_INFO_bKGD)
++ if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) {
+ /* set the background to the one supplied */
+- png_set_background(png_ptr, &info_ptr->background,
++ png_color_16p background;
++ png_get_bKGD(png_ptr,info_ptr,&background);
++ png_set_background(png_ptr, background,
+ PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
++ }
+ else {
+ /* blend the canvas background using the alpha channel */
+ if (bgspec) {
diff --git a/media-gfx/transfig/files/transfig-3.2.5d-precision.patch b/media-gfx/transfig/files/transfig-3.2.5d-precision.patch
new file mode 100644
index 000000000000..227f19cfe71b
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-3.2.5d-precision.patch
@@ -0,0 +1,45 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 24_PIC_precision.dpatch by Roger Leigh <rleigh@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Change the precision of PIC floating point output from %.2f to %.3f.
+## DP: (Closes: #611948)
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' transfig~/fig2dev/dev/genpic.c transfig/fig2dev/dev/genpic.c
+--- transfig~/fig2dev/dev/genpic.c
++++ transfig/fig2dev/dev/genpic.c
+@@ -229,9 +229,9 @@
+
+ /* Should have a #define somewhere for the # of fill patterns */
+ if (l->fill_style != UNFILLED)
+- fprintf(tfp, " fill %.2f", ((double) l->fill_style ) / (double) BLACK_FILL);
++ fprintf(tfp, " fill %.3f", ((double) l->fill_style ) / (double) BLACK_FILL);
+
+- fprintf(tfp, " with .sw at (%.2f,%.2f) ",
++ fprintf(tfp, " with .sw at (%.3f,%.3f) ",
+ minx / ppi, convy(maxy / ppi));
+
+ width = (maxx - minx) / ppi;
+@@ -239,10 +239,10 @@
+ height = convy(maxy / ppi) - convy(miny / ppi);
+ if (height < 0.0) height = -height;
+
+- fprintf(tfp, "width %.2f height %.2f", width, height);
++ fprintf(tfp, "width %.3f height %.3f", width, height);
+
+ if (OptArcBox && l->type == T_ARC_BOX)
+- fprintf(tfp, " rad %.2f", l->radius/ppi);
++ fprintf(tfp, " rad %.3f", l->radius/ppi);
+
+ AddThickness();
+
+@@ -411,7 +411,7 @@
+ 2 * e->radiuses.x/ppi, 2 * e->radiuses.y/ppi);
+
+ if ( OptEllipseFill && e->fill_style != UNFILLED)
+- fprintf(tfp, " fill %.2f", (double)e->fill_style / (double) BLACK_FILL);
++ fprintf(tfp, " fill %.3f", (double)e->fill_style / (double) BLACK_FILL);
+
+ AddThickness();
+
diff --git a/media-gfx/transfig/files/transfig-3.2.5e-fprintf_format_warnings.patch b/media-gfx/transfig/files/transfig-3.2.5e-fprintf_format_warnings.patch
new file mode 100644
index 000000000000..6b3f8a7d870d
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-3.2.5e-fprintf_format_warnings.patch
@@ -0,0 +1,55 @@
+Author: Roland Rosenfeld <roland@debian.org>
+Description: Add a format string to fprintf()/sprintf() call instead
+ of directly printing out Err_Mem. This is needed by harding options.
+
+--- a/fig2dev/trans_spline.c
++++ b/fig2dev/trans_spline.c
+@@ -648,7 +648,7 @@
+ F_control *cp;
+
+ if ((cp = (F_control *) malloc(CONTROL_SIZE)) == NULL)
+- fprintf(stderr,Err_mem);
++ fprintf(stderr, "%s", Err_mem);
+ return cp;
+ }
+
+@@ -659,7 +659,7 @@
+ F_line *l;
+
+ if ((l = (F_line *) malloc(LINOBJ_SIZE)) == NULL)
+- fprintf(stderr,Err_mem);
++ fprintf(stderr, "%s", Err_mem);
+ l->pic = NULL;
+ l->next = NULL;
+ l->for_arrow = NULL;
+--- a/fig2dev/dev/gencgm.c
++++ b/fig2dev/dev/gencgm.c
+@@ -139,7 +139,7 @@
+
+ if (from) {
+ figname = malloc(strlen(from)+1);
+- sprintf(figname, from);
++ sprintf(figname, "%s", from);
+ p = strrchr(figname, '/');
+ if (p)
+ figname = p+1; /* remove path from name for comment in file */
+--- a/fig2dev/dev/genmp.c
++++ b/fig2dev/dev/genmp.c
+@@ -1150,7 +1150,7 @@
+ }
+ } else {
+ /* special text in latex mode: just write the text. */
+- fprintf(tfp, t->cstring);
++ fprintf(tfp, "%s", t->cstring);
+ }
+ fprintf(tfp," etex;\n");
+
+@@ -1164,7 +1164,7 @@
+
+ fprintf(tfp," picture q;\n");
+ fprintf(tfp," q=thelabel.urt(\"");
+- fprintf(tfp, t->cstring);
++ fprintf(tfp, "%s", t->cstring);
+ fprintf(tfp, "\" infont ");
+ if (t->font<0) {
+ fprintf(tfp, "defaultfont");
diff --git a/media-gfx/transfig/files/transfig-3.2.5e-man-hyphen.patch b/media-gfx/transfig/files/transfig-3.2.5e-man-hyphen.patch
new file mode 100644
index 000000000000..bb79ec82c92c
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-3.2.5e-man-hyphen.patch
@@ -0,0 +1,530 @@
+Author: Roland Rosenfeld <roland@debian.org>
+Description: Escape hyphen '-' in man pages
+
+--- a/doc/fig2dev.1
++++ b/doc/fig2dev.1
+@@ -63,9 +63,9 @@
+ Notes:
+ .br
+ .I dvips
+-and
++ and
+ .I xdvi
+-must be compiled with the tpic support (-DTPIC) for epic, eepic and tpic to work.
++must be compiled with the tpic support (\-DTPIC) for epic, eepic and tpic to work.
+ .br
+ You must have ghostscript and ps2pdf, which comes with the ghostscript distribution
+ to get the pdf output and the bitmap formats (png, jpeg, etc.), and the netpbm (pbmplus)
+@@ -81,16 +81,16 @@
+
+ .TP
+ .B "\-D +/-rangelist"
+-With +rangelist, keep only those depths in the list. With -rangelist, keep all
++With +rangelist, keep only those depths in the list. With \-rangelist, keep all
+ depths except those in the list. The rangelist may be a list of comma-separated
+-numbers or ranges separated by colon (:). For example, -D +10,40,55:70,80
++numbers or ranges separated by colon (:). For example, \-D +10,40,55:70,80
+ means keep only layers 10, 40, 55 \fBthrough\fR 70, and 80.
+
+ .TP
+-.B -K
+-The selection of the depths with the '-D +/-rangelist' option does normally not
++.B \-K
++The selection of the depths with the '\-D +/\-rangelist' option does normally not
+ affect the calcualtion of the bounding box. Thus the generated document might
+-have a much larger bounding box than necessary. If -K is given then the
++have a much larger bounding box than necessary. If \-K is given then the
+ bounding box is adjusted to include only those objects in the selected depths.
+
+ .TP
+@@ -107,10 +107,10 @@
+ .TP
+ .B "\-G minor[:major][:unit]"
+ Draws a grid on the page. Specify thin, or thin and thick line
+-spacing in one of several units. For example, "-G .25:1cm" draws a thin,
++spacing in one of several units. For example, "\-G .25:1cm" draws a thin,
+ gray line every .25 cm and a thicker gray line every 1 cm. Specifying
+-"-G 1in" draws a thin line every 1 inch.
+-Fractions may be used, e.g. "-G 1/16:1/2in" will draw a thin line every
++"\-G 1in" draws a thin line every 1 inch.
++Fractions may be used, e.g. "\-G 1/16:1/2in" will draw a thin line every
+ 1/16 inch (0.0625 inch) and a thick line every 1/2 inch.
+ .br
+ Allowable units are: i, in, inch, f, ft, feet, c, cm, mm, and m.
+@@ -126,7 +126,7 @@
+ Set the magnification at which the figure is rendered to
+ .I mag.
+ The default is 1.0.
+-This may not be used with the maxdimension option (-Z).
++This may not be used with the maxdimension option (\-Z).
+
+ .TP
+ .B "\-s size"
+@@ -141,7 +141,7 @@
+ .I maxdimension
+ inches or cm, depending on whether the figure was saved with
+ imperial or metric units.
+-This may not be used with the magnification option (-m).
++This may not be used with the magnification option (\-m).
+
+ .TP
+ .I other options
+@@ -157,7 +157,7 @@
+ something that they won't do with EPS files that have an ASCII preview.
+ .TP
+ .B "\-b dummyarg"
+-Generate binary output (dummy argument required after the "-b").
++Generate binary output (dummy argument required after the "\-b").
+
+ .TP
+ .B \-r
+@@ -335,7 +335,7 @@
+ file.
+ The table must have 21 entries - one for each of the area fill patterns.
+ Each entry consists of 5 numbers which specify the
+-1.) pattern number (-1 - 6),
++1.) pattern number (\-1 - 6),
+ 2.) pattern length (inches),
+ 3.) fill type (1 - 5),
+ 4.) fill spacing (inches) and
+@@ -390,7 +390,7 @@
+ .TP
+ .B \-F
+ Use correct font sizes (points, 1/72 inch) instead of the traditional size that xfig/fig2dev uses,
+-which is (1/80 inch). The corresponding xfig command-line option is -correct_font_size.
++which is (1/80 inch). The corresponding xfig command-line option is \-correct_font_size.
+
+ .TP
+ .B \-g color
+@@ -403,13 +403,13 @@
+ Convert all colors to grayscale.
+
+ .TP
+-.B -S smoothfactor
++.B \-S smoothfactor
+ This will smooth the output by passing
+ .I smoothfactor
+ to ghostscript in the
+-.I -dTextAlphaBits
++.I \-dTextAlphaBits
+ and
+-.I -dGraphicsAlphaBits
++.I \-dGraphicsAlphaBits
+ options to improve font rendering and graphic smoothing.
+ A value of 2 for
+ .I smoothfactor
+@@ -418,7 +418,7 @@
+ .SH GIF OPTIONS
+
+ .TP
+-.B -t color
++.B \-t color
+ Use
+ .I color
+ for the transparent color in the GIF file. This must be specified
+@@ -428,7 +428,7 @@
+
+ .SH JPEG OPTIONS
+ .TP
+-.B -q image_quality
++.B \-q image_quality
+ use the integer value
+ .I image_quality
+ for the JPEG "Quality" factor. Valid values are 0-100, with the default being 75.
+@@ -495,7 +495,7 @@
+ .I fig2dev
+ scales the figure by 1/8 before generating METAFONT code.
+ The magnification can be further changed with the
+-.B -m
++.B \-m
+ option or by giving magnification options to
+ .B mf.
+ .LP
+@@ -506,33 +506,33 @@
+ under the subdirectory: graphics/mfpic
+
+ .TP
+-.B -C code
++.B \-C code
+ specifies the starting METAFONT font code. The default is 32.
+ .TP
+-.B -n name
++.B \-n name
+ specifies the name to use in the output file.
+ .TP
+-.B -p pen_magnification
++.B \-p pen_magnification
+ specifies how much the line width should be magnified compared to the
+ original figure. The default is 1.
+ .TP
+-.B -t top
++.B \-t top
+ specifies the top of the whole coordinate system. The default is
+ .B ypos.
+ .TP
+-.B -x xmin
++.B \-x xmin
+ specifies the minimum x coordinate value of the figure (inches). The
+ default is 0.
+ .TP
+-.B -y ymin
++.B \-y ymin
+ specifies the minumum y coordinate value of the figure (inches). The
+ default is 0.
+ .TP
+-.B -X xmax
++.B \-X xmax
+ specifies the maximum x coordinate value of the figure (inches). The
+ default is 8.
+ .TP
+-.B -Y ymax
++.B \-Y ymax
+ specifies the maximum y coordinate value of the figure (inches). The
+ default is 8.
+
+@@ -546,7 +546,7 @@
+ Include file content as additional header.
+
+ .TP
+-.B -o
++.B \-o
+ Old mode (no latex).
+
+ .TP
+@@ -597,15 +597,15 @@
+ Set encoding for latex text translation (0 no translation, 1 ISO-8859-1, 2 ISO-8859-2)
+
+ .SH GBX OPTIONS (Gerber, RS-247-X)
+-Typically you will wish to set the y scale to -1. See
+-.B -g
++Typically you will wish to set the y scale to \-1. See
++.B \-g
+ for more information.
+ .TP
+-.B -d [mm|in]
++.B \-d [mm|in]
+ Output dimensions should be assumed to be millimeters (mm) or inches
+ (in). The default is millimeters.
+ .TP
+-.B -p [pos|neg]
++.B \-p [pos|neg]
+ Select the image polarity. For positive images lines drawn in the fig
+ file will generate lines of material. For negative images lines drawn
+ in the fig file will result in removed material. Consider etching a
+@@ -613,29 +613,29 @@
+ choosing 'neg' will result in these lines being etched through the
+ chrome, leaving transparent lines.
+ .TP
+-.B -g <x scale>x<y scale>+<x offset>+<y offset>
++.B \-g <x scale>x<y scale>+<x offset>+<y offset>
+ This controls the geometry of the output, scaling the dimensions as
+ shown and applying the given offset. Typically you will wish to set
+-the y scale to -1, mirroring about the x axis. This is because Gerber
++the y scale to \-1, mirroring about the x axis. This is because Gerber
+ assumes the origin to be bottom left, while xfig selects top left.
+ .TP
+-.B -f <n digits>.<n digits>
++.B \-f <n digits>.<n digits>
+ This controls the number of digits of precision before and after the
+-implied decimal point. With -f 5.3 the following number 12345678
+-corresponds to 12345.678. Whereas with -f 3.5 it corresponds to
++implied decimal point. With \-f 5.3 the following number 12345678
++corresponds to 12345.678. Whereas with \-f 3.5 it corresponds to
+ 123.45678. The default is for 3 places before the decimal point and 5
+ after. This corresponds, to a range of 0 to 1m in 10 micron
+ increments.
+ .TP
+-.B -i [on|off]
++.B \-i [on|off]
+ Controls the output of comments describing the type of objects being
+ output. The text appears as comments starting with ## on each line in
+ the output file. By default this is on.
+
+ .SH POSTSCRIPT, ENCAPSULATED POSTSCRIPT (EPS), and PDF OPTIONS
+ With PostScript, xfig can be used to create multiple page figures
+-Specify the -M option to produce a multi-page output.
+-For posters, add -O to overlap the pages slightly to get around the problem of
++Specify the \-M option to produce a multi-page output.
++For posters, add \-O to overlap the pages slightly to get around the problem of
+ the unprintable area in most printers, then cut and paste the pages together.
+ Due to memory limitations of most laser printers, the figure should not
+ have large imported images (bitmaps). Great for text with very big letters.
+@@ -658,7 +658,7 @@
+ .LP
+ The EPS driver has the following two special options:
+ .TP
+-.B -B 'Wx [Wy X0 Y0]'
++.B \-B 'Wx [Wy X0 Y0]'
+ This specifies that the bounding box of the EPS file should have the
+ width Wx and the height Wy.
+ Note that it doesn't scale the figure to this size, it merely sets the bounding box.
+@@ -667,13 +667,13 @@
+ screen (0,0) (upper-left).
+ Wx, Wy, X0 and Y0 are interpreted in centimeters or inches depending on the measure
+ given in the fig-file.
+-Remember to put either quotes (") or apostrophes (') to group the arguments to -B.
++Remember to put either quotes (") or apostrophes (') to group the arguments to \-B.
+ .TP
+-.B -R 'Wx [Wy X0 Y0]'
+-Same as the -B option except that X0 and Y0 is relative to the lower
++.B \-R 'Wx [Wy X0 Y0]'
++Same as the \-B option except that X0 and Y0 is relative to the lower
+ left corner of the
+ .B figure.
+-Remember to put either quotes (") or apostrophes (') to group the arguments to -R.
++Remember to put either quotes (") or apostrophes (') to group the arguments to \-R.
+ .LP
+ The PDF driver uses all the PostScript options.
+ .LP
+@@ -697,106 +697,106 @@
+ In addition, there are 16 patterns such as bricks, diagonal lines,
+ crosshatch, etc.
+ .TP
+-.B -A
++.B \-A
+ Add an ASCII (EPSI) preview.
+ .TP
+-.B -b borderwidth
++.B \-b borderwidth
+ Make blank border around figure of width
+ .I borderwidth.
+ .br
+-Not availble in EPS.
++Not available in EPS.
+
+ .TP
+-.B -C dummy_arg
++.B \-C dummy_arg
+ Add a color *binary* TIFF preview for Microsoft products that need a binary preview.
+-See also -T (monochrome preview). A dummy argument must be supplied for historical reasons.
++See also \-T (monochrome preview). A dummy argument must be supplied for historical reasons.
+ .TP
+-.B -c
++.B \-c
+ option centers the figure on the page.
+ The centering may not be accurate if there are texts in the
+ .I fig_file
+ that extends too far to the right of other objects.
+ .TP
+-.B -e
++.B \-e
+ option puts the figure against the edge (not centered) of the page.
+-Not availble in EPS.
++Not available in EPS.
+
+ .TP
+-.B -F
++.B \-F
+ Use correct font sizes (points) instead of the traditional size that xfig/fig2dev uses,
+-which is 1/80 inch. The corresponding xfig command-line option is -correct_font_size.
++which is 1/80 inch. The corresponding xfig command-line option is \-correct_font_size.
+
+ .TP
+-.B -g color
++.B \-g color
+ Use
+ .I color
+ for the background.
+ .TP
+-.B -l dummy_arg
++.B \-l dummy_arg
+ Generate figure in landscape mode. The dummy argument is ignored,
+ but must appear on the command line for reasons of compatibility.
+ This option will override the orientation specification in the
+ file (for file versions 3.0 and higher).
+ .br
+-Not availble in EPS.
++Not available in EPS.
+ .TP
+-.B -M
++.B \-M
+ Generate multiple pages if figure exceeds paper size.
+ .br
+-Not availble in EPS.
++Not available in EPS.
+ .TP
+ .B \-N
+ Convert all colors to grayscale.
+
+ .TP
+-.B -n name
++.B \-n name
+ Set the Title part of the PostScript output to
+ .I name.
+ This is useful when the input to
+ .I fig2dev
+ comes from standard input.
+ .TP
+-.B -O
++.B \-O
+ When used with \fB-M\fR,
+ overlaps the pages slightly to get around the problem of
+ the unprintable area in most printers.
+ .br
+-Not availble in EPS.
++Not available in EPS.
+ .TP
+-.B -p dummy_arg
++.B \-p dummy_arg
+ Generate figure in portrait mode. The dummy argument is ignored,
+ but must appear on the command line for reasons of compatibility.
+ This option will override the orientation specification in the
+ file (for file versions 3.0 and higher).
+ This is the default for Fig files of version 2.1 or lower.
+ .br
+-Not availble in EPS.
++Not available in EPS.
+
+ .TP
+-.B -T
++.B \-T
+ Add a monochrome *binary* TIFF preview for Microsoft products that need a binary preview.
+-See also -C (color preview).
++See also \-C (color preview).
+ .TP
+ .TP
+-.B -x offset
++.B \-x offset
+ shift the figure in the X direction by
+ .I offset
+ units (1/72 inch).
+ A negative value shifts the figure to the left and a positive value to the right.
+ .br
+-Not availble in EPS.
++Not available in EPS.
+ .TP
+-.B -y offset
++.B \-y offset
+ shift the figure in the Y direction by
+ .I offset
+ units (1/72 inch).
+ A negative value shifts the figure up and a positive value down.
+ .br
+-Not availble in EPS.
++Not available in EPS.
+ .TP
+-.B -z papersize
++.B \-z papersize
+ Sets the papersize.
+-Not availble in EPS.
++Not available in EPS.
+ .br
+ Available paper sizes are:
+ .nf
+@@ -839,17 +839,17 @@
+ special text.
+
+ .TP
+-.B -F
++.B \-F
+ Use correct font sizes (points) instead of the traditional size that xfig/fig2dev uses,
+-which is 1/80 inch. The corresponding xfig command-line option is -correct_font_size.
++which is 1/80 inch. The corresponding xfig command-line option is \-correct_font_size.
+
+ .TP
+-.B -g color
++.B \-g color
+ Use
+ .I color
+ for the background.
+ .TP
+-.B -n name
++.B \-n name
+ sets the Title part of the PostScript output to
+ .I name.
+ This is useful when the input to
+@@ -876,7 +876,7 @@
+ LaTeX document. With this option on, you can set the font from your LaTeX
+ document (like "\fB\\sfshape \\input picture.eepic\fR").
+ .TP
+-.B -p file
++.B \-p file
+ specifies the name of the PostScript file to be overlaid.
+ If not set or its value is null then no PS file will be inserted.
+
+@@ -977,7 +977,7 @@
+ .TP
+ .B \-P
+ Shorthand for
+-.B -n 3
++.B \-n 3
+ .
+
+ .TP
+@@ -992,7 +992,7 @@
+ directory! Don't put your stuff here. The
+ .B includegraphics
+ commands in the output file refer to this directory. Even
+-if the -p option is not used,
++if the \-p option is not used,
+ .B includegrpahics
+ commands follow this convention with the default directory
+ .I "\./eps".
+@@ -1064,26 +1064,26 @@
+
+ .SH TK and PTK OPTIONS (tcl/tk and Perl/tk)
+ .TP
+-.B -l dummy_arg
++.B \-l dummy_arg
+ Generate figure in landscape mode. The dummy argument is ignored,
+ but must appear on the command line for reasons of compatibility.
+ This option will override the orientation specification in the
+ file (for file versions 3.0 and higher).
+ .TP
+-.B -p dummy_arg
++.B \-p dummy_arg
+ Generate figure in portrait mode. The dummy argument is ignored,
+ but must appear on the command line for reasons of compatibility.
+ This option will override the orientation specification in the
+ file (for file versions 3.0 and higher).
+ This is the default for Fig files of version 2.1 or lower.
+ .TP
+-.B -P
++.B \-P
+ Generate canvas of full page size instead of using the bounding box
+ of the figure's objects. The default is to use only the bounding box.
+ .TP
+-.B -z papersize
++.B \-z papersize
+ Sets the papersize. See the POSTSCRIPT OPTIONS for available paper sizes.
+-This is only used when the -P option (use full page) is used.
++This is only used when the \-P option (use full page) is used.
+
+ .SH "SEE ALSO"
+ [x]fig(1),
+--- a/doc/transfig.1
++++ b/doc/transfig.1
+@@ -3,11 +3,11 @@
+ transfig \- creates a makefile for portable LaTeX figures
+ .SH SYNOPSIS
+ .B transfig
+-[ -L \fIlanguage\fR ]
+-[ -M \fImakefile\fR ]
+-[ -T \fItexfile\fR ]
+-[ -I \fImacrofile\fR ]
+-[ -V ]
++[ \-L \fIlanguage\fR ]
++[ \-M \fImakefile\fR ]
++[ \-T \fItexfile\fR ]
++[ \-I \fImacrofile\fR ]
++[ \-V ]
+ [ \fIcontrol_specs\fR figfile ... ]
+ .SH DESCRIPTION
+ .I Transfig
+@@ -76,13 +76,13 @@
+ is the default.
+ .PP
+ The names of the makefile and TeX macro file can be set with the
+--M and -T options.
++\-M and \-T options.
+ The default names are "Makefile" and "transfig.tex", respectively.
+ If there is already an existing \fImakefile\fR in the directory, transfig
+ first renames it to \fImakefile~\fR. The same holds for any existing TeX macro file.
+-If the -I option is specified, then a command to read in \fImacrofile\fR is
++If the \-I option is specified, then a command to read in \fImacrofile\fR is
+ inserted into the TeX macro file.
+-If the -V option is specified, the program version number is printed only.
++If the \-V option is specified, the program version number is printed only.
+ .PP
+ Control specifiers are
+ .TP
diff --git a/media-gfx/transfig/files/transfig-3.2.5e-typos.patch b/media-gfx/transfig/files/transfig-3.2.5e-typos.patch
new file mode 100644
index 000000000000..0a0e5cd60b1e
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-3.2.5e-typos.patch
@@ -0,0 +1,25 @@
+Author: Roland Rosenfeld <roland@debian.org>
+Description: Fix some spelling errors in the binaries
+
+--- a/fig2dev/dev/readgif.c
++++ b/fig2dev/dev/readgif.c
+@@ -151,7 +151,7 @@
+
+ if (c == '!') { /* Extension */
+ if (! ReadOK(file,&c,1))
+- fprintf(stderr,"GIF read error on extention function code\n");
++ fprintf(stderr,"GIF read error on extension function code\n");
+ (void) DoGIFextension(file, c);
+ continue;
+ }
+--- a/fig2dev/read.c
++++ b/fig2dev/read.c
+@@ -109,7 +109,7 @@
+ /* Format error; relevant error message is already delivered */
+ }
+ else
+- put_msg("File \"%s\" is not accessable; %s", file, strerror(err));
++ put_msg("File \"%s\" is not accessible; %s", file, strerror(err));
+ }
+
+ /**********************************************************
diff --git a/media-gfx/transfig/files/transfig-ru_RU.CP1251.ps b/media-gfx/transfig/files/transfig-ru_RU.CP1251.ps
new file mode 100644
index 000000000000..f8c142a642b2
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-ru_RU.CP1251.ps
@@ -0,0 +1,298 @@
+%% Begining of ru_RU.CP1251.ps
+%%
+%% Author: Yura Zotov <yz@altlinux.ru>
+%% based on cs_CZ.ps made by Radim Gelner <radim.gelner@suse.cz>
+%%
+%%BeginResource: encoding ISOLatin2Encoding
+
+/isol2vec [
+10#0 /.notdef
+10#1 /.notdef
+10#2 /.notdef
+10#3 /.notdef
+10#4 /.notdef
+10#5 /.notdef
+10#6 /.notdef
+10#7 /.notdef
+10#8 /.notdef
+10#9 /.notdef
+10#10 /.notdef
+10#11 /.notdef
+10#12 /.notdef
+10#13 /.notdef
+10#14 /.notdef
+10#15 /.notdef
+10#16 /.notdef
+10#17 /.notdef
+10#18 /.notdef
+10#19 /.notdef
+10#20 /.notdef
+10#21 /.notdef
+10#22 /.notdef
+10#23 /.notdef
+10#24 /.notdef
+10#25 /.notdef
+10#26 /.notdef
+10#27 /.notdef
+10#28 /.notdef
+10#29 /.notdef
+10#30 /.notdef
+10#31 /.notdef
+10#32 /space
+10#33 /exclam
+10#34 /quotedbl
+10#35 /numbersign
+10#36 /dollar
+10#37 /percent
+10#38 /ampersand
+10#39 /quoteright
+10#40 /parenleft
+10#41 /parenright
+10#42 /asterisk
+10#43 /plus
+10#44 /comma
+10#45 /hyphen
+10#46 /period
+10#47 /slash
+10#48 /zero
+10#49 /one
+10#50 /two
+10#51 /three
+10#52 /four
+10#53 /five
+10#54 /six
+10#55 /seven
+10#56 /eight
+10#57 /nine
+10#58 /colon
+10#59 /semicolon
+10#60 /less
+10#61 /equal
+10#62 /greater
+10#63 /question
+10#64 /at
+10#65 /A
+10#66 /B
+10#67 /C
+10#68 /D
+10#69 /E
+10#70 /F
+10#71 /G
+10#72 /H
+10#73 /I
+10#74 /J
+10#75 /K
+10#76 /L
+10#77 /M
+10#78 /N
+10#79 /O
+10#80 /P
+10#81 /Q
+10#82 /R
+10#83 /S
+10#84 /T
+10#85 /U
+10#86 /V
+10#87 /W
+10#88 /X
+10#89 /Y
+10#90 /Z
+10#91 /bracketleft
+10#92 /backslash
+10#93 /bracketright
+10#94 /asciicircum
+10#95 /underscore
+10#96 /quoteleft
+10#97 /a
+10#98 /b
+10#99 /c
+10#100 /d
+10#101 /e
+10#102 /f
+10#103 /g
+10#104 /h
+10#105 /i
+10#106 /j
+10#107 /k
+10#108 /l
+10#109 /m
+10#110 /n
+10#111 /o
+10#112 /p
+10#113 /q
+10#114 /r
+10#115 /s
+10#116 /t
+10#117 /u
+10#118 /v
+10#119 /w
+10#120 /x
+10#121 /y
+10#122 /z
+10#123 /braceleft
+10#124 /bar
+10#125 /braceright
+10#126 /asciitilde
+10#127 /.notdef
+10#128 /afii10051
+10#129 /afii10052
+10#130 /quotesinglbase
+10#131 /afii10100
+10#132 /quotedblbase
+10#133 /ellipsis
+10#134 /dagger
+10#135 /daggerdbl
+10#136 /Euro
+10#137 /perthousand
+10#138 /afii10058
+10#139 /guilsinglleft
+10#140 /afii10059
+10#141 /afii10061
+10#142 /afii10060
+10#143 /afii10145
+10#144 /afii10099
+10#145 /quoteleft
+10#146 /quoteright
+10#147 /quotedblleft
+10#148 /quotedblright
+10#149 /bullet
+10#150 /endash
+10#151 /emdash
+10#152 /tilde
+10#153 /trademark
+10#154 /afii10106
+10#155 /guilsinglright
+10#156 /afii10107
+10#157 /afii10109
+10#158 /afii10108
+10#159 /afii10193
+10#160 /.notdef
+10#161 /afii10062
+10#162 /afii10110
+10#163 /afii10057
+10#164 /currency
+10#165 /afii10050
+10#166 /brokenbar
+10#167 /section
+10#168 /afii10023
+10#169 /copyright
+10#170 /afii10053
+10#171 /guillemotleft
+10#172 /logicalnot
+10#173 /hyphen
+10#174 /registered
+10#175 /afii10056
+10#176 /degree
+10#177 /plusminus
+10#178 /afii10055
+10#179 /afii10103
+10#180 /afii10098
+10#181 /mu
+10#182 /paragraph
+10#183 /periodcentered
+10#184 /afii10071
+10#185 /afii61352
+10#186 /afii10101
+10#187 /guillemotright
+10#188 /afii10105
+10#189 /afii10054
+10#190 /afii10102
+10#191 /afii10104
+10#192 /afii10017
+10#193 /afii10018
+10#194 /afii10019
+10#195 /afii10020
+10#196 /afii10021
+10#197 /afii10022
+10#198 /afii10024
+10#199 /afii10025
+10#200 /afii10026
+10#201 /afii10027
+10#202 /afii10028
+10#203 /afii10029
+10#204 /afii10030
+10#205 /afii10031
+10#206 /afii10032
+10#207 /afii10033
+10#208 /afii10034
+10#209 /afii10035
+10#210 /afii10036
+10#211 /afii10037
+10#212 /afii10038
+10#213 /afii10039
+10#214 /afii10040
+10#215 /afii10041
+10#216 /afii10042
+10#217 /afii10043
+10#218 /afii10044
+10#219 /afii10045
+10#220 /afii10046
+10#221 /afii10047
+10#222 /afii10048
+10#223 /afii10049
+10#224 /afii10065
+10#225 /afii10066
+10#226 /afii10067
+10#227 /afii10068
+10#228 /afii10069
+10#229 /afii10070
+10#230 /afii10072
+10#231 /afii10073
+10#232 /afii10074
+10#233 /afii10075
+10#234 /afii10076
+10#235 /afii10077
+10#236 /afii10078
+10#237 /afii10079
+10#238 /afii10080
+10#239 /afii10081
+10#240 /afii10082
+10#241 /afii10083
+10#242 /afii10084
+10#243 /afii10085
+10#244 /afii10086
+10#245 /afii10087
+10#246 /afii10088
+10#247 /afii10089
+10#248 /afii10090
+10#249 /afii10091
+10#250 /afii10092
+10#251 /afii10093
+10#252 /afii10094
+10#253 /afii10095
+10#254 /afii10096
+10#255 /afii10097] def
+%%EndResource
+/Times-Roman /Times-Roman-iso isol2vec ReEncode
+/Times-Italic /Times-Italic-iso isol2vec ReEncode
+/Times-Bold /Times-Bold-iso isol2vec ReEncode
+/Times-BoldItalic /Times-BoldItalic-iso isol2vec ReEncode
+/AvantGarde-Book /AvantGarde-Book-iso isol2vec ReEncode
+/AvantGarde-BookOblique /AvantGarde-BookOblique-iso isol2vec ReEncode
+/AvantGarde-Demi /AvantGarde-Demi-iso isol2vec ReEncode
+/AvantGarde-DemiOblique /AvantGarde-DemiOblique-iso isol2vec ReEncode
+/Bookman-Light /Bookman-Light-iso isol2vec ReEncode
+/Bookman-LightItalic /Bookman-LightItalic-iso isol2vec ReEncode
+/Bookman-Demi /Bookman-Demi-iso isol2vec ReEncode
+/Bookman-DemiItalic /Bookman-DemiItalic-iso isol2vec ReEncode
+/Courier /Courier-iso isol2vec ReEncode
+/Courier-Oblique /Courier-Oblique-iso isol2vec ReEncode
+/Courier-Bold /Courier-Bold-iso isol2vec ReEncode
+/Courier-BoldOblique /Courier-BoldOblique-iso isol2vec ReEncode
+/Helvetica /Helvetica-iso isol2vec ReEncode
+/Helvetica-Oblique /Helvetica-Oblique-iso isol2vec ReEncode
+/Helvetica-Bold /Helvetica-Bold-iso isol2vec ReEncode
+/Helvetica-BoldOblique /Helvetica-BoldOblique-iso isol2vec ReEncode
+/Helvetica-Narrow /Helvetica-Narrow-iso isol2vec ReEncode
+/Helvetica-Narrow-Oblique /Helvetica-Narrow-Oblique-iso isol2vec ReEncode
+/Helvetica-Narrow-Bold /Helvetica-Narrow-Bold-iso isol2vec ReEncode
+/Helvetica-Narrow-BoldOblique /Helvetica-Narrow-BoldOblique-iso isol2vec ReEncode
+/NewCenturySchlbk-Roman /NewCenturySchlbk-Roman-iso isol2vec ReEncode
+/NewCenturySchlbk-Italic /NewCenturySchlbk-Italic-iso isol2vec ReEncode
+/NewCenturySchlbk-Bold /NewCenturySchlbk-Bold-iso isol2vec ReEncode
+/NewCenturySchlbk-BoldItalic /NewCenturySchlbk-BoldItalic-iso isol2vec ReEncode
+/Palatino-Roman /Palatino-Roman-iso isol2vec ReEncode
+/Palatino-Italic /Palatino-Italic-iso isol2vec ReEncode
+/Palatino-Bold /Palatino-Bold-iso isol2vec ReEncode
+/Palatino-BoldItalic /Palatino-BoldItalic-iso isol2vec ReEncode
+%% End of ru_RU.CP1251.ps
diff --git a/media-gfx/transfig/files/transfig-ru_RU.KOI8-R.ps b/media-gfx/transfig/files/transfig-ru_RU.KOI8-R.ps
new file mode 100644
index 000000000000..1bda0b26a602
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-ru_RU.KOI8-R.ps
@@ -0,0 +1,298 @@
+%% Begining of ru_RU.KOI8-R.ps
+%%
+%% Author: Yura Zotov <yz@altlinux.ru>
+%% based on cs_CZ.ps made by Radim Gelner <radim.gelner@suse.cz>
+%%
+%%BeginResource: encoding ISOLatin2Encoding
+
+/isol2vec [
+10#0 /.notdef
+10#1 /.notdef
+10#2 /.notdef
+10#3 /.notdef
+10#4 /.notdef
+10#5 /.notdef
+10#6 /.notdef
+10#7 /.notdef
+10#8 /.notdef
+10#9 /.notdef
+10#10 /.notdef
+10#11 /.notdef
+10#12 /.notdef
+10#13 /.notdef
+10#14 /.notdef
+10#15 /.notdef
+10#16 /.notdef
+10#17 /.notdef
+10#18 /.notdef
+10#19 /.notdef
+10#20 /.notdef
+10#21 /.notdef
+10#22 /.notdef
+10#23 /.notdef
+10#24 /.notdef
+10#25 /.notdef
+10#26 /.notdef
+10#27 /.notdef
+10#28 /.notdef
+10#29 /.notdef
+10#30 /.notdef
+10#31 /.notdef
+10#32 /space
+10#33 /exclam
+10#34 /quotedbl
+10#35 /numbersign
+10#36 /dollar
+10#37 /percent
+10#38 /ampersand
+10#39 /quotesingle
+10#40 /parenleft
+10#41 /parenright
+10#42 /asterisk
+10#43 /plus
+10#44 /comma
+10#45 /hyphen
+10#46 /period
+10#47 /slash
+10#48 /zero
+10#49 /one
+10#50 /two
+10#51 /three
+10#52 /four
+10#53 /five
+10#54 /six
+10#55 /seven
+10#56 /eight
+10#57 /nine
+10#58 /colon
+10#59 /semicolon
+10#60 /less
+10#61 /equal
+10#62 /greater
+10#63 /question
+10#64 /at
+10#65 /A
+10#66 /B
+10#67 /C
+10#68 /D
+10#69 /E
+10#70 /F
+10#71 /G
+10#72 /H
+10#73 /I
+10#74 /J
+10#75 /K
+10#76 /L
+10#77 /M
+10#78 /N
+10#79 /O
+10#80 /P
+10#81 /Q
+10#82 /R
+10#83 /S
+10#84 /T
+10#85 /U
+10#86 /V
+10#87 /W
+10#88 /X
+10#89 /Y
+10#90 /Z
+10#91 /bracketleft
+10#92 /backslash
+10#93 /bracketright
+10#94 /asciicircum
+10#95 /underscore
+10#96 /grave
+10#97 /a
+10#98 /b
+10#99 /c
+10#100 /d
+10#101 /e
+10#102 /f
+10#103 /g
+10#104 /h
+10#105 /i
+10#106 /j
+10#107 /k
+10#108 /l
+10#109 /m
+10#110 /n
+10#111 /o
+10#112 /p
+10#113 /q
+10#114 /r
+10#115 /s
+10#116 /t
+10#117 /u
+10#118 /v
+10#119 /w
+10#120 /x
+10#121 /y
+10#122 /z
+10#123 /braceleft
+10#124 /bar
+10#125 /braceright
+10#126 /asciitilde
+10#127 /.notdef
+10#128 /SF100000
+10#129 /SF110000
+10#130 /SF010000
+10#131 /SF030000
+10#132 /SF020000
+10#133 /SF040000
+10#134 /SF080000
+10#135 /SF090000
+10#136 /SF060000
+10#137 /SF070000
+10#138 /SF050000
+10#139 /upblock
+10#140 /dnblock
+10#141 /block
+10#142 /lfblock
+10#143 /rtblock
+10#144 /ltshade
+10#145 /shade
+10#146 /dkshade
+10#147 /integraltp
+10#148 /filledbox
+10#149 /uni2219
+10#150 /radical
+10#151 /approxequal
+10#152 /lessequal
+10#153 /greaterequal
+10#154 /uni00A0
+10#155 /integralbt
+10#156 /degree
+10#157 /twosuperior
+10#158 /periodcentered
+10#159 /divide
+10#160 /SF430000
+10#161 /SF240000
+10#162 /SF510000
+10#163 /afii10071
+10#164 /SF520000
+10#165 /SF390000
+10#166 /SF220000
+10#167 /SF210000
+10#168 /SF250000
+10#169 /SF500000
+10#170 /SF490000
+10#171 /SF380000
+10#172 /SF280000
+10#173 /SF270000
+10#174 /SF260000
+10#175 /SF360000
+10#176 /SF370000
+10#177 /SF420000
+10#178 /SF190000
+10#179 /afii10023
+10#180 /SF200000
+10#181 /SF230000
+10#182 /SF470000
+10#183 /SF480000
+10#184 /SF410000
+10#185 /SF450000
+10#186 /SF460000
+10#187 /SF400000
+10#188 /SF540000
+10#189 /SF530000
+10#190 /SF440000
+10#191 /copyright
+10#192 /afii10096
+10#193 /afii10065
+10#194 /afii10066
+10#195 /afii10088
+10#196 /afii10069
+10#197 /afii10070
+10#198 /afii10086
+10#199 /afii10068
+10#200 /afii10087
+10#201 /afii10074
+10#202 /afii10075
+10#203 /afii10076
+10#204 /afii10077
+10#205 /afii10078
+10#206 /afii10079
+10#207 /afii10080
+10#208 /afii10081
+10#209 /afii10097
+10#210 /afii10082
+10#211 /afii10083
+10#212 /afii10084
+10#213 /afii10085
+10#214 /afii10072
+10#215 /afii10067
+10#216 /afii10094
+10#217 /afii10093
+10#218 /afii10073
+10#219 /afii10090
+10#220 /afii10095
+10#221 /afii10091
+10#222 /afii10089
+10#223 /afii10092
+10#224 /afii10048
+10#225 /afii10017
+10#226 /afii10018
+10#227 /afii10040
+10#228 /afii10021
+10#229 /afii10022
+10#230 /afii10038
+10#231 /afii10020
+10#232 /afii10039
+10#233 /afii10026
+10#234 /afii10027
+10#235 /afii10028
+10#236 /afii10029
+10#237 /afii10030
+10#238 /afii10031
+10#239 /afii10032
+10#240 /afii10033
+10#241 /afii10049
+10#242 /afii10034
+10#243 /afii10035
+10#244 /afii10036
+10#245 /afii10037
+10#246 /afii10024
+10#247 /afii10019
+10#248 /afii10046
+10#249 /afii10045
+10#250 /afii10025
+10#251 /afii10042
+10#252 /afii10047
+10#253 /afii10043
+10#254 /afii10041
+10#255 /afii10044] def
+%%EndResource
+/Times-Roman /Times-Roman-iso isol2vec ReEncode
+/Times-Italic /Times-Italic-iso isol2vec ReEncode
+/Times-Bold /Times-Bold-iso isol2vec ReEncode
+/Times-BoldItalic /Times-BoldItalic-iso isol2vec ReEncode
+/AvantGarde-Book /AvantGarde-Book-iso isol2vec ReEncode
+/AvantGarde-BookOblique /AvantGarde-BookOblique-iso isol2vec ReEncode
+/AvantGarde-Demi /AvantGarde-Demi-iso isol2vec ReEncode
+/AvantGarde-DemiOblique /AvantGarde-DemiOblique-iso isol2vec ReEncode
+/Bookman-Light /Bookman-Light-iso isol2vec ReEncode
+/Bookman-LightItalic /Bookman-LightItalic-iso isol2vec ReEncode
+/Bookman-Demi /Bookman-Demi-iso isol2vec ReEncode
+/Bookman-DemiItalic /Bookman-DemiItalic-iso isol2vec ReEncode
+/Courier /Courier-iso isol2vec ReEncode
+/Courier-Oblique /Courier-Oblique-iso isol2vec ReEncode
+/Courier-Bold /Courier-Bold-iso isol2vec ReEncode
+/Courier-BoldOblique /Courier-BoldOblique-iso isol2vec ReEncode
+/Helvetica /Helvetica-iso isol2vec ReEncode
+/Helvetica-Oblique /Helvetica-Oblique-iso isol2vec ReEncode
+/Helvetica-Bold /Helvetica-Bold-iso isol2vec ReEncode
+/Helvetica-BoldOblique /Helvetica-BoldOblique-iso isol2vec ReEncode
+/Helvetica-Narrow /Helvetica-Narrow-iso isol2vec ReEncode
+/Helvetica-Narrow-Oblique /Helvetica-Narrow-Oblique-iso isol2vec ReEncode
+/Helvetica-Narrow-Bold /Helvetica-Narrow-Bold-iso isol2vec ReEncode
+/Helvetica-Narrow-BoldOblique /Helvetica-Narrow-BoldOblique-iso isol2vec ReEncode
+/NewCenturySchlbk-Roman /NewCenturySchlbk-Roman-iso isol2vec ReEncode
+/NewCenturySchlbk-Italic /NewCenturySchlbk-Italic-iso isol2vec ReEncode
+/NewCenturySchlbk-Bold /NewCenturySchlbk-Bold-iso isol2vec ReEncode
+/NewCenturySchlbk-BoldItalic /NewCenturySchlbk-BoldItalic-iso isol2vec ReEncode
+/Palatino-Roman /Palatino-Roman-iso isol2vec ReEncode
+/Palatino-Italic /Palatino-Italic-iso isol2vec ReEncode
+/Palatino-Bold /Palatino-Bold-iso isol2vec ReEncode
+/Palatino-BoldItalic /Palatino-BoldItalic-iso isol2vec ReEncode
+%% End of ru_RU.KOI8-R.ps
diff --git a/media-gfx/transfig/files/transfig-uk_UA.KOI8-U.ps b/media-gfx/transfig/files/transfig-uk_UA.KOI8-U.ps
new file mode 100644
index 000000000000..8803c72e4697
--- /dev/null
+++ b/media-gfx/transfig/files/transfig-uk_UA.KOI8-U.ps
@@ -0,0 +1,298 @@
+%% Begining of uk_UA.KOI8-U.ps
+%%
+%% Author: Yura Zotov <yz@altlinux.ru>
+%% based on cs_CZ.ps made by Radim Gelner <radim.gelner@suse.cz>
+%%
+%%BeginResource: encoding ISOLatin2Encoding
+
+/isol2vec [
+10#0 /.notdef
+10#1 /.notdef
+10#2 /.notdef
+10#3 /.notdef
+10#4 /.notdef
+10#5 /.notdef
+10#6 /.notdef
+10#7 /.notdef
+10#8 /.notdef
+10#9 /.notdef
+10#10 /.notdef
+10#11 /.notdef
+10#12 /.notdef
+10#13 /.notdef
+10#14 /.notdef
+10#15 /.notdef
+10#16 /.notdef
+10#17 /.notdef
+10#18 /.notdef
+10#19 /.notdef
+10#20 /.notdef
+10#21 /.notdef
+10#22 /.notdef
+10#23 /.notdef
+10#24 /.notdef
+10#25 /.notdef
+10#26 /.notdef
+10#27 /.notdef
+10#28 /.notdef
+10#29 /.notdef
+10#30 /.notdef
+10#31 /.notdef
+10#32 /space
+10#33 /exclam
+10#34 /quotedbl
+10#35 /numbersign
+10#36 /dollar
+10#37 /percent
+10#38 /ampersand
+10#39 /quotesingle
+10#40 /parenleft
+10#41 /parenright
+10#42 /asterisk
+10#43 /plus
+10#44 /comma
+10#45 /hyphen
+10#46 /period
+10#47 /slash
+10#48 /zero
+10#49 /one
+10#50 /two
+10#51 /three
+10#52 /four
+10#53 /five
+10#54 /six
+10#55 /seven
+10#56 /eight
+10#57 /nine
+10#58 /colon
+10#59 /semicolon
+10#60 /less
+10#61 /equal
+10#62 /greater
+10#63 /question
+10#64 /at
+10#65 /A
+10#66 /B
+10#67 /C
+10#68 /D
+10#69 /E
+10#70 /F
+10#71 /G
+10#72 /H
+10#73 /I
+10#74 /J
+10#75 /K
+10#76 /L
+10#77 /M
+10#78 /N
+10#79 /O
+10#80 /P
+10#81 /Q
+10#82 /R
+10#83 /S
+10#84 /T
+10#85 /U
+10#86 /V
+10#87 /W
+10#88 /X
+10#89 /Y
+10#90 /Z
+10#91 /bracketleft
+10#92 /backslash
+10#93 /bracketright
+10#94 /asciicircum
+10#95 /underscore
+10#96 /grave
+10#97 /a
+10#98 /b
+10#99 /c
+10#100 /d
+10#101 /e
+10#102 /f
+10#103 /g
+10#104 /h
+10#105 /i
+10#106 /j
+10#107 /k
+10#108 /l
+10#109 /m
+10#110 /n
+10#111 /o
+10#112 /p
+10#113 /q
+10#114 /r
+10#115 /s
+10#116 /t
+10#117 /u
+10#118 /v
+10#119 /w
+10#120 /x
+10#121 /y
+10#122 /z
+10#123 /braceleft
+10#124 /bar
+10#125 /braceright
+10#126 /asciitilde
+10#127 /.notdef
+10#128 /SF100000
+10#129 /SF110000
+10#130 /SF010000
+10#131 /SF030000
+10#132 /SF020000
+10#133 /SF040000
+10#134 /SF080000
+10#135 /SF090000
+10#136 /SF060000
+10#137 /SF070000
+10#138 /SF050000
+10#139 /upblock
+10#140 /dnblock
+10#141 /block
+10#142 /lfblock
+10#143 /rtblock
+10#144 /ltshade
+10#145 /shade
+10#146 /dkshade
+10#147 /integraltp
+10#148 /filledbox
+10#149 /uni2219
+10#150 /radical
+10#151 /approxequal
+10#152 /lessequal
+10#153 /greaterequal
+10#154 /uni00A0
+10#155 /integralbt
+10#156 /degree
+10#157 /twosuperior
+10#158 /periodcentered
+10#159 /divide
+10#160 /SF430000
+10#161 /SF240000
+10#162 /SF510000
+10#163 /afii10071
+10#164 /afii10101
+10#165 /SF390000
+10#166 /afii10103
+10#167 /afii10104
+10#168 /SF250000
+10#169 /SF500000
+10#170 /SF490000
+10#171 /SF380000
+10#172 /SF280000
+10#173 /afii10098
+10#174 /SF260000
+10#175 /SF360000
+10#176 /SF370000
+10#177 /SF420000
+10#178 /SF190000
+10#179 /afii10023
+10#180 /afii10053
+10#181 /SF230000
+10#182 /afii10055
+10#183 /afii10056
+10#184 /SF410000
+10#185 /SF450000
+10#186 /SF460000
+10#187 /SF400000
+10#188 /SF540000
+10#189 /afii10050
+10#190 /SF440000
+10#191 /copyright
+10#192 /afii10096
+10#193 /afii10065
+10#194 /afii10066
+10#195 /afii10088
+10#196 /afii10069
+10#197 /afii10070
+10#198 /afii10086
+10#199 /afii10068
+10#200 /afii10087
+10#201 /afii10074
+10#202 /afii10075
+10#203 /afii10076
+10#204 /afii10077
+10#205 /afii10078
+10#206 /afii10079
+10#207 /afii10080
+10#208 /afii10081
+10#209 /afii10097
+10#210 /afii10082
+10#211 /afii10083
+10#212 /afii10084
+10#213 /afii10085
+10#214 /afii10072
+10#215 /afii10067
+10#216 /afii10094
+10#217 /afii10093
+10#218 /afii10073
+10#219 /afii10090
+10#220 /afii10095
+10#221 /afii10091
+10#222 /afii10089
+10#223 /afii10092
+10#224 /afii10048
+10#225 /afii10017
+10#226 /afii10018
+10#227 /afii10040
+10#228 /afii10021
+10#229 /afii10022
+10#230 /afii10038
+10#231 /afii10020
+10#232 /afii10039
+10#233 /afii10026
+10#234 /afii10027
+10#235 /afii10028
+10#236 /afii10029
+10#237 /afii10030
+10#238 /afii10031
+10#239 /afii10032
+10#240 /afii10033
+10#241 /afii10049
+10#242 /afii10034
+10#243 /afii10035
+10#244 /afii10036
+10#245 /afii10037
+10#246 /afii10024
+10#247 /afii10019
+10#248 /afii10046
+10#249 /afii10045
+10#250 /afii10025
+10#251 /afii10042
+10#252 /afii10047
+10#253 /afii10043
+10#254 /afii10041
+10#255 /afii10044] def
+%%EndResource
+/Times-Roman /Times-Roman-iso isol2vec ReEncode
+/Times-Italic /Times-Italic-iso isol2vec ReEncode
+/Times-Bold /Times-Bold-iso isol2vec ReEncode
+/Times-BoldItalic /Times-BoldItalic-iso isol2vec ReEncode
+/AvantGarde-Book /AvantGarde-Book-iso isol2vec ReEncode
+/AvantGarde-BookOblique /AvantGarde-BookOblique-iso isol2vec ReEncode
+/AvantGarde-Demi /AvantGarde-Demi-iso isol2vec ReEncode
+/AvantGarde-DemiOblique /AvantGarde-DemiOblique-iso isol2vec ReEncode
+/Bookman-Light /Bookman-Light-iso isol2vec ReEncode
+/Bookman-LightItalic /Bookman-LightItalic-iso isol2vec ReEncode
+/Bookman-Demi /Bookman-Demi-iso isol2vec ReEncode
+/Bookman-DemiItalic /Bookman-DemiItalic-iso isol2vec ReEncode
+/Courier /Courier-iso isol2vec ReEncode
+/Courier-Oblique /Courier-Oblique-iso isol2vec ReEncode
+/Courier-Bold /Courier-Bold-iso isol2vec ReEncode
+/Courier-BoldOblique /Courier-BoldOblique-iso isol2vec ReEncode
+/Helvetica /Helvetica-iso isol2vec ReEncode
+/Helvetica-Oblique /Helvetica-Oblique-iso isol2vec ReEncode
+/Helvetica-Bold /Helvetica-Bold-iso isol2vec ReEncode
+/Helvetica-BoldOblique /Helvetica-BoldOblique-iso isol2vec ReEncode
+/Helvetica-Narrow /Helvetica-Narrow-iso isol2vec ReEncode
+/Helvetica-Narrow-Oblique /Helvetica-Narrow-Oblique-iso isol2vec ReEncode
+/Helvetica-Narrow-Bold /Helvetica-Narrow-Bold-iso isol2vec ReEncode
+/Helvetica-Narrow-BoldOblique /Helvetica-Narrow-BoldOblique-iso isol2vec ReEncode
+/NewCenturySchlbk-Roman /NewCenturySchlbk-Roman-iso isol2vec ReEncode
+/NewCenturySchlbk-Italic /NewCenturySchlbk-Italic-iso isol2vec ReEncode
+/NewCenturySchlbk-Bold /NewCenturySchlbk-Bold-iso isol2vec ReEncode
+/NewCenturySchlbk-BoldItalic /NewCenturySchlbk-BoldItalic-iso isol2vec ReEncode
+/Palatino-Roman /Palatino-Roman-iso isol2vec ReEncode
+/Palatino-Italic /Palatino-Italic-iso isol2vec ReEncode
+/Palatino-Bold /Palatino-Bold-iso isol2vec ReEncode
+/Palatino-BoldItalic /Palatino-BoldItalic-iso isol2vec ReEncode
+%% End of uk_UA.KOI8-U.ps
diff --git a/media-gfx/transfig/metadata.xml b/media-gfx/transfig/metadata.xml
new file mode 100644
index 000000000000..129d5d9f4b93
--- /dev/null
+++ b/media-gfx/transfig/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pva@gentoo.org</email>
+ <name>Peter Volkov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">mcj</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/transfig/transfig-3.2.5d-r1.ebuild b/media-gfx/transfig/transfig-3.2.5d-r1.ebuild
new file mode 100644
index 000000000000..c972d2d71bdc
--- /dev/null
+++ b/media-gfx/transfig/transfig-3.2.5d-r1.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit toolchain-funcs eutils flag-o-matic multilib
+
+MY_P=${PN}.${PV}
+
+DESCRIPTION="A set of tools for creating TeX documents with graphics"
+HOMEPAGE="http://www.xfig.org/"
+SRC_URI="mirror://sourceforge/mcj/${MY_P}.tar.gz
+ mirror://gentoo/fig2mpdf-1.1.2.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng
+ x11-apps/rgb"
+DEPEND="${RDEPEND}
+ x11-misc/imake
+ app-text/rman"
+
+S=${WORKDIR}/${MY_P}
+
+sed_Imakefile() {
+ # see fig2dev/Imakefile for details
+ vars2subs="BINDIR=${EPREFIX}/usr/bin
+ MANDIR=${EPREFIX}/usr/share/man/man\$\(MANSUFFIX\)
+ XFIGLIBDIR=${EPREFIX}/usr/share/xfig
+ PNGINC=-I${EPREFIX}/usr/include/X11
+ XPMINC=-I${EPREFIX}/usr/include/X11
+ USEINLINE=-DUSE_INLINE
+ RGB=${EPREFIX}/usr/share/X11/rgb.txt
+ FIG2DEV_LIBDIR=${EPREFIX}/usr/share/fig2dev"
+
+ for variable in ${vars2subs} ; do
+ varname=${variable%%=*}
+ varval=${variable##*=}
+ sed -i "s:^\(XCOMM\)*[[:space:]]*${varname}[[:space:]]*=.*$:${varname} = ${varval}:" "$@"
+ done
+}
+
+src_prepare() {
+ find . -type f -exec chmod a-x '{}' \;
+ find . -name Makefile -delete
+ epatch "${FILESDIR}"/${P}-fig2mpdf-r1.patch
+ epatch "${FILESDIR}"/${PN}-3.2.5c-maxfontsize.patch
+ epatch "${FILESDIR}"/${P}-leadspace.patch
+ epatch "${FILESDIR}"/${P}-precision.patch
+ epatch "${FILESDIR}"/${P}-MAXWIDTH.patch
+ epatch "${FILESDIR}"/${P}-libpng-1.5.patch #356751
+ epatch "${FILESDIR}"/${PN}-3.2.5-solaris.patch
+
+ sed -e 's:-L$(ZLIBDIR) -lz::' \
+ -e 's: -lX11::' \
+ -i fig2dev/Imakefile || die
+ sed_Imakefile fig2dev/Imakefile fig2dev/dev/Imakefile
+}
+
+src_compile() {
+ xmkmf || die "xmkmf failed"
+ emake Makefiles
+
+ emake CC="$(tc-getCC)" LOCAL_LDFLAGS="${LDFLAGS}" CDEBUGFLAGS="${CFLAGS}" \
+ USRLIBDIR="${EPREFIX}/usr/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ ${transfig_conf} install install.man
+
+ dobin "${WORKDIR}/fig2mpdf/fig2mpdf"
+ doman "${WORKDIR}/fig2mpdf/fig2mpdf.1"
+
+ insinto /usr/share/fig2dev/
+ newins "${FILESDIR}/transfig-ru_RU.CP1251.ps" ru_RU.CP1251.ps
+ newins "${FILESDIR}/transfig-ru_RU.KOI8-R.ps" ru_RU.KOI8-R.ps
+ newins "${FILESDIR}/transfig-uk_UA.KOI8-U.ps" uk_UA.KOI8-U.ps
+
+ dohtml "${WORKDIR}/fig2mpdf/doc/"* || die
+
+ mv "${ED}"/usr/bin/fig2ps2tex{.sh,} || die #338295
+
+ dodoc README CHANGES LATEX.AND.XFIG NOTES
+}
+
+pkg_postinst() {
+ elog "Note, that defaults are changed and now if you don't want to ship"
+ elog "personal information into output files, use fig2dev with -a option."
+}
diff --git a/media-gfx/transfig/transfig-3.2.5e.ebuild b/media-gfx/transfig/transfig-3.2.5e.ebuild
new file mode 100644
index 000000000000..49075044ecc8
--- /dev/null
+++ b/media-gfx/transfig/transfig-3.2.5e.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit toolchain-funcs eutils flag-o-matic multilib
+
+MY_P=${PN}.${PV}
+
+DESCRIPTION="A set of tools for creating TeX documents with graphics"
+HOMEPAGE="http://www.xfig.org/"
+SRC_URI="mirror://sourceforge/mcj/${MY_P}.tar.gz
+ mirror://gentoo/fig2mpdf-1.1.2.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ~hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="x11-libs/libXpm
+ virtual/jpeg
+ media-libs/libpng
+ x11-apps/rgb"
+DEPEND="${RDEPEND}
+ x11-misc/imake
+ app-text/rman"
+
+S=${WORKDIR}/${MY_P}
+
+sed_Imakefile() {
+ # see fig2dev/Imakefile for details
+ vars2subs="BINDIR=${EPREFIX}/usr/bin
+ MANDIR=${EPREFIX}/usr/share/man/man\$\(MANSUFFIX\)
+ XFIGLIBDIR=${EPREFIX}/usr/share/xfig
+ PNGINC=-I${EPREFIX}/usr/include/X11
+ XPMINC=-I${EPREFIX}/usr/include/X11
+ USEINLINE=-DUSE_INLINE
+ RGB=${EPREFIX}/usr/share/X11/rgb.txt
+ FIG2DEV_LIBDIR=${EPREFIX}/usr/share/fig2dev"
+
+ for variable in ${vars2subs} ; do
+ varname=${variable%%=*}
+ varval=${variable##*=}
+ sed -i "s:^\(XCOMM\)*[[:space:]]*${varname}[[:space:]]*=.*$:${varname} = ${varval}:" "$@"
+ done
+}
+
+src_prepare() {
+ find . -type f -exec chmod a-x '{}' \;
+ find . -name Makefile -delete
+ epatch "${FILESDIR}"/${PN}-3.2.5d-fig2mpdf-r1.patch
+ epatch "${FILESDIR}"/${PN}-3.2.5c-maxfontsize.patch
+ epatch "${FILESDIR}"/${PN}-3.2.5-solaris.patch
+ epatch "${FILESDIR}"/${PN}-3.2.5e-typos.patch
+ epatch "${FILESDIR}"/${PN}-3.2.5e-man-hyphen.patch
+ epatch "${FILESDIR}"/${PN}-3.2.5e-fprintf_format_warnings.patch
+
+ sed -e 's:-L$(ZLIBDIR) -lz::' \
+ -e 's: -lX11::' \
+ -i fig2dev/Imakefile || die
+ sed_Imakefile fig2dev/Imakefile fig2dev/dev/Imakefile
+}
+
+src_compile() {
+ xmkmf || die "xmkmf failed"
+ emake Makefiles
+
+ emake CC="$(tc-getCC)" LOCAL_LDFLAGS="${LDFLAGS}" CDEBUGFLAGS="${CFLAGS}" \
+ USRLIBDIR="${EPREFIX}/usr/$(get_libdir)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" \
+ ${transfig_conf} install install.man
+
+ dobin "${WORKDIR}/fig2mpdf/fig2mpdf"
+ doman "${WORKDIR}/fig2mpdf/fig2mpdf.1"
+
+ insinto /usr/share/fig2dev/
+ newins "${FILESDIR}/transfig-ru_RU.CP1251.ps" ru_RU.CP1251.ps
+ newins "${FILESDIR}/transfig-ru_RU.KOI8-R.ps" ru_RU.KOI8-R.ps
+ newins "${FILESDIR}/transfig-uk_UA.KOI8-U.ps" uk_UA.KOI8-U.ps
+
+ dohtml "${WORKDIR}/fig2mpdf/doc/"* || die
+
+ mv "${ED}"/usr/bin/fig2ps2tex{.sh,} || die #338295
+
+ dodoc README CHANGES LATEX.AND.XFIG NOTES
+}
+
+pkg_postinst() {
+ elog "Note, that defaults are changed and now if you don't want to ship"
+ elog "personal information into output files, use fig2dev with -a option."
+}
diff --git a/media-gfx/tuxpaint-stamps/Manifest b/media-gfx/tuxpaint-stamps/Manifest
new file mode 100644
index 000000000000..75689e50ca03
--- /dev/null
+++ b/media-gfx/tuxpaint-stamps/Manifest
@@ -0,0 +1 @@
+DIST tuxpaint-stamps-2009.06.28.tar.gz 48273629 SHA256 271d9a5739d24b6dcee751bf8c889eecb3beb3ff67f5a870dba5d7732dca3e68
diff --git a/media-gfx/tuxpaint-stamps/files/tuxpaint-stamps-20090628-make-382.patch b/media-gfx/tuxpaint-stamps/files/tuxpaint-stamps-20090628-make-382.patch
new file mode 100644
index 000000000000..9a92ae112457
--- /dev/null
+++ b/media-gfx/tuxpaint-stamps/files/tuxpaint-stamps-20090628-make-382.patch
@@ -0,0 +1,15 @@
+http://bugs.gentoo.org/334569
+
+--- Makefile
++++ Makefile
+@@ -79,9 +79,7 @@
+ @rm -rf "build/tuxpaint-stamps-$(VER_DATE)" "build/tuxpaint-stamps-$(VER_DATE).tar.gz"
+ @-if [ -d build ] ; then rmdir build ; fi
+
+-releasedir: build/tuxpaint-stamps-$(VER_DATE)
+-
+-build/tuxpaint-stamps-$(VER_DATE):
++releasedir:
+ @echo
+ @echo "Creating release directory"
+ @echo
diff --git a/media-gfx/tuxpaint-stamps/metadata.xml b/media-gfx/tuxpaint-stamps/metadata.xml
new file mode 100644
index 000000000000..74f748621c92
--- /dev/null
+++ b/media-gfx/tuxpaint-stamps/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription>
+ These are additional stamps for the Tux Paint drawing program.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tuxpaint</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/tuxpaint-stamps/tuxpaint-stamps-20090628.ebuild b/media-gfx/tuxpaint-stamps/tuxpaint-stamps-20090628.ebuild
new file mode 100644
index 000000000000..9a10fa1b801b
--- /dev/null
+++ b/media-gfx/tuxpaint-stamps/tuxpaint-stamps-20090628.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils
+
+MY_P=${PN}-${PV:0:4}.${PV:4:2}.${PV:6:2}
+
+DESCRIPTION="Set of 'Rubber Stamp' images which can be used within Tux Paint"
+HOMEPAGE="http://www.tuxpaint.org/"
+SRC_URI="mirror://sourceforge/tuxpaint/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="media-gfx/tuxpaint"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-make-382.patch
+}
+
+src_install() {
+ emake PREFIX="${D}/usr" install-all || die
+
+ rm -f docs/COPYING.txt
+ dodoc docs/*.txt
+}
diff --git a/media-gfx/tuxpaint/Manifest b/media-gfx/tuxpaint/Manifest
new file mode 100644
index 000000000000..63c33f1e43b8
--- /dev/null
+++ b/media-gfx/tuxpaint/Manifest
@@ -0,0 +1 @@
+DIST tuxpaint-0.9.21.tar.gz 9543034 SHA256 6d4f2b981643b5c937708e5e6cdaf318ae7b5562375327b4b1cb84611e65ede9 SHA512 fafd80fe7a5a4d65236c8b5a4f15c644c76180e0e4ed7e774795572b70cc38ddb3273be2a93f041d74a1e536a5a9386c18e51987425ea1a3ff910661e4b0afb3 WHIRLPOOL e9b8dc45ed8f5ffd099d0d8308a13cd0b8658cf08e4c35ba21fe1a2edf18178936809c2e95a2a560c3f3e5b3e875fd078412067830bef69becd8f25fb74ad2fd
diff --git a/media-gfx/tuxpaint/files/tuxpaint-0.9.20-gentoo.patch b/media-gfx/tuxpaint/files/tuxpaint-0.9.20-gentoo.patch
new file mode 100644
index 000000000000..00af3cb2a867
--- /dev/null
+++ b/media-gfx/tuxpaint/files/tuxpaint-0.9.20-gentoo.patch
@@ -0,0 +1,136 @@
+diff -ru tuxpaint-0.9.20.orig/Makefile tuxpaint-0.9.20/Makefile
+--- tuxpaint-0.9.20.orig/Makefile 2008-12-21 15:04:36.000000000 +0100
++++ tuxpaint-0.9.20/Makefile 2008-12-21 15:42:24.000000000 +0100
+@@ -137,9 +137,12 @@
+ # Icons and launchers:
+ ICON_PREFIX:=$(DESTDIR)$(PREFIX)/share/pixmaps
+ X11_ICON_PREFIX:=$(DESTDIR)$(PREFIX)/X11R6/include/X11/pixmaps
+-GNOME_PREFIX:=$(shell gnome-config --prefix 2> /dev/null)
+-KDE_PREFIX:=$(shell kde-config --install apps --expandvars 2> /dev/null)
+-KDE_ICON_PREFIX:=$(shell kde-config --install icon --expandvars 2> /dev/null)
++GNOME_PREFIX:=
++KDE_PREFIX:=
++KDE_ICON_PREFIX:=
++DESKTOP_ICON_PREFIX:=$(PREFIX)/share/icons
++
++ENABLE_GETTEXT:=0
+
+ # Maemo flag
+ MAEMOFLAG:=
+@@ -200,7 +203,7 @@
+
+ #-ffast-math
+ OPTFLAGS:=-O2
+-CFLAGS:=$(CPPFLAGS) $(OPTFLAGS) -W -Wall -fno-common -ffloat-store \
++CFLAGS:=$(CPPFLAGS) -W -Wall -fno-common -ffloat-store \
+ $(call comptest,-fvisibility=hidden,) \
+ -Wcast-align -Wredundant-decls \
+ -Wbad-function-cast -Wwrite-strings \
+@@ -232,7 +235,10 @@
+ # "make" with no arguments builds the program and man page from sources:
+ #
+ .PHONY: all
+-all: tuxpaint translations magic-plugins tp-magic-config
++all: tuxpaint magic-plugins tp-magic-config
++ @if [ -n "$(ENABLE_GETTEXT)" ] && [ $(ENABLE_GETTEXT) -eq 1 ]; then \
++ make translations; \
++ fi
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo
+@@ -390,7 +396,7 @@
+ windows_ARCH_INSTALL:=
+ osx_ARCH_INSTALL:=
+ beos_ARCH_INSTALL:=
+-linux_ARCH_INSTALL:=install-gnome install-kde install-kde-icons
++linux_ARCH_INSTALL:=install-desktop-data
+ ARCH_INSTALL:=$($(OS)_ARCH_INSTALL)
+
+ # "make install" installs all of the various parts
+@@ -400,10 +406,13 @@
+ install: install-bin install-data install-man install-doc \
+ install-magic-plugins \
+ install-magic-plugin-dev \
+- install-icon install-gettext install-im install-importscript \
++ install-icon install-im install-importscript \
+ install-default-config install-example-stamps \
+ install-example-starters \
+ $(ARCH_INSTALL)
++ @if [ -n "$(ENABLE_GETTEXT)" ] && [ $(ENABLE_GETTEXT) -eq 1 ]; then \
++ make install-gettext ; \
++ fi
+ @echo
+ @echo "--------------------------------------------------------------"
+ @echo
+@@ -581,17 +590,50 @@
+
+ # Install a launcher icon in the Gnome menu
+ .PHONY: install-gnome
+-install-gnome:
++install-desktop-data:
+ @echo
+- @echo "...Installing launcher icon into GNOME..."
+- @if [ "x$(GNOME_PREFIX)" != "x" ]; then \
+- install -d $(DESTDIR)$(GNOME_PREFIX)/share/pixmaps; \
+- cp data/images/icon.png $(DESTDIR)/$(GNOME_PREFIX)/share/pixmaps/tuxpaint.png; \
+- chmod 644 $(DESTDIR)$(GNOME_PREFIX)/share/pixmaps/tuxpaint.png; \
+- install -d $(DESTDIR)$(GNOME_PREFIX)/share/applications; \
+- cp src/tuxpaint.desktop $(DESTDIR)$(GNOME_PREFIX)/share/applications/; \
+- chmod 644 $(DESTDIR)$(GNOME_PREFIX)/share/applications/tuxpaint.desktop; \
+- fi
++ @echo "...Installing launcher entry..."
++ @if [ "x$(PREFIX)" != "x" ]; then \
++ install -d $(PKG_ROOT)$(PREFIX)/share/applications; \
++ cp src/tuxpaint.desktop $(PKG_ROOT)$(PREFIX)/share/applications/; \
++ chmod 644 $(PKG_ROOT)$(PREFIX)/share/applications/tuxpaint.desktop; \
++ install -d $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/scalable/apps/; \
++ install -d $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/192x192/apps/; \
++ install -d $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/128x128/apps/; \
++ install -d $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/96x96/apps/; \
++ install -d $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/64x64/apps/; \
++ install -d $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/48x48/apps/; \
++ install -d $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/32x32/apps/; \
++ install -d $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/22x22/apps/; \
++ install -d $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/16x16/apps/; \
++ cp data/images/tuxpaint-icon.svg \
++ $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/scalable/apps/tuxpaint.svg; \
++ chmod 644 $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/scalable/apps/tuxpaint.svg; \
++ cp data/images/icon192x192.png \
++ $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/192x192/apps/tuxpaint.png; \
++ chmod 644 $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/192x192/apps/tuxpaint.png; \
++ cp data/images/icon128x128.png \
++ $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/128x128/apps/tuxpaint.png; \
++ chmod 644 $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/128x128/apps/tuxpaint.png; \
++ cp data/images/icon96x96.png \
++ $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/96x96/apps/tuxpaint.png; \
++ chmod 644 $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/96x96/apps/tuxpaint.png; \
++ cp data/images/icon64x64.png \
++ $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/64x64/apps/tuxpaint.png; \
++ chmod 644 $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/64x64/apps/tuxpaint.png; \
++ cp data/images/icon48x48.png \
++ $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/48x48/apps/tuxpaint.png; \
++ chmod 644 $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/48x48/apps/tuxpaint.png; \
++ cp data/images/icon32x32.png \
++ $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/32x32/apps/tuxpaint.png; \
++ chmod 644 $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/32x32/apps/tuxpaint.png; \
++ cp data/images/icon22x22.png \
++ $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/22x22/apps/tuxpaint.png; \
++ chmod 644 $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/22x22/apps/tuxpaint.png; \
++ cp data/images/icon16x16.png \
++ $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/16x16/apps/tuxpaint.png; \
++ chmod 644 $(PKG_ROOT)$(DESKTOP_ICON_PREFIX)/hicolor/16x16/apps/tuxpaint.png; \
++ fi
+
+
+ # Install a launcher icon for the Nokia 770.
+@@ -684,9 +726,6 @@
+ @install -d $(ICON_PREFIX)
+ @cp data/images/icon.png $(ICON_PREFIX)/tuxpaint.png
+ @chmod 644 $(ICON_PREFIX)/tuxpaint.png
+- @install -d $(X11_ICON_PREFIX)
+- @cp data/images/icon32x32.xpm $(X11_ICON_PREFIX)/tuxpaint.xpm
+- @chmod 644 $(X11_ICON_PREFIX)/tuxpaint.xpm
+
+
+ # Install the program:
+Only in tuxpaint-0.9.20: Makefile.bak
diff --git a/media-gfx/tuxpaint/files/tuxpaint-0.9.21-LDFLAGS.patch b/media-gfx/tuxpaint/files/tuxpaint-0.9.21-LDFLAGS.patch
new file mode 100644
index 000000000000..3370d6725d58
--- /dev/null
+++ b/media-gfx/tuxpaint/files/tuxpaint-0.9.21-LDFLAGS.patch
@@ -0,0 +1,22 @@
+=== modified file 'Makefile'
+--- Makefile 2011-08-09 15:19:01 +0000
++++ Makefile 2011-08-09 15:19:43 +0000
+@@ -871,7 +871,7 @@
+ $(ARCH_LIBS)
+ @echo
+ @echo "...Linking Tux Paint..."
+- $(CC) $(CFLAGS) $(DEBUG_FLAGS) $(SDL_CFLAGS) $(FRIBIDI_CFLAGS) $(DEFS) \
++ $(CC) $(CFLAGS) $(LDFLAGS) $(DEBUG_FLAGS) $(SDL_CFLAGS) $(FRIBIDI_CFLAGS) $(DEFS) \
+ -o tuxpaint $^ \
+ $(SDL_LIBS) $(SVG_LIB) $(ARCH_LINKS)
+ @$(RSRC_CMD)
+@@ -1043,7 +1043,7 @@
+ MAGIC_SO:=$(patsubst magic/src/%.c,magic/%.$(SO_TYPE),$(MAGIC_C))
+
+ $(MAGIC_SO): magic/%.$(SO_TYPE): magic/src/%.c
+- $(CC) $(MAGIC_CFLAGS) $(SHARED_FLAGS) -o $@ $< $(PLUGIN_LIBS)
++ $(CC) $(MAGIC_CFLAGS) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $< $(PLUGIN_LIBS)
+ # Probably should separate the various flags like the following:
+ # $(CC) $(PLUG_CPPFLAGS) $(PLUG_CFLAGS) $(PLUG_LDFLAGS) -o $@ $< $(PLUG_LIBS)
+
+
diff --git a/media-gfx/tuxpaint/files/tuxpaint-0.9.21-libpng1.5.patch b/media-gfx/tuxpaint/files/tuxpaint-0.9.21-libpng1.5.patch
new file mode 100644
index 000000000000..25e80cd2a488
--- /dev/null
+++ b/media-gfx/tuxpaint/files/tuxpaint-0.9.21-libpng1.5.patch
@@ -0,0 +1,19 @@
+http://tuxpaint.cvs.sourceforge.net/viewvc/tuxpaint/tuxpaint/src/tuxpaint.c?r1=1.828&r2=1.829
+No longer directly accessing PNG structure members directly, now using png_set_IHDR(). (Patch from SF.net Bug #3386433)
+
+--- src/tuxpaint.c 2011/07/29 21:27:39 1.828
++++ src/tuxpaint.c 2011/08/08 17:59:12 1.829
+@@ -13425,12 +13425,7 @@
+ {
+ png_init_io(png_ptr, fi);
+
+- info_ptr->width = surf->w;
+- info_ptr->height = surf->h;
+- info_ptr->bit_depth = 8;
+- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+- info_ptr->interlace_type = 1;
+- info_ptr->valid = 0; /* will be updated by various png_set_FOO() functions */
++ png_set_IHDR(png_ptr, info_ptr, surf->w, surf->h, 8, PNG_COLOR_TYPE_RGB, 1, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+
+ png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr,
+ PNG_sRGB_INTENT_PERCEPTUAL);
diff --git a/media-gfx/tuxpaint/files/tuxpaint-0.9.21-underlinking.patch b/media-gfx/tuxpaint/files/tuxpaint-0.9.21-underlinking.patch
new file mode 100644
index 000000000000..295684918f50
--- /dev/null
+++ b/media-gfx/tuxpaint/files/tuxpaint-0.9.21-underlinking.patch
@@ -0,0 +1,17 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Sat Oct 26 19:16:54 UTC 2013
+Subject: fix underlinking
+
+https://bugs.gentoo.org/show_bug.cgi?id=484434
+
+--- tuxpaint-0.9.21/Makefile
++++ tuxpaint-0.9.21/Makefile
+@@ -80,7 +80,7 @@
+ windows_ARCH_LINKS:=-lintl $(PNG) -lwinspool -lshlwapi $(FRIBIDI_LIB)
+ osx_ARCH_LINKS:=$(PAPER_LIB) $(FRIBIDI_LIB)
+ beos_ARCH_LINKS:="-lintl $(PNG) -lz -lbe -liconv $(FRIBIDI_LIB)"
+-linux_ARCH_LINKS:=$(PAPER_LIB) $(FRIBIDI_LIB)
++linux_ARCH_LINKS:=$(PAPER_LIB) $(PNG) $(FRIBIDI_LIB)
+ ARCH_LINKS:=$($(OS)_ARCH_LINKS)
+
+ # Install a launcher icon for the Nokia 770.
diff --git a/media-gfx/tuxpaint/metadata.xml b/media-gfx/tuxpaint/metadata.xml
new file mode 100644
index 000000000000..251afdaea786
--- /dev/null
+++ b/media-gfx/tuxpaint/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription>
+ Tux Paint is a free drawing program designed for young children
+ (kids ages 3 and up). It has a simple, easy-to-use interface, fun
+ sound effects, and an encouraging cartoon mascot who helps guide
+ children as they use the program. It provides a blank canvas and a
+ variety of drawing tools to help your child be creative.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">tuxpaint</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/tuxpaint/tuxpaint-0.9.21-r1.ebuild b/media-gfx/tuxpaint/tuxpaint-0.9.21-r1.ebuild
new file mode 100644
index 000000000000..72014f9da5c2
--- /dev/null
+++ b/media-gfx/tuxpaint/tuxpaint-0.9.21-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils gnome2-utils multilib toolchain-funcs
+
+DESCRIPTION="Drawing program designed for young children"
+HOMEPAGE="http://www.tuxpaint.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+
+IUSE="nls"
+
+RDEPEND="
+ app-text/libpaper
+ dev-libs/fribidi
+ gnome-base/librsvg
+ >=media-libs/libpng-1.2
+ >=media-libs/freetype-2
+ media-libs/libsdl
+ media-libs/sdl-image[png]
+ media-libs/sdl-mixer
+ media-libs/sdl-pango
+ media-libs/sdl-ttf
+ x11-libs/cairo"
+
+DEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_prepare() {
+ # Sanitize the Makefile and correct a few other issues.
+ epatch "${FILESDIR}/${PN}-0.9.20-gentoo.patch"
+ epatch "${FILESDIR}/${P}-libpng1.5.patch" #378199
+ epatch "${FILESDIR}/${P}-LDFLAGS.patch" #334571
+ epatch "${FILESDIR}/${P}-underlinking.patch" #484434
+
+ sed -i \
+ -e "s|linux_PREFIX:=/usr/local|linux_PREFIX:=/usr|" \
+ -e "s:/lib/:/$(get_libdir)/:" \
+ -e "s:/share/doc/tuxpaint.*:/share/doc/${PF}:g" \
+ Makefile || die
+}
+
+src_compile() {
+ # emake may break things
+ make CC="$(tc-getCC)" \
+ $(use nls && echo ENABLE_GETTEXT=1) || die "Compilation failed"
+}
+
+src_install () {
+ make PKG_ROOT="${D}" \
+ $(use nls && echo ENABLE_GETTEXT=1) install || die "Installation failed"
+
+ rm -f docs/COPYING.txt docs/INSTALL.txt
+ dodoc docs/*.txt
+}
+
+pkg_postinst() {
+ gnome2_icon_cache_update
+
+ elog ""
+ elog "For additional graphic stamps, you can emerge the"
+ elog "media-gfx/tuxpaint-stamps package."
+ elog ""
+}
diff --git a/media-gfx/ufraw/Manifest b/media-gfx/ufraw/Manifest
new file mode 100644
index 000000000000..1bc5165f713c
--- /dev/null
+++ b/media-gfx/ufraw/Manifest
@@ -0,0 +1,3 @@
+DIST ufraw-0.20.tar.gz 1086969 SHA256 6dcd30f73238f56641ec87ae07807a6ebeab141a1a481aafe3ddab6f3db8a1e0 SHA512 d18ecc257f9d88c77fca0e7a8641ee1e78abd28e73c34bd98def2d0dbd65f8fbaa677deca34ac4ed3ce7775764b6baca2896a023d690573057e4659de6dc3b1a WHIRLPOOL fedecf66ef22bdffe667408ac0b8106ec99ee2a1dd29fab53877229ec375bdeab37cc6fe942d7e3ef2c3de38a5770eaf4f49c44367ca1677acfda13bb4c85a1d
+DIST ufraw-0.21.tar.gz 1016298 SHA256 2a6a1bcc633bdc8e15615cf726befcd7f27ab00e7c2a518469a24e1a96964d87 SHA512 e1fbfcf7b6f15089d51626a3e2d3dc694aa79edfc0bdfe4a8be6f684d4a31a91c56502942174c0708de91413fe907acb5d2fa2ad9d1a5404eb66b14764909ae9 WHIRLPOOL 84e96894f9ecc9d3a81f96f7c58165e095553b9bab69343754c8a89ef18480f751745cb48e8846ea5db26d1077ace4104ef18d0c0546b2b54439819b81ee3a7c
+DIST ufraw-0.22.tar.gz 1103554 SHA256 f7abd28ce587db2a74b4c54149bd8a2523a7ddc09bedf4f923246ff0ae09a25e SHA512 a42eff5052c18afec90245cf97ceeade78e3f288186cf697ac4abf2e8290d4081db8ac4de3ae47b3774f30a6cb4cbda392099e6fd2125fe751abb40d9b065ad2 WHIRLPOOL 5cb53f83d2f2baccd0752a0898eb894b8e15ad234962f3e3cc4ae2166309cd68893dceef28d32018aa486da1a09c64df378a2569f764a42f8251f5a568c14e5f
diff --git a/media-gfx/ufraw/files/ufraw-0.17-cfitsio-automagic.patch b/media-gfx/ufraw/files/ufraw-0.17-cfitsio-automagic.patch
new file mode 100644
index 000000000000..aff7c5a25930
--- /dev/null
+++ b/media-gfx/ufraw/files/ufraw-0.17-cfitsio-automagic.patch
@@ -0,0 +1,28 @@
+diff -ru ufraw-0.17.orig/configure.ac ufraw-0.17/configure.ac
+--- ufraw-0.17.orig/configure.ac 2010-04-02 16:16:08.000000000 +0200
++++ ufraw-0.17/configure.ac 2010-04-02 16:19:33.000000000 +0200
+@@ -246,11 +246,19 @@
+ [ have_png=no
+ AC_MSG_RESULT($LIBPNG_PKG_ERRORS) ] )
+
+-PKG_CHECK_MODULES(CFITSIO, cfitsio,
+- [ have_cfitsio=yes
+- AC_DEFINE(HAVE_LIBCFITSIO, 1, have the cfitsio library) ],
+- [ have_cfitsio=no
+- AC_MSG_RESULT($CFITSIO_PKG_ERRORS) ] )
++AC_ARG_WITH([cfitsio],
++ [AS_HELP_STRING([--with-cfitsio],
++ [build fits support @<:@default=check@:>@])],
++ [],
++ [with_cfitsio=check])
++
++have_cfitsio=no
++AS_IF([test "x$with_cfitsio" != xno],
++ [PKG_CHECK_MODULES(CFITSIO, cfitsio,
++ [ have_cfitsio=yes
++ AC_DEFINE(HAVE_LIBCFITSIO, 1, have the cfitsio library) ],
++ [ have_cfitsio=no
++ AC_MSG_RESULT($CFITSIO_PKG_ERRORS) ] ) ] )
+
+ PKG_CHECK_MODULES(EXIV2, exiv2 >= 0.16,
+ [ have_exiv2=yes
diff --git a/media-gfx/ufraw/files/ufraw-0.20-gimp.patch b/media-gfx/ufraw/files/ufraw-0.20-gimp.patch
new file mode 100644
index 000000000000..5ce607c3179a
--- /dev/null
+++ b/media-gfx/ufraw/files/ufraw-0.20-gimp.patch
@@ -0,0 +1,24 @@
+http://ufraw.cvs.sourceforge.net/viewvc/ufraw/ufraw/ufraw-gimp.c?r1=1.82&r2=1.83&diff_format=u
+http://sourceforge.net/p/ufraw/bugs/392/
+https://bugs.gentoo.org/show_bug.cgi?id=527836
+
+--- ufraw-gimp.c 2014/01/07 13:00:08 1.82
++++ ufraw-gimp.c 2014/10/20 04:00:10 1.83
+@@ -79,12 +79,16 @@
+ load_args,
+ load_return_vals);
+
++#if HAVE_GIMP_2_9
+ gimp_register_magic_load_handler("file_ufraw_load",
+ (char *)raw_ext,
+ "",
+ "0,string,II*\\0,"
+ "0,string,MM\\0*,"
+ "0,string,<?xml");
++#else
++ gimp_register_load_handler("file_ufraw_load", (char *)raw_ext, "");
++#endif
+
+ gimp_install_procedure("file_ufraw_load_thumb",
+ "Loads thumbnails from digital camera raw files.",
+
diff --git a/media-gfx/ufraw/files/ufraw-0.21-CVE-2015-3885.patch b/media-gfx/ufraw/files/ufraw-0.21-CVE-2015-3885.patch
new file mode 100644
index 000000000000..c17c66c41ab7
--- /dev/null
+++ b/media-gfx/ufraw/files/ufraw-0.21-CVE-2015-3885.patch
@@ -0,0 +1,52 @@
+From 6b4ff65c6fc1a88eaa7bfc1ee5a25413d171b5f7 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Thu, 21 May 2015 13:47:29 +0200
+Subject: [PATCH] patch: CVE-2015-3885
+
+Squashed commit of the following:
+
+commit 8f2a2348638f74e059069d98a6329fcc656ae4b5
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue May 19 11:36:57 2015 +0200
+
+ CVE-2015-3885: avoid overflowing array
+
+ When reading raw image files containing lossless JPEG data, headers
+ could be manipulated to make the signed int variable 'len' negative
+ which specifies how much actual data follows. Interpreted as unsigned,
+ this could lead to reading file data past the 64k boundary of the array
+ used for storing it. To avoid that, make 'len' unsigned short, and bail
+ out early if its value would become invalid (i.e. <= 0).
+---
+ dcraw.cc | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/dcraw.cc b/dcraw.cc
+index 75ea121..d9f96ff 100644
+--- a/dcraw.cc
++++ b/dcraw.cc
+@@ -934,7 +934,8 @@ struct jhead {
+
+ int CLASS ljpeg_start (struct jhead *jh, int info_only)
+ {
+- int c, tag, len;
++ int c, tag;
++ ushort len;
+ uchar data[0x10000];
+ const uchar *dp;
+
+@@ -945,8 +946,9 @@ int CLASS ljpeg_start (struct jhead *jh, int info_only)
+ do {
+ fread (data, 2, 2, ifp);
+ tag = data[0] << 8 | data[1];
+- len = (data[2] << 8 | data[3]) - 2;
+- if (tag <= 0xff00) return 0;
++ len = (data[2] << 8 | data[3]);
++ if (tag <= 0xff00 || len <= 2) return 0;
++ len -= 2;
+ fread (data, 1, len, ifp);
+ switch (tag) {
+ case 0xffc3:
+--
+2.4.1
+
diff --git a/media-gfx/ufraw/metadata.xml b/media-gfx/ufraw/metadata.xml
new file mode 100644
index 000000000000..56bf6e46d23e
--- /dev/null
+++ b/media-gfx/ufraw/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <use>
+ <flag name="contrast">
+ enable contrast setting option
+ </flag>
+ <flag name="fits">
+ Enable support for the FITS image format through <pkg>sci-libs/cfitsio</pkg>
+ </flag>
+ <flag name="timezone">
+ enable DST correction for file timestamps
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ufraw</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/ufraw/ufraw-0.20-r1.ebuild b/media-gfx/ufraw/ufraw-0.20-r1.ebuild
new file mode 100644
index 000000000000..60d5b046f303
--- /dev/null
+++ b/media-gfx/ufraw/ufraw-0.20-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils fdo-mime gnome2-utils toolchain-funcs
+
+DESCRIPTION="RAW Image format viewer and GIMP plugin"
+HOMEPAGE="http://ufraw.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
+IUSE="contrast fits gimp gnome gtk openmp timezone"
+
+RDEPEND="dev-libs/glib:2
+ >=media-gfx/exiv2-0.11:0=
+ media-libs/lcms
+ >=media-libs/lensfun-0.2.5
+ media-libs/libpng:0=
+ media-libs/tiff
+ virtual/jpeg
+ fits? ( sci-libs/cfitsio:0= )
+ gnome? ( >=gnome-base/gconf-2 )
+ gtk? ( >=x11-libs/gtk+-2.6:2
+ >=media-gfx/gtkimageview-1.5 )
+ gimp? ( >=x11-libs/gtk+-2.6:2
+ >=media-gfx/gtkimageview-1.5
+ >=media-gfx/gimp-2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-0.17-cfitsio-automagic.patch \
+ "${FILESDIR}"/${P}-gimp.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable contrast) \
+ $(use_with fits cfitsio) \
+ $(use_with gimp) \
+ $(use_enable gnome mime) \
+ $(use_with gtk) \
+ $(use_enable openmp) \
+ $(use_enable timezone dst-correction) \
+ $(usex gimp --with-gtk "")
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" schemasdir=/etc/gconf/schemas install
+ dodoc README TODO
+}
+
+pkg_preinst() {
+ if use gnome; then
+ gnome2_gconf_savelist
+ fi
+}
+
+pkg_postinst() {
+ if use gnome; then
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+ gnome2_gconf_install
+ fi
+}
+
+pkg_postrm() {
+ if use gnome; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ fi
+}
diff --git a/media-gfx/ufraw/ufraw-0.21-r1.ebuild b/media-gfx/ufraw/ufraw-0.21-r1.ebuild
new file mode 100644
index 000000000000..b16c10f20169
--- /dev/null
+++ b/media-gfx/ufraw/ufraw-0.21-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils fdo-mime gnome2-utils toolchain-funcs
+
+DESCRIPTION="RAW Image format viewer and GIMP plugin"
+HOMEPAGE="http://ufraw.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
+IUSE="contrast fits gimp gnome gtk openmp timezone"
+
+REQUIRED_USE="gimp? ( gtk )"
+
+RDEPEND="
+ dev-libs/glib:2=
+ >=media-gfx/exiv2-0.11:0=
+ media-libs/lcms:2=
+ >=media-libs/lensfun-0.2.5:=
+ media-libs/libpng:0=
+ media-libs/tiff:0=
+ virtual/jpeg:0=
+ fits? ( sci-libs/cfitsio:0= )
+ gnome? ( >=gnome-base/gconf-2 )
+ gtk? ( >=x11-libs/gtk+-2.6:2
+ >=media-gfx/gtkimageview-1.5 )
+ gimp? ( >=media-gfx/gimp-2 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.17-cfitsio-automagic.patch
+ epatch "${FILESDIR}"/${P}-CVE-2015-3885.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable contrast) \
+ $(use_with fits cfitsio) \
+ $(use_with gimp) \
+ $(use_enable gnome mime) \
+ $(use_with gtk) \
+ $(use_enable openmp) \
+ $(use_enable timezone dst-correction)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" schemasdir=/etc/gconf/schemas install
+ dodoc README TODO
+}
+
+pkg_preinst() {
+ if use gnome; then
+ gnome2_gconf_savelist
+ fi
+}
+
+pkg_postinst() {
+ if use gnome; then
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+ gnome2_gconf_install
+ fi
+}
+
+pkg_postrm() {
+ if use gnome; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ fi
+}
diff --git a/media-gfx/ufraw/ufraw-0.21.ebuild b/media-gfx/ufraw/ufraw-0.21.ebuild
new file mode 100644
index 000000000000..4ddf3483190e
--- /dev/null
+++ b/media-gfx/ufraw/ufraw-0.21.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils fdo-mime gnome2-utils toolchain-funcs
+
+DESCRIPTION="RAW Image format viewer and GIMP plugin"
+HOMEPAGE="http://ufraw.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
+IUSE="contrast fits gimp gnome gtk openmp timezone"
+
+REQUIRED_USE="gimp? ( gtk )"
+
+RDEPEND="
+ dev-libs/glib:2=
+ >=media-gfx/exiv2-0.11:0=
+ media-libs/lcms:2=
+ >=media-libs/lensfun-0.2.5:=
+ media-libs/libpng:0=
+ media-libs/tiff:0=
+ virtual/jpeg:0=
+ fits? ( sci-libs/cfitsio:0= )
+ gnome? ( >=gnome-base/gconf-2 )
+ gtk? ( >=x11-libs/gtk+-2.6:2
+ >=media-gfx/gtkimageview-1.5 )
+ gimp? ( >=media-gfx/gimp-2 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.17-cfitsio-automagic.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable contrast) \
+ $(use_with fits cfitsio) \
+ $(use_with gimp) \
+ $(use_enable gnome mime) \
+ $(use_with gtk) \
+ $(use_enable openmp) \
+ $(use_enable timezone dst-correction)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" schemasdir=/etc/gconf/schemas install
+ dodoc README TODO
+}
+
+pkg_preinst() {
+ if use gnome; then
+ gnome2_gconf_savelist
+ fi
+}
+
+pkg_postinst() {
+ if use gnome; then
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+ gnome2_gconf_install
+ fi
+}
+
+pkg_postrm() {
+ if use gnome; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ fi
+}
diff --git a/media-gfx/ufraw/ufraw-0.22.ebuild b/media-gfx/ufraw/ufraw-0.22.ebuild
new file mode 100644
index 000000000000..4ddf3483190e
--- /dev/null
+++ b/media-gfx/ufraw/ufraw-0.22.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils fdo-mime gnome2-utils toolchain-funcs
+
+DESCRIPTION="RAW Image format viewer and GIMP plugin"
+HOMEPAGE="http://ufraw.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
+IUSE="contrast fits gimp gnome gtk openmp timezone"
+
+REQUIRED_USE="gimp? ( gtk )"
+
+RDEPEND="
+ dev-libs/glib:2=
+ >=media-gfx/exiv2-0.11:0=
+ media-libs/lcms:2=
+ >=media-libs/lensfun-0.2.5:=
+ media-libs/libpng:0=
+ media-libs/tiff:0=
+ virtual/jpeg:0=
+ fits? ( sci-libs/cfitsio:0= )
+ gnome? ( >=gnome-base/gconf-2 )
+ gtk? ( >=x11-libs/gtk+-2.6:2
+ >=media-gfx/gtkimageview-1.5 )
+ gimp? ( >=media-gfx/gimp-2 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.17-cfitsio-automagic.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable contrast) \
+ $(use_with fits cfitsio) \
+ $(use_with gimp) \
+ $(use_enable gnome mime) \
+ $(use_with gtk) \
+ $(use_enable openmp) \
+ $(use_enable timezone dst-correction)
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" schemasdir=/etc/gconf/schemas install
+ dodoc README TODO
+}
+
+pkg_preinst() {
+ if use gnome; then
+ gnome2_gconf_savelist
+ fi
+}
+
+pkg_postinst() {
+ if use gnome; then
+ fdo-mime_mime_database_update
+ fdo-mime_desktop_database_update
+ gnome2_gconf_install
+ fi
+}
+
+pkg_postrm() {
+ if use gnome; then
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ fi
+}
diff --git a/media-gfx/uniconvertor/Manifest b/media-gfx/uniconvertor/Manifest
new file mode 100644
index 000000000000..342ee925975a
--- /dev/null
+++ b/media-gfx/uniconvertor/Manifest
@@ -0,0 +1 @@
+DIST uniconvertor-2.0_pre379.tar.xz 1844780 SHA256 96ab27fd19743bcb12385ffd15a586033e8a4a3aa1958eecf1c5cdee67a73fa5 SHA512 3a0dd8e52addb391225ae148a673e3464a04e0d36e5955e496ef78e91597408706e5cbc06113b3e959446c6dd89aefa821f32ef81a5d1837a2a3d405a5a63dea WHIRLPOOL 53c78ec1fdc64445467ea9a9ab04923a9447b428c37f1d43789e03ece61361a00db7686e0ce566805313c7298334c35a1d4fa0939d81d9962f072d5daece36df
diff --git a/media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-import.patch b/media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-import.patch
new file mode 100644
index 000000000000..fae5535c6492
--- /dev/null
+++ b/media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-import.patch
@@ -0,0 +1,30 @@
+ src/uc2/formats/sk1/model.py | 2 +-
+ src/unittests/image_tests/__init__.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/uc2/formats/sk1/model.py b/src/uc2/formats/sk1/model.py
+index 33e2b55..59aecf2 100644
+--- a/src/uc2/formats/sk1/model.py
++++ b/src/uc2/formats/sk1/model.py
+@@ -16,7 +16,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ from copy import deepcopy
+-import Image
++from PIL import Image
+
+ from uc2 import _, uc2const
+ from uc2.formats.pdxf import const
+diff --git a/src/unittests/image_tests/__init__.py b/src/unittests/image_tests/__init__.py
+index 031cd9f..6165129 100644
+--- a/src/unittests/image_tests/__init__.py
++++ b/src/unittests/image_tests/__init__.py
+@@ -16,7 +16,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ import unittest, os, shutil
+-import Image
++from PIL import Image
+
+
+ _pkgdir = __path__[0]
diff --git a/media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-libimg.patch b/media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-libimg.patch
new file mode 100644
index 000000000000..f84b332ec63e
--- /dev/null
+++ b/media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-libimg.patch
@@ -0,0 +1,30 @@
+ setup.py | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 46cda83..5cfd22a 100644
+--- a/setup.py
++++ b/setup.py
+@@ -184,14 +184,14 @@ modules.append(cairo_module)
+ # libraries=['potrace'])
+ #modules.append(trace_module)
+
+-#libimg_src = os.path.join(src_path, 'uc2', 'libimg')
+-#files = make_source_list(libimg_src, ['_libimg.c', ])
+-#include_dirs = make_source_list(include_path, ['ImageMagick', ])
+-#libimg_module = Extension('uc2.libimg._libimg',
+-# define_macros=[('MAJOR_VERSION', '1'), ('MINOR_VERSION', '0')],
+-# sources=files, include_dirs=include_dirs,
+-# libraries=['MagickWand'])
+-#modules.append(libimg_module)
++libimg_src = os.path.join(src_path, 'uc2', 'libimg')
++files = make_source_list(libimg_src, ['_libimg.c', ])
++include_dirs = make_source_list(include_path, ['ImageMagick-6', ])
++libimg_module = Extension('uc2.libimg._libimg',
++ define_macros=[('MAJOR_VERSION', '1'), ('MINOR_VERSION', '0')],
++ sources=files, include_dirs=include_dirs,
++ libraries=['MagickWand'])
++modules.append(libimg_module)
+
+ if os.path.isfile(os.path.join(include_path, 'lcms2.h')):
+ pycms_src = os.path.join(src_path, 'uc2', 'cms')
diff --git a/media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-test.patch b/media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-test.patch
new file mode 100644
index 000000000000..2a3e3a00601f
--- /dev/null
+++ b/media-gfx/uniconvertor/files/uniconvertor-2.0_pre379-test.patch
@@ -0,0 +1,37 @@
+ src/unittests/_libimg_tests/__init__.py | 2 +-
+ src/unittests/image_tests/__init__.py | 4 +++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/unittests/_libimg_tests/__init__.py b/src/unittests/_libimg_tests/__init__.py
+index 3891290..cdc7dd6 100644
+--- a/src/unittests/_libimg_tests/__init__.py
++++ b/src/unittests/_libimg_tests/__init__.py
+@@ -84,7 +84,7 @@ class TestCoreLibImgFunctions(unittest.TestCase):
+ def test07_image_type(self):
+ names = []
+ names.append(['type_bilevel.png', 'BilevelType'])
+- names.append(['type_grayscale.png', 'GrayscaleType'])
++ names.append(['type_grayscale.png', 'BilevelType'])
+ names.append(['type_palette.png', 'PaletteType'])
+ names.append(['type_palettematte.png', 'PaletteMatteType'])
+ names.append(['type_truecolor.png', 'TrueColorType'])
+diff --git a/src/unittests/image_tests/__init__.py b/src/unittests/image_tests/__init__.py
+index 031cd9f..265743a 100644
+--- a/src/unittests/image_tests/__init__.py
++++ b/src/unittests/image_tests/__init__.py
+@@ -42,6 +42,7 @@ class TestImageFunctions(unittest.TestCase):
+ def tearDown(self):pass
+ # shutil.rmtree(self.save_dir)
+
++ @unittest.skip("Broken")
+ def test01_create_new_image(self):
+ for mode in MODES:
+ image = Image.new(mode, (100, 100))
+@@ -77,6 +78,7 @@ class TestImageFunctions(unittest.TestCase):
+ result = False
+ self.assertNotEquals(False, result)
+
++ @unittest.skip("Broken")
+ def test04_load_unsupported_images(self):
+ for name in FILES2:
+ filename = os.path.join(self.load_dir, name)
diff --git a/media-gfx/uniconvertor/metadata.xml b/media-gfx/uniconvertor/metadata.xml
new file mode 100644
index 000000000000..b66884cd1c1d
--- /dev/null
+++ b/media-gfx/uniconvertor/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="google-code">uniconvertor</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/uniconvertor/uniconvertor-2.0_pre379-r1.ebuild b/media-gfx/uniconvertor/uniconvertor-2.0_pre379-r1.ebuild
new file mode 100644
index 000000000000..45c4a5ce57e7
--- /dev/null
+++ b/media-gfx/uniconvertor/uniconvertor-2.0_pre379-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Commandline tool for popular vector formats convertion"
+HOMEPAGE="http://sk1project.org/modules.php?name=Products&product=uniconvertor https://code.google.com/p/uniconvertor/"
+SRC_URI="http://dev.gentoo.org/~jlec/distfiles/${P}.tar.xz"
+
+KEYWORDS="amd64 ~arm hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~x86-solaris"
+SLOT="0"
+LICENSE="GPL-2 LGPL-2"
+IUSE=""
+
+RDEPEND="
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ media-gfx/imagemagick
+ media-libs/lcms:2
+ virtual/python-imaging[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ app-text/ghostscript-gpl"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-import.patch
+ "${FILESDIR}"/${P}-libimg.patch
+ "${FILESDIR}"/${P}-test.patch
+ )
+
+python_prepare_all() {
+ local wand
+ wand=$(pkg-config --libs Wand | sed -e "s:^ *::g" -e "s: *$::g" -e "s:-l:\':g" -e "s: :',:g" -e "s:$:':g" -e "s:,'$::g")
+
+ distutils-r1_python_prepare_all
+
+ sed \
+ -e "/libraries/s:'MagickWand':${wand}:g" \
+ -i setup.py || die
+
+ ln -sf \
+ "${EPREFIX}"/usr/share/imagemagick/sRGB.icm \
+ src/unittests/cms_tests/cms_data/sRGB.icm || die
+}
+
+python_test() {
+ einfo ${PYTHONPATH}
+ #distutils_install_for_testing
+ cd src/unittests || die
+ ${EPYTHON} all_tests.py || die
+}
diff --git a/media-gfx/videorbits/Manifest b/media-gfx/videorbits/Manifest
new file mode 100644
index 000000000000..1d8d885e06cf
--- /dev/null
+++ b/media-gfx/videorbits/Manifest
@@ -0,0 +1 @@
+DIST videorbits-2.201.tgz 648187 SHA256 2d3b7dd906e2e20e2082b5106b92d279d662a8877ec780cac0913c877642d1bb
diff --git a/media-gfx/videorbits/files/videorbits-2.201-libpng15.patch b/media-gfx/videorbits/files/videorbits-2.201-libpng15.patch
new file mode 100644
index 000000000000..e384738b9357
--- /dev/null
+++ b/media-gfx/videorbits/files/videorbits-2.201-libpng15.patch
@@ -0,0 +1,30 @@
+--- src/simple_png_read.c
++++ src/simple_png_read.c
+@@ -92,7 +92,7 @@
+ return -1;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ fprintf(stderr, "simple_png_read: error (internal)\n");
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ fclose(fp);
+@@ -226,7 +226,7 @@
+ return -1;
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ fprintf(stderr, "simple_png_read_header: error\n");
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ fclose(fp);
+--- src/simple_png_write.c
++++ src/simple_png_write.c
+@@ -18,6 +18,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <png.h>
++#include <zlib.h>
+
+ int simple_png_write_rgba(
+ char *filename,
diff --git a/media-gfx/videorbits/metadata.xml b/media-gfx/videorbits/metadata.xml
new file mode 100644
index 000000000000..126edb4e0cd2
--- /dev/null
+++ b/media-gfx/videorbits/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">comparametric</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/videorbits/videorbits-2.201.ebuild b/media-gfx/videorbits/videorbits-2.201.ebuild
new file mode 100644
index 000000000000..51b99c720072
--- /dev/null
+++ b/media-gfx/videorbits/videorbits-2.201.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="a collection of programs for creating high dynamic range images"
+HOMEPAGE="http://comparametric.sourceforge.net/"
+SRC_URI="mirror://sourceforge/comparametric/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ppc x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11
+ sys-libs/zlib
+ media-libs/libpng
+ virtual/jpeg"
+DEPEND="${RDEPEND}"
+
+DOCS=( AUTHORS README README.MORE )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+
+ sed -i \
+ -e "s:\$(prefix)/images:\$(prefix)/share/${PN}/images:" \
+ images/Makefile.in || die
+
+ sed -i \
+ -e "s:\$(prefix)/lookuptables:\$(prefix)/share/${PN}/lookuptables:" \
+ lookuptables/Makefile.in || die
+}
+
+src_configure() {
+ tc-export CC
+ econf
+}
diff --git a/media-gfx/viewer/Manifest b/media-gfx/viewer/Manifest
new file mode 100644
index 000000000000..7d38105ca2db
--- /dev/null
+++ b/media-gfx/viewer/Manifest
@@ -0,0 +1 @@
+DIST viewer-0.8.0.tar.gz 117329 RMD160 0967c7ef22937a5bcb616e6a4e0807e22bd05849 SHA1 a1a86994d3f8e1361cb2576e9380b953be741bf7 SHA256 c8f553b26b0ce0f875339dbddba7b36d23f47468d121780e7eb18e1bcbbff2ce
diff --git a/media-gfx/viewer/metadata.xml b/media-gfx/viewer/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/media-gfx/viewer/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/viewer/viewer-0.8.0.ebuild b/media-gfx/viewer/viewer-0.8.0.ebuild
new file mode 100644
index 000000000000..08da8c47065c
--- /dev/null
+++ b/media-gfx/viewer/viewer-0.8.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit autotools multilib
+
+DESCRIPTION="A stereo pair image viewer (supports ppm's only)"
+HOMEPAGE="http://www-users.cs.umn.edu/~wburdick/geowall/viewer.html"
+SRC_URI="ftp://ftp.cs.umn.edu/dept/users/wburdick/geowall/${P}.tar.gz"
+SRC_URI="http://www-users.cs.umn.edu/~wburdick/ftp/geowall/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+DEPEND="virtual/opengl
+ media-libs/freeglut
+ x11-libs/libXmu
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i configure.in \
+ -e "s|/usr/X11R6/lib|/usr/$(get_libdir)/X11|g" \
+ -e 's|/usr/X11R6/include|/usr/include/X11|g'
+ eautoreconf
+}
+
+src_compile() {
+ emake LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" || die "emake failed"
+}
+
+src_install() {
+ dobin viewer
+ doman viewer.1
+
+ dodoc AUTHORS ChangeLog README
+}
diff --git a/media-gfx/viewnior/Manifest b/media-gfx/viewnior/Manifest
new file mode 100644
index 000000000000..f5574d1284a4
--- /dev/null
+++ b/media-gfx/viewnior/Manifest
@@ -0,0 +1,2 @@
+DIST viewnior-1.3.tar.gz 525015 SHA256 46c97c1a85361519b42fe008cfb8911e66f709f3a3a988c11047ab3726889f10 SHA512 1047422f73fc9bc7b7cbef1298f52bd1e59c0430bdcfa219061ec929c9c874f7872d3d6fbfcb44681f031deffd7fa5c2ffe2e98002df47ada8f432203feefa33 WHIRLPOOL 899a6f40fb4da994335cee5f21ee0613e60f7bbb3b1331730c25c44278f93da3c28abe08e3ddd61a1566c1c9117b24a743bf8336c4b72a0945fa333d6e5cfb03
+DIST viewnior-1.4.tar.gz 566470 SHA256 ea14f27d384962c0c429e123f1275938bacd2a636b995645aadf3d78c708616f SHA512 eef2efdbcb828f18b4fc4b6a63d191728dbb696b26a3bf4b0fd58c136182dc43486edd52f564f20fb5f773e472c9d7736d4ab7ae483f90c029071867cede9228 WHIRLPOOL 624ea88bdf4da57cfb7f740ef5b43468af2211895fd91a22338d7caef7458bbec86306bfbce738fc39219893451df866d1c1eeaa2fac92aeaef245b7276e5ff2
diff --git a/media-gfx/viewnior/metadata.xml b/media-gfx/viewnior/metadata.xml
new file mode 100644
index 000000000000..b73e1c37604f
--- /dev/null
+++ b/media-gfx/viewnior/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>wired@gentoo.org</email>
+ <name>Alex Alexander</name>
+ </maintainer>
+ <longdescription lang="en">
+ </longdescription>
+</pkgmetadata>
+
diff --git a/media-gfx/viewnior/viewnior-1.3.ebuild b/media-gfx/viewnior/viewnior-1.3.ebuild
new file mode 100644
index 000000000000..9599f1e6f7e7
--- /dev/null
+++ b/media-gfx/viewnior/viewnior-1.3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+inherit fdo-mime gnome2-utils autotools
+
+DESCRIPTION="Fast and simple image viewer"
+HOMEPAGE="http://xsisqox.github.com/Viewnior/index.html"
+SRC_URI="mirror://github/xsisqox/Viewnior/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="dev-libs/glib:2
+ >=x11-libs/gtk+-2.20:2
+ x11-misc/shared-mime-info"
+RDEPEND="${DEPEND}"
+
+DOCS="AUTHORS ChangeLog* NEWS README TODO"
+
+src_prepare() {
+ # fix for bug #454230
+ sed -r -i "s:(PKG_CHECK_MODULES):AC_CHECK_LIB([m],[cos])\n\n\1:" configure.ac
+ sed -r -i "/^SHAVE_INIT/d" configure.ac
+
+ eautoreconf
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-gfx/viewnior/viewnior-1.4.ebuild b/media-gfx/viewnior/viewnior-1.4.ebuild
new file mode 100644
index 000000000000..93cd4f40946b
--- /dev/null
+++ b/media-gfx/viewnior/viewnior-1.4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+inherit fdo-mime gnome2-utils autotools
+
+DESCRIPTION="Fast and simple image viewer"
+HOMEPAGE="http://xsisqox.github.com/Viewnior/index.html"
+SRC_URI="https://www.dropbox.com/s/zytq0suabesv933/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND="dev-libs/glib:2
+ media-gfx/exiv2
+ >=x11-libs/gtk+-2.20:2
+ x11-misc/shared-mime-info"
+RDEPEND="${DEPEND}"
+
+DOCS="AUTHORS ChangeLog* NEWS README TODO"
+
+src_prepare() {
+ # fix for bug #454230
+ sed -r -i "s:(PKG_CHECK_MODULES):AC_CHECK_LIB([m],[cos])\n\n\1:" configure.ac
+
+ eautoreconf
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}
diff --git a/media-gfx/w3mimgfb/Manifest b/media-gfx/w3mimgfb/Manifest
new file mode 100644
index 000000000000..0ccb82177b5d
--- /dev/null
+++ b/media-gfx/w3mimgfb/Manifest
@@ -0,0 +1 @@
+DIST w3mimgfb-0.9.1.tar.gz 10070 RMD160 ba947fa6a7cae54968810aea527d0d432b6fad17 SHA1 c1b0ae7d90e148c4460a9ca0678fd3aeb0fac653 SHA256 c16802c48871dba05b0dfe86f886f30dd8fd50baa34deaf1b292e80b2bf76f12
diff --git a/media-gfx/w3mimgfb/metadata.xml b/media-gfx/w3mimgfb/metadata.xml
new file mode 100644
index 000000000000..91f4e72fb544
--- /dev/null
+++ b/media-gfx/w3mimgfb/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/w3mimgfb/w3mimgfb-0.9.1.ebuild b/media-gfx/w3mimgfb/w3mimgfb-0.9.1.ebuild
new file mode 100644
index 000000000000..7a6979192ecf
--- /dev/null
+++ b/media-gfx/w3mimgfb/w3mimgfb-0.9.1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit toolchain-funcs
+
+DESCRIPTION="Image viewer for w3m under frame buffer environment"
+HOMEPAGE="http://homepage3.nifty.com/slokar/fb/w3mimg.html"
+SRC_URI="http://homepage3.nifty.com/slokar/fb/${P}.tar.gz"
+
+LICENSE="w3m BSD"
+SLOT="0"
+KEYWORDS="~amd64 x86 ppc"
+IUSE=""
+
+DEPEND="media-libs/stimg"
+RDEPEND="${DEPEND}
+ virtual/w3m"
+
+src_prepare() {
+ sed \
+ -e '/^CC/d' \
+ -e '/^CFLAGS/d' \
+ -e '/^LDFLAGS/d' \
+ -i Makefile || die
+ tc-export CC
+}
+
+src_install() {
+ exeinto /usr/libexec/w3m
+ doexe w3mimgdisplayfb
+
+ dodoc readme.txt
+}
diff --git a/media-gfx/wally/Manifest b/media-gfx/wally/Manifest
new file mode 100644
index 000000000000..80a30477c290
--- /dev/null
+++ b/media-gfx/wally/Manifest
@@ -0,0 +1 @@
+DIST wally-2.4.5.tar.gz 1601018 SHA256 deb8aecf3742a93b5051fdc9ca2144a4f88892a465cd4723e04ec2a07f2cca5e SHA512 d0b81478fa2e7690136aa811b761ebf2f8a5daf4e2b736d67b72e1b874d0ec5e3020bb97d52b30c79411b8c4a50c6e05a44051cc87157b012f5a7f60b085faa5 WHIRLPOOL 8f5e2e560f333674c97a2f47762487a653a1cc34d93ce8fc015f4680c775a3e10179ed92f46ba21206419188a43d0bb20e2a2d84460634e6abdeaf4a188ac177
diff --git a/media-gfx/wally/files/wally-2.2.0-disable-kde4.patch b/media-gfx/wally/files/wally-2.2.0-disable-kde4.patch
new file mode 100644
index 000000000000..95f471ce1cd5
--- /dev/null
+++ b/media-gfx/wally/files/wally-2.2.0-disable-kde4.patch
@@ -0,0 +1,14 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -238,11 +238,6 @@ else( APPLE )
+ add_custom_command( TARGET ${PROGNAME} POST_BUILD COMMAND strip ARGS ${WALLY_PATH} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
+ endif( CMAKE_BUILD_TYPE STREQUAL Release )
+
+- find_package( KDE4 )
+- if ( KDE4_FOUND )
+- add_subdirectory( ${CMAKE_SOURCE_DIR}/wallyplugin )
+- endif( KDE4_FOUND )
+-
+ endif( APPLE )
+
+ file( GLOB TS_FILES ${CMAKE_SOURCE_DIR}/res/lang/*.ts )
diff --git a/media-gfx/wally/files/wally-2.2.0-disable_popup.patch b/media-gfx/wally/files/wally-2.2.0-disable_popup.patch
new file mode 100644
index 000000000000..9d482eb231c0
--- /dev/null
+++ b/media-gfx/wally/files/wally-2.2.0-disable_popup.patch
@@ -0,0 +1,9 @@
+--- a/wallyplugin/CMakeLists.txt
++++ b/wallyplugin/CMakeLists.txt
+@@ -26,6 +26,3 @@ install(TARGETS plasma_wallpaper_wallypl
+
+ install(FILES plasma-wallpaper-wallyplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+ install(FILES wallyplugin.png DESTINATION ${ICON_INSTALL_DIR}/oxygen/16x16/apps)
+-
+-install(CODE "execute_process(COMMAND kbuildsycoca4 OUTPUT_QUIET ERROR_QUIET)")
+-install(CODE "execute_process(COMMAND kdialog --title \"WallyPlugin\" --msgbox \"WallyPlugin will be loaded next time KDE is started. Please select it in Appearance Settings.\")")
diff --git a/media-gfx/wally/files/wally-2.4.4-gold.patch b/media-gfx/wally/files/wally-2.4.4-gold.patch
new file mode 100644
index 000000000000..6410bf7f7bc4
--- /dev/null
+++ b/media-gfx/wally/files/wally-2.4.4-gold.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -284,7 +284,7 @@
+ set( PROGNAME wally )
+
+ add_executable( ${PROGNAME} ${WALLY_QMS} ${WALLY_SRCS} ${WALLY_MOC_SRCS} ${WALLY_IMAGES_RC_SRCS} ${WALLY_LANGUAGES_RC_SRCS} ${WALLY_UI_HDRS} )
+- target_link_libraries( ${PROGNAME} ${QT_LIBRARIES} ${EXIF_LIBRARIES} )
++ target_link_libraries( ${PROGNAME} ${QT_LIBRARIES} ${EXIF_LIBRARIES} -lX11 )
+ install( TARGETS ${PROGNAME} DESTINATION /usr/bin )
+
+ if( CMAKE_BUILD_TYPE STREQUAL Release )
diff --git a/media-gfx/wally/metadata.xml b/media-gfx/wally/metadata.xml
new file mode 100644
index 000000000000..60f988e1b73e
--- /dev/null
+++ b/media-gfx/wally/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>desktop-misc</herd>
+ <maintainer>
+ <email>hwoarang@gentoo.org</email>
+ <name>Markos Chandras</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">wally</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/wally/wally-2.4.5.ebuild b/media-gfx/wally/wally-2.4.5.ebuild
new file mode 100644
index 000000000000..19b48f7bf5af
--- /dev/null
+++ b/media-gfx/wally/wally-2.4.5.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+KDE_REQUIRED="optional"
+
+inherit eutils kde4-base readme.gentoo
+
+DESCRIPTION="A Qt4/KDE4 wallpaper changer"
+HOMEPAGE="http://www.becrux.com/index.php?page=projects&name=wally"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="4"
+KEYWORDS="amd64 x86"
+IUSE="debug kde"
+
+DEPEND="
+ media-libs/libexif
+ x11-libs/libX11
+ dev-qt/qtcore:4
+ dev-qt/qtdbus:4
+ dev-qt/qtgui:4
+ dev-qt/qtsql:4
+ dev-qt/qtsvg:4
+ kde? ( $(add_kdebase_dep kdelibs) )
+"
+RDEPEND="${DEPEND}"
+
+DOCS=(
+ "AUTHORS" "ChangeLog" "README" "README.XFCE4"
+ "README.shortcuts" "TODO"
+)
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.2.0-disable_popup.patch
+)
+
+src_prepare() {
+ DOC_CONTENTS="In order to use wallyplugin you need to
+ restart plasma in your KDE4 enviroment."
+ kde4-base_src_prepare
+ use kde || epatch "${FILESDIR}"/${PN}-2.2.0-disable-kde4.patch
+}
+
+src_configure() {
+ mycmakeargs=(
+ -DSTATIC=FALSE
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ newicon "${S}"/res/images/idle.png wally.png
+ make_desktop_entry wally Wally wally "Graphics;Qt"
+ use kde && readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ use kde && readme.gentoo_print_elog
+}
diff --git a/media-gfx/wings/Manifest b/media-gfx/wings/Manifest
new file mode 100644
index 000000000000..c07c9dba831c
--- /dev/null
+++ b/media-gfx/wings/Manifest
@@ -0,0 +1 @@
+DIST wings-1.1.1.tar.bz2 1932572 SHA256 1a75a39a1a4586b242558a879d611adf1566b86785750f48ba60d851c2e40d08
diff --git a/media-gfx/wings/files/wings.sh b/media-gfx/wings/files/wings.sh
new file mode 100644
index 000000000000..e542588910a6
--- /dev/null
+++ b/media-gfx/wings/files/wings.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+ESDL_ROOT="/usr/lib/erlang/lib/esdl"
+WINGS_ROOT="/usr/lib/erlang/lib/wings"
+exec erl -smp disable -noshell -pa $ESDL_ROOT/ebin $WINGS_ROOT/ebin -run wings_start start_halt
diff --git a/media-gfx/wings/metadata.xml b/media-gfx/wings/metadata.xml
new file mode 100644
index 000000000000..1faadf36651d
--- /dev/null
+++ b/media-gfx/wings/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <longdescription>
+Wings 3D is a polygon mesh modeler inspired by Nendo and
+Mirai from Izware.
+
+It is possible to assign materials, vertex color, UV
+coordinates and textures, but there will be improvements
+in those features before Wings goes 1.0.
+
+There is no support in Wings for doing animations.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">wings</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/wings/wings-1.1.1.ebuild b/media-gfx/wings/wings-1.1.1.ebuild
new file mode 100644
index 000000000000..2e0636af6fbc
--- /dev/null
+++ b/media-gfx/wings/wings-1.1.1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit multilib eutils
+
+DESCRIPTION="excellent 3D polygon mesh modeler"
+HOMEPAGE="http://www.wings3d.com/"
+SRC_URI="mirror://sourceforge/wings/${P}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc ppc64 x86"
+IUSE=""
+
+RDEPEND=">=dev-lang/erlang-13.0
+ >=media-libs/esdl-1.0.1
+ media-libs/libsdl[opengl]"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ ERL_PATH="/usr/$(get_libdir)/erlang/lib/"
+ ESDL_PATH="${ERL_PATH}/$(best_version media-libs/esdl | cut -d/ -f2)"
+}
+
+src_compile() {
+ make ESDL_PATH="${ERL_PATH}/$(best_version media-libs/esdl | cut -d/ -f2)" || die
+}
+
+src_install() {
+ WINGS_PATH=${ERL_PATH}/${P}
+ dodir ${WINGS_PATH}
+
+ find -name 'Makefile*' -exec rm -f '{}' \;
+ for subdir in e3d ebin icons plugins plugins_src src fonts ; do
+ cp -r ${subdir} "${D}"/${WINGS_PATH}/ || die
+ done
+
+ dosym ${WINGS_PATH} ${ERL_PATH}/${PN}
+ dosym ${ESDL_PATH} ${ERL_PATH}/esdl
+ newbin "${FILESDIR}"/wings.sh wings
+ dodoc AUTHORS README
+}
diff --git a/media-gfx/wkhtmltopdf/Manifest b/media-gfx/wkhtmltopdf/Manifest
new file mode 100644
index 000000000000..eb252c6dbe2d
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/Manifest
@@ -0,0 +1,2 @@
+DIST wkhtmltopdf-0.12.1.2.tar.gz 127182 SHA256 2f27dd0e9e7957692aba98014c873121898275859b1da0f1dab42b7dd5e10098 SHA512 81f3e29e6714e9fc6737100218758b59760c9675b9d9caaad1b40737e6322e6067d80dcf51cf8a533aaa5fb293b0c72efc6331909eeeed60da007fccb90f88d8 WHIRLPOOL 1f1e6470fbbbee07a76073d2946df3159d962d6452211126431e3a9c6ad44c0bf0b6444ace4616251def091dde13196577c11f3b7c4daf56892c48b0725d60e5
+DIST wkhtmltopdf-0.12.2.1.tar.gz 127565 SHA256 24847a2b8f495fb40d8b7a92c9051b40520d2439454ee8def0c952c932a1283d SHA512 4986d1a85ad8f3e8a3577ae0d6e1cfba726b143c67d3301ebbaac844c63a1ffd39b6d2b2c64054ec3603ca24efd01deb5b2f7501b14c092b09ad64160dc9db0e WHIRLPOOL f37afa640430db18cd48258f2f670405714fe3084a6cd2684aae9952bdbe5afdd1acc42fed4d0811c8a3329a5e4bd7b658444d7fb5683d228bb526670d624001
diff --git a/media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.1.2-manpages.patch b/media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.1.2-manpages.patch
new file mode 100644
index 000000000000..962647121402
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/files/wkhtmltopdf-0.12.1.2-manpages.patch
@@ -0,0 +1,24 @@
+Fix install paths and don't precompress man pages.
+
+--- wkhtmltopdf-0.12.1.2/src/image/image.pro
++++ wkhtmltopdf-0.12.1.2/src/image/image.pro
+@@ -25,7 +25,7 @@
+
+ unix {
+ man.path=$$INSTALLBASE/share/man/man1
+- man.extra=LD_LIBRARY_PATH=../../bin/ ../../bin/wkhtmltoimage --manpage | gzip > $(INSTALL_ROOT)/share/man/man1/wkhtmltoimage.1.gz
++ man.extra=LD_LIBRARY_PATH=../../bin/ ../../bin/wkhtmltoimage --manpage > $(INSTALL_ROOT)$$INSTALLBASE/share/man/man1/wkhtmltoimage.1
+
+ QMAKE_EXTRA_TARGETS += man
+ INSTALLS += man
+--- wkhtmltopdf-0.12.1.2/src/pdf/pdf.pro
++++ wkhtmltopdf-0.12.1.2/src/pdf/pdf.pro
+@@ -25,7 +25,7 @@
+
+ unix {
+ man.path=$$INSTALLBASE/share/man/man1
+- man.extra=LD_LIBRARY_PATH=../../bin/ ../../bin/wkhtmltopdf --manpage | gzip > $(INSTALL_ROOT)/share/man/man1/wkhtmltopdf.1.gz
++ man.extra=LD_LIBRARY_PATH=../../bin/ ../../bin/wkhtmltopdf --manpage > $(INSTALL_ROOT)$$INSTALLBASE/share/man/man1/wkhtmltopdf.1
+
+ QMAKE_EXTRA_TARGETS += man
+ INSTALLS += man
diff --git a/media-gfx/wkhtmltopdf/metadata.xml b/media-gfx/wkhtmltopdf/metadata.xml
new file mode 100644
index 000000000000..9022e05f424b
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="github">wkhtmltopdf/wkhtmltopdf</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.1.2.ebuild b/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.1.2.ebuild
new file mode 100644
index 000000000000..1cdab0e991d4
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.1.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2 multilib eutils
+
+DESCRIPTION="Convert html to pdf (and various image formats) using webkit"
+HOMEPAGE="http://wkhtmltopdf.org/ https://github.com/wkhtmltopdf/wkhtmltopdf/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+RDEPEND="dev-qt/qtgui:4
+ dev-qt/qtwebkit:4
+ dev-qt/qtcore:4
+ dev-qt/qtsvg:4
+ dev-qt/qtxmlpatterns:4"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # fix install paths and don't precompress man pages
+ epatch "${FILESDIR}"/${P}-manpages.patch
+
+ sed -i "s:\(INSTALLBASE/\)lib:\1$(get_libdir):" src/lib/lib.pro || die
+}
+
+src_configure() {
+ eqmake4 INSTALLBASE=/usr
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install
+ dodoc AUTHORS CHANGELOG* README.md
+ use examples && dodoc -r examples
+}
diff --git a/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.2.1.ebuild b/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.2.1.ebuild
new file mode 100644
index 000000000000..caf71b29af52
--- /dev/null
+++ b/media-gfx/wkhtmltopdf/wkhtmltopdf-0.12.2.1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit qt4-r2 multilib eutils
+
+DESCRIPTION="Convert html to pdf (and various image formats) using webkit"
+HOMEPAGE="http://wkhtmltopdf.org/ https://github.com/wkhtmltopdf/wkhtmltopdf/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+RDEPEND="dev-qt/qtgui:4
+ dev-qt/qtwebkit:4
+ dev-qt/qtcore:4
+ dev-qt/qtsvg:4
+ dev-qt/qtxmlpatterns:4"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ # fix install paths and don't precompress man pages
+ epatch "${FILESDIR}"/${PN}-0.12.1.2-manpages.patch
+
+ sed -i "s:\(INSTALLBASE/\)lib:\1$(get_libdir):" src/lib/lib.pro || die
+}
+
+src_configure() {
+ eqmake4 INSTALLBASE=/usr
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install
+ dodoc AUTHORS CHANGELOG* README.md
+ use examples && dodoc -r examples
+}
diff --git a/media-gfx/xfig/Manifest b/media-gfx/xfig/Manifest
new file mode 100644
index 000000000000..8f63326ed0e3
--- /dev/null
+++ b/media-gfx/xfig/Manifest
@@ -0,0 +1 @@
+DIST xfig.3.2.5c.full.tar.gz 6078933 SHA256 ea628f975b79ab175ab29220cc118274466497f6217f2989928317be2993a1f9 SHA512 763bd6fd43bff9b44f934dd6e16b0aa5142041f895e74564d28e7252e012f1c7728bbee40e3970357c7d3fd15aa109dbfcbc1d0a2203fa1a2ed770aabacd9525 WHIRLPOOL f2234fc9c1f011bdec301b447816f7bfd090bc2ca3471823afd0617ae15ceafb195dd81ddbb0b255f23e0256b35e12cdd30f44fb65d3fff23f444e4d26028726
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-CVE-2010-4262.patch b/media-gfx/xfig/files/xfig-3.2.5b-CVE-2010-4262.patch
new file mode 100644
index 000000000000..eb85513ef69d
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-CVE-2010-4262.patch
@@ -0,0 +1,22 @@
+--- w_msgpanel.c
++++ w_msgpanel.c 2010-12-03 14:21:07.931926127 +0000
+@@ -60,7 +60,7 @@ DeclareStaticArgs(12);
+ /* for the popup message (file_msg) window */
+
+ static int file_msg_length=0;
+-static char tmpstr[300];
++static char tmpstr[512];
+ static Widget file_msg_panel,
+ file_msg_win, file_msg_dismiss;
+
+@@ -582,8 +582,8 @@ file_msg(char *format,...)
+ }
+
+ va_start(ap, format);
+- /* format the string */
+- vsprintf(tmpstr, format, ap);
++ /* format the string (but leave room for \n and \0) */
++ vsnprintf(tmpstr, sizeof(tmpstr)-2, format, ap);
+ va_end(ap);
+
+ strcat(tmpstr,"\n");
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch b/media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch
new file mode 100644
index 000000000000..d773da51b180
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-app-defaults.patch
@@ -0,0 +1,24 @@
+Defaults for xfig. Idea from Roland Rosenfeld <roland@debian.org>
+
+diff -urNad xfig~/Fig.ad xfig/Fig.ad
+--- Fig.ad
++++ Fig.ad
+@@ -10,13 +10,17 @@
+
+ ! some sample settings you may want to change
+
++! If the following resource is set to false, xfig will use metric units
++! by default.
++Fig.inches: false
++
+ ! The following fixes a problem that some window managers have
+ ! with xfig continually resizing itself
+
+ Fig*AllowShellResize: false
+
+ ! Image editor - can edit imported image
+-Fig.image_editor: xv
++Fig.image_editor: gimp
+
+ ! name of ghostscript (not ghostview)
+ Fig.ghostscript: gs
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-darwin.patch b/media-gfx/xfig/files/xfig-3.2.5b-darwin.patch
new file mode 100644
index 000000000000..0c4fa29fb271
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-darwin.patch
@@ -0,0 +1,22 @@
+--- fig.h
++++ fig.h
+@@ -374,7 +374,7 @@
+ extern long random();
+ extern void srandom(unsigned int);
+
+-#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) && !defined(__FreeBSD__) && !defined(__GLIBC__)
++#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) && !defined(__FreeBSD__) && !defined(__DARWIN__) && !defined(__GLIBC__)
+ extern void srandom(int);
+
+ #endif
+--- w_keyboard.c
++++ w_keyboard.c
+@@ -41,7 +41,7 @@
+ #define REG_NOERROR REG_OKAY
+ #endif
+
+-#if defined(__FreeBSD__) && !defined(REG_NOERROR)
++#if (defined(__FreeBSD__) || defined(__DARWIN__)) && !defined(REG_NOERROR)
+ #define REG_NOERROR 0
+ #endif
+
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-edit-menu.patch b/media-gfx/xfig/files/xfig-3.2.5b-edit-menu.patch
new file mode 100644
index 000000000000..ea396f1b005c
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-edit-menu.patch
@@ -0,0 +1,332 @@
+diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/Imakefile /root/xfig.3.2.5b/Imakefile
+--- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/Imakefile 2012-04-20 09:46:26.217957716 +0200
++++ /root/xfig.3.2.5b/Imakefile 2012-04-20 09:16:28.744362135 +0200
+@@ -251,7 +251,7 @@
+ #endif /* USEJPEG */
+
+ #ifdef I18N
+-I18N_DEFS = -DI18N -DSETLOCALE
++I18N_DEFS = -DI18N -DSETLOCALE -DXAW_INTERNATIONALIZATION
+ I18N_SRC = w_i18n.c
+ I18N_OBJ = w_i18n.o
+ #endif
+diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/e_edit.c /root/xfig.3.2.5b/e_edit.c
+--- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/e_edit.c 2007-04-04 18:18:32.000000000 +0200
++++ /root/xfig.3.2.5b/e_edit.c 2012-04-20 10:02:04.209542848 +0200
+@@ -3211,7 +3211,7 @@
+ XtAddCallback(but1, XtNcallback,
+ (XtCallbackProc) grab_button, (XtPointer) NULL);
+
+- if ( cur_image_editor != NULL && *cur_image_editor != (char) NULL) {
++ if ( cur_image_editor != NULL && *cur_image_editor != '\0' ) {
+ FirstArg(XtNlabel,"Edit Image");
+ NextArg(XtNfromHoriz, but1);
+ NextArg(XtNfromVert, label);
+@@ -3501,7 +3501,7 @@
+ {
+ Widget but_spline[3];
+ Dimension label_height, label_width;
+- int i, dist;
++ int i, dist;
+
+ static char use_item[]="Edit the behavior\nof the control point";
+
+@@ -3598,7 +3598,7 @@
+ below = but_spline[i] = XtCreateManagedWidget(sfactor_type[i].label,
+ commandWidgetClass, form, Args, ArgCount);
+ XtAddCallback(but_spline[i], XtNcallback,
+- (XtCallbackProc) toggle_sfactor_type, (XtPointer) i);
++ (XtCallbackProc) toggle_sfactor_type, (XtPointer) (intptr_t) i);
+ XtSetArg(Args[0], XtNfromVert, below); /* here are the direct */
+ XtSetArg(Args[1], XtNvertDistance, 3 * dist); /* accesses to Args */
+ }
+@@ -3608,7 +3608,7 @@
+ static void
+ toggle_sfactor_type(Widget panel_local, XtPointer _sfactor_index, XtPointer call_data)
+ {
+- int sfactor_index = (int) _sfactor_index;
++ int sfactor_index = (int) (intptr_t) _sfactor_index;
+
+ update_sfactor_value(sfactor_type[sfactor_index].value);
+ XawScrollbarSetThumb(sfactor_bar,
+@@ -3629,10 +3629,10 @@
+ static void
+ scroll_sfactor_value(Widget panel_local, XtPointer closure, XtPointer _num_pixels)
+ {
+- int *num_pixels = (int *) _num_pixels;
++ int num_pixels = (int) (intptr_t) _num_pixels;
+
+ update_sfactor_value(sub_sfactor->s +
+- (STEP_VALUE * SFACTOR_SIGN((int) num_pixels)));
++ (STEP_VALUE * SFACTOR_SIGN(num_pixels)));
+ XawScrollbarSetThumb(panel_local, SFACTOR_TO_PERCENTAGE(sub_sfactor->s),
+ THUMB_H);
+ }
+@@ -4031,7 +4031,6 @@
+ Widget
+ color_selection_panel(char *label, char *wname, char *name, Widget parent, Widget below, Widget beside, Widget *button, Widget *popup, int color, XtCallbackProc callback)
+ {
+-
+ FirstArg(XtNfromVert, below);
+ NextArg(XtNborderWidth, 0);
+ NextArg(XtNtop, XtChainBottom);
+@@ -4057,7 +4056,7 @@
+ * callback
+ */
+ /* also set the label */
+- (callback)(below, (XtPointer) color, NULL);
++ (callback)(below, (XtPointer) (intptr_t) color, NULL);
+ *popup = make_color_popup_menu(below, name, callback, NO_TRANSP, NO_BACKG);
+
+ return *button;
+@@ -4658,7 +4657,7 @@
+ int ival;
+ double val;
+
+- new_points_units = (int) new_unit;
++ new_points_units = (int) (intptr_t) new_unit;
+ if (points_units == new_points_units)
+ return;
+
+@@ -4739,7 +4738,7 @@
+ FirstArg(XtNlabel, XtName(w));
+ SetValues(arc_type_panel);
+
+- generic_vals.arc_type = (int) new_style;
++ generic_vals.arc_type = (int) (intptr_t) new_style;
+ /* if now a pie-wedge type, make the arrow panels insensitive */
+ if (generic_vals.arc_type == T_PIE_WEDGE_ARC) {
+ /* unmanage arrow forms */
+@@ -4865,7 +4864,7 @@
+ static void
+ pen_color_select(Widget w, XtPointer new_color, XtPointer call_data)
+ {
+- pen_color = (Color) new_color;
++ pen_color = (Color) (intptr_t) new_color;
+ color_select(pen_col_button, pen_color);
+ if (pen_color_popup) {
+ XtPopdown(pen_color_popup);
+@@ -4875,7 +4874,7 @@
+ static void
+ fill_color_select(Widget w, XtPointer new_color, XtPointer call_data)
+ {
+- fill_color = (Color) new_color;
++ fill_color = (Color) (intptr_t) new_color;
+ color_select(fill_col_button, fill_color);
+ if (fill_color_popup) {
+ XtPopdown(fill_color_popup);
+@@ -4927,7 +4926,7 @@
+ {
+ FirstArg(XtNlabel, XtName(w));
+ SetValues(hidden_text_panel);
+- hidden_text_flag = (int) new_hidden_text;
++ hidden_text_flag = (int) (intptr_t) new_hidden_text;
+ }
+
+ static void
+@@ -4935,7 +4934,7 @@
+ {
+ FirstArg(XtNlabel, XtName(w));
+ SetValues(rigid_text_panel);
+- rigid_text_flag = (int) new_rigid_text;
++ rigid_text_flag = (int) (intptr_t) new_rigid_text;
+ }
+
+ static void
+@@ -4943,7 +4942,7 @@
+ {
+ FirstArg(XtNlabel, XtName(w));
+ SetValues(special_text_panel);
+- special_text_flag = (int) new_special_text;
++ special_text_flag = (int) (intptr_t) new_special_text;
+ }
+
+ static void
+@@ -4951,7 +4950,7 @@
+ {
+ FirstArg(XtNlabel, XtName(w));
+ SetValues(textjust_panel);
+- textjust = (int) new_textjust;
++ textjust = (int) (intptr_t) new_textjust;
+ }
+
+ static void
+@@ -4963,7 +4962,7 @@
+
+ FirstArg(XtNlabel, XtName(w));
+ SetValues(flip_pic_panel);
+- flip_pic_flag = (int) new_flipflag;
++ flip_pic_flag = (int) (intptr_t) new_flipflag;
+ p1.x = panel_get_dim_value(x1_panel);
+ p1.y = panel_get_dim_value(y1_panel);
+ p2.x = panel_get_dim_value(x2_panel);
+@@ -4996,7 +4995,7 @@
+ FirstArg(XtNlabel, XtName(w));
+ SetValues(rotation_panel);
+ /* get new rotation (0 = 0 degrees, 1 = 90, 2 = 180, 3 = 270) */
+- rotation = (int) new_rotation;
++ rotation = (int) (intptr_t) new_rotation;
+
+ /* get the two opposite corners */
+ p1.x = panel_get_dim_value(x1_panel);
+@@ -5104,7 +5103,7 @@
+
+ FirstArg(XtNlabel, XtName(w));
+ SetValues(fill_style_button);
+- fill_flag = (int) new_fillflag;
++ fill_flag = (int) (intptr_t) new_fillflag;
+
+ if (fill_flag == 0) {
+ /* no fill; blank out fill density value and pattern */
+diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/u_draw.c /root/xfig.3.2.5b/u_draw.c
+--- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/u_draw.c 2007-04-04 18:18:32.000000000 +0200
++++ /root/xfig.3.2.5b/u_draw.c 2012-04-20 09:20:31.379714332 +0200
+@@ -603,7 +603,7 @@
+ /* is it a picture object or a Fig figure? */
+ if (line->type == T_PICTURE) {
+ if (line->pic->pic_cache) {
+- if ((line->pic->pic_cache->bitmap != (Pixmap) NULL) && active_layer(line->depth)) {
++ if ((line->pic->pic_cache->bitmap != NULL) && active_layer(line->depth)) {
+ /* only draw the picture if there is a pixmap AND this layer is active */
+ draw_pic_pixmap(line, op);
+ return;
+diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_cmdpanel.c /root/xfig.3.2.5b/w_cmdpanel.c
+--- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_cmdpanel.c 2008-07-17 17:50:06.000000000 +0200
++++ /root/xfig.3.2.5b/w_cmdpanel.c 2012-04-20 09:54:55.595198185 +0200
+@@ -1581,7 +1581,7 @@
+ beside = XtCreateManagedWidget("char_button", commandWidgetClass,
+ character_map_panel, Args, ArgCount);
+ /* add callback to paste character into current text */
+- XtAddCallback(beside, XtNcallback, paste_char, (XtPointer) i);
++ XtAddCallback(beside, XtNcallback, paste_char, (XtPointer) (intptr_t) i);
+ /* skip empty entries and 127 (delete) */
+ if (i==126) {
+ below = beside;
+diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_color.c /root/xfig.3.2.5b/w_color.c
+--- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_color.c 2007-04-04 18:18:32.000000000 +0200
++++ /root/xfig.3.2.5b/w_color.c 2012-04-20 09:23:24.738775166 +0200
+@@ -334,7 +334,7 @@
+ } else {
+ NextArg(XtNstate, True); /* start with edit pen */
+ }
+- NextArg(XtNradioData, (XtPointer) (i+1)); /* can't use 0 */
++ NextArg(XtNradioData, (XtPointer) (intptr_t) (i+1)); /* can't use 0 */
+ mixedEdit[i] = XtCreateManagedWidget("mixedEdit", toggleWidgetClass,
+ mixedForm[i], Args, ArgCount);
+ XtAddCallback(mixedEdit[i], XtNcallback, switch_edit, (XtPointer) 0);
+@@ -807,7 +807,7 @@
+ set_slider_sensitivity();
+
+ /* activate the one the user pressed (pen or fill) */
+- XawToggleSetCurrent(mixedEdit[0],(XtPointer) (func==I_PEN_COLOR? 1:2));
++ XawToggleSetCurrent(mixedEdit[0],(XtPointer) (intptr_t) (func==I_PEN_COLOR? 1:2));
+ }
+
+ void restore_mixed_colors(void)
+diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_export.c /root/xfig.3.2.5b/w_export.c
+--- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_export.c 2007-09-19 21:32:30.000000000 +0200
++++ /root/xfig.3.2.5b/w_export.c 2012-04-20 09:24:09.181867729 +0200
+@@ -384,7 +384,7 @@
+ change_orient();
+ appres.landscape = (int) client_data;
+ /* make sure that paper size is appropriate */
+- papersize_select(export_papersize_panel, (XtPointer) appres.papersize, (XtPointer) 0);
++ papersize_select(export_papersize_panel, (XtPointer) (intptr_t) appres.papersize, (XtPointer) 0);
+ }
+ }
+
+diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_fontpanel.c /root/xfig.3.2.5b/w_fontpanel.c
+--- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_fontpanel.c 2007-04-04 18:18:32.000000000 +0200
++++ /root/xfig.3.2.5b/w_fontpanel.c 2012-04-20 09:26:50.774325641 +0200
+@@ -142,14 +142,14 @@
+ ps_fontmenu_items[i].type = MENU_IMAGESTRING; /* put the fontnames in
+ * menu */
+ ps_fontmenu_items[i].label = ps_fontinfo[i].name;
+- ps_fontmenu_items[i].info = (caddr_t) (i - 1); /* index for font # */
++ ps_fontmenu_items[i].info = (caddr_t) (intptr_t) (i - 1); /* index for font # */
+ }
+
+ for (i = 0; i < NUM_LATEX_FONTS; i++) {
+ latex_fontmenu_items[i].type = MENU_IMAGESTRING; /* put the fontnames in
+ * menu */
+ latex_fontmenu_items[i].label = latex_fontinfo[i].name;
+- latex_fontmenu_items[i].info = (caddr_t) i; /* index for font # */
++ latex_fontmenu_items[i].info = (caddr_t) (intptr_t) i; /* index for font # */
+ }
+
+ pane_actions = XtParseTranslationTable("<EnterWindow>:set()\n\
+@@ -352,9 +352,9 @@
+ char *font_name = mi->label;
+
+ if (*flag_sel)
+- *font_ps_sel = (int) mi->info; /* set ps font to one selected */
++ *font_ps_sel = (int) (intptr_t) mi->info; /* set ps font to one selected */
+ else
+- *font_latex_sel = (int) mi->info; /* set latex font to one
++ *font_latex_sel = (int) (intptr_t) mi->info; /* set latex font to one
+ * selected */
+ put_msg("Font: %s", font_name);
+ /* put image of font in indicator window */
+diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_indpanel.c /root/xfig.3.2.5b/w_indpanel.c
+--- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_indpanel.c 2009-03-30 17:54:00.000000000 +0200
++++ /root/xfig.3.2.5b/w_indpanel.c 2012-04-20 09:34:38.181793478 +0200
+@@ -2692,7 +2692,7 @@
+ /* "Ticks" checkbutton */
+ below = CreateCheckbutton("Show ticks", "ticks", tickform, below, (Widget) NULL,
+ MANAGE, LARGE_CHK, &dimline_ticks,
+- dimline_panel_preview, (Widget) NULL);
++ dimline_panel_preview, (Widget*) NULL);
+
+ /* Tick Thickness label */
+ FirstArg(XtNlabel, "Thickness");
+diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_print.c /root/xfig.3.2.5b/w_print.c
+--- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_print.c 2009-04-20 18:26:14.000000000 +0200
++++ /root/xfig.3.2.5b/w_print.c 2012-04-20 09:36:11.004623947 +0200
+@@ -407,7 +407,7 @@
+ change_orient();
+ appres.landscape = (int) new_orient;
+ /* make sure that paper size is appropriate */
+- papersize_select(print_papersize_panel, (XtPointer) appres.papersize, (XtPointer) 0);
++ papersize_select(print_papersize_panel, (XtPointer) (intptr_t) appres.papersize, (XtPointer) 0);
+ }
+ }
+
+@@ -771,7 +771,7 @@
+ for (i = 0; i < XtNumber(paper_sizes); i++) {
+ entry = XtCreateManagedWidget(paper_sizes[i].fname, smeBSBObjectClass,
+ papersize_menu, NULL, ZERO);
+- XtAddCallback(entry, XtNcallback, papersize_select, (XtPointer) i);
++ XtAddCallback(entry, XtNcallback, papersize_select, (XtPointer) (intptr_t) i);
+ }
+
+ /* Orientation */
+diff -Naur /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_util.c /root/xfig.3.2.5b/w_util.c
+--- /var/tmp/portage/media-gfx/xfig-3.2.5b-r2/work/xfig.3.2.5b/w_util.c 2009-03-30 17:52:38.000000000 +0200
++++ /root/xfig.3.2.5b/w_util.c 2012-04-20 09:37:37.764153931 +0200
+@@ -378,7 +378,7 @@
+ }
+ entry = XtCreateManagedWidget(entries[i], smeBSBObjectClass, pulldown_menu,
+ NULL, ZERO);
+- XtAddCallback(entry, XtNcallback, callback, (XtPointer) i);
++ XtAddCallback(entry, XtNcallback, callback, (XtPointer) (intptr_t) i);
+ }
+ return pulldown_menu;
+ }
+@@ -488,7 +488,7 @@
+ NextArg(XtNbackground, black_color.pixel);
+ }
+ entry = XtCreateManagedWidget(buf, commandWidgetClass, pop_form, Args, ArgCount);
+- XtAddCallback(entry, XtNcallback, callback, (XtPointer) i);
++ XtAddCallback(entry, XtNcallback, callback, (XtPointer) (intptr_t) i);
+ }
+
+ /* make a scrollable viewport in case all the buttons don't fit */
+@@ -545,7 +545,7 @@
+ }
+ entry = XtCreateManagedWidget(buf, commandWidgetClass, color_box,
+ Args, ArgCount);
+- XtAddCallback(entry, XtNcallback, callback, (XtPointer) i);
++ XtAddCallback(entry, XtNcallback, callback, (XtPointer) (intptr_t) i);
+ }
+
+ /* make the cancel button */
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-figparserstack.patch b/media-gfx/xfig/files/xfig-3.2.5b-figparserstack.patch
new file mode 100644
index 000000000000..7f4668214acc
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-figparserstack.patch
@@ -0,0 +1,61 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30_figparserstack.dpatch by Hans de Goede <j.w.r.degoede@hhs.nl>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix Stack-based buffer overflow by loading malformed .FIG files
+## DP: https://bugzilla.redhat.com/show_bug.cgi?id=543905
+## DP: Closes: #559274
+
+@DPATCH@
+diff -urNad xfig~/f_readold.c xfig/f_readold.c
+--- xfig~/f_readold.c
++++ xfig/f_readold.c
+@@ -471,7 +471,7 @@
+ F_text *t;
+ int n;
+ int dum;
+- char buf[128];
++ char buf[512];
+ PR_SIZE tx_dim;
+
+ if ((t = create_text()) == NULL)
+@@ -485,22 +485,34 @@
+ t->pen_style = -1;
+ t->angle = 0.0;
+ t->next = NULL;
++ if (!fgets(buf, sizeof(buf), fp)) {
++ file_msg("Incomplete text data");
++ free((char *) t);
++ return (NULL);
++ }
++
++ /* Note using strlen(buf) here will waste a few bytes, as the
++ various text attributes are counted into this length too. */
++ if ((t->cstring = new_string(strlen(buf))) == NULL)
++ return (NULL);
++
+ /* ascent and length will be recalculated later */
+- n = fscanf(fp, " %d %d %d %d %d %d %d %[^\n]",
++ n = sscanf(buf, " %d %d %d %d %d %d %d %[^\n]",
+ &t->font, &dum, &dum, &t->ascent, &t->length,
+- &t->base_x, &t->base_y, buf);
++ &t->base_x, &t->base_y, t->cstring);
+ if (n != 8) {
+ file_msg("Incomplete text data");
++ free(t->cstring);
+ free((char *) t);
+ return (NULL);
+ }
+- if ((t->cstring = new_string(strlen(buf))) == NULL) {
++
++ if (!strlen(t->cstring)) {
++ free(t->cstring);
+ free((char *) t);
+ file_msg("Empty text string at line %d.", line_no);
+ return (NULL);
+ }
+- /* put string in structure */
+- strcpy(t->cstring, buf);
+
+ /* get the font struct */
+ t->zoom = zoomscale;
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-fix-eps-reading.patch b/media-gfx/xfig/files/xfig-3.2.5b-fix-eps-reading.patch
new file mode 100644
index 000000000000..7601d20eae31
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-fix-eps-reading.patch
@@ -0,0 +1,46 @@
+diff -ur xfig.3.2.5b/f_readeps.c xfig.3.2.5b.new/f_readeps.c
+--- xfig.3.2.5b/f_readeps.c 2009-03-30 17:52:18.000000000 +0200
++++ xfig.3.2.5b.new/f_readeps.c 2010-11-25 16:53:54.328247928 +0100
+@@ -252,12 +252,13 @@
+ {
+ char buf[300];
+ FILE *tmpfp, *pixfile, *gsfile;
+- char *psnam, *driver;
++ char *driver;
+ int status, wid, ht, nbitmap, fd;
+ char tmpfile[PATH_MAX],
+ pixnam[PATH_MAX],
+ errnam[PATH_MAX],
+- gscom[2 * PATH_MAX];
++ gscom[2 * PATH_MAX],
++ psnam[PATH_MAX];
+
+ wid = urx - llx;
+ ht = ury - lly;
+@@ -307,19 +308,14 @@
+ /* for color, use pcx */
+ driver = "pcx256";
+ }
+- /* avoid absolute paths (for Cygwin with gswin32) by changing directory */
+- if (tmpfile[0] == '/') {
+- psnam = strrchr(tmpfile, '/');
+- *psnam = 0;
+- sprintf(gscom, "cd \"%s/\";", tmpfile);
+- *psnam++ = '/'; /* Restore name for unlink() below */
+- } else {
+- psnam = tmpfile;
+- gscom[0] = '\0';
++ /* Canonicalize the eps file filename, needed to "defeat" -dSAFER */
++ if (!realpath(tmpfile, psnam)) {
++ file_msg("Cannot canonicalize %s: %s\n", tmpfile, strerror(errno));
++ return False;
+ }
+- sprintf(&gscom[strlen(gscom)],
+- "%s -r72x72 -dSAFER -sDEVICE=%s -g%dx%d -sOutputFile=%s -q - > %s 2>&1",
+- appres.ghostscript, driver, wid, ht, pixnam, errnam);
++ sprintf(gscom,
++ "%s -r72x72 -sDEVICE=%s -g%dx%d -sOutputFile=%s -dDELAYSAFER -c '<< /PermitFileReading [ (%s)] >> setuserparams .locksafe' -dSAFER -q - > %s 2>&1",
++ appres.ghostscript, driver, wid, ht, pixnam, psnam, errnam);
+ if (appres.DEBUG)
+ fprintf(stderr,"calling: %s\n",gscom);
+ if ((gsfile = popen(gscom, "w")) == 0) {
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-libpng-1.5.patch b/media-gfx/xfig/files/xfig-3.2.5b-libpng-1.5.patch
new file mode 100644
index 000000000000..7d9c3f15efb9
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-libpng-1.5.patch
@@ -0,0 +1,70 @@
+Index: xfig.3.2.5b/f_readpng.c
+===================================================================
+--- xfig.3.2.5b.orig/f_readpng.c
++++ xfig.3.2.5b/f_readpng.c
+@@ -73,7 +73,7 @@ read_png(FILE *file, int filetype, F_pic
+ }
+
+ /* set long jump recovery here */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* if we get here there was a problem reading the file */
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ close_picfile(file,filetype);
+@@ -90,15 +90,17 @@ read_png(FILE *file, int filetype, F_pic
+ png_get_IHDR(png_ptr, info_ptr, &w, &h, &bit_depth, &color_type,
+ &interlace_type, &compression_type, &filter_type);
+
+- if (info_ptr->valid & PNG_INFO_gAMA)
+- png_set_gamma(png_ptr, 2.2, info_ptr->gamma);
+- else
+- png_set_gamma(png_ptr, 2.2, 0.45);
++ png_fixed_point gamma = 0.45;
++ png_get_gAMA_fixed(png_ptr,info_ptr,&gamma);
++ png_set_gamma(png_ptr, 2.2, gamma);
+
+- if (info_ptr->valid & PNG_INFO_bKGD)
++ if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) {
+ /* set the background to the one supplied */
+- png_set_background(png_ptr, &info_ptr->background,
++ png_color_16p background;
++ png_get_bKGD(png_ptr,info_ptr,&background);
++ png_set_background(png_ptr, background,
+ PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
++ }
+ else {
+ /* blend the canvas background using the alpha channel */
+ background.red = x_bg_color.red >> 8;
+@@ -136,7 +138,11 @@ read_png(FILE *file, int filetype, F_pic
+
+ if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette)) {
+ png_get_hIST(png_ptr, info_ptr, &histogram);
++#if PNG_LIBPNG_VER_MAJOR <= 1 && PNG_LIBPNG_VER_MINOR < 5
+ png_set_dither(png_ptr, palette, num_palette, 256, histogram, 0);
++#else
++ png_set_quantize(png_ptr, palette, num_palette, 256, histogram, 0);
++#endif
+ }
+ }
+ if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
+Index: xfig.3.2.5b/f_wrpng.c
+===================================================================
+--- xfig.3.2.5b.orig/f_wrpng.c
++++ xfig.3.2.5b/f_wrpng.c
+@@ -20,6 +20,7 @@
+ #include "w_msgpanel.h"
+ #include "w_setup.h"
+ #include <png.h>
++#include <zlib.h>
+
+ /*
+ * Write PNG file from rgb data
+@@ -59,7 +60,7 @@ write_png(FILE *file, unsigned char *dat
+ }
+
+ /* set long jump recovery here */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* if we get here there was a problem reading the file */
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return False;
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch b/media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch
new file mode 100644
index 000000000000..c672a27554da
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-mkstemp.patch
@@ -0,0 +1,32 @@
+Missed hunk noticed https://bugzilla.redhat.com/show_bug.cgi?id=505257#c1 is recreated.
+
+http://bugs.gentoo.org/show_bug.cgi?id=264575
+
+=== modified file 'u_print.c'
+--- u_print.c 2010-01-14 19:50:08 +0000
++++ u_print.c 2010-01-14 19:54:14 +0000
+@@ -202,14 +202,22 @@
+ char tmp_fig_file[PATH_MAX];
+ char *outfile, *name, *real_lang;
+ char *suf;
++ int fd;
+
+ /* if file exists, ask if ok */
+ if (!ok_to_write(file, "EXPORT"))
+ return (1);
+
+- sprintf(tmp_fig_file, "%s/%s%06d", TMPDIR, "xfig-fig", getpid());
++ snprintf(tmp_fig_file, sizeof(tmp_fig_file), "%s/xfig-fig.XXXXXX", TMPDIR);
+ /* write the fig objects to a temporary file */
+ warnexist = False;
++
++ if ((fd = mkstemp(tmp_fig_file)) == -1) {
++ file_msg("Can't open temp file %s: %s\n", tmp_fig_file, strerror(errno));
++ return;
++ }
++ close(fd);
++
+ init_write_tmpfile();
+ if (write_file(tmp_fig_file, False)) {
+ end_write_tmpfile();
+
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-network_images.patch b/media-gfx/xfig/files/xfig-3.2.5b-network_images.patch
new file mode 100644
index 000000000000..1f7be5ff99a9
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-network_images.patch
@@ -0,0 +1,371 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 12_network_images.dpatch by Roland Rosenfeld <roland@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Some network icons colored and/or combined by Roland Rosenfeld.
+
+@DPATCH@
+diff -urNad xfig~/Libraries/Networks/Devices/firewall-pair.fig xfig/Libraries/Networks/Devices/firewall-pair.fig
+--- Libraries/Networks/Devices/firewall-pair.fig
++++ Libraries/Networks/Devices/firewall-pair.fig
+@@ -0,0 +1,75 @@
++#FIG 3.2 Produced by xfig version 3.2.5-alpha5
++Portrait
++Center
++Inches
++A4
++100.00
++Single
++-2
++# A pair of firewalls
++# Combined by Roland Rosenfeld
++1200 2
++0 32 #aeaaae
++# A pair of firewalls
++6 3375 2175 4050 3075
++6 3600 2250 4050 3075
++# Firewall
++# (from TomiOllila <Tomi.Ollila@tfi.net> )
++6 3600 2250 4050 3075
++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
++ 3825 3075 3825 2475
++2 1 0 1 0 20 2 0 20 0.000 0 0 -1 0 0 5
++ 3675 2475 3675 3075 3825 3075 3975 2925 3975 2400
++2 1 0 1 0 32 1 0 20 0.000 0 0 -1 0 0 7
++ 3600 2400 3600 2475 3900 2475 4050 2325 4050 2250 3750 2250
++ 3600 2400
++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 3
++ 3900 2475 3900 2400 3600 2400
++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
++ 3900 2400 4050 2250
++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 3
++ 3675 2625 3825 2625 3975 2475
++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 3
++ 3675 2775 3825 2775 3975 2625
++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 3
++ 3675 2925 3825 2925 3975 2775
++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
++ 3900 3000 3900 2850
++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
++ 3900 2700 3900 2550
++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
++ 3750 2475 3750 2625
++2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
++ 3750 2775 3750 2925
++-6
++-6
++6 3375 2175 3825 3000
++6 3450 2175 3825 3000
++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2
++ 3600 3000 3600 2400
++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2
++ 3675 2325 3825 2175
++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 3
++ 3450 2550 3600 2550 3750 2400
++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 3
++ 3450 2700 3600 2700 3750 2550
++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 3
++ 3450 2850 3600 2850 3750 2700
++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2
++ 3675 2925 3675 2775
++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2
++ 3675 2625 3675 2475
++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2
++ 3525 2400 3525 2550
++2 1 0 1 0 7 20 0 -1 0.000 0 0 7 0 0 2
++ 3525 2700 3525 2850
++-6
++2 1 0 1 0 20 22 0 20 0.000 0 0 -1 0 0 5
++ 3450 2400 3450 3000 3600 3000 3750 2850 3750 2325
++2 1 0 1 0 32 21 0 20 0.000 0 0 -1 0 0 7
++ 3375 2325 3375 2400 3675 2400 3825 2250 3825 2175 3525 2175
++ 3375 2325
++2 1 0 1 0 7 20 0 -1 0.000 0 0 -1 0 0 3
++ 3675 2400 3675 2325 3375 2325
++-6
++-6
+diff -urNad xfig~/Libraries/Networks/Devices/internet.fig xfig/Libraries/Networks/Devices/internet.fig
+--- Libraries/Networks/Devices/internet.fig
++++ Libraries/Networks/Devices/internet.fig
+@@ -0,0 +1,39 @@
++#FIG 3.2 Produced by xfig version 3.2.5-alpha5
++Portrait
++Center
++Inches
++A4
++100.00
++Single
++-2
++# Internet cloud
++# By Roland Rosenfeld
++1200 2
++# An Internet cloud
++6 4275 5700 7200 7650
++2 1 0 0 7 7 970 0 20 4.000 0 0 0 0 0 65
++ 4719 7111 4633 7121 4548 7105 4469 7057 4394 6983 4346 6888
++ 4309 6776 4298 6654 4309 6526 4346 6415 4394 6325 4469 6244
++ 4548 6197 4633 6181 4719 6197 4798 6048 4893 5915 4994 5825
++ 5122 5746 5244 5719 5377 5719 5505 5746 5627 5825 5733 5915
++ 5850 5825 5961 5746 6094 5719 6222 5719 6355 5746 6472 5825
++ 6583 5915 6668 6048 6748 6197 6833 6181 6918 6197 7003 6244
++ 7072 6325 7130 6415 7157 6526 7168 6654 7157 6776 7130 6888
++ 7072 6983 7003 7057 6918 7105 6833 7121 6748 7111 6668 7265
++ 6583 7387 6472 7488 6355 7557 6222 7594 6094 7594 5961 7557
++ 5850 7488 5733 7387 5627 7488 5505 7557 5377 7594 5244 7594
++ 5122 7557 4994 7488 4893 7387 4798 7265 4719 7111
++2 1 0 2 1 0 969 0 -1 0.000 0 0 0 0 0 65
++ 4719 7111 4633 7121 4548 7105 4469 7057 4394 6983 4346 6888
++ 4309 6776 4298 6654 4309 6526 4346 6415 4394 6325 4469 6244
++ 4548 6197 4633 6181 4719 6197 4798 6048 4893 5915 4994 5825
++ 5122 5746 5244 5719 5377 5719 5505 5746 5627 5825 5733 5915
++ 5850 5825 5961 5746 6094 5719 6222 5719 6355 5746 6472 5825
++ 6583 5915 6668 6048 6748 6197 6833 6181 6918 6197 7003 6244
++ 7072 6325 7130 6415 7157 6526 7168 6654 7157 6776 7130 6888
++ 7072 6983 7003 7057 6918 7105 6833 7121 6748 7111 6668 7265
++ 6583 7387 6472 7488 6355 7557 6222 7594 6094 7594 5961 7557
++ 5850 7488 5733 7387 5627 7488 5505 7557 5377 7594 5244 7594
++ 5122 7557 4994 7488 4893 7387 4798 7265 4719 7111
++4 0 0 100 0 18 33 0.0000 4 405 2040 4744 6853 Internet\001
++-6
+diff -urNad xfig~/Libraries/Networks/Routers/router-pair.fig xfig/Libraries/Networks/Routers/router-pair.fig
+--- Libraries/Networks/Routers/router-pair.fig
++++ Libraries/Networks/Routers/router-pair.fig
+@@ -0,0 +1,78 @@
++#FIG 3.2 Produced by xfig version 3.2.5-alpha5
++Portrait
++Center
++Inches
++A4
++100.00
++Single
++-2
++# A pair of routers
++# Colored and combined by Roland Rosenfeld
++1200 2
++# A pair of routers
++6 3150 3300 4275 3975
++6 3346 3450 4269 3975
++6 3844 3615 4173 3718
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 3879 3701 3854 3647 3976 3624 3955 3642 4159 3676 4111 3713
++ 3908 3676 3879 3701
++-6
++6 3617 3636 3803 3759
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 3764 3731 3638 3754 3634 3694 3671 3703 3738 3646 3800 3657
++ 3727 3719 3764 3731
++-6
++6 3803 3470 3988 3594
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 7 0 0 8
++ 3837 3518 3982 3481 3983 3541 3947 3535 3876 3591 3809 3581
++ 3882 3526 3837 3518
++-6
++1 2 0 1 0 15 51 0 20 0.000 1 0.0000 3807 3619 457 169 3349 3619 4264 3619
++1 2 0 1 0 15 53 0 20 0.000 1 0.0000 3803 3806 457 169 3346 3806 4261 3806
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 3705 3557 3738 3608 3609 3637 3638 3615 3439 3581 3488 3545
++ 3681 3576 3705 3557
++2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
++ 3350 3613 3347 3812
++2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
++ 4263 3626 4263 3815
++2 2 0 0 0 15 52 -1 20 0.000 0 0 -1 0 0 5
++ 3349 3626 4269 3626 4269 3800 3349 3800 3349 3626
++-6
++6 3150 3300 4125 3825
++6 3600 3450 3975 3600
++# polyline
++2 1 0 1 0 7 60 0 20 0.000 0 0 0 0 0 8
++ 3683 3551 3658 3497 3780 3474 3759 3492 3963 3526 3915 3563
++ 3712 3526 3683 3551
++-6
++6 3600 3300 3825 3450
++# polyline
++2 1 0 1 0 7 60 0 20 0.000 0 0 7 0 0 8
++ 3641 3368 3786 3331 3787 3391 3751 3385 3680 3441 3613 3431
++ 3686 3376 3641 3368
++-6
++6 3375 3450 3675 3675
++# polyline
++2 1 0 1 0 7 60 0 20 0.000 0 0 0 0 0 8
++ 3568 3581 3442 3604 3438 3544 3475 3553 3542 3496 3604 3507
++ 3531 3569 3568 3581
++-6
++1 2 0 1 0 15 61 0 20 0.000 1 0.0000 3611 3469 457 169 3153 3469 4068 3469
++1 2 0 1 0 15 63 0 20 0.000 1 0.0000 3607 3656 457 169 3150 3656 4065 3656
++2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2
++ 4067 3476 4067 3665
++# polyline
++2 1 0 1 0 7 60 0 20 0.000 0 0 0 0 0 8
++ 3509 3407 3542 3458 3413 3487 3442 3465 3243 3431 3292 3395
++ 3485 3426 3509 3407
++2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2
++ 3154 3463 3151 3662
++2 2 0 0 0 15 62 -1 20 0.000 0 0 -1 0 0 5
++ 3153 3476 4073 3476 4073 3650 3153 3650 3153 3476
++-6
++-6
+diff -urNad xfig~/Libraries/Networks/Routers/router4.fig xfig/Libraries/Networks/Routers/router4.fig
+--- Libraries/Networks/Routers/router4.fig
++++ Libraries/Networks/Routers/router4.fig
+@@ -0,0 +1,44 @@
++#FIG 3.2 Produced by xfig version 3.2.5-alpha5
++Portrait
++Center
++Metric
++A4
++100.00
++Single
++-2
++# Router
++# Colored by Roland Rosenfeld
++1200 2
++# Router
++6 3870 4455 5940 5625
++6 4995 4815 5715 5040
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 5072 5002 5018 4886 5284 4834 5238 4873 5683 4948 5578 5030
++ 5136 4948 5072 5002
++-6
++6 4500 4860 4905 5130
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 4822 5067 4545 5117 4537 4989 4618 5007 4766 4883 4900 4905
++ 4741 5041 4822 5067
++-6
++6 4905 4500 5310 4770
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 7 0 0 8
++ 4981 4603 5296 4523 5300 4653 5222 4640 5066 4762 4919 4741
++ 5079 4622 4981 4603
++-6
++1 2 0 1 0 15 51 0 20 0.000 1 0.0000 4914 4824 999 369 3915 4824 5913 4824
++1 2 0 1 0 15 53 0 20 0.000 1 0.0000 4908 5231 999 369 3909 5231 5907 5231
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 4693 4690 4766 4800 4483 4863 4545 4814 4111 4740 4219 4661
++ 4640 4731 4693 4690
++2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
++ 3917 4811 3910 5244
++2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2
++ 5910 4838 5910 5251
++2 2 0 0 0 15 52 -1 20 0.000 0 0 -1 0 0 5
++ 3915 4838 5924 4838 5924 5218 3915 5218 3915 4838
++-6
+diff -urNad xfig~/Libraries/Networks/Switches/switch-pair.fig xfig/Libraries/Networks/Switches/switch-pair.fig
+--- Libraries/Networks/Switches/switch-pair.fig
++++ Libraries/Networks/Switches/switch-pair.fig
+@@ -0,0 +1,66 @@
++#FIG 3.2 Produced by xfig version 3.2.5-alpha5
++Portrait
++Center
++Inches
++A4
++100.00
++Single
++-2
++# A pair of switches
++# Colored and combined by Roland Rosenfeld
++1200 2
++# A pair of switches
++6 2550 2625 4725 3750
++6 2625 2850 4725 3750
++6 3000 2850 4425 3300
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 3603 3180 3581 3210 3194 3210 3161 3240 3028 3195 3268 3126
++ 3214 3184 3608 3184
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 3651 3128 3673 3098 4060 3098 4093 3068 4226 3113 3986 3182
++ 4040 3124 3646 3124
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 3760 3008 3738 3038 3351 3038 3318 3068 3185 3023 3425 2954
++ 3371 3012 3765 3012
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 3827 2963 3849 2933 4236 2933 4269 2903 4402 2948 4162 3017
++ 4216 2959 3822 2959
++-6
++2 1 0 1 0 15 51 0 20 0.000 0 0 -1 0 0 4
++ 4125 3300 4725 2850 4725 3300 4125 3750
++2 2 0 1 0 15 51 0 20 0.000 0 0 -1 0 0 5
++ 2625 3300 4125 3300 4125 3750 2625 3750 2625 3300
++2 3 0 1 0 15 51 -1 20 0.000 0 0 -1 0 0 5
++ 2625 3300 3225 2850 4725 2850 4125 3300 2625 3300
++-6
++6 2550 2625 4650 3525
++6 2925 2625 4350 3075
++# polyline
++2 1 0 1 0 7 61 0 20 0.000 0 0 0 0 0 8
++ 3528 2955 3506 2985 3119 2985 3086 3015 2953 2970 3193 2901
++ 3139 2959 3533 2959
++# polyline
++2 1 0 1 0 7 61 0 20 0.000 0 0 0 0 0 8
++ 3576 2903 3598 2873 3985 2873 4018 2843 4151 2888 3911 2957
++ 3965 2899 3571 2899
++# polyline
++2 1 0 1 0 7 61 0 20 0.000 0 0 0 0 0 8
++ 3685 2783 3663 2813 3276 2813 3243 2843 3110 2798 3350 2729
++ 3296 2787 3690 2787
++# polyline
++2 1 0 1 0 7 61 0 20 0.000 0 0 0 0 0 8
++ 3752 2738 3774 2708 4161 2708 4194 2678 4327 2723 4087 2792
++ 4141 2734 3747 2734
++-6
++2 1 0 1 0 15 62 0 20 0.000 0 0 -1 0 0 4
++ 4050 3075 4650 2625 4650 3075 4050 3525
++2 2 0 1 0 15 62 0 20 0.000 0 0 -1 0 0 5
++ 2550 3075 4050 3075 4050 3525 2550 3525 2550 3075
++2 3 0 1 0 15 62 -1 20 0.000 0 0 -1 0 0 5
++ 2550 3075 3150 2625 4650 2625 4050 3075 2550 3075
++-6
++-6
+diff -urNad xfig~/Libraries/Networks/Switches/switch2.fig xfig/Libraries/Networks/Switches/switch2.fig
+--- Libraries/Networks/Switches/switch2.fig
++++ Libraries/Networks/Switches/switch2.fig
+@@ -0,0 +1,38 @@
++#FIG 3.2 Produced by xfig version 3.2.5-alpha5
++Portrait
++Center
++Inches
++A4
++100.00
++Single
++-2
++# Switch
++# colored by Roland Rosenfeld
++1200 2
++# Switch
++6 2625 2850 4725 3750
++6 3000 2850 4425 3300
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 3603 3180 3581 3210 3194 3210 3161 3240 3028 3195 3268 3126
++ 3214 3184 3608 3184
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 3651 3128 3673 3098 4060 3098 4093 3068 4226 3113 3986 3182
++ 4040 3124 3646 3124
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 3760 3008 3738 3038 3351 3038 3318 3068 3185 3023 3425 2954
++ 3371 3012 3765 3012
++# polyline
++2 1 0 1 0 7 50 0 20 0.000 0 0 0 0 0 8
++ 3827 2963 3849 2933 4236 2933 4269 2903 4402 2948 4162 3017
++ 4216 2959 3822 2959
++-6
++2 1 0 1 0 15 51 0 20 0.000 0 0 -1 0 0 4
++ 4125 3300 4725 2850 4725 3300 4125 3750
++2 2 0 1 0 15 51 0 20 0.000 0 0 -1 0 0 5
++ 2625 3300 4125 3300 4125 3750 2625 3750 2625 3300
++2 3 0 1 0 15 51 -1 20 0.000 0 0 -1 0 0 5
++ 2625 3300 3225 2850 4725 2850 4125 3300 2625 3300
++-6
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-papersize_b1.patch b/media-gfx/xfig/files/xfig-3.2.5b-papersize_b1.patch
new file mode 100644
index 000000000000..fa0bdf0a3c0e
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-papersize_b1.patch
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 32_papersize_b1.dpatch by Roland Rosenfeld <roland@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: xfig -papersize b1 now really uses B1 instead of B10
+## DP: Closes: #535181
+
+@DPATCH@
+diff -urNad xfig~/resources.c xfig/resources.c
+--- xfig~/resources.c
++++ xfig/resources.c
+@@ -228,7 +228,6 @@
+ {"A2 ", "ISO A2 ( 420mm x 594mm)", 19843, 28063},
+ {"A1 ", "ISO A1 ( 594mm x 841mm)", 28063, 39732},
+ {"A0 ", "ISO A0 ( 841mm x 1189mm)", 39732, 56173},
+- {"B10 ", "JIS B10 ( 32mm x 45mm)", 1516, 2117},
+ {"B9 ", "JIS B9 ( 45mm x 64mm)", 2117, 3017},
+ {"B8 ", "JIS B8 ( 64mm x 91mm)", 3017, 4300},
+ {"B7 ", "JIS B7 ( 91mm x 128mm)", 4300, 6050},
+@@ -239,6 +238,7 @@
+ {"B2 ", "JIS B2 ( 515mm x 728mm)", 24333, 34400},
+ {"B1 ", "JIS B1 ( 728mm x 1030mm)", 34400, 48666},
+ {"B0 ", "JIS B0 (1030mm x 1456mm)", 48666, 68783},
++ {"B10 ", "JIS B10 ( 32mm x 45mm)", 1516, 2117},
+ };
+
+ char *multiple_pages[] = {
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-pdfimport_mediabox.patch b/media-gfx/xfig/files/xfig-3.2.5b-pdfimport_mediabox.patch
new file mode 100644
index 000000000000..23de740f157d
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-pdfimport_mediabox.patch
@@ -0,0 +1,37 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 33_pdfimport_mediabox.dpatch by jsoula@univ-lille2.fr
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix reading "/MediaBox" when importing PDF (Closes: #530898).
+
+@DPATCH@
+diff -urNad xfig~/f_readeps.c xfig/f_readeps.c
+--- xfig~/f_readeps.c
++++ xfig/f_readeps.c
+@@ -77,11 +77,13 @@
+
+ /* look for /MediaBox for pdf file */
+ if (pdf_flag) {
+- if (!strncmp(buf, "/MediaBox", 8)) { /* look for the MediaBox spec */
++ char *s;
++ for(s=buf; (s=strchr(s,'/')); s++) {
++ if (!strncmp(s, "/MediaBox", 8)) { /* look for the MediaBox spec */
+ char *c;
+
+- c = strchr(buf, '[') + 1;
+- if (c && sscanf(c, "%d %d %d %d", &llx, &lly, &urx, &ury) < 4) {
++ c = strchr(s, '[');
++ if (c && sscanf(c+1, "%d %d %d %d", &llx, &lly, &urx, &ury) < 4) {
+ llx = lly = 0;
+ urx = paper_sizes[0].width * 72 / PIX_PER_INCH;
+ ury = paper_sizes[0].height * 72 / PIX_PER_INCH;
+@@ -89,7 +91,9 @@
+ appres.INCHES ? "Letter" : "A4");
+ app_flush();
+ }
++ break;
+ }
++ }
+ /* look for bounding box */
+ } else if (!nested && !strncmp(buf, "%%BoundingBox:", 14)) {
+ if (!strstr(buf, "(atend)")) { /* make sure doesn't say (atend) */
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-solaris.patch b/media-gfx/xfig/files/xfig-3.2.5b-solaris.patch
new file mode 100644
index 000000000000..a295b5227f00
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-solaris.patch
@@ -0,0 +1,26 @@
+* workaround some missing things on Solaris
+
+--- u_quartic.c
++++ u_quartic.c
+@@ -21,4 +21,7 @@
+ #include <math.h>
+
++ #ifndef M_PI
++ # define M_PI 3.14159265358979323846
++ #endif
+
+ static int
+--- w_intersect.c
++++ w_intersect.c
+@@ -31,6 +31,11 @@
+ #define ISET_P1 (1 << 0)
+ #define ISET_P2 (1 << 1)
+
++#if defined (__SVR4) && defined (__sun)
++#undef _Complex_I
++#define _Complex_I (__extension__ 1.0fi)
++#endif
++
+ intersect_state_e intersect_state = INTERSECT_INITIAL;
+
+ static INLINE Boolean
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-spelling.patch b/media-gfx/xfig/files/xfig-3.2.5b-spelling.patch
new file mode 100644
index 000000000000..942276ca75e9
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-spelling.patch
@@ -0,0 +1,29 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 31_spelling.dpatch by Roland Rosenfeld <roland@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix spelling errors in binary.
+
+@DPATCH@
+diff -urNad xfig~/f_load.c xfig/f_load.c
+--- xfig~/f_load.c
++++ xfig/f_load.c
+@@ -373,5 +373,5 @@
+ /* Format error; relevant error message is already delivered */
+ ;
+ else
+- file_msg("File \"%s\" is not accessable; %s.", file, strerror(err));
++ file_msg("File \"%s\" is not accessible; %s.", file, strerror(err));
+ }
+diff -urNad xfig~/f_readgif.c xfig/f_readgif.c
+--- xfig~/f_readgif.c
++++ xfig/f_readgif.c
+@@ -137,7 +137,7 @@
+
+ if (c == '!') { /* Extension */
+ if (! ReadOK(file,&c,1))
+- file_msg("GIF read error on extention function code");
++ file_msg("GIF read error on extension function code");
+ (void) DoGIFextension(file, c);
+ continue;
+ }
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch b/media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch
new file mode 100644
index 000000000000..6a5c3dff949e
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-urwfonts.patch
@@ -0,0 +1,79 @@
+--- u_fonts.c 2002-09-09 13:36:58.000000000 -0400
++++ u_fonts.c 2006-10-11 00:29:07.000000000 -0400
+@@ -22,41 +22,41 @@
+ /* X11 font names */
+
+ struct _xfstruct x_fontinfo[NUM_FONTS] = {
+- {"-*-times-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-times-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-times-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-times-bold-i-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-book-r-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-book-o-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-demi-r-normal--", (struct xfont*) NULL},
+- {"-*-avantgarde-demi-o-normal--", (struct xfont*) NULL},
+- {"-*-bookman-light-r-normal--", (struct xfont*) NULL},
+- {"-*-bookman-light-i-normal--", (struct xfont*) NULL},
+- {"-*-bookman-demi-r-normal--", (struct xfont*) NULL},
+- {"-*-bookman-demi-i-normal--", (struct xfont*) NULL},
+- {"-*-courier-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-courier-medium-o-normal--", (struct xfont*) NULL},
+- {"-*-courier-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-courier-bold-o-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-o-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-o-normal--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-r-narrow--", (struct xfont*) NULL},
+- {"-*-helvetica-medium-o-narrow--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-r-narrow--", (struct xfont*) NULL},
+- {"-*-helvetica-bold-o-narrow--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-new century schoolbook-bold-i-normal--", (struct xfont*) NULL},
+- {"-*-palatino-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-palatino-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-palatino-bold-r-normal--", (struct xfont*) NULL},
+- {"-*-palatino-bold-i-normal--", (struct xfont*) NULL},
+- {"-*-symbol-medium-r-normal--", (struct xfont*) NULL},
+- {"-*-itc zapf chancery-medium-i-normal--", (struct xfont*) NULL},
+- {"-*-itc zapf dingbats-*-*-*--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus roman no9 l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-medium-o-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-semibold-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw gothic l-semibold-o-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw bookman l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-medium-o-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus mono l-bold-o-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-medium-r-condensed--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-medium-i-condensed--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-bold-r-condensed--", (struct xfont*) NULL},
++ {"-urw-nimbus sans l-bold-i-condensed--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-century schoolbook l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-bold-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw palladio l-bold-i-normal--", (struct xfont*) NULL},
++ {"-urw-standard symbols l-medium-r-normal--", (struct xfont*) NULL},
++ {"-urw-urw chancery l-medium-i-normal--", (struct xfont*) NULL},
++ {"-urw-dingbats-medium-r-normal--", (struct xfont*) NULL},
+ };
+
+ /* Use the following font names for any font that doesn't exist in the table above.
diff --git a/media-gfx/xfig/files/xfig-3.2.5b-zoom-during-edit.patch b/media-gfx/xfig/files/xfig-3.2.5b-zoom-during-edit.patch
new file mode 100644
index 000000000000..11e5ceb932a8
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5b-zoom-during-edit.patch
@@ -0,0 +1,22 @@
+commit fc4381d7c3e8d7440a3e33430d24ebf217a99142
+Author: Vladislav Zavjalov <slazav@altlinux.org>
+Date: Thu Oct 2 12:24:04 2008 +0400
+
+ fix calling null function (todo: problem with initialize_char_handler after resize?)
+
+Fixes crash. To reproduce create some object, zoom in so that it does not fit
+the screen, start another edit and press Ctrl+Z.
+
+diff --git a/xfig/u_redraw.c b/xfig/u_redraw.c
+index 146abfa..fd53a8e 100644
+--- a/xfig/u_redraw.c
++++ b/xfig/u_redraw.c
+@@ -434,7 +434,7 @@ redisplay_curobj()
+ }
+ } else {
+ /* editing an object, just refresh it as is */
+- (*canvas_ref_proc)(cur_x, cur_y);
++ if (canvas_ref_proc) (*canvas_ref_proc)(cur_x, cur_y);
+ }
+ }
+
diff --git a/media-gfx/xfig/files/xfig-3.2.5c-XAW3D1_5E_notlocal.patch b/media-gfx/xfig/files/xfig-3.2.5c-XAW3D1_5E_notlocal.patch
new file mode 100644
index 000000000000..8998b406467a
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5c-XAW3D1_5E_notlocal.patch
@@ -0,0 +1,70 @@
+From be8cf541743060921f629d5bfe990d985ecf1813 Mon Sep 17 00:00:00 2001
+From: Vladislav Zavjalov <slazav@altlinux.org>
+Origin: http://git.altlinux.org/people/slazav/packages/?p=xfig.git;a=patch;h=be8cf541743060921f629d5bfe990d985ecf1813
+Date: Wed, 29 May 2013 02:18:13 +0400
+Subject: [PATCH] Don't use local SimpleMenu.c with XAW3D1_5E
+Bug-Debian: http://bugs.debian.org/296703
+
+---
+ xfig/SmeCascade.h | 5 +++++
+ xfig/SmeCascadeP.h | 5 +++++
+ xfig/w_menuentry.h | 4 ++++
+ xfig/w_util.c | 2 ++
+ 4 files changed, 16 insertions(+), 0 deletions(-)
+
+--- a/SmeCascade.h
++++ b/SmeCascade.h
+@@ -27,7 +27,12 @@
+ #else
+ #include <X11/Xaw/Sme.h>
+ #endif
++
++#ifdef XAW3D1_5E
++#include <X11/Xaw3d/SmeBSB.h>
++#else
+ #include "SmeBSB.h"
++#endif
+
+ /****************************************************************
+ *
+--- a/SmeCascadeP.h
++++ b/SmeCascadeP.h
+@@ -32,8 +32,12 @@
+ #include <X11/Xaw/SmeP.h>
+ #endif
+
++#ifdef XAW3D1_5E
++#include <X11/Xaw3d/SmeBSBP.h>
++#else
+ #include "SmeBSBP.h"
+ #include "SmeCascade.h"
++#endif
+
+ /************************************************************
+ *
+--- a/w_menuentry.h
++++ b/w_menuentry.h
+@@ -30,7 +30,11 @@
+ #include <X11/Xaw/Sme.h>
+ #endif
+
++#ifdef XAW3D1_5E
++#include <X11/Xaw3d/SmeBSB.h>
++#else
+ #include "SmeBSB.h"
++#endif
+
+ /****************************************************************
+ *
+--- a/w_util.c
++++ b/w_util.c
+@@ -351,7 +351,9 @@
+ * (use -1 if no line desired)
+ */
+
++#ifndef XAW3D1_5E
+ #include "SmeCascade.h"
++#endif /* XAW3D1_5E */
+
+ #include "d_text.h"
+ #include "e_placelib.h"
diff --git a/media-gfx/xfig/files/xfig-3.2.5c-crash-on-exit.patch b/media-gfx/xfig/files/xfig-3.2.5c-crash-on-exit.patch
new file mode 100644
index 000000000000..80d20281ae93
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5c-crash-on-exit.patch
@@ -0,0 +1,19 @@
+commit 56f0caaae3cc3fdbf6eaa21fc419c951c53a156d
+Author: Peter Volkov <peter.volkov@gmail.com>
+Date: Mon Jun 9 12:36:12 2014 +0400
+
+ Fix crash on exit (regression of xfig.3.2.5c)
+
+diff --git a/u_free.c b/u_free.c
+index 18d517a..4a5080f 100755
+--- a/u_free.c
++++ b/u_free.c
+@@ -270,8 +270,6 @@ void free_Fonts(void)
+ XUnloadFont(tool_d, nf->fid);
+ if (nf->fstruct != NULL)
+ XFreeFont(tool_d, nf->fstruct);
+- if (nf->fset != NULL)
+- XFreeFontSet(tool_d, nf->fset);
+ nf = nf->next;
+ }
+ }
diff --git a/media-gfx/xfig/files/xfig-3.2.5c-darwin.patch b/media-gfx/xfig/files/xfig-3.2.5c-darwin.patch
new file mode 100644
index 000000000000..5d64c2a4deb5
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5c-darwin.patch
@@ -0,0 +1,26 @@
+diff --git a/fig.h b/fig.h
+index ca00aef..a3605b0 100644
+--- a/fig.h
++++ b/fig.h
+@@ -375,7 +375,7 @@ extern double drand48();
+ extern long random();
+ extern void srandom(unsigned int);
+
+-#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) && !defined(__FreeBSD__) && !defined(__GLIBC__)
++#elif !defined(__osf__) && !defined(__CYGWIN__) && !defined(linux) && !defined(__FreeBSD__) && !defined(__DARWIN__) && !defined(__GLIBC__)
+ extern void srandom(int);
+
+ #endif
+diff --git a/w_keyboard.c b/w_keyboard.c
+index 427d60c..03a3f76 100644
+--- a/w_keyboard.c
++++ b/w_keyboard.c
+@@ -41,7 +41,7 @@
+ #define REG_NOERROR 0
+ #endif
+
+-#if defined(__FreeBSD__) && !defined(REG_NOERROR)
++#if (defined(__FreeBSD__) || defined(__DARWIN__)) && !defined(REG_NOERROR)
+ #define REG_NOERROR 0
+ #endif
+
diff --git a/media-gfx/xfig/files/xfig-3.2.5c-spelling.patch b/media-gfx/xfig/files/xfig-3.2.5c-spelling.patch
new file mode 100644
index 000000000000..4af77e0e9b06
--- /dev/null
+++ b/media-gfx/xfig/files/xfig-3.2.5c-spelling.patch
@@ -0,0 +1,17 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 31_spelling.dpatch by Roland Rosenfeld <roland@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix spelling errors in binary.
+
+@DPATCH@
+diff -urNad xfig~/f_load.c xfig/f_load.c
+--- xfig~/f_load.c
++++ xfig/f_load.c
+@@ -373,5 +373,5 @@
+ /* Format error; relevant error message is already delivered */
+ ;
+ else
+- file_msg("File \"%s\" is not accessable; %s.", file, strerror(err));
++ file_msg("File \"%s\" is not accessible; %s.", file, strerror(err));
+ }
diff --git a/media-gfx/xfig/metadata.xml b/media-gfx/xfig/metadata.xml
new file mode 100644
index 000000000000..129d5d9f4b93
--- /dev/null
+++ b/media-gfx/xfig/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>pva@gentoo.org</email>
+ <name>Peter Volkov</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">mcj</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/xfig/xfig-3.2.5c.ebuild b/media-gfx/xfig/xfig-3.2.5c.ebuild
new file mode 100644
index 000000000000..c8817ed81e0b
--- /dev/null
+++ b/media-gfx/xfig/xfig-3.2.5c.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib
+
+MY_P=${PN}.${PV}
+
+DESCRIPTION="A menu-driven tool to draw and manipulate objects interactively in an X window"
+HOMEPAGE="http://www.xfig.org"
+SRC_URI="mirror://sourceforge/mcj/${MY_P}.full.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="nls"
+
+RDEPEND="x11-libs/libXaw
+ x11-libs/libXp
+ x11-libs/libXaw3d
+ nls? ( x11-libs/libXaw3d[unicode] )
+ x11-libs/libXi
+ x11-libs/libXt
+ virtual/jpeg
+ media-libs/libpng
+ media-fonts/font-misc-misc
+ media-fonts/urw-fonts
+ >=media-gfx/transfig-3.2.5-r1
+ media-libs/netpbm"
+DEPEND="${RDEPEND}
+ x11-misc/imake
+ x11-proto/xproto
+ x11-proto/inputproto"
+
+S=${WORKDIR}/${MY_P}
+
+sed_Imakefile() {
+ # see Imakefile for details
+ vars2subs=( BINDIR="${EPREFIX}"/usr/bin
+ PNGINC=-I"${EPREFIX}"/usr/include
+ JPEGLIBDIR="${EPREFIX}"/usr/$(get_libdir)
+ JPEGINC=-I"${EPREFIX}"/usr/include
+ XPMLIBDIR="${EPREFIX}"/usr/$(get_libdir)
+ XPMINC=-I"${EPREFIX}"/usr/include/X11
+ USEINLINE=-DUSE_INLINE
+ XFIGLIBDIR="${EPREFIX}"/usr/share/xfig
+ XFIGDOCDIR="${EPREFIX}/usr/share/doc/${PF}"
+ MANDIR="${EPREFIX}/usr/share/man/man\$\(MANSUFFIX\)"
+ "CC=$(tc-getCC)" )
+
+ for variable in "${vars2subs[@]}" ; do
+ varname=${variable%%=*}
+ varval=${variable##*=}
+ sed -i \
+ -e "s:^\(XCOMM\)*[[:space:]]*${varname}[[:space:]]*=.*$:${varname} = ${varval}:" \
+ "$@" || die
+ done
+ if use nls; then
+ # XAW_INTERNATIONALIZATION fixes #405475 (comment 17) and #426780 by Markus Peloquin
+ sed -i \
+ -e "s:^\(XCOMM\)*[[:space:]]*\(#define I18N\).*$:\2:" \
+ -e "s:^\(XCOMM\)*[[:space:]]*\(XAW_INTERN = -DXAW_INTERNATIONALIZATION\).*$:\2:" \
+ "$@" || die
+ fi
+ sed -i -e "s:^\(XCOMM\)*[[:space:]]*\(#define XAW3D1_5E\).*$:\2:" "$@" || die
+}
+
+src_prepare() {
+ # Permissions are really crazy here
+ chmod -R go+rX . || die
+ find . -type f -exec chmod a-x '{}' \; || die
+ epatch "${FILESDIR}/${PN}-3.2.5c-spelling.patch"
+ epatch "${FILESDIR}/${PN}-3.2.5b-papersize_b1.patch"
+ epatch "${FILESDIR}/${PN}-3.2.5b-pdfimport_mediabox.patch"
+ epatch "${FILESDIR}/${PN}-3.2.5b-network_images.patch"
+ epatch "${FILESDIR}/${PN}-3.2.5b-app-defaults.patch"
+ epatch "${FILESDIR}/${PN}-3.2.5b-urwfonts.patch"
+ epatch "${FILESDIR}/${PN}-3.2.5b-mkstemp.patch" #264575
+ epatch "${FILESDIR}/${PN}-3.2.5c-darwin.patch"
+ epatch "${FILESDIR}/${PN}-3.2.5b-solaris.patch"
+ epatch "${FILESDIR}/${PN}-3.2.5c-XAW3D1_5E_notlocal.patch"
+ epatch "${FILESDIR}/${PN}-3.2.5c-crash-on-exit.patch"
+
+ sed_Imakefile Imakefile
+ sed -e "s:/usr/lib/X11/xfig:${EPREFIX}/usr/share/doc/${PF}:" \
+ -i Doc/xfig.man || die
+}
+
+src_compile() {
+ local EXTCFLAGS=${CFLAGS}
+ xmkmf || die
+ [[ ${CHOST} == *-solaris* ]] && EXTCFLAGS="${EXTCFLAGS} -D_POSIX_SOURCE"
+ emake CC="$(tc-getCC)" LOCAL_LDFLAGS="${LDFLAGS}" CDEBUGFLAGS="${EXTCFLAGS}" \
+ USRLIBDIR="${EPREFIX}"/usr/$(get_libdir)
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install install.libs install.man
+
+ dodoc README FIGAPPS CHANGES LATEX.AND.XFIG
+
+ doicon xfig.png
+ make_desktop_entry xfig Xfig xfig
+}
+
+pkg_postinst() {
+ einfo "Don't forget to update xserver's font path for media-fonts/urw-fonts."
+}
diff --git a/media-gfx/xli/Manifest b/media-gfx/xli/Manifest
new file mode 100644
index 000000000000..10dcfa588bec
--- /dev/null
+++ b/media-gfx/xli/Manifest
@@ -0,0 +1 @@
+DIST xli-2005-02-27.tar.gz 201011 SHA256 442dcf5ac75841e648c3bffed795d9301a6a485dc55f7998d0acfc2b8daad2bc SHA512 132b28396ebf3832dc35ff5fa7c102539ef30a194512fe6577ce1432bb84ecd7b4368e75eaf59f26a806900f63e1bfb9a93487ce1ebe3cfef2199256a783ccf7 WHIRLPOOL 1d3b45be838d397fdbc2521c9c5a466e4141248591ae00016fa316f67a4ab44bc712896a59581e3f9a2e10cabb56f041ef7a3e21cc2a4f59733dc44d446e541b
diff --git a/media-gfx/xli/files/Xli.ad b/media-gfx/xli/files/Xli.ad
new file mode 100644
index 000000000000..6c9a022e40b6
--- /dev/null
+++ b/media-gfx/xli/files/Xli.ad
@@ -0,0 +1,2 @@
+path=/usr/X11R6/include/X11/bitmaps /usr/X11R6/include/X11/images
+extension=.gif .jpg .rle .csun .msun .sun .face .xbm .bm
diff --git a/media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch b/media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch
new file mode 100644
index 000000000000..44ee262aee25
--- /dev/null
+++ b/media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch
@@ -0,0 +1,61 @@
+As of jpeg-7, the scale coefficents may be set to non-unitary values by the
+initial DCT transform. This caused the original already-scale detection
+algorithm in xli to break.
+
+To avoid this, set the already-scaled marker when we adjust the scale fraction
+(that gets passed into the DCT).
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar -X x xli-2005-02-27.orig/jpeg.c xli-2005-02-27/jpeg.c
+--- xli-2005-02-27.orig/jpeg.c 2005-02-27 16:42:39.000000000 -0800
++++ xli-2005-02-27/jpeg.c 2009-09-05 15:02:12.462635389 -0700
+@@ -211,7 +211,7 @@
+ xli_jpg_err jerr;
+ Image *image = 0;
+ byte **rows = 0;
+- int i, rowbytes;
++ int i, rowbytes, flags;
+
+ CURRFUNC("jpegLoad");
+ zfp = zopen(fullname);
+@@ -248,9 +248,13 @@
+ if (verbose)
+ describe_jpeg(&cinfo, fullname);
+
++ flags = 0;
+ if (image_ops->iscale > 0 && image_ops->iscale < 4) {
+- cinfo.scale_num = 1;
+- cinfo.scale_denom = 1 << image_ops->iscale;
++ flags |= FLAG_ISCALE;
++ //cinfo.scale_num = 1;
++ cinfo.scale_denom *= 1 << image_ops->iscale;
++ if (verbose)
++ printf("scaling to %d/%d\n", cinfo.scale_num, cinfo.scale_denom);
+ } else if (image_ops->iscale_auto) {
+ image_ops->iscale = 0;
+ while (image_ops->iscale < 3 && (cinfo.image_width >>
+@@ -258,9 +262,11 @@
+ cinfo.image_height >> image_ops->iscale >
+ globals.dinfo.height * .9))
+ image_ops->iscale += 1;
+- cinfo.scale_denom = 1 << image_ops->iscale;
++ cinfo.scale_denom *= 1 << image_ops->iscale;
++ if(image_ops->iscale > 0)
++ flags |= FLAG_ISCALE;
+ if (verbose)
+- printf("auto-scaling to 1/%d\n", cinfo.scale_denom);
++ printf("auto-scaling to %d/%d\n", cinfo.scale_num, cinfo.scale_denom);
+ }
+ znocache(zfp);
+
+@@ -288,8 +294,7 @@
+ }
+
+ image->gamma = RETURN_GAMMA;
+- if (cinfo.scale_denom > 1)
+- image->flags |= FLAG_ISCALE;
++ image->flags |= flags;
+
+ rowbytes = cinfo.output_width * cinfo.output_components;
+ assert(image->pixlen * image->width == rowbytes);
diff --git a/media-gfx/xli/files/xli-1.17.0-libpng14.patch b/media-gfx/xli/files/xli-1.17.0-libpng14.patch
new file mode 100644
index 000000000000..afb4b24208d7
--- /dev/null
+++ b/media-gfx/xli/files/xli-1.17.0-libpng14.patch
@@ -0,0 +1,14 @@
+http://aur.archlinux.org/packages.php?ID=1676
+http://archwyrm.net/~me/xli-libpng.diff
+
+--- png.c
++++ png.c
+@@ -27,7 +27,7 @@
+ if (ret != 8)
+ return 0;
+
+- ret = png_check_sig(buf, 8);
++ ret = !png_sig_cmp(buf, 0, 8);
+
+ return (ret);
+ }
diff --git a/media-gfx/xli/files/xli-security-gentoo.diff b/media-gfx/xli/files/xli-security-gentoo.diff
new file mode 100644
index 000000000000..7425e67c7c74
--- /dev/null
+++ b/media-gfx/xli/files/xli-security-gentoo.diff
@@ -0,0 +1,199 @@
+diff -Nrup xli-2005-02-27/imagetypes.c xli-2005-02-27/imagetypes.c
+--- xli-2005-02-27/imagetypes.c 1999-10-24 22:14:57.000000000 -0400
++++ xli-2005-02-27/imagetypes.c 2005-10-18 07:53:46.000000000 -0400
+@@ -53,7 +53,7 @@ Image *loadImage(ImageOptions * image_op
+ Image *image;
+ int a;
+
+- if (findImage(image_ops->name, fullname) < 0) {
++ if (findImage(image_ops->name, fullname, BUFSIZ) < 0) {
+ if (errno == ENOENT)
+ printf("%s: image not found\n", image_ops->name);
+ else if (errno == EISDIR)
+@@ -95,7 +95,7 @@ void identifyImage(char *name)
+ char fullname[BUFSIZ];
+ int a;
+
+- if (findImage(name, fullname) < 0) {
++ if (findImage(name, fullname, BUFSIZ) < 0) {
+ if (errno == ENOENT)
+ printf("%s: image not found\n", name);
+ else if (errno == EISDIR)
+diff -Nrup xli-2005-02-27/path.c xli-2005-02-27/path.c
+--- xli-2005-02-27/path.c 2005-02-27 19:42:39.000000000 -0500
++++ xli-2005-02-27/path.c 2005-10-18 07:56:45.000000000 -0400
+@@ -172,12 +172,12 @@ static int fileIsOk(char *fullname, stru
+ /* find an image with paths and extensions from defaults files. returns
+ * -1 if access denied or not found, 0 if ok.
+ */
+-int findImage(char *name, char *fullname)
++int findImage(char *name, char *fullname, size_t size)
+ {
+ unsigned int p, e;
+ struct stat sbuf;
+
+- strcpy(fullname, name);
++ strncpy(fullname, name, size);
+ if (!strcmp(name, "stdin")) /* stdin is special name */
+ return (0);
+
+@@ -185,26 +185,26 @@ int findImage(char *name, char *fullname
+ if (!stat(fullname, &sbuf))
+ return (fileIsOk(fullname, &sbuf));
+ #ifndef NO_COMPRESS
+- strcat(fullname, ".Z");
++ strncat(fullname, ".Z", size);
+ if (!stat(fullname, &sbuf))
+ return (fileIsOk(fullname, &sbuf));
+ #endif
+
+ for (p = 0; p < NumPaths; p++) {
+- sprintf(fullname, "%s/%s", Paths[p], name);
++ snprintf(fullname, size, "%s/%s", Paths[p], name);
+ if (!stat(fullname, &sbuf))
+ return (fileIsOk(fullname, &sbuf));
+ #ifndef NO_COMPRESS
+- strcat(fullname, ".Z");
++ strncat(fullname, ".Z", size);
+ if (!stat(fullname, &sbuf))
+ #endif
+ return (fileIsOk(fullname, &sbuf));
+ for (e = 0; e < NumExts; e++) {
+- sprintf(fullname, "%s/%s%s", Paths[p], name, Exts[e]);
++ snprintf(fullname, size, "%s/%s%s", Paths[p], name, Exts[e]);
+ if (!stat(fullname, &sbuf))
+ return (fileIsOk(fullname, &sbuf));
+ #ifndef NO_COMPRESS
+- strcat(fullname, ".Z");
++ strncat(fullname, ".Z", size);
+ if (!stat(fullname, &sbuf))
+ return (fileIsOk(fullname, &sbuf));
+ #endif
+@@ -212,11 +212,11 @@ int findImage(char *name, char *fullname
+ }
+
+ for (e = 0; e < NumExts; e++) {
+- sprintf(fullname, "%s%s", name, Exts[e]);
++ snprintf(fullname, size, "%s%s", name, Exts[e]);
+ if (!stat(fullname, &sbuf))
+ return (fileIsOk(fullname, &sbuf));
+ #ifndef NO_COMPRESS
+- strcat(fullname, ".Z");
++ strncat(fullname, ".Z", size);
+ if (!stat(fullname, &sbuf))
+ return (fileIsOk(fullname, &sbuf));
+ #endif
+@@ -241,7 +241,7 @@ void listImages(void)
+ for (a = 0; a < NumPaths; a++) {
+ printf("%s:\n", Paths[a]);
+ fflush(stdout);
+- sprintf(buf, "ls %s", Paths[a]);
++ snprintf(buf, sizeof(buf)-1, "ls %s", Paths[a]);
+ if (system(buf) < 0) {
+ perror("ls");
+ return;
+@@ -296,14 +296,14 @@ char *expandPath(char *p)
+ var++;
+ else if (*p == '~') {
+ buf1[b1] = '\0';
+- strcat(buf1, getenv("HOME"));
++ strncat(buf1, getenv("HOME"), sizeof(buf1)-1);
+ b1 = strlen(buf1);
+ var = 0;
+ } else if (*p == '/' || *p == '}') {
+ if (var) {
+ buf1[b1] = '\0';
+ buf2[b2] = '\0';
+- strcat(buf1, getenv(buf2));
++ strncat(buf1, getenv(buf2), sizeof(buf1));
+ b1 = strlen(buf1);
+ buf2[0] = '\0';
+ b2 = 0;
+diff -Nrup xli-2005-02-27/reduce.c xli-2005-02-27/reduce.c
+--- xli-2005-02-27/reduce.c 1999-10-24 22:15:02.000000000 -0400
++++ xli-2005-02-27/reduce.c 2005-10-18 07:33:34.000000000 -0400
+@@ -178,7 +178,7 @@ Image *reduce(Image *image, unsigned col
+ /* get destination image */
+ depth = colorsToDepth(OutColors);
+ new_image = newRGBImage(image->width, image->height, depth);
+- sprintf(buf, "%s (%d colors)", image->title, OutColors);
++ snprintf(buf, sizeof(buf)-1, "%s (%d colors)", image->title, OutColors);
+ new_image->title = dupString(buf);
+ new_image->gamma = image->gamma;
+
+diff -Nrup xli-2005-02-27/rlelib.c xli-2005-02-27/rlelib.c
+--- xli-2005-02-27/rlelib.c 2005-10-18 07:40:51.000000000 -0400
++++ xli-2005-02-27/rlelib.c 2005-10-18 07:48:12.000000000 -0400
+@@ -18,7 +18,7 @@
+ #undef DEBUG
+
+ #ifdef DEBUG
+-# define debug(xx) fprintf(stderr,xx)
++# define debug(xx) fprintf(stderr, "%s", xx)
+ #else
+ # define debug(xx)
+ #endif
+Files xli-2005-02-27/xli and xli-2005-02-27/xli differ
+diff -Nrup xli-2005-02-27/xli.h xli-2005-02-27/xli.h
+--- xli-2005-02-27/xli.h 1999-10-24 22:15:07.000000000 -0400
++++ xli-2005-02-27/xli.h 2005-10-19 07:49:21.000000000 -0400
+@@ -229,7 +229,7 @@ char *xlistrstr(char *s1, char *s2);
+
+ /* path.c */
+ char *expandPath(char *p);
+-int findImage(char *name, char *fullname);
++int findImage(char *name, char *fullname, size_t size);
+ void listImages(void);
+ void loadPathsAndExts(void);
+ void showPath(void);
+diff -Nrup xli-2005-02-27/xlito.c xli-2005-02-27/xlito.c
+--- xli-2005-02-27/xlito.c 2005-02-27 19:42:39.000000000 -0500
++++ xli-2005-02-27/xlito.c 2005-10-18 07:48:54.000000000 -0400
+@@ -31,7 +31,7 @@ char *pname, *fname;
+ #undef DEBUG
+
+ #ifdef DEBUG
+-# define debug(xx) fprintf(stderr,xx)
++# define debug(xx) fprintf(stderr, "%s", xx)
+ #else
+ # define debug(xx)
+ #endif
+diff -Nrup xli-2005-02-27/zoom.c xli-2005-02-27/zoom.c
+--- xli-2005-02-27/zoom.c 2005-02-27 19:42:39.000000000 -0500
++++ xli-2005-02-27/zoom.c 2005-10-18 07:35:42.000000000 -0400
+@@ -52,30 +52,30 @@ Image *zoom(Image *oimage, unsigned int
+ if (verbose)
+ printf(" Zooming image Y axis by %d%%...", yzoom);
+ if (changetitle)
+- sprintf(buf, "%s (Y zoom %d%%)", oimage->title, yzoom);
++ snprintf(buf, sizeof(buf)-1, "%s (Y zoom %d%%)", oimage->title, yzoom);
+ }
+ else if (!yzoom) {
+ if (verbose)
+ printf(" Zooming image X axis by %d%%...", xzoom);
+ if (changetitle)
+- sprintf(buf, "%s (X zoom %d%%)", oimage->title, xzoom);
++ snprintf(buf, sizeof(buf)-1, "%s (X zoom %d%%)", oimage->title, xzoom);
+ }
+ else if (xzoom == yzoom) {
+ if (verbose)
+ printf(" Zooming image by %d%%...", xzoom);
+ if (changetitle)
+- sprintf(buf, "%s (%d%% zoom)", oimage->title, xzoom);
++ snprintf(buf, sizeof(buf)-1, "%s (%d%% zoom)", oimage->title, xzoom);
+ }
+ else {
+ if (verbose)
+ printf(" Zooming image X axis by %d%% and Y axis by %d%%...",
+ xzoom, yzoom);
+ if (changetitle)
+- sprintf(buf, "%s (X zoom %d%% Y zoom %d%%)", oimage->title,
++ snprintf(buf, sizeof(buf)-1, "%s (X zoom %d%% Y zoom %d%%)", oimage->title,
+ xzoom, yzoom);
+ }
+ if (!changetitle)
+- strcpy(buf,oimage->title);
++ strncpy(buf,oimage->title, sizeof(buf)-1);
+
+ if (verbose)
+ fflush(stdout);
diff --git a/media-gfx/xli/metadata.xml b/media-gfx/xli/metadata.xml
new file mode 100644
index 000000000000..9be90a258970
--- /dev/null
+++ b/media-gfx/xli/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/xli/xli-1.17.0-r5.ebuild b/media-gfx/xli/xli-1.17.0-r5.ebuild
new file mode 100644
index 000000000000..1cc713ee8aec
--- /dev/null
+++ b/media-gfx/xli/xli-1.17.0-r5.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils
+
+SNAPSHOT="2005-02-27"
+DESCRIPTION="X Load Image: view images or load them to root window"
+HOMEPAGE="ftp://ftp.ibiblio.org/pub/Linux/apps/graphics/viewers/X/xli-1.16.README"
+SRC_URI="http://pantransit.reptiles.org/prog/xli/xli-${SNAPSHOT}.tar.gz"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+RDEPEND="app-arch/bzip2
+ >=media-libs/libpng-1.0.5
+ >=sys-libs/zlib-1.1.4
+ virtual/jpeg:0
+ x11-libs/libXext"
+
+DEPEND="${RDEPEND}
+ app-text/rman
+ x11-proto/xextproto
+ x11-misc/imake
+ !media-gfx/xloadimage"
+
+S=${WORKDIR}/${PN}-${SNAPSHOT}
+
+src_prepare() {
+ # avoid conflicts on systems that have zopen in system headers
+ sed -i -e "s:zopen:xli_zopen:g" *
+
+ sed -i Imakefile \
+ -e '/^DEFINES =/s/$/ -DHAVE_GUNZIP -DHAVE_BUNZIP2 /' \
+ -e '/CCOPTIONS =/s/=.*/=/'
+
+ # This is a hack to avoid a parse error on /usr/include/string.h
+ # when _BSD_SOURCE is defined. This may be a bug in that header.
+ sed -i png.c \
+ -e '/^#include "xli.h"/i#undef _BSD_SOURCE'
+
+ # This hack will allow xli to compile using gcc-3.3
+ sed -i rlelib.c \
+ -e 's/#include <varargs.h>//'
+
+ # fix potential security issues.
+ EPATCH_OPTS="-F3 -l" epatch "${FILESDIR}"/xli-security-gentoo.diff
+
+ # Fix scale per bug 282979
+ epatch "${FILESDIR}"/${P}-fix-scale-zoom.patch \
+ "${FILESDIR}"/${P}-libpng14.patch
+}
+
+src_compile() {
+ xmkmf || die
+ emake CDEBUGFLAGS="${CFLAGS}" CC="$(tc-getCC)" EXTRA_LDOPTIONS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin xli xlito
+
+ dosym xli /usr/bin/xsetbg
+ dosym xli /usr/bin/xview
+
+ dodoc README README.xloadimage ABOUTGAMMA TODO chkgamma.jpg
+ newman xli.man xli.1
+ newman xliguide.man xliguide.1
+ newman xlito.man xlito.1
+
+ insinto /etc/X11/app-defaults
+ newins "${FILESDIR}"/Xli.ad Xli
+ fperms a+r /etc/X11/app-defaults/Xli
+}
diff --git a/media-gfx/xloadimage/Manifest b/media-gfx/xloadimage/Manifest
new file mode 100644
index 000000000000..7cc6caafdeb7
--- /dev/null
+++ b/media-gfx/xloadimage/Manifest
@@ -0,0 +1,2 @@
+DIST xloadimage-4.1-gentoo-r1.diff.bz2 41535 SHA256 addfd04c0a5667bb9c3f4ae6a9da35a443776086e30b84b2c3afa5eac161144a SHA512 a1a52d576eb68c44e5ff3b68a6bd87cd9b8f21f6fa8edee2d7df2329002d40f6513df6c04ecd57f66018583d0251019bd02e15756dac705b8c9cb8470cb386e3 WHIRLPOOL 6141e5f38c1b8435375021181321658b86140f28189d2d31d93ea7d23b6f6c4cd62a428b946ca35428c00cb4fcc10015a0948cda1238926a530ee9f00744f0b9
+DIST xloadimage.4.1.tar.gz 596021 SHA256 400bc7d84dcfb3265a7a1ce51819679dc3adaeda231514bd89b0f932b78ff5c4 SHA512 2c91699c8ef07c101ff9b458708ace01cab2979a5e88cf8a4e47ec971f7b4cb5571108afa3e53271ade4e8ccfdcf72ef9e2e09edfc0be6b8afaba50847aa0586 WHIRLPOOL 65ca85500a8171d95a56b5550951f6b64ad6176a48370ed41b6919cd92dde366235cf2df86fc093847102eccf6659aef1f747e32f02af97e90389cfbdc683a14
diff --git a/media-gfx/xloadimage/files/xloadimage-4.1-bracket.patch b/media-gfx/xloadimage/files/xloadimage-4.1-bracket.patch
new file mode 100644
index 000000000000..5d71028652da
--- /dev/null
+++ b/media-gfx/xloadimage/files/xloadimage-4.1-bracket.patch
@@ -0,0 +1,13 @@
+diff -ruN xloadimage.4.1.patched/jpeg.c xloadimage.4.1/jpeg.c
+--- xloadimage.4.1.patched/jpeg.c 2011-08-25 22:44:04.835308001 +0200
++++ xloadimage.4.1/jpeg.c 2011-08-25 22:45:57.391307973 +0200
+@@ -321,8 +321,8 @@
+ cinfo->arith_code = TRUE;
+ #else
+ fprintf(stderr, "jpegDump: sorry, arithmetic coding not supported\n");
+- }
+ #endif
++ }
+ else if (!strncmp("grayscale", name, strlen(name)) ||
+ !strncmp("greyscale", name, strlen(name)) ||
+ !strncmp("monochrome", name, strlen(name))) {
diff --git a/media-gfx/xloadimage/files/xloadimage-4.1-endif.patch b/media-gfx/xloadimage/files/xloadimage-4.1-endif.patch
new file mode 100644
index 000000000000..df6f3e492190
--- /dev/null
+++ b/media-gfx/xloadimage/files/xloadimage-4.1-endif.patch
@@ -0,0 +1,11 @@
+--- xloadimage.4.1/copyright.orig 2005-03-04 12:58:27.347474256 +0100
++++ xloadimage.4.1/copyright.h 2005-03-04 12:58:42.913107920 +0100
+@@ -22,7 +22,7 @@
+ #ifndef __SABER__
+ #ifndef LINT
+ static char *Copyright= "Copyright 1989, 1993 Jim Frost";
+-#endif LINT
++#endif /* LINT */
+ #endif
+ #define _JIM_COPYRIGHT_
+ #endif
diff --git a/media-gfx/xloadimage/files/xloadimage-4.1-include-errno_h.patch b/media-gfx/xloadimage/files/xloadimage-4.1-include-errno_h.patch
new file mode 100644
index 000000000000..f071d761617a
--- /dev/null
+++ b/media-gfx/xloadimage/files/xloadimage-4.1-include-errno_h.patch
@@ -0,0 +1,13 @@
+--- xloadimage.4.1/img.c.orig 2003-01-01 15:14:47.000000000 +0200
++++ xloadimage.4.1/img.c 2003-01-01 15:15:05.000000000 +0200
+@@ -14,9 +14,9 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <math.h>
++#include <errno.h>
+ #include "image.h"
+
+-extern int errno;
+
+ #define TRUE 1
+ #define FALSE 0
diff --git a/media-gfx/xloadimage/files/xloadimage-4.1-ldflags_and_exit.patch b/media-gfx/xloadimage/files/xloadimage-4.1-ldflags_and_exit.patch
new file mode 100644
index 000000000000..afdea768aa47
--- /dev/null
+++ b/media-gfx/xloadimage/files/xloadimage-4.1-ldflags_and_exit.patch
@@ -0,0 +1,23 @@
+diff -ur xloadimage.4.1.orig/Makefile.in xloadimage.4.1/Makefile.in
+--- xloadimage.4.1.orig/Makefile.in 2009-09-04 15:37:09.000000000 +0300
++++ xloadimage.4.1/Makefile.in 2009-09-04 15:38:50.000000000 +0300
+@@ -27,7 +27,7 @@
+ $(CC) -o $@ $(OBJS) build.o $(LDFLAGS) $(XLIB) $(LIBS)
+
+ uufilter: uufilter.c
+- $(CC) $(CFLAGS) $(DEFS) uufilter.c -o $@
++ $(CC) $(LDFLAGS) $(CFLAGS) $(DEFS) uufilter.c -o $@
+
+ .c.o: config.h image.h
+ $(CC) $(CFLAGS) -c $(DEFS) $<
+diff -ur xloadimage.4.1.orig/uufilter.c xloadimage.4.1/uufilter.c
+--- xloadimage.4.1.orig/uufilter.c 2009-09-04 15:37:09.000000000 +0300
++++ xloadimage.4.1/uufilter.c 2009-09-04 15:37:59.000000000 +0300
+@@ -11,6 +11,7 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+
+ int main(argc, argv)
diff --git a/media-gfx/xloadimage/files/xloadimage-4.1-libpng15.patch b/media-gfx/xloadimage/files/xloadimage-4.1-libpng15.patch
new file mode 100644
index 000000000000..ffd05f62b332
--- /dev/null
+++ b/media-gfx/xloadimage/files/xloadimage-4.1-libpng15.patch
@@ -0,0 +1,29 @@
+--- png.c
++++ png.c
+@@ -75,7 +75,7 @@
+ {
+ debug(" #error ");
+ output_warn( png_ptr, str);
+- longjmp(png_ptr->jmpbuf, 1); /* return control to outer routine */
++ longjmp(png_jmpbuf(png_ptr), 1); /* return control to outer routine */
+ }
+
+
+@@ -164,7 +164,7 @@
+ png_destroy_read_struct(png_pp, info_pp, end_pp);
+ return 0;
+ }
+- if (setjmp((*png_pp)->jmpbuf)) {
++ if (setjmp(png_jmpbuf(*png_pp))) {
+ /* On error */
+ png_destroy_read_struct(png_pp, info_pp, end_pp);
+ return 0;
+@@ -220,7 +220,7 @@
+ zclose(zinput_file);
+ return 0;
+ }
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* On error */
+ freeImage(image);
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
diff --git a/media-gfx/xloadimage/files/xloadimage-4.1-unaligned-access.patch b/media-gfx/xloadimage/files/xloadimage-4.1-unaligned-access.patch
new file mode 100644
index 000000000000..874ad8a4f329
--- /dev/null
+++ b/media-gfx/xloadimage/files/xloadimage-4.1-unaligned-access.patch
@@ -0,0 +1,51 @@
+diff -ruN ./cmuwmraster.c /tmp/xloadimage.4.1/cmuwmraster.c
+--- a/cmuwmraster.c 2005-07-23 13:15:50 -0700
++++ b/cmuwmraster.c 2005-07-23 13:08:36 -0700
+@@ -20,7 +20,7 @@
+ char *name;
+ struct cmuwm_header *headerp;
+ {
+- printf("%s is a %ldx%ld %ld plane CMU WM raster\n",
++ printf("%s is a %lux%lu %lu plane CMU WM raster\n",
+ name,
+ memToVal(headerp->width, sizeof(long)),
+ memToVal(headerp->height, sizeof(long)),
+diff -ruN ./niff.c /tmp/xloadimage.4.1/niff.c
+--- a/niff.c 2005-07-23 13:15:50 -0700
++++ b/niff.c 2005-07-23 13:07:55 -0700
+@@ -24,18 +24,18 @@
+ memToVal(header->width, 4),
+ memToVal(header->height, 4));
+ if (memToVal(header->version, 4) != NIFF_VERSION)
+- printf("version %ld ", memToVal(header->version, 4));
++ printf("version %lu ", memToVal(header->version, 4));
+ printf("NIFF ");
+ switch (header->type) {
+ case NIFF_BITMAP:
+ printf("bitmap image");
+ break;
+ case NIFF_RGB:
+- printf("%ld-bit RGB image with %ld colors",
++ printf("%lu-bit RGB image with %lu colors",
+ memToVal(header->depth, 4), memToVal(header->cmap_size, 4));
+ break;
+ case NIFF_TRUE:
+- printf("%ld-bit true color image", memToVal(header->depth, 4));
++ printf("%lu-bit true color image", memToVal(header->depth, 4));
+ break;
+ default:
+ printf("image with an unknown type");
+diff -ruN ./root.c /tmp/xloadimage.4.1/root.c
+--- a/root.c 2005-07-23 13:15:51 -0700
++++ b/root.c 2005-07-23 13:05:48 -0700
+@@ -68,8 +68,8 @@
+ Pixmap *pm;
+ Atom actual_type; /* NOTUSED */
+ int format;
+- int nitems;
+- int bytes_after;
++ unsigned long nitems;
++ unsigned long bytes_after;
+
+ /* intern the property name */
+ Atom atom = XInternAtom(dpy, RETAIN_PROP_NAME, 0);
diff --git a/media-gfx/xloadimage/files/xloadimage-4.1-zio-shell-meta-char.diff b/media-gfx/xloadimage/files/xloadimage-4.1-zio-shell-meta-char.diff
new file mode 100644
index 000000000000..730504fb43f6
--- /dev/null
+++ b/media-gfx/xloadimage/files/xloadimage-4.1-zio-shell-meta-char.diff
@@ -0,0 +1,36 @@
+--- xloadimage.4.1/zio.c 1993-10-28 17:10:02.000000000 +0000
++++ xloadimage.4.1/zio.c 2005-02-28 15:32:05.895470680 +0000
+@@ -210,9 +211,30 @@
+ if ((strlen(name) > strlen(filter->extension)) &&
+ !strcmp(filter->extension,
+ name + (strlen(name) - strlen(filter->extension)))) {
+- debug(("Filtering image through '%s'\n", filter->filter));
+- zf->type= ZPIPE;
+- sprintf(buf, "%s %s", filter->filter, name);
++ char *fname, *t, *s;
++
++ /* meta-char protection from xli.
++ *
++ * protect in single quotes, replacing single quotes
++ * with '"'"', so worst-case expansion is 5x
++ */
++
++ s = fname = (char *) lmalloc(1 + (5 * strlen(name)) + 1 + 1);
++ *s++ = '\'';
++ for (t = name; *t; ++t) {
++ if ('\'' == *t) {
++ /* 'foo'bar' -> 'foo'"'"'bar' */
++ strcpy(s, "'\"'\"'");
++ s += strlen(s);
++ } else {
++ *s++ = *t;
++ }
++ }
++ strcpy (s, "'");
++ debug(("Filtering image through '%s'\n", filter->filter));
++ zf->type= ZPIPE;
++ sprintf(buf, "%s %s", filter->filter, fname);
++ lfree (fname);
+ if (! (zf->stream= popen(buf, "r"))) {
+ lfree((byte *)zf->filename);
+ zf->filename= NULL;
diff --git a/media-gfx/xloadimage/files/xloadimage-gentoo.patch b/media-gfx/xloadimage/files/xloadimage-gentoo.patch
new file mode 100644
index 000000000000..896786680e30
--- /dev/null
+++ b/media-gfx/xloadimage/files/xloadimage-gentoo.patch
@@ -0,0 +1,258 @@
+diff -ru xloadimage.4.1.orig/config.c xloadimage.4.1/config.c
+--- xloadimage.4.1.orig/config.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/config.c 2005-10-22 15:58:16.000000000 +0200
+@@ -313,12 +313,13 @@
+ * -1 if access denied or not found, 0 if ok.
+ */
+
+-int findImage(name, fullname)
++int findImage(name, fullname, size)
+ char *name, *fullname;
++ size_t size;
+ { unsigned int p, e;
+ struct stat sbuf;
+
+- strcpy(fullname, name);
++ strncpy(fullname, name, size);
+ if (!strcmp(name, "stdin")) /* stdin is special name */
+ return(0);
+
+@@ -327,7 +328,7 @@
+ if (! stat(fullname, &sbuf))
+ return(fileIsOk(fullname, &sbuf));
+ #ifndef NO_COMPRESS
+- strcat(fullname, ".Z");
++ strncat(fullname, ".Z", size);
+ if (! stat(fullname, &sbuf))
+ return(fileIsOk(fullname, &sbuf));
+ #endif
+@@ -336,12 +337,12 @@
+ #ifdef VMS
+ sprintf(fullname, "%s%s", Paths[p], name);
+ #else
+- sprintf(fullname, "%s/%s", Paths[p], name);
++ snprintf(fullname, size, "%s/%s", Paths[p], name);
+ #endif
+ if (! stat(fullname, &sbuf))
+ return(fileIsOk(fullname, &sbuf));
+ #ifndef NO_COMPRESS
+- strcat(fullname, ".Z");
++ strncat(fullname, ".Z", size);
+ if (! stat(fullname, &sbuf))
+ #endif
+ return(fileIsOk(fullname, &sbuf));
+@@ -349,12 +350,12 @@
+ #ifdef VMS
+ sprintf(fullname, "%s%s%s", Paths[p], name, Exts[e]);
+ #else
+- sprintf(fullname, "%s/%s%s", Paths[p], name, Exts[e]);
++ snprintf(fullname, size, "%s/%s%s", Paths[p], name, Exts[e]);
+ #endif
+ if (! stat(fullname, &sbuf))
+ return(fileIsOk(fullname, &sbuf));
+ #ifndef NO_COMPRESS
+- strcat(fullname, ".Z");
++ strncat(fullname, ".Z", size);
+ if (! stat(fullname, &sbuf))
+ return(fileIsOk(fullname, &sbuf));
+ #endif
+@@ -362,11 +363,11 @@
+ }
+
+ for (e= 0; e < NumExts; e++) {
+- sprintf(fullname, "%s%s", name, Exts[e]);
++ snprintf(fullname, size, "%s%s", name, Exts[e]);
+ if (! stat(fullname, &sbuf))
+ return(fileIsOk(fullname, &sbuf));
+ #ifndef NO_COMPRESS
+- strcat(fullname, ".Z");
++ strncat(fullname, ".Z", size);
+ if (! stat(fullname, &sbuf))
+ return(fileIsOk(fullname, &sbuf));
+ #endif
+@@ -392,7 +393,7 @@
+ #ifdef VMS
+ sprintf(buf, "directory %s", Paths[a]);
+ #else
+- sprintf(buf, "ls %s", Paths[a]);
++ snprintf(buf, sizeof(buf)-1, "ls %s", Paths[a]);
+ #endif
+ if (system(buf) < 0) {
+ #ifdef VMS
+diff -ru xloadimage.4.1.orig/imagetypes.c xloadimage.4.1/imagetypes.c
+--- xloadimage.4.1.orig/imagetypes.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/imagetypes.c 2005-10-22 15:51:31.000000000 +0200
+@@ -17,7 +17,7 @@
+ /* SUPPRESS 560 */
+
+ extern int errno;
+-extern int findImage(char *name, char *fullname);
++extern int findImage(char *name, char *fullname, size_t size);
+
+ /* load a named image
+ */
+@@ -32,7 +32,7 @@
+ Image *image;
+ int a;
+
+- if (findImage(name, fullname) < 0) {
++ if (findImage(name, fullname, BUFSIZ) < 0) {
+ if (errno == ENOENT)
+ fprintf(stderr, "%s: image not found\n", name);
+ else
+@@ -109,7 +109,7 @@
+ { char fullname[BUFSIZ];
+ int a;
+
+- if (findImage(name, fullname) < 0) {
++ if (findImage(name, fullname, BUFSIZ) < 0) {
+ if (errno == ENOENT)
+ fprintf(stderr, "%s: image not found\n", name);
+ else
+diff -ru xloadimage.4.1.orig/jpeg.c xloadimage.4.1/jpeg.c
+--- xloadimage.4.1.orig/jpeg.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/jpeg.c 2005-10-22 16:02:03.000000000 +0200
+@@ -19,7 +19,7 @@
+ #undef debug
+
+ #ifdef DEBUG
+-# define debug(xx) fprintf(stderr,xx)
++# define debug(xx) fprintf(stderr, "%s", xx)
+ #else
+ # define debug(xx)
+ #endif
+diff -ru xloadimage.4.1.orig/mcidas.c xloadimage.4.1/mcidas.c
+--- xloadimage.4.1.orig/mcidas.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/mcidas.c 2005-10-22 15:48:49.000000000 +0200
+@@ -63,7 +63,7 @@
+ minute = (time % 10000) / 100;
+ second = (time % 100);
+
+- sprintf(buf, "%d:%2.2d:%2.2d %s %d, %d (day %d)",
++ snprintf(buf, 29, "%d:%2.2d:%2.2d %s %d, %d (day %d)",
+ hour, minute, second, month_info[month].name, day, year,
+ (date % 1000));
+ return(buf);
+diff -ru xloadimage.4.1.orig/png.c xloadimage.4.1/png.c
+--- xloadimage.4.1.orig/png.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/png.c 2005-10-22 16:02:20.000000000 +0200
+@@ -30,7 +30,7 @@
+ #undef debug
+
+ #ifdef DEBUG
+-# define debug(xx) fprintf(stderr,xx)
++# define debug(xx) fprintf(stderr, "%s", xx)
+ #else
+ # define debug(xx)
+ #endif
+diff -ru xloadimage.4.1.orig/reduce.c xloadimage.4.1/reduce.c
+--- xloadimage.4.1.orig/reduce.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/reduce.c 2005-10-22 15:48:49.000000000 +0200
+@@ -502,7 +502,7 @@
+
+ depth= colorsToDepth(n);
+ new_image= newRGBImage(image->width, image->height, depth);
+- sprintf(buf, "%s (%d colors)", image->title, n);
++ snprintf(buf, BUFSIZ - 1, "%s (%d colors)", image->title, n);
+ new_image->title= dupString(buf);
+
+ /* calculate RGB table from each color area. this should really calculate
+diff -ru xloadimage.4.1.orig/rle.c xloadimage.4.1/rle.c
+--- xloadimage.4.1.orig/rle.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/rle.c 2005-10-22 16:00:06.000000000 +0200
+@@ -21,7 +21,7 @@
+ #undef debug
+
+ #ifdef DEBUG
+-# define debug(xx) fprintf(stderr,xx)
++# define debug(xx) fprintf(stderr, "%s", xx)
+ #else
+ # define debug(xx)
+ #endif
+diff -ru xloadimage.4.1.orig/rotate.c xloadimage.4.1/rotate.c
+--- xloadimage.4.1.orig/rotate.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/rotate.c 2005-10-22 15:48:49.000000000 +0200
+@@ -70,7 +70,7 @@
+ { printf(" Rotating image by %d degrees...", degrees);
+ fflush(stdout);
+ }
+- sprintf(buf, "%s (rotated by %d degrees)", simage->title, degrees);
++ snprintf(buf, BUFSIZ - 1, "%s (rotated by %d degrees)", simage->title, degrees);
+
+ image1 = simage;
+ image2 = NULL;
+diff -ru xloadimage.4.1.orig/tiff.c xloadimage.4.1/tiff.c
+--- xloadimage.4.1.orig/tiff.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/tiff.c 2005-10-22 15:48:49.000000000 +0200
+@@ -133,14 +133,14 @@
+ switch (info->photometric) {
+ case PHOTOMETRIC_MINISBLACK:
+ if (info->bitspersample > 1) {
+- sprintf(buf, "%d-bit greyscale ", info->bitspersample);
++ snprintf(buf, 31, "%d-bit greyscale ", info->bitspersample);
+ return(buf);
+ }
+ else
+ return "white-on-black ";
+ case PHOTOMETRIC_MINISWHITE:
+ if (info->bitspersample > 1) {
+- sprintf(buf, "%d-bit greyscale ", info->bitspersample);
++ snprintf(buf, 31, "%d-bit greyscale ", info->bitspersample);
+ return(buf);
+ }
+ else
+diff -ru xloadimage.4.1.orig/window.c xloadimage.4.1/window.c
+--- xloadimage.4.1.orig/window.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/window.c 2005-10-22 15:48:50.000000000 +0200
+@@ -606,7 +606,7 @@
+ else {
+ char def_geom[30];
+
+- sprintf(def_geom, "%ux%u+0+0", image->width, image->height);
++ snprintf(def_geom, 29, "%ux%u+0+0", image->width, image->height);
+ XGeometry(disp, scrn, opt->info.geometry.string, def_geom, 0, 1, 1, 0, 0,
+ (int *)&winx, (int *)&winy, (int *)&winwidth, (int *)&winheight);
+ }
+diff -ru xloadimage.4.1.orig/zio.c xloadimage.4.1/zio.c
+--- xloadimage.4.1.orig/zio.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/zio.c 2005-10-22 15:48:50.000000000 +0200
+@@ -233,7 +233,7 @@
+ strcpy (s, "'");
+ debug(("Filtering image through '%s'\n", filter->filter));
+ zf->type= ZPIPE;
+- sprintf(buf, "%s %s", filter->filter, fname);
++ snprintf(buf, BUFSIZ - 1, "%s %s", filter->filter, fname);
+ lfree (fname);
+ if (! (zf->stream= popen(buf, "r"))) {
+ lfree((byte *)zf->filename);
+diff -ru xloadimage.4.1.orig/zoom.c xloadimage.4.1/zoom.c
+--- xloadimage.4.1.orig/zoom.c 2005-10-22 15:47:17.000000000 +0200
++++ xloadimage.4.1/zoom.c 2005-10-22 15:48:50.000000000 +0200
+@@ -63,23 +63,23 @@
+ if (!xzoom) {
+ if (verbose)
+ printf(" Zooming image Y axis by %d%%...", yzoom);
+- sprintf(buf, "%s (Y zoom %d%%)", oimage->title, yzoom);
++ snprintf(buf, BUFSIZ - 1, "%s (Y zoom %d%%)", oimage->title, yzoom);
+ }
+ else if (!yzoom) {
+ if (verbose)
+ printf(" Zooming image X axis by %d%%...", xzoom);
+- sprintf(buf, "%s (X zoom %d%%)", oimage->title, xzoom);
++ snprintf(buf, BUFSIZ - 1, "%s (X zoom %d%%)", oimage->title, xzoom);
+ }
+ else if (xzoom == yzoom) {
+ if (verbose)
+ printf(" Zooming image by %d%%...", xzoom);
+- sprintf(buf, "%s (%d%% zoom)", oimage->title, xzoom);
++ snprintf(buf, BUFSIZ - 1, "%s (%d%% zoom)", oimage->title, xzoom);
+ }
+ else {
+ if (verbose)
+ printf(" Zooming image X axis by %d%% and Y axis by %d%%...",
+ xzoom, yzoom);
+- sprintf(buf, "%s (X zoom %d%% Y zoom %d%%)", oimage->title,
++ snprintf(buf, BUFSIZ - 1, "%s (X zoom %d%% Y zoom %d%%)", oimage->title,
+ xzoom, yzoom);
+ }
+ if (verbose)
diff --git a/media-gfx/xloadimage/metadata.xml b/media-gfx/xloadimage/metadata.xml
new file mode 100644
index 000000000000..9be90a258970
--- /dev/null
+++ b/media-gfx/xloadimage/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/xloadimage/xloadimage-4.1-r11.ebuild b/media-gfx/xloadimage/xloadimage-4.1-r11.ebuild
new file mode 100644
index 000000000000..4442b7a87a31
--- /dev/null
+++ b/media-gfx/xloadimage/xloadimage-4.1-r11.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="utility to view many different types of images under X11"
+HOMEPAGE="http://world.std.com/~jimf/xloadimage.html"
+SRC_URI="ftp://ftp.x.org/R5contrib/${P/-/.}.tar.gz
+ mirror://gentoo/${P}-gentoo-r1.diff.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="tiff jpeg png"
+
+RDEPEND="x11-libs/libX11
+ tiff? ( media-libs/tiff )
+ png? ( media-libs/libpng )
+ jpeg? ( virtual/jpeg:0 )"
+DEPEND="${RDEPEND}
+ !media-gfx/xli"
+
+S=${WORKDIR}/${P/-/.}
+
+src_prepare() {
+ epatch "${WORKDIR}"/${P}-gentoo-r1.diff
+ epatch "${FILESDIR}"/${P}-zio-shell-meta-char.diff
+ epatch "${FILESDIR}"/${P}-endif.patch
+
+ # Do not define errno extern, but rather include errno.h
+ # <azarah@gentoo.org> (1 Jan 2003)
+ epatch "${FILESDIR}"/${P}-include-errno_h.patch
+
+ epatch "${FILESDIR}"/xloadimage-gentoo.patch
+
+ sed -i -e "s:OPT_FLAGS=:OPT_FLAGS=$CFLAGS:" Make.conf || die
+ sed -i -e "s:^#include <varargs.h>:#include <stdarg.h>:" rlelib.c || die
+
+ # On FreeBSD systems malloc.h is a false header asking for fixes.
+ # On MacOSX it would require malloc/malloc.h
+ # On other systems it's simply unneeded
+ sed -i -e 's,<malloc.h>,<stdlib.h>,' vicar.c || die
+
+ epatch "${FILESDIR}"/${P}-unaligned-access.patch
+ epatch "${FILESDIR}"/${P}-ldflags_and_exit.patch
+
+ sed -i -e "/^DEFS = /s:/etc:${EPREFIX}/etc:" Makefile.in
+
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+ sed -i \
+ -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:' \
+ png.c || die
+
+ # One of the previous patches screws up a bracket...
+ epatch "${FILESDIR}"/${P}-bracket.patch
+
+ chmod +x configure
+ eautoreconf
+}
+
+src_configure() {
+ # Set TIFFHeader to TIFFHeaderCommon wrt #319383
+ has_version '>=media-libs/tiff-4.0.0_pre' && \
+ append-flags -DTIFFHeader=TIFFHeaderCommon
+
+ tc-export CC
+ econf $(use_with jpeg) \
+ $(use_with png) \
+ $(use_with tiff)
+}
+
+src_compile() {
+ emake SYSPATHFILE="${EPREFIX}"/etc/X11/Xloadimage || die
+}
+
+src_install() {
+ dobin xloadimage uufilter || die
+
+ dosym xloadimage /usr/bin/xsetbg || die
+ dosym xloadimage /usr/bin/xview || die
+
+ insinto /etc/X11
+ doins xloadimagerc || die
+
+ newman xloadimage.man xloadimage.1 || die
+ newman uufilter.man uufilter.1 || die
+
+ echo ".so man1/xloadimage.1" > "${T}"/xsetbg.1
+ doman "${T}"/xsetbg.1 || die
+ newman "${T}"/xsetbg.1 xview.1 || die
+
+ dodoc README
+}
diff --git a/media-gfx/xpaint/Manifest b/media-gfx/xpaint/Manifest
new file mode 100644
index 000000000000..452330505bd8
--- /dev/null
+++ b/media-gfx/xpaint/Manifest
@@ -0,0 +1 @@
+DIST xpaint-2.9.10.2.tar.bz2 1245813 SHA256 7f1554c8390bc68da2bcc0449407b8cc69616ce5d2170f97d1b30aee9fcbdcf6 SHA512 8aa388d4b82b5867817eca2188f50734140c395efe663c290a78b4f24314754fb29257165a64c9b8a03634dede03d919d9a3a54c1d32049cc34216a1f3d4e499 WHIRLPOOL 5ffe99ba979590c1ad675f7cbd57e4dba92aa7c24a9600784224c913069cad1fa88a676180d60fc2cc60c6f7185056385ccb59f2725c9799781335ed38d8934a
diff --git a/media-gfx/xpaint/files/xpaint-2.9.10.2-QA2.patch b/media-gfx/xpaint/files/xpaint-2.9.10.2-QA2.patch
new file mode 100644
index 000000000000..9179585974c2
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.10.2-QA2.patch
@@ -0,0 +1,67 @@
+From 08bdf5f5d0c64384b2be16bd8ac68244675388d5 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sun, 6 Oct 2013 21:13:51 +0200
+Subject: [PATCH] respect CFLAGS
+
+---
+ Makefile.am | 2 +-
+ configure.ac | 2 +-
+ rw/Makefile.am | 2 +-
+ rw/configure.ac | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 4cf1753..414597f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -26,7 +26,7 @@ EXTERN_VIEWER = display
+ ## -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+ ## -DFUNCPROTO=15 -DNARROWPROTO
+
+-ARCH_DEFINES = -g -O2 -fno-strict-aliasing -fPIC
++ARCH_DEFINES = -fno-strict-aliasing -fPIC
+
+ ##
+ ## Specific xpaint options
+diff --git a/configure.ac b/configure.ac
+index e058529..3979075 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -29,7 +29,7 @@ AC_TYPE_UINT16_T
+ AC_TYPE_UINT32_T
+ AC_TYPE_UINT64_T
+
+-CFLAGS="-I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
++CFLAGS="$CFLAGS -I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
+ LIBS="$LIBS -lm"
+ echo "VERSION = $VERSION" > .version
+
+diff --git a/rw/Makefile.am b/rw/Makefile.am
+index d91d5d5..2f50253 100644
+--- a/rw/Makefile.am
++++ b/rw/Makefile.am
+@@ -10,7 +10,7 @@ SHAREDIR = $(prefix)/share/xpaint
+ ## -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+ ## -DFUNCPROTO=15 -DNARROWPROTO
+
+-ARCH_DEFINES = -g -O2 -fno-strict-aliasing -fPIC
++ARCH_DEFINES = -fno-strict-aliasing -fPIC
+
+ ##
+ ## Specific xpaint options
+diff --git a/rw/configure.ac b/rw/configure.ac
+index fb4f3d4..d9c7601 100644
+--- a/rw/configure.ac
++++ b/rw/configure.ac
+@@ -29,7 +29,7 @@ AC_TYPE_UINT16_T
+ AC_TYPE_UINT32_T
+ AC_TYPE_UINT64_T
+
+-CFLAGS="-D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFUNCPROTO=15 -DNARROWPROTO -I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
++CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DFUNCPROTO=15 -DNARROWPROTO -I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
+ LIBS="$LIBS -lm"
+
+ dnl check X11
+--
+1.8.3.2
+
diff --git a/media-gfx/xpaint/files/xpaint-2.9.10.2-tiff.patch b/media-gfx/xpaint/files/xpaint-2.9.10.2-tiff.patch
new file mode 100644
index 000000000000..20e59872b84d
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.10.2-tiff.patch
@@ -0,0 +1,37 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Fri Jun 20 13:52:42 UTC 2014
+Subject: fix tiff build switch
+
+--- xpaint-2.9.10.2/configure.ac
++++ xpaint-2.9.10.2/configure.ac
+@@ -125,9 +125,11 @@
+ with_libtiff="yes"
+ tiff_header_found="no"
+ #
+-AC_ARG_ENABLE(tiff,
++AC_ARG_ENABLE([tiff],
+ [ --enable-tiff[=[yes|no]] Build with TIFF support [ [default=yes] ]],
+-test "$enable_tiff" = "no" && with_libtiff="no")
++ [with_libtiff=$enableval],
++ [with_libtiff=yes]
++)
+ #
+ if test "x$with_libtiff" = xyes ; then
+ #TIFF compiled with JPEG and JBIG support?
+--- xpaint-2.9.10.2/rw/readWriteTIFF.c
++++ xpaint-2.9.10.2/rw/readWriteTIFF.c
+@@ -14,6 +14,8 @@
+
+ /* $Id$ */
+
++#ifdef HAVE_TIFF
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include "tiffio.h"
+@@ -527,3 +529,5 @@ int WriteTIFF(char *file, Image * image)
+
+ return 0;
+ }
++
++#endif /* HAVE_TIFF */
diff --git a/media-gfx/xpaint/files/xpaint-2.9.9.4-QA1.patch b/media-gfx/xpaint/files/xpaint-2.9.9.4-QA1.patch
new file mode 100644
index 000000000000..31e3a38ba005
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.9.4-QA1.patch
@@ -0,0 +1,91 @@
+From 2987bfa203a8467a697efffa211b90b12858b40b Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sun, 6 Oct 2013 20:37:28 +0200
+Subject: [PATCH] respect flags, add WITH_PGF option, fix echo
+
+---
+ util/Makefile | 56 +++++++++++++++++++++++++++++++++++---------------------
+ 1 file changed, 35 insertions(+), 21 deletions(-)
+
+diff --git a/util/Makefile b/util/Makefile
+index e6af415..21a0d17 100644
+--- a/util/Makefile
++++ b/util/Makefile
+@@ -1,39 +1,53 @@
+-GCC = gcc
+-CPP = g++ -fpermissive
++# set to anything but "no" to enable
++WITH_PGF=no
+
++ifneq ($(WITH_PGF),no)
+ all: pdfconcat ppmtops pgf2pnm
++else
++all: pdfconcat ppmtops
++endif
+
+ pdfconcat:
+- $(GCC) -O3 -s -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wstrict-prototypes -Wtraditional -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat
++ $(CC) $(CFLAGS) -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wstrict-prototypes -Wtraditional -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat $(LDFLAGS)
+
+ ppmtops:
+- $(GCC) ppmtops.c -o ppmtops
++ $(CC) $(CFLAGS) ppmtops.c -o ppmtops $(LDFLAGS)
+
++ifneq ($(WITH_PGF),no)
+ pgf2pnm: main.cpp pnm.cpp
+ @if [ -x /usr/include/libpgf ] ; then \
+- $(CPP) -c main.cpp -o main.o -I/usr/include/libpgf ; \
+- $(CPP) -c pnm.cpp -o pnm.o -I/usr/include/libpgf ; \
+- $(CPP) -o pgf2pnm main.o pnm.o -lpgf ; \
++ $(CXX) $(CXXFLAGS) -fpermissive -c main.cpp -o main.o -I/usr/include/libpgf ; \
++ $(CXX) $(CXXFLAGS) -fpermissive -c pnm.cpp -o pnm.o -I/usr/include/libpgf ; \
++ $(CXX) $(CXXFLAGS) -fpermissive -o pgf2pnm main.o pnm.o $(LDFLAGS) -lpgf ; \
+ else \
+- @echo "libpgf not installed !!" ; \
++ echo "libpgf not installed !!" ; \
+ fi
++endif
+
+-install:
++install-common:
+ @if [ -x pdfconcat ] ; then \
+- mkdir -p $(DESTDIR)/usr/bin ; \
+- install -c pdfconcat $(DESTDIR)/usr/bin ; \
+- echo "install -c pdfconcat $(DESTDIR)/usr/bin" ; \
+- mkdir -p $(DESTDIR)/usr/share/man/man1 ; \
+- install -c -m 644 pdfconcat.1 $(DESTDIR)/usr/share/man/man1 ; \
+- echo "install -c pdfconcat.1 $(DESTDIR)/usr/share/man/man1" ; fi
++ mkdir -p "$(DESTDIR)"/usr/bin ; \
++ install -c pdfconcat "$(DESTDIR)"/usr/bin ; \
++ echo "install -c pdfconcat "$(DESTDIR)"/usr/bin" ; \
++ mkdir -p "$(DESTDIR)"/usr/share/man/man1 ; \
++ install -c -m 644 pdfconcat.1 "$(DESTDIR)"/usr/share/man/man1 ; \
++ echo "install -c pdfconcat.1 "$(DESTDIR)"/usr/share/man/man1" ; fi
+ @if [ -x ppmtops ] ; then \
+- mkdir -p $(DESTDIR)/usr/bin ; \
+- install -c ppmtops $(DESTDIR)/usr/bin ; \
+- echo "install -c ppmtops $(DESTDIR)/usr/bin" ; fi
++ mkdir -p "$(DESTDIR)"/usr/bin ; \
++ install -c ppmtops "$(DESTDIR)"/usr/bin ; \
++ echo "install -c ppmtops "$(DESTDIR)"/usr/bin" ; fi
++
++install-pgf:
+ @if [ -x pgf2pnm ] ; then \
+- mkdir -p $(DESTDIR)/usr/bin ; \
+- install -c pgf2pnm $(DESTDIR)/usr/bin ; \
+- echo "install -c pgf2pnm $(DESTDIR)/usr/bin" ; fi
++ mkdir -p "$(DESTDIR)"/usr/bin ; \
++ install -c pgf2pnm "$(DESTDIR)"/usr/bin ; \
++ echo "install -c pgf2pnm "$(DESTDIR)"/usr/bin" ; fi
++
++ifneq ($(WITH_PGF),no)
++install: install-common install-pgf
++else
++install: install-common
++endif
+
+ clean:
+ rm -f core *~ *.o pdfconcat ppmtops pgf2pnm
+--
+1.8.3.2
+
diff --git a/media-gfx/xpaint/files/xpaint-2.9.9.4-QA2.patch b/media-gfx/xpaint/files/xpaint-2.9.9.4-QA2.patch
new file mode 100644
index 000000000000..03b35f81f37b
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.9.4-QA2.patch
@@ -0,0 +1,67 @@
+From 08bdf5f5d0c64384b2be16bd8ac68244675388d5 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sun, 6 Oct 2013 21:13:51 +0200
+Subject: [PATCH] respect CFLAGS
+
+---
+ Makefile.am | 2 +-
+ configure.ac | 2 +-
+ rw/Makefile.am | 2 +-
+ rw/configure.ac | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 4cf1753..414597f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -26,7 +26,7 @@ EXTERN_VIEWER = display
+ ## -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+ ## -DFUNCPROTO=15 -DNARROWPROTO
+
+-ARCH_DEFINES = -g -O2 -fno-strict-aliasing -fPIC
++ARCH_DEFINES = -fno-strict-aliasing -fPIC
+
+ ##
+ ## Specific xpaint options
+diff --git a/configure.ac b/configure.ac
+index e058529..3979075 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -29,7 +29,7 @@ AC_TYPE_UINT16_T
+ AC_TYPE_UINT32_T
+ AC_TYPE_UINT64_T
+
+-CFLAGS="-I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
++CFLAGS="$CFLAGS -I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
+ LIBS="$LIBS -lm"
+ echo "VERSION = $VERSION" > .version
+
+diff --git a/rw/Makefile.am b/rw/Makefile.am
+index d91d5d5..2f50253 100644
+--- a/rw/Makefile.am
++++ b/rw/Makefile.am
+@@ -10,7 +10,7 @@ SHAREDIR = $(prefix)/share/xpaint
+ ## -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+ ## -DFUNCPROTO=15 -DNARROWPROTO
+
+-ARCH_DEFINES = -g -O2 -fno-strict-aliasing -fPIC
++ARCH_DEFINES = -fno-strict-aliasing -fPIC
+
+ ##
+ ## Specific xpaint options
+diff --git a/rw/configure.ac b/rw/configure.ac
+index fb4f3d4..d9c7601 100644
+--- a/rw/configure.ac
++++ b/rw/configure.ac
+@@ -29,7 +29,7 @@ AC_TYPE_UINT16_T
+ AC_TYPE_UINT32_T
+ AC_TYPE_UINT64_T
+
+-CFLAGS="-I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
++CFLAGS="$CFLAGS -I/usr/include -I/usr/include/X11 -I/usr/include/X11/Xaw3dxft"
+ LIBS="$LIBS -lm"
+
+ dnl check X11
+--
+1.8.3.2
+
diff --git a/media-gfx/xpaint/files/xpaint-2.9.9.4-autoreconf.patch b/media-gfx/xpaint/files/xpaint-2.9.9.4-autoreconf.patch
new file mode 100644
index 000000000000..4342d4f4fa78
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.9.4-autoreconf.patch
@@ -0,0 +1,24 @@
+From e22a3c15aea7d734f433370130458d97d6490d8a Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sun, 6 Oct 2013 20:27:49 +0200
+Subject: [PATCH] add missing macros
+
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 169419e..e058529 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -15,6 +15,7 @@ AC_CONFIG_MACRO_DIR([m4])
+ AM_INIT_AUTOMAKE([-Wall -Werror])
+
+ AC_LANG_C
++AM_PROG_AR
+
+ ## basic types
+
+--
+1.8.3.2
+
diff --git a/media-gfx/xpaint/files/xpaint-2.9.9.4-parallel-make.patch b/media-gfx/xpaint/files/xpaint-2.9.9.4-parallel-make.patch
new file mode 100644
index 000000000000..250f634f9973
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.9.4-parallel-make.patch
@@ -0,0 +1,25 @@
+From ae11f5cb975749bd8d6ffda48301eb4aadfee35d Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sun, 6 Oct 2013 21:02:12 +0200
+Subject: [PATCH] fix parallel make
+
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b2285a0..4cf1753 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -112,7 +112,7 @@ XPaint.ad: app-defaults
+ XPaint.ad.h: substads XPaint.ad
+ ./substads -ad2c XPaint.ad $@
+
+-xpaint.1: xpaint.1.in version.h
++xpaint.1: substads xpaint.1.in version.h
+ ./substads -single xpaint.1.in xpaint.1 XPAINT_VERSION $(PACKAGE_VERSION)
+
+ install-exec-hook:
+--
+1.8.3.2
+
diff --git a/media-gfx/xpaint/files/xpaint-2.9.9.4-submake.patch b/media-gfx/xpaint/files/xpaint-2.9.9.4-submake.patch
new file mode 100644
index 000000000000..e218eb4c75e9
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.9.9.4-submake.patch
@@ -0,0 +1,29 @@
+From 11b369b69c4637431b139960391bded531a9f652 Mon Sep 17 00:00:00 2001
+From: hasufell <hasufell@gentoo.org>
+Date: Sun, 6 Oct 2013 20:25:14 +0200
+Subject: [PATCH] don't run submake
+
+---
+ Makefile.am | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 5b2caec..b2285a0 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -139,11 +139,6 @@ install-exec-hook:
+ mkdir -p $(DESTDIR)$(SHAREDIR)/messages
+ cd share/messages ; $(RM) -f *~ ; cp -f Messages* $(DESTDIR)$(SHAREDIR)/messages
+ chmod -R a+r $(DESTDIR)$(SHAREDIR)/
+- cd util ; make ; make install DESTDIR=$(DESTDIR)$
+
+ clean-local:
+ rm -f xaw_incdir
+- cd util ; make clean
+-
+-distclean-local:
+- cd util ; make distclean
+\ No newline at end of file
+--
+1.8.3.2
+
diff --git a/media-gfx/xpaint/metadata.xml b/media-gfx/xpaint/metadata.xml
new file mode 100644
index 000000000000..d62666a4598c
--- /dev/null
+++ b/media-gfx/xpaint/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ XPaint is an X Window System color image bitmap editing program.
+ It also supports advanced features, such as image processing
+ algorithms, scripting and batch jobs. XPaint allows the edition
+ of multiple images simultaneously and supports a wide variety of
+ image formats, including: GIF, JPG, PNG, PPM, TIFF, XBM, XPM,
+ etc.
+
+ xpaint is now fully UTF8 compliant, and is capable of using
+ antialiased truetype fonts in its operations and in the menus
+ (in particular, translating to oriental languages should now be
+ quite easy - also the X core font protocol is no longer used
+ anywhere.)
+
+ xpaint also offers optional editing features based on
+ programmable filters and user defined procedures written as
+ scripts in plain C. The package includes a substantial list of
+ examples and some support for batch processing.
+ </longdescription>
+ <use>
+ <flag name="pgf">Support for loading PGF images</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">sf-xpaint</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/xpaint/xpaint-2.9.10.2.ebuild b/media-gfx/xpaint/xpaint-2.9.10.2.ebuild
new file mode 100644
index 000000000000..339c0feb901e
--- /dev/null
+++ b/media-gfx/xpaint/xpaint-2.9.10.2.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils
+
+DESCRIPTION="Image editor with tiff, jpeg and png support"
+HOMEPAGE="http://sf-xpaint.sourceforge.net/"
+SRC_URI="mirror://sourceforge/sf-xpaint/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="jpeg2k pgf tiff"
+
+RDEPEND="
+ media-libs/fontconfig
+ media-libs/freetype
+ media-libs/libpng:0
+ x11-libs/libICE
+ x11-libs/libX11
+ >=x11-libs/libXaw3dXft-1.6.2c
+ x11-libs/libXext
+ x11-libs/libXft
+ x11-libs/libXmu
+ x11-libs/libXpm
+ x11-libs/libXt
+ sys-libs/zlib
+ virtual/jpeg
+ jpeg2k? ( media-libs/openjpeg:0 )
+ pgf? ( media-libs/libpgf )
+ tiff? (
+ media-libs/jbigkit:0
+ media-libs/tiff:0
+ )"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2.9.9.4-{QA1,submake,parallel-make}.patch \
+ "${FILESDIR}"/${PN}-2.9.10.2-{QA2,tiff}.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable tiff) \
+ $(use_enable jpeg2k libopenjpeg)
+}
+
+src_compile() {
+ # clean up
+ emake clean
+ emake -C util clean
+
+ # parallel make still fails sometimes
+ emake substads
+ emake xpaint.1
+
+ default
+ emake \
+ WITH_PGF="$(usex pgf "yes" "no")" \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ -C util
+}
+
+src_install() {
+ default
+ emake \
+ WITH_PGF="$(usex pgf "yes" "no")" \
+ DESTDIR="${ED}" \
+ -C util install
+}
+
+pkg_postinst() {
+ elog "optional dependencies:"
+ elog " app-text/gv (external viewer for PostScript output)"
+ elog " media-gfx/imagemagick (external viewer for pixel graphics)"
+ elog " net-print/cups (printing)"
+}
diff --git a/media-gfx/xsane/Manifest b/media-gfx/xsane/Manifest
new file mode 100644
index 000000000000..cb5d50e4193a
--- /dev/null
+++ b/media-gfx/xsane/Manifest
@@ -0,0 +1,2 @@
+DIST xsane-0.998-patches-2.tar.xz 54804 SHA256 84af533cba6309cf44892da8952b6203daa4dcfaf64e2efd1dddc5144e4cab4c SHA512 973ccac2fe3b6089049c1c5ba3e4cb0db29fdc79de372f8a7b461ee108e5bfc3f4a84997552fc3d3b651bbe9f98d247a5974d90e8949089b2ea52118eab6ad1f WHIRLPOOL 2294601aa696c442e8d2b5173b8ee04d158439e0ae02dd22c7d5c8f9fce98c8238a42e0867a5e511d206dd4030f7a15df2a98676471abe1e91870883662add56
+DIST xsane-0.999.tar.gz 2950621 SHA256 5782d23e67dc961c81eef13a87b17eb0144cae3d1ffc5cf7e0322da751482b4b SHA512 73ec961fce1a86b5d6f5bac0995d222785eb4b077dc8e72492b092d2bf4500455426e80e4d27233721cd38ec84f77fb9f92190a6afe45bdaf7ffd1ee50b431ed WHIRLPOOL 7d50f6ecd8ad671d36a6b92eb365a6361da8d90bfea3136cf7add0890313294903f8cbc75684cbc24e42a028f83922a0308783fb20d89b0d6b14b1f949283ad5
diff --git a/media-gfx/xsane/files/xsane-0.999-lcms2.patch b/media-gfx/xsane/files/xsane-0.999-lcms2.patch
new file mode 100644
index 000000000000..c3d696c28ecf
--- /dev/null
+++ b/media-gfx/xsane/files/xsane-0.999-lcms2.patch
@@ -0,0 +1,372 @@
+From 30af0e2edbf061b71bed9536d826894449f0390d Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 23 Sep 2013 16:11:31 +0200
+Subject: [PATCH] patch: lcms2
+
+Squashed commit of the following:
+
+commit f975accf7e1a08438b63580ea848457d373200f5
+Author: Nils Philippsen <nils@redhat.com>
+Date: Mon Sep 23 14:53:45 2013 +0200
+
+ Add support for lcms 2.x.
+---
+ configure.in | 22 ++++++++++++++----
+ include/config.h.in | 8 ++++++-
+ src/xsane-preview.c | 6 +++--
+ src/xsane-save.c | 38 ++++++++++++++++++++++++++-----
+ src/xsane-viewer.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++---
+ src/xsane.h | 8 ++++++-
+ 6 files changed, 130 insertions(+), 17 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index df7b114..3659c97 100644
+--- a/configure.in
++++ b/configure.in
+@@ -130,7 +130,17 @@ if test "${USE_TIFF}" = "yes"; then
+ fi
+
+ if test "${USE_LCMS}" = "yes"; then
+- AC_CHECK_LIB(lcms, cmsOpenProfileFromFile)
++ AC_SEARCH_LIBS(cmsOpenProfileFromFile, [lcms2 lcms])
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" != "no"; then
++ AC_DEFINE(HAVE_LIBLCMS, 1, [Define if LCMS is to be used.])
++ fi
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" == "-llcms2"; then
++ AC_DEFINE(HAVE_LIBLCMS2, 1, [Define if you have liblcms2.])
++ else
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" == "-llcms"; then
++ AC_DEFINE(HAVE_LIBLCMS1, 1, [Define if you have liblcms.])
++ fi
++ fi
+ fi
+
+ dnl Checks for library functions.
+@@ -294,10 +304,14 @@ else
+ echo "* - PNG support deactivated *"
+ fi
+
+-if test "${ac_cv_lib_lcms_cmsOpenProfileFromFile}" = "yes"; then
+- echo "* - LCMS (color management) support activated *"
++if test "${ac_cv_search_cmsOpenProfileFromFile}" = "-llcms2"; then
++ echo "* - LCMS (color management) support activated (lcms2) *"
+ else
+- echo "* - LCMS (color management) support deactivated *"
++ if test "${ac_cv_search_cmsOpenProfileFromFile}" = "-llcms"; then
++ echo "* - LCMS (color management) support activated (lcms) *"
++ else
++ echo "* - LCMS (color management) support deactivated *"
++ fi
+ fi
+
+ echo "* *"
+diff --git a/include/config.h.in b/include/config.h.in
+index ecc9637..f9a3e40 100755
+--- a/include/config.h.in
++++ b/include/config.h.in
+@@ -290,9 +290,15 @@
+ /* Define if you have libtiff. */
+ #undef HAVE_LIBTIFF
+
+-/* Define if you have liblcms. */
++/* Define if LCMS is to be used. */
+ #undef HAVE_LIBLCMS
+
++/* Define if you have liblcms. */
++#undef HAVE_LIBLCMS1
++
++/* Define if you have liblcms2. */
++#undef HAVE_LIBLCMS2
++
+ #ifndef HAVE_STRNCASECMP
+ /* OS/2 needs this */
+ # define strncasecmp(a, b, c) strnicmp(a, b, c)
+diff --git a/src/xsane-preview.c b/src/xsane-preview.c
+index 6327ca7..6eaf687 100644
+--- a/src/xsane-preview.c
++++ b/src/xsane-preview.c
+@@ -6346,8 +6346,8 @@ int preview_do_color_correction(Preview *p)
+ cmsHPROFILE hOutProfile = NULL;
+ cmsHPROFILE hProofProfile = NULL;
+ cmsHTRANSFORM hTransform = NULL;
+- DWORD input_format, output_format;
+- DWORD cms_flags = 0;
++ cmsUInt32Number input_format, output_format;
++ cmsUInt32Number cms_flags = 0;
+ int proof = 0;
+ char *cms_proof_icm_profile = NULL;
+ int linesize = 0;
+@@ -6355,7 +6355,9 @@ int preview_do_color_correction(Preview *p)
+
+ DBG(DBG_proc, "preview_do_color_correction\n");
+
++#ifdef HAVE_LIBLCMS1
+ cmsErrorAction(LCMS_ERROR_SHOW);
++#endif
+
+ if (preferences.cms_bpc)
+ {
+diff --git a/src/xsane-save.c b/src/xsane-save.c
+index 75e0a63..2d0e44b 100644
+--- a/src/xsane-save.c
++++ b/src/xsane-save.c
+@@ -832,9 +832,9 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio
+ cmsHPROFILE hInProfile = NULL;
+ cmsHPROFILE hOutProfile = NULL;
+ cmsHTRANSFORM hTransform = NULL;
+- DWORD cms_input_format;
+- DWORD cms_output_format;
+- DWORD cms_flags = 0;
++ cmsUInt32Number cms_input_format;
++ cmsUInt32Number cms_output_format;
++ cmsUInt32Number cms_flags = 0;
+
+ if (cms_function == XSANE_CMS_FUNCTION_EMBED_SCANNER_ICM_PROFILE)
+ {
+@@ -843,7 +843,9 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio
+
+ DBG(DBG_info, "Prepare CMS transform\n");
+
++#ifdef HAVE_LIBLCMS1
+ cmsErrorAction(LCMS_ERROR_SHOW);
++#endif
+
+ if (cms_bpc)
+ {
+@@ -890,10 +892,18 @@ cmsHTRANSFORM xsane_create_cms_transform(Image_info *image_info, int cms_functio
+ if (image_info->channels == 1) /* == 1 (grayscale) */
+ {
+ #if 1 /* xxx oli */
++# ifdef HAVE_LIBLCMS2
++ cmsToneCurve *Gamma = cmsBuildGamma(NULL, 2.2);
++# else
+ LPGAMMATABLE Gamma = cmsBuildGamma(256, 2.2);
++# endif
+
+ hOutProfile = cmsCreateGrayProfile(cmsD50_xyY(), Gamma);
++# ifdef HAVE_LIBLCMS2
++ cmsFreeToneCurve(Gamma);
++# else
+ cmsFreeGamma(Gamma);
++# endif
+ #endif
+ }
+ else
+@@ -2896,7 +2906,11 @@ static int xsane_write_CSA(FILE *outfile, char *input_profile, int intent)
+ return -1;
+ }
+
++#ifdef HAVE_LIBLCMS2
++ n = cmsGetPostScriptCSA(NULL, hProfile, intent, 0, NULL, 0);
++#else
+ n = cmsGetPostScriptCSA(hProfile, intent, NULL, 0);
++#endif
+ if (n == 0)
+ {
+ return -2;
+@@ -2908,7 +2922,11 @@ static int xsane_write_CSA(FILE *outfile, char *input_profile, int intent)
+ return -3;
+ }
+
++#ifdef HAVE_LIBLCMS2
++ cmsGetPostScriptCSA(NULL, hProfile, intent, 0, buffer, n);
++#else
+ cmsGetPostScriptCSA(hProfile, intent, buffer, n);
++#endif
+ buffer[n] = 0;
+
+ fprintf(outfile, "%s", buffer);
+@@ -2927,7 +2945,7 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int
+ cmsHPROFILE hProfile;
+ size_t n;
+ char* buffer;
+- DWORD flags = cmsFLAGS_NODEFAULTRESOURCEDEF;
++ cmsUInt32Number flags = cmsFLAGS_NODEFAULTRESOURCEDEF;
+
+ hProfile = cmsOpenProfileFromFile(output_profile, "r");
+ if (!hProfile)
+@@ -2940,7 +2958,11 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int
+ flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
+ }
+
++#ifdef HAVE_LIBLCMS2
++ n = cmsGetPostScriptCRD(NULL, hProfile, intent, flags, NULL, 0);
++#else
+ n = cmsGetPostScriptCRDEx(hProfile, intent, flags, NULL, 0);
++#endif
+ if (n == 0)
+ {
+ return -2;
+@@ -2952,7 +2974,11 @@ static int xsane_write_CRD(FILE *outfile, char *output_profile, int intent, int
+ return -3;
+ }
+
++#ifdef HAVE_LIBLCMS2
++ cmsGetPostScriptCRD(NULL, hProfile, intent, flags, buffer, n);
++#else
+ cmsGetPostScriptCRDEx(hProfile, intent, flags, buffer, n);
++#endif
+ buffer[n] = 0;
+
+ fprintf(outfile, "%s", buffer);
+@@ -4349,7 +4375,7 @@ static void xsane_jpeg_embed_scanner_icm_profile(j_compress_ptr cinfo_ptr, const
+ {
+ FILE *icm_profile;
+ size_t size, embed_len;
+- LPBYTE embed_buffer;
++ cmsUInt8Number *embed_buffer;
+
+ DBG(DBG_proc, "xsane_jpeg_embed_scanner_icm_profile(%s)\n", icm_filename);
+
+@@ -4363,7 +4389,7 @@ static void xsane_jpeg_embed_scanner_icm_profile(j_compress_ptr cinfo_ptr, const
+ size = ftell(icm_profile);
+ fseek(icm_profile, 0, SEEK_SET);
+
+- embed_buffer = (LPBYTE) malloc(size + 1);
++ embed_buffer = (cmsUInt8Number *) malloc(size + 1);
+ if (embed_buffer)
+ {
+ embed_len = fread(embed_buffer, 1, size, icm_profile);
+diff --git a/src/xsane-viewer.c b/src/xsane-viewer.c
+index 69a444d..844c077 100644
+--- a/src/xsane-viewer.c
++++ b/src/xsane-viewer.c
+@@ -1795,6 +1795,9 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g
+ {
+ Viewer *v = (Viewer *) data;
+ int val;
++#ifdef HAVE_LIBLCMS2
++ cmsUInt16Number alarm_codes[cmsMAXCHANNELS];
++#endif
+
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[0]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+ g_signal_handlers_block_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[1]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+@@ -1811,6 +1814,49 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g
+ v->cms_gamut_alarm_color = val;
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(v->cms_gamut_alarm_color_widget[v->cms_gamut_alarm_color]), TRUE);
+
++#ifdef HAVE_LIBLCMS2
++ switch(v->cms_gamut_alarm_color)
++ {
++ default:
++ case 0: /* black */
++ alarm_codes[0] = (cmsUInt16Number) 0;
++ alarm_codes[1] = (cmsUInt16Number) 0;
++ alarm_codes[2] = (cmsUInt16Number) 0;
++ break;
++
++ case 1: /* gray */
++ alarm_codes[0] = (cmsUInt16Number) 128;
++ alarm_codes[1] = (cmsUInt16Number) 128;
++ alarm_codes[2] = (cmsUInt16Number) 128;
++ break;
++
++ case 2: /* white */
++ alarm_codes[0] = (cmsUInt16Number) 255;
++ alarm_codes[1] = (cmsUInt16Number) 255;
++ alarm_codes[2] = (cmsUInt16Number) 255;
++ break;
++
++ case 3: /* red */
++ alarm_codes[0] = (cmsUInt16Number) 255;
++ alarm_codes[1] = (cmsUInt16Number) 0;
++ alarm_codes[2] = (cmsUInt16Number) 0;
++ break;
++
++ case 4: /* green */
++ alarm_codes[0] = (cmsUInt16Number) 0;
++ alarm_codes[1] = (cmsUInt16Number) 255;
++ alarm_codes[2] = (cmsUInt16Number) 0;
++ break;
++
++ case 5: /* blue */
++ alarm_codes[0] = (cmsUInt16Number) 0;
++ alarm_codes[1] = (cmsUInt16Number) 0;
++ alarm_codes[2] = (cmsUInt16Number) 255;
++ break;
++ }
++
++ cmsSetAlarmCodes(alarm_codes);
++#else
+ switch(v->cms_gamut_alarm_color)
+ {
+ default:
+@@ -1838,6 +1884,7 @@ static void xsane_viewer_set_cms_gamut_alarm_color_callback(GtkWidget *widget, g
+ cmsSetAlarmCodes(0, 0, 255);
+ break;
+ }
++#endif
+
+ g_signal_handlers_unblock_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[0]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+ g_signal_handlers_unblock_by_func(GTK_OBJECT(v->cms_gamut_alarm_color_widget[1]), (GtkSignalFunc) xsane_viewer_set_cms_gamut_alarm_color_callback, v);
+@@ -2172,9 +2219,9 @@ static int xsane_viewer_read_image(Viewer *v)
+ cmsHTRANSFORM hTransform = NULL;
+ int proof = 0;
+ char *cms_proof_icm_profile = NULL;
+- DWORD cms_input_format;
+- DWORD cms_output_format;
+- DWORD cms_flags = 0;
++ cmsUInt32Number cms_input_format;
++ cmsUInt32Number cms_output_format;
++ cmsUInt32Number cms_flags = 0;
+ #endif
+
+ /* open imagefile */
+@@ -2203,7 +2250,9 @@ static int xsane_viewer_read_image(Viewer *v)
+
+ if ((v->enable_color_management) && (v->cms_enable))
+ {
++#ifdef HAVE_LIBLCMS1
+ cmsErrorAction(LCMS_ERROR_SHOW);
++#endif
+
+ if (v->cms_bpc)
+ {
+@@ -2801,6 +2850,9 @@ Viewer *xsane_viewer_new(char *filename, char *selection_filetype, int allow_red
+ GtkWidget *scrolled_window;
+ GtkWidget *zoom_option_menu, *zoom_menu, *zoom_menu_item;
+ int i, selection;
++#ifdef HAVE_LIBLCMS2
++ cmsUInt16Number alarm_codes[cmsMAXCHANNELS];
++#endif
+
+ DBG(DBG_proc, "viewer_new(%s)\n", filename);
+
+@@ -2830,8 +2882,15 @@ Viewer *xsane_viewer_new(char *filename, char *selection_filetype, int allow_red
+ v->cms_proofing_intent = INTENT_ABSOLUTE_COLORIMETRIC;
+ v->cms_gamut_check = 0;
+ v->cms_gamut_alarm_color = 3; /* red */
++#ifdef HAVE_LIBLCMS2
++ alarm_codes[0] = (cmsUInt16Number) 255;
++ alarm_codes[1] = (cmsUInt16Number) 0;
++ alarm_codes[2] = (cmsUInt16Number) 0;
++ cmsSetAlarmCodes(alarm_codes);
++#else
+ cmsSetAlarmCodes(255, 0, 0);
+ #endif
++#endif
+ if (selection_filetype)
+ {
+ v->selection_filetype = strdup(selection_filetype);
+diff --git a/src/xsane.h b/src/xsane.h
+index 4067d61..adcc0ed 100644
+--- a/src/xsane.h
++++ b/src/xsane.h
+@@ -70,7 +70,13 @@
+ #include <gtk/gtk.h>
+
+ #ifdef HAVE_LIBLCMS
+-# include "lcms.h"
++# ifdef HAVE_LIBLCMS2
++# include "lcms2.h"
++# else
++# include "lcms.h"
++typedef BYTE cmsUInt8Number;
++typedef DWORD cmsUInt32Number;
++# endif
+ #else
+ # define cmsHTRANSFORM void *
+ #endif
+--
+1.8.3.1
+
diff --git a/media-gfx/xsane/metadata.xml b/media-gfx/xsane/metadata.xml
new file mode 100644
index 000000000000..a203d1b2511d
--- /dev/null
+++ b/media-gfx/xsane/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>printing</herd>
+<herd>graphics</herd>
+<maintainer>
+ <email>pacho@gentoo.org</email>
+</maintainer>
+<use>
+ <flag name='ocr'>Enable support for Optical Character Recognition reader</flag>
+</use>
+</pkgmetadata>
diff --git a/media-gfx/xsane/xsane-0.999-r1.ebuild b/media-gfx/xsane/xsane-0.999-r1.ebuild
new file mode 100644
index 000000000000..537097f1dd01
--- /dev/null
+++ b/media-gfx/xsane/xsane-0.999-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils toolchain-funcs
+
+DESCRIPTION="graphical scanning frontend"
+HOMEPAGE="http://www.xsane.org/"
+SRC_URI="
+ http://www.xsane.org/download/${P}.tar.gz
+ http://dev.gentoo.org/~dilfridge/distfiles/${PN}-0.998-patches-2.tar.xz
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="nls jpeg png tiff gimp lcms ocr"
+
+RDEPEND="
+ media-gfx/sane-backends
+ x11-libs/gtk+:2
+ x11-misc/xdg-utils
+ jpeg? ( virtual/jpeg )
+ png? ( media-libs/libpng )
+ tiff? ( media-libs/tiff )
+ gimp? ( media-gfx/gimp )
+ lcms? ( media-libs/lcms:2 )
+"
+
+PDEPEND="ocr? ( app-text/gocr )"
+
+DEPEND="${RDEPEND}
+ app-arch/xz-utils
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ # Apply multiple fixes from different distributions
+ # Drop included patch and reuse patchset from prior version
+ rm "${WORKDIR}/${PN}-0.998-patches-2"/005-update-param-crash.patch || die
+ epatch "${WORKDIR}/${PN}-0.998-patches-2"/*.patch
+
+ # Fix compability with libpng15 wrt #377363
+ sed -i -e 's:png_ptr->jmpbuf:png_jmpbuf(png_ptr):' src/xsane-save.c || die
+
+ # Fix AR calling directly (bug #442606)
+ sed -i -e 's:ar r:$(AR) r:' lib/Makefile.in || die
+ tc-export AR
+
+ # Add support for lcms-2 (from Fedora)
+ epatch "${FILESDIR}/${PN}-0.999-lcms2.patch"
+ AT_M4DIR="m4" eautoreconf
+}
+
+src_configure() {
+ econf \
+ --enable-gtk2 \
+ $(use_enable nls) \
+ $(use_enable jpeg) \
+ $(use_enable png) \
+ $(use_enable tiff) \
+ $(use_enable gimp) \
+ $(use_enable lcms)
+}
+
+src_install() {
+ default
+
+ dodoc xsane.*
+
+ # link xsane so it is seen as a plugin in gimp
+ if use gimp; then
+ local plugindir
+ if [ -x "${EPREFIX}"/usr/bin/gimptool ]; then
+ plugindir="$(gimptool --gimpplugindir)/plug-ins"
+ elif [ -x "${EPREFIX}"/usr/bin/gimptool-2.0 ]; then
+ plugindir="$(gimptool-2.0 --gimpplugindir)/plug-ins"
+ else
+ die "Can't find GIMP plugin directory."
+ fi
+ dodir "${plugindir#${EPREFIX}}"
+ dosym /usr/bin/xsane "${plugindir#${EPREFIX}}"/xsane
+ fi
+
+ newicon src/xsane-48x48.png ${PN}.png
+}
diff --git a/media-gfx/xsvg/Manifest b/media-gfx/xsvg/Manifest
new file mode 100644
index 000000000000..247cdfd2788e
--- /dev/null
+++ b/media-gfx/xsvg/Manifest
@@ -0,0 +1 @@
+DIST xsvg-0.2.1.tar.gz 91431 RMD160 c26af8139e87080b45b8b41556d984dc9fd3da8f SHA1 429d63ac35573177f8600353bc0a2e2030b4152f SHA256 af75bb7f5ab15310c34a1ca3d357c7f5210be6439a3a76047c44ad9f0a3c2d6f
diff --git a/media-gfx/xsvg/files/xsvg-0.2.1-asneeded.patch b/media-gfx/xsvg/files/xsvg-0.2.1-asneeded.patch
new file mode 100644
index 000000000000..aafe09893476
--- /dev/null
+++ b/media-gfx/xsvg/files/xsvg-0.2.1-asneeded.patch
@@ -0,0 +1,9 @@
+diff -ur xsvg-0.2.1.orig/src/Makefile.am xsvg-0.2.1/src/Makefile.am
+--- xsvg-0.2.1.orig/src/Makefile.am 2003-12-19 17:07:21.000000000 +0200
++++ xsvg-0.2.1/src/Makefile.am 2007-03-12 22:31:55.000000000 +0200
+@@ -6,4 +6,4 @@
+ xsvg.c
+
+ AM_CFLAGS = $(X_CFLAGS) $(XSVG_CFLAGS)
+-xsvg_LDFLAGS = $(X_LIBS) $(XSVG_LIBS)
++xsvg_LDADD = $(X_LIBS) $(XSVG_LIBS)
diff --git a/media-gfx/xsvg/metadata.xml b/media-gfx/xsvg/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/xsvg/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/xsvg/xsvg-0.2.1.ebuild b/media-gfx/xsvg/xsvg-0.2.1.ebuild
new file mode 100644
index 000000000000..da41a89bb357
--- /dev/null
+++ b/media-gfx/xsvg/xsvg-0.2.1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit autotools eutils
+
+DESCRIPTION="a command line viewer for SVG files"
+HOMEPAGE="http://cairographics.org"
+SRC_URI="http://cairographics.org/snapshots/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ~sparc x86"
+IUSE=""
+
+RDEPEND="
+ x11-libs/cairo[X]
+ x11-libs/libsvg-cairo"
+DEPEND="${RDEPEND}
+ x11-libs/libXt
+ x11-libs/libXcursor"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-asneeded.patch
+ eautoreconf
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+ dodoc AUTHORS ChangeLog NEWS README
+}
diff --git a/media-gfx/xv/Manifest b/media-gfx/xv/Manifest
new file mode 100644
index 000000000000..84649ca9d613
--- /dev/null
+++ b/media-gfx/xv/Manifest
@@ -0,0 +1,3 @@
+DIST xv-3.10a-jumbo-patches-20070520.tar.gz 1363802 SHA256 221ec89fdf0772bd09c845cbb337aecf411a1aee215140b676717f49e9e65c80 SHA512 e2ac5a3b4d743bf142c162b00815dd9d8dcaf345d0649016b2c6441fe2329879471b19453808e677c1a0b8eeb3468295dba160b1f30eacb2a7a9d8524ce03e75 WHIRLPOOL d4466b7a7fb2405dc9696e6d547e09746c7137e615ec3675c4c534bcd014ec4305b46731ff1f764fcbb309d8da67bc5c753f1af3fad0582ebcbeb16ae5ec5b9f
+DIST xv-3.10a.png.bz2 3082 SHA256 244cd9da79e86e0c0bc00bfaad09a18e229795eb0146925328ad147ec7adcfe9
+DIST xv-3.10a.tar.gz 2259124 SHA256 03eb26b1e8f315c3093f4ae794862ba46637d16c055e8efbe5e3beb5d40fc451 SHA512 5b8c5890503e2796638921cabae8967e458c73e332acea8561b1025ed13c771bc44c0e309b4592852e33726eeaa9784f933d1312073b0ba2e0b8c0cedabcaa3f WHIRLPOOL 1fd41559d0a3c02ba3f4da3b88925c982ddea5a14d16792a458e144e19c8cd1aef1759f232cdc20827892568a4cdee99df19562bbcad45039ee7f3ace7c13767
diff --git a/media-gfx/xv/files/xv-3.10a-add-ldflags-20070520.patch b/media-gfx/xv/files/xv-3.10a-add-ldflags-20070520.patch
new file mode 100644
index 000000000000..da53ccb8bd6b
--- /dev/null
+++ b/media-gfx/xv/files/xv-3.10a-add-ldflags-20070520.patch
@@ -0,0 +1,27 @@
+--- xv-3.10a/Makefile.orig 2008-06-16 08:32:39.000000000 -0600
++++ xv-3.10a/Makefile 2008-06-16 08:49:19.000000000 -0600
+@@ -369,19 +369,19 @@
+
+ #xv: $(OBJS) $(JPEGLIB) $(TIFFLIB)
+ xv: $(OBJS)
+- $(CC) -o xv $(CFLAGS) $(OBJS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o xv $(OBJS) $(LIBS)
+
+ bggen: bggen.c
+- $(CC) $(CFLAGS) -o bggen bggen.c $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o bggen bggen.c $(LIBS)
+
+ vdcomp: vdcomp.c
+- $(CC) $(CFLAGS) -o vdcomp vdcomp.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o vdcomp vdcomp.c
+
+ xcmap: xcmap.c
+- $(CC) $(CFLAGS) -o xcmap xcmap.c $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o xcmap xcmap.c $(LIBS)
+
+ xvpictoppm: xvpictoppm.c
+- $(CC) $(CFLAGS) -o xvpictoppm xvpictoppm.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o xvpictoppm xvpictoppm.c
+
+
+
diff --git a/media-gfx/xv/files/xv-3.10a-disable-jp2k-20070520.patch b/media-gfx/xv/files/xv-3.10a-disable-jp2k-20070520.patch
new file mode 100644
index 000000000000..41d30235e5be
--- /dev/null
+++ b/media-gfx/xv/files/xv-3.10a-disable-jp2k-20070520.patch
@@ -0,0 +1,23 @@
+--- Makefile~ 2007-06-24 15:41:58 -0600
++++ Makefile 2007-06-24 15:42:43 -0600
+@@ -176,16 +176,16 @@
+ ### if, for whatever reason, you're unable to get the JasPer JPEG-2000 library
+ ### to compile on your machine, *COMMENT OUT* the following lines
+ ###
+-JP2K = -DDOJP2K
++#JP2K = -DDOJP2K
+ ###
+ #JP2KDIR = ../../jasper
+-JP2KDIR = /usr/local/lib
++#JP2KDIR = /usr/local/lib
+ ###
+ #JP2KINC = -I$(JP2KDIR)
+-JP2KINC = -I/usr/local/include
++#JP2KINC = -I/usr/local/include
+ ###
+ #JP2KLIB = -L$(JP2KDIR) -ljasper
+-JP2KLIB = $(JP2KDIR)/libjasper.a
++#JP2KLIB = $(JP2KDIR)/libjasper.a
+
+
+ ###
diff --git a/media-gfx/xv/files/xv-3.10a-fix-wait-20070520.patch b/media-gfx/xv/files/xv-3.10a-fix-wait-20070520.patch
new file mode 100644
index 000000000000..ec093ab309c9
--- /dev/null
+++ b/media-gfx/xv/files/xv-3.10a-fix-wait-20070520.patch
@@ -0,0 +1,40 @@
+diff -Nur xv-3.10a_old/xvevent.c xv-3.10a/xvevent.c
+--- xv-3.10a_old/xvevent.c 2008-05-06 12:44:41.000000000 -0600
++++ xv-3.10a/xvevent.c 2008-05-06 15:55:59.000000000 -0600
+@@ -82,7 +82,7 @@
+ int retval,done,waiting;
+ #ifdef USE_TICKS
+ clock_t waitsec_ticks=0L, orgtime_ticks=0L, curtime_ticks;
+- clock_t elapsed_ticks=0L, remaining_interval;
++ clock_t elapsed_ticks=0L, remaining_interval, clock_ticks_per_sec;
+ #else
+ time_t orgtime=0L, curtime;
+ #endif
+@@ -126,7 +126,8 @@
+ all pending events (ie, drawing the image the first time)
+ have been dealt with: START WAITING */
+ #ifdef USE_TICKS
+- waitsec_ticks = (clock_t)(waitsec * CLK_TCK);
++ clock_ticks_per_sec = sysconf(_SC_CLK_TCK);
++ waitsec_ticks = (clock_t)(waitsec * clock_ticks_per_sec);
+ orgtime_ticks = times(NULL); /* unclear if NULL valid, but OK on Linux */
+ #else
+ orgtime = time(NULL);
+@@ -168,11 +169,14 @@
+ } else
+ elapsed_ticks = curtime_ticks - orgtime_ticks;
+ remaining_interval = waitsec_ticks - elapsed_ticks;
+- if (remaining_interval >= (clock_t)(1 * CLK_TCK))
++ if (remaining_interval > clock_ticks_per_sec)
+ sleep(1);
+ else {
+- /* less than one second remaining: do delay in msec, then return */
+- Timer((remaining_interval * 1000L) / CLK_TCK); /* can't overflow */
++ if (remaining_interval > 0) {
++ /* less than one second remaining: do delay in msec, then return */
++ Timer((remaining_interval * 1000L) / clock_ticks_per_sec); /* can't overflow */
++ }
++
+ return waitloop? NEXTLOOP : NEXTQUIT;
+ }
+ #else
diff --git a/media-gfx/xv/files/xv-3.10a-libpng15.patch b/media-gfx/xv/files/xv-3.10a-libpng15.patch
new file mode 100644
index 000000000000..43c51766839c
--- /dev/null
+++ b/media-gfx/xv/files/xv-3.10a-libpng15.patch
@@ -0,0 +1,520 @@
+--- xvinfo.c
++++ xvinfo.c
+@@ -26,7 +26,7 @@
+ #define INFOHIGH 270
+
+ /* max length of an Info String */
+-#define ISTRLEN 80
++#define ISTRLEN 256
+
+ /* baseline of top line of text */
+ #define TOPBASE (36 + penn_height/2 + 4 + 8 + ASCENT)
+--- xvpng.c
++++ xvpng.c
+@@ -31,6 +31,7 @@
+
+ #ifdef HAVE_PNG
+
++#include "zlib.h"
+ #include "png.h"
+
+ /*** Stuff for PNG Dialog box ***/
+@@ -41,7 +42,9 @@
+ #define COMPRESSION 6 /* default zlib compression level, not max
+ (Z_BEST_COMPRESSION) */
+
+-#define HAVE_tRNS (info_ptr->valid & PNG_INFO_tRNS)
++/* old
++#define HAVE_tRNS (info_ptr->valid & PNG_INFO_tRNS) */
++#define HAVE_tRNS png_get_valid(png_ptr,info_ptr,PNG_INFO_tRNS)
+
+ #define DWIDE 86
+ #define DHIGH 104
+@@ -444,6 +447,10 @@
+ byte *p, *png_line;
+ char software[256];
+ char *savecmnt;
++ /* for storing values until all are accumulated, so that the image header can be set in full */
++ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type;
++ png_uint_32 _width,_height;
++ png_time _mod_time;
+
+ if ((png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL,
+ png_xv_error, png_xv_warning)) == NULL) {
+@@ -458,7 +465,7 @@
+ FatalError(software);
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return -1;
+ }
+@@ -489,8 +496,8 @@
+ png_set_filter(png_ptr, 0, filter);
+ }
+
+- info_ptr->width = w;
+- info_ptr->height = h;
++ _width = w;
++ _height = h;
+ if (w <= 0 || h <= 0) {
+ SetISTR(ISTR_WARNING, "%s: image dimensions out of range (%dx%d)",
+ fbasename, w, h);
+@@ -498,7 +505,7 @@
+ return -1;
+ }
+
+- info_ptr->interlace_type = interCB.val ? 1 : 0;
++ _interlace_type = interCB.val ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE;
+
+ linesize = 0; /* quiet a compiler warning */
+
+@@ -542,40 +549,44 @@
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return -1;
+ }
+- info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+- info_ptr->bit_depth = 8;
++ _color_type = PNG_COLOR_TYPE_RGB;
++ _bit_depth = 8;
+ } else /* ptype == PIC8 */ {
+ linesize = w;
+- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
++ _color_type = PNG_COLOR_TYPE_PALETTE;
+ if (numuniqcols <= 2)
+- info_ptr->bit_depth = 1;
++ _bit_depth = 1;
+ else
+ if (numuniqcols <= 4)
+- info_ptr->bit_depth = 2;
++ _bit_depth = 2;
+ else
+ if (numuniqcols <= 16)
+- info_ptr->bit_depth = 4;
++ _bit_depth = 4;
+ else
+- info_ptr->bit_depth = 8;
++ _bit_depth = 8;
+
+ for (i = 0; i < numuniqcols; i++) {
+ palette[i].red = r1[i];
+ palette[i].green = g1[i];
+ palette[i].blue = b1[i];
+ }
+- info_ptr->num_palette = numuniqcols;
+- info_ptr->palette = palette;
++/* cannot find a setter for this, unsure if it is necessary anymore...
+ info_ptr->valid |= PNG_INFO_PLTE;
++*/
++ /* set the header just in case it's needed */
++ png_set_IHDR(png_ptr,info_ptr,_width,_height,_bit_depth,_color_type,
++ _interlace_type,PNG_COMPRESSION_TYPE_DEFAULT,PNG_FILTER_TYPE_DEFAULT);
++ png_set_PLTE(png_ptr,info_ptr,palette,numuniqcols);
+ }
+ }
+
+ else if (colorType == F_GREYSCALE || colorType == F_BWDITHER) {
+- info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
++ _color_type = PNG_COLOR_TYPE_GRAY;
+ if (colorType == F_BWDITHER) {
+ /* shouldn't happen */
+ if (ptype == PIC24) FatalError("PIC24 and B/W Stipple in WritePNG()");
+
+- info_ptr->bit_depth = 1;
++ _bit_depth = 1;
+ if (MONO(r1[0], g1[0], b1[0]) > MONO(r1[1], g1[1], b1[1])) {
+ remap[0] = 1;
+ remap[1] = 0;
+@@ -595,7 +606,7 @@
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ return -1;
+ }
+- info_ptr->bit_depth = 8;
++ _bit_depth = 8;
+ }
+ else /* ptype == PIC8 */ {
+ int low_precision;
+@@ -617,7 +628,7 @@
+ for (; i < 256; i++)
+ remap[i]=0; /* shouldn't be necessary, but... */
+
+- info_ptr->bit_depth = 8;
++ _bit_depth = 8;
+
+ /* Note that this fails most of the time because of gamma */
+ /* (and that would be a bug: GRR FIXME) */
+@@ -636,7 +647,7 @@
+ for (i = 0; i < numuniqcols; i++) {
+ remap[i] &= 0xf;
+ }
+- info_ptr->bit_depth = 4;
++ _bit_depth = 4;
+
+ /* try to adjust to 2-bit precision grayscale */
+
+@@ -652,7 +663,7 @@
+ for (i = 0; i < numuniqcols; i++) {
+ remap[i] &= 3;
+ }
+- info_ptr->bit_depth = 2;
++ _bit_depth = 2;
+
+ /* try to adjust to 1-bit precision grayscale */
+
+@@ -668,7 +679,7 @@
+ for (i = 0; i < numuniqcols; i++) {
+ remap[i] &= 1;
+ }
+- info_ptr->bit_depth = 1;
++ _bit_depth = 1;
+ }
+ }
+ }
+@@ -677,6 +688,9 @@
+ else
+ png_error(png_ptr, "Unknown colorstyle in WritePNG");
+
++ png_set_IHDR(png_ptr,info_ptr,_width,_height,_bit_depth,_color_type,
++ _interlace_type,PNG_COMPRESSION_TYPE_DEFAULT,PNG_FILTER_TYPE_DEFAULT);
++
+ if ((text = (png_textp)malloc(sizeof(png_text)))) {
+ sprintf(software, "XV %s", REVDATE);
+
+@@ -685,20 +699,22 @@
+ text->text = software;
+ text->text_length = strlen(text->text);
+
+- info_ptr->max_text = 1;
+- info_ptr->num_text = 1;
+- info_ptr->text = text;
++/* max_text seems to be internal only now, do not set
++ info_ptr->max_text = 1; */
++ png_set_text(png_ptr,info_ptr,text,1);
+ }
+
+ Display_Gamma = gDial.val; /* Save the current gamma for loading */
+
+ // GRR FIXME: add .Xdefaults option to omit writing gamma (size, cumulative errors when editing)--alternatively, modify save box to include "omit" checkbox
+- info_ptr->gamma = 1.0/gDial.val;
+- info_ptr->valid |= PNG_INFO_gAMA;
++ png_set_gAMA(png_ptr,info_ptr,1.0/gDial.val);
++/* doesn't seem to be a way to set valid directly anymore, unnecessary maybe..
++ info_ptr->valid |= PNG_INFO_gAMA; */
+
++/* might need to be png_write_info_before_PLTE() ... */
+ png_write_info(png_ptr, info_ptr);
+
+- if (info_ptr->bit_depth < 8)
++ if (_bit_depth < 8)
+ png_set_packing(png_ptr);
+
+ pass=png_set_interlace_handling(png_ptr);
+@@ -711,13 +727,13 @@
+ int j;
+ p = pic;
+ for (j = 0; j < h; ++j) {
+- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY) {
++ if (_color_type == PNG_COLOR_TYPE_GRAY) {
+ int k;
+ for (k = 0; k < w; ++k)
+ png_line[k] = ptype==PIC24 ? MONO(p[k*3], p[k*3+1], p[k*3+2]) :
+ remap[pc2nc[p[k]]];
+ png_write_row(png_ptr, png_line);
+- } else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) {
++ } else if (_color_type == PNG_COLOR_TYPE_PALETTE) {
+ int k;
+ for (k = 0; k < w; ++k)
+ png_line[k] = pc2nc[p[k]];
+@@ -739,28 +755,31 @@
+ (savecmnt = (char *)malloc((strlen(picComments) + 1)*sizeof(char)))) {
+ png_textp tp;
+ char *comment, *key;
++ int nt;
++ int mt;
+
+ strcpy(savecmnt, picComments);
+ key = savecmnt;
++ png_get_text(png_ptr,info_ptr,&tp,&mt); /* to get 'max_text' */
+ tp = text;
+- info_ptr->num_text = 0;
++ nt = 0;
+
+ comment = strchr(key, ':');
+
+ do {
+ /* Allocate a larger structure for comments if necessary */
+- if (info_ptr->num_text >= info_ptr->max_text)
++ if (nt >= mt)
+ {
+ if ((tp =
+- realloc(text, (info_ptr->num_text + 2)*sizeof(png_text))) == NULL)
++ realloc(text, (nt + 2)*sizeof(png_text))) == NULL)
+ {
+ break;
+ }
+ else
+ {
+ text = tp;
+- tp = &text[info_ptr->num_text];
+- info_ptr->max_text += 2;
++ tp = &text[nt];
++ mt += 2;
+ }
+ }
+
+@@ -810,7 +829,7 @@
+ }
+
+ tp->compression = tp->text_length > 640 ? 0 : -1;
+- info_ptr->num_text++;
++ nt++;
+ tp++;
+ }
+ }
+@@ -834,27 +853,29 @@
+ tp->text = key;
+ tp->text_length = q - key;
+ tp->compression = tp->text_length > 750 ? 0 : -1;
+- info_ptr->num_text++;
++ nt++;
+ key = NULL;
+ }
+ } while (key && *key);
++ png_set_text(png_ptr,info_ptr,text,nt);
+ }
+ else {
+- info_ptr->num_text = 0;
++ png_set_text(png_ptr,info_ptr,text,0);
+ }
+ }
+- info_ptr->text = text;
+
+- png_convert_from_time_t(&(info_ptr->mod_time), time(NULL));
+- info_ptr->valid |= PNG_INFO_tIME;
++ png_convert_from_time_t(&_mod_time, time(NULL));
++ png_set_tIME(png_ptr,info_ptr,&_mod_time);
++/* dunno how to set validity
++ info_ptr->valid |= PNG_INFO_tIME; */
+
+ png_write_end(png_ptr, info_ptr);
+ fflush(fp); /* just in case we core-dump before finishing... */
+
+ if (text) {
+ free(text);
+- /* must do this or png_destroy_write_struct() 0.97+ will free text again: */
+- info_ptr->text = (png_textp)NULL;
++ /* must do this or png_destroy_write_struct() 0.97+ will free text again:
++ info_ptr->text = (png_textp)NULL; */
+ if (savecmnt)
+ {
+ free(savecmnt);
+@@ -886,6 +907,14 @@
+ int pass;
+ int gray_to_rgb;
+ size_t commentsize;
++ /* temp storage vars for libpng15 migration */
++ int _bit_depth,_color_type,_interlace_type,_compression_type,_filter_type,_num_text,_num_palette;
++ png_uint_32 _width,_height;
++ png_timep _mod_time;
++ double _gamma;
++ png_textp _text;
++ png_colorp _palette;
++ png_color_16p _background;
+
+ fbasename = BaseName(fname);
+
+@@ -921,7 +950,7 @@
+ FatalError("malloc failure in LoadPNG");
+ }
+
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ fclose(fp);
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ if (!read_anything) {
+@@ -945,8 +974,10 @@
+ #endif
+ png_read_info(png_ptr, info_ptr);
+
+- pinfo->w = pinfo->normw = info_ptr->width;
+- pinfo->h = pinfo->normh = info_ptr->height;
++ png_get_IHDR(png_ptr,info_ptr,&_width,&_height,&_bit_depth,&_color_type,&_interlace_type,NULL,NULL);
++
++ pinfo->w = pinfo->normw = _width;
++ pinfo->h = pinfo->normh = _height;
+ if (pinfo->w <= 0 || pinfo->h <= 0) {
+ SetISTR(ISTR_WARNING, "%s: image dimensions out of range (%dx%d)",
+ fbasename, pinfo->w, pinfo->h);
+@@ -957,9 +988,9 @@
+ pinfo->frmType = F_PNG;
+
+ sprintf(pinfo->fullInfo, "PNG, %d bit ",
+- info_ptr->bit_depth * info_ptr->channels);
++ _bit_depth * png_get_channels(png_ptr,info_ptr));
+
+- switch(info_ptr->color_type) {
++ switch(_color_type) {
+ case PNG_COLOR_TYPE_PALETTE:
+ strcat(pinfo->fullInfo, "palette color");
+ break;
+@@ -983,15 +1014,17 @@
+
+ sprintf(pinfo->fullInfo + strlen(pinfo->fullInfo),
+ ", %sinterlaced. (%d bytes)",
+- info_ptr->interlace_type ? "" : "non-", filesize);
++ _interlace_type ? "" : "non-", filesize);
+
+- sprintf(pinfo->shrtInfo, "%lux%lu PNG", info_ptr->width, info_ptr->height);
++ sprintf(pinfo->shrtInfo, "%lux%lu PNG", _width, _height);
+
+- if (info_ptr->bit_depth < 8)
++ if (_bit_depth < 8)
+ png_set_packing(png_ptr);
+
+- if (info_ptr->valid & PNG_INFO_gAMA)
+- png_set_gamma(png_ptr, Display_Gamma, info_ptr->gamma);
++ if (png_get_valid(png_ptr,info_ptr,PNG_INFO_gAMA)) {
++ png_get_gAMA(png_ptr,info_ptr,&_gamma);
++ png_set_gamma(png_ptr, Display_Gamma, _gamma);
++ }
+ /*
+ *else
+ * png_set_gamma(png_ptr, Display_Gamma, 0.45);
+@@ -1000,7 +1033,7 @@
+ gray_to_rgb = 0; /* quiet a compiler warning */
+
+ if (have_imagebg) {
+- if (info_ptr->bit_depth == 16) {
++ if (_bit_depth == 16) {
+ my_background.red = imagebgR;
+ my_background.green = imagebgG;
+ my_background.blue = imagebgB;
+@@ -1013,8 +1046,8 @@
+ }
+ png_set_background(png_ptr, &my_background, PNG_BACKGROUND_GAMMA_SCREEN,
+ 0, Display_Gamma);
+- if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA ||
+- (info_ptr->color_type == PNG_COLOR_TYPE_GRAY && HAVE_tRNS)) &&
++ if ((_color_type == PNG_COLOR_TYPE_GRAY_ALPHA ||
++ (_color_type == PNG_COLOR_TYPE_GRAY && HAVE_tRNS)) &&
+ (imagebgR != imagebgG || imagebgR != imagebgB)) /* i.e., colored bg */
+ {
+ png_set_gray_to_rgb(png_ptr);
+@@ -1022,8 +1055,9 @@
+ gray_to_rgb = 1;
+ }
+ } else {
+- if (info_ptr->valid & PNG_INFO_bKGD) {
+- png_set_background(png_ptr, &info_ptr->background,
++ if (png_get_valid(png_ptr,info_ptr,PNG_INFO_bKGD)) {
++ png_get_bKGD(png_ptr,info_ptr,&_background);
++ png_set_background(png_ptr, _background,
+ PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
+ } else {
+ my_background.red = my_background.green = my_background.blue =
+@@ -1033,13 +1067,13 @@
+ }
+ }
+
+- if (info_ptr->bit_depth == 16)
++ if (_bit_depth == 16)
+ png_set_strip_16(png_ptr);
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
+- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
++ if (_color_type == PNG_COLOR_TYPE_GRAY ||
++ _color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ {
+- if (info_ptr->bit_depth == 1)
++ if (_bit_depth == 1)
+ pinfo->colType = F_BWDITHER;
+ else
+ pinfo->colType = F_GREYSCALE;
+@@ -1049,9 +1083,11 @@
+ pass=png_set_interlace_handling(png_ptr);
+
+ png_read_update_info(png_ptr, info_ptr);
++ /* get HIDR again just in case the info_ptr changed */
++ png_get_IHDR(png_ptr,info_ptr,&_width,&_height,&_bit_depth,&_color_type,&_interlace_type,NULL,NULL);
+
+- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB ||
+- info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA || gray_to_rgb)
++ if (_color_type == PNG_COLOR_TYPE_RGB ||
++ _color_type == PNG_COLOR_TYPE_RGB_ALPHA || gray_to_rgb)
+ {
+ linesize = 3 * pinfo->w;
+ if (linesize/3 < pinfo->w) { /* know pinfo->w > 0 (see above) */
+@@ -1065,16 +1101,17 @@
+ } else {
+ linesize = pinfo->w;
+ pinfo->type = PIC8;
+- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY ||
+- info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
++ if (_color_type == PNG_COLOR_TYPE_GRAY ||
++ _color_type == PNG_COLOR_TYPE_GRAY_ALPHA) {
+ for (i = 0; i < 256; i++)
+ pinfo->r[i] = pinfo->g[i] = pinfo->b[i] = i;
+ } else {
+ pinfo->colType = F_FULLCOLOR;
+- for (i = 0; i < info_ptr->num_palette; i++) {
+- pinfo->r[i] = info_ptr->palette[i].red;
+- pinfo->g[i] = info_ptr->palette[i].green;
+- pinfo->b[i] = info_ptr->palette[i].blue;
++ png_get_PLTE(png_ptr,info_ptr,&_palette,&_num_palette);
++ for (i = 0; i < _num_palette; i++) {
++ pinfo->r[i] = _palette[i].red;
++ pinfo->g[i] = _palette[i].green;
++ pinfo->b[i] = _palette[i].blue;
+ }
+ }
+ }
+@@ -1092,7 +1129,7 @@
+ png_error(png_ptr, "can't allocate space for PNG image");
+ }
+
+- png_start_read_image(png_ptr);
++ /*png_start_read_image(png_ptr); -- causes a warning and seems to be unnecessary */
+
+ for (i = 0; i < pass; i++) {
+ byte *p = pinfo->pic;
+@@ -1106,22 +1143,23 @@
+
+ png_read_end(png_ptr, info_ptr);
+
+- if (info_ptr->num_text > 0) {
++ png_get_text(png_ptr,info_ptr,&_text,&_num_text);
++ if (_num_text > 0) {
+ commentsize = 1;
+
+- for (i = 0; i < info_ptr->num_text; i++)
+- commentsize += strlen(info_ptr->text[i].key) + 1 +
+- info_ptr->text[i].text_length + 2;
++ for (i = 0; i < _num_text; i++)
++ commentsize += strlen(_text[i].key) + 1 +
++ _text[i].text_length + 2;
+
+ if ((pinfo->comment = malloc(commentsize)) == NULL) {
+ png_warning(png_ptr,"can't allocate comment string");
+ }
+ else {
+ pinfo->comment[0] = '\0';
+- for (i = 0; i < info_ptr->num_text; i++) {
+- strcat(pinfo->comment, info_ptr->text[i].key);
++ for (i = 0; i < _num_text; i++) {
++ strcat(pinfo->comment, _text[i].key);
+ strcat(pinfo->comment, "::");
+- strcat(pinfo->comment, info_ptr->text[i].text);
++ strcat(pinfo->comment, _text[i].text);
+ strcat(pinfo->comment, "\n");
+ }
+ }
+@@ -1143,7 +1181,7 @@
+ {
+ SetISTR(ISTR_WARNING,"%s: libpng error: %s", fbasename, message);
+
+- longjmp(png_ptr->jmpbuf, 1);
++ longjmp(png_jmpbuf(png_ptr), 1);
+ }
+
+
diff --git a/media-gfx/xv/files/xv-3.10a-osx-bsd-20070520.patch b/media-gfx/xv/files/xv-3.10a-osx-bsd-20070520.patch
new file mode 100644
index 000000000000..59a768ebceb1
--- /dev/null
+++ b/media-gfx/xv/files/xv-3.10a-osx-bsd-20070520.patch
@@ -0,0 +1,38 @@
+--- xv.h~ 2007-06-24 14:30:42 -0600
++++ xv.h 2007-06-24 14:42:04 -0600
+@@ -158,7 +158,7 @@
+
+ #ifndef VMS
+ # include <errno.h>
+-# ifndef __NetBSD__
++# if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__APPLE__)
+ # if !(defined __GLIBC__ && __GLIBC__ >= 2)
+ extern int errno; /* SHOULD be in errno.h, but often isn't */
+ extern char *sys_errlist[]; /* this too... */
+@@ -171,7 +171,7 @@
+ #ifdef VMS
+ # define ERRSTR(x) strerror(x, vaxc$errno)
+ #else
+-# if defined(__BEOS__) || defined(__linux__) /* or all modern/glibc systems? */
++# if defined(__BEOS__) || defined(__linux__) || defined(__APPLE__) /* or all modern/glibc systems? */
+ # define ERRSTR(x) strerror(x)
+ # else
+ # define ERRSTR(x) sys_errlist[x]
+@@ -206,6 +206,8 @@
+ #ifdef NEED_MALLOC_H
+ # if defined(hp300) || defined(hp800) || defined(NeXT)
+ # include <sys/malloc.h> /* it's in "sys" on HPs and NeXT */
++# elif defined(__APPLE__)
++# include <malloc/malloc.h>
+ # else
+ # include <malloc.h>
+ # endif
+@@ -369,7 +371,7 @@
+ * them later. */
+ #ifndef VMS /* VMS hates multi-line definitions */
+ # if defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__) || \
+- defined(__bsdi__)
++ defined(__FreeBSD__) || defined(__bsdi__) || defined(__APPLE__)
+ # ifndef USE_MKSTEMP
+ # define USE_MKSTEMP /* use 'mkstemp()' instead of 'mktemp()' */
+ # endif /* >> SECURITY ISSUE << */
diff --git a/media-gfx/xv/files/xv-3.10a-vdcomp-osx-20070520.patch b/media-gfx/xv/files/xv-3.10a-vdcomp-osx-20070520.patch
new file mode 100644
index 000000000000..06e9f8a8d978
--- /dev/null
+++ b/media-gfx/xv/files/xv-3.10a-vdcomp-osx-20070520.patch
@@ -0,0 +1,11 @@
+--- vdcomp.c~ 2007-06-24 14:30:42 -0600
++++ vdcomp.c 2007-06-24 14:48:12 -0600
+@@ -123,6 +123,8 @@
+
+ # if defined(hp300) || defined(hp800) || defined(NeXT)
+ # include <sys/malloc.h> /* it's in "sys" on HPs and NeXT */
++# elif defined(__APPLE__)
++# include <malloc/malloc.h>
+ # else
+ # include <malloc.h> /* FIXME: should explicitly list systems that NEED this, not everyone that doesn't */
+ # endif
diff --git a/media-gfx/xv/metadata.xml b/media-gfx/xv/metadata.xml
new file mode 100644
index 000000000000..ca01873cfa0f
--- /dev/null
+++ b/media-gfx/xv/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">png-mng</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/xv/xv-3.10a-r16.ebuild b/media-gfx/xv/xv-3.10a-r16.ebuild
new file mode 100644
index 000000000000..c81c7f02048a
--- /dev/null
+++ b/media-gfx/xv/xv-3.10a-r16.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils flag-o-matic
+
+JUMBOV=20070520
+DESCRIPTION="An interactive image manipulation program that supports a wide variety of image formats"
+HOMEPAGE="http://www.trilon.com/xv/index.html http://www.sonic.net/~roelofs/greg_xv.html"
+SRC_URI="mirror://sourceforge/png-mng/${P}-jumbo-patches-${JUMBOV}.tar.gz
+ ftp://ftp.cis.upenn.edu/pub/xv/${P}.tar.gz
+ mirror://gentoo/${P}.png.bz2"
+
+LICENSE="xv"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="jpeg tiff png"
+
+DEPEND="x11-libs/libXt
+ jpeg? ( virtual/jpeg )
+ tiff? ( media-libs/tiff:0 )
+ png? ( >=media-libs/libpng-1.2:0 sys-libs/zlib )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Apply the jumbo patch
+ epatch "${WORKDIR}"/${P}-jumbo-fix-enh-patch-${JUMBOV}.txt
+
+ # OSX and BSD xv.h define patches
+ epatch "${FILESDIR}"/${P}-osx-bsd-${JUMBOV}.patch
+
+ # OSX malloc patch
+ epatch "${FILESDIR}"/${P}-vdcomp-osx-${JUMBOV}.patch
+
+ # Disable JP2K (i.e. use system JPEG libs)
+ epatch "${FILESDIR}"/${P}-disable-jp2k-${JUMBOV}.patch
+
+ # Fix -wait option (do not rely on obsolete CLK_TCK)
+ epatch "${FILESDIR}"/${P}-fix-wait-${JUMBOV}.patch
+
+ # Use LDFLAGS on link lines
+ epatch "${FILESDIR}"/${P}-add-ldflags-${JUMBOV}.patch
+
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+
+ # Link with various image libraries depending on use flags
+ IMAGE_LIBS=""
+ use jpeg && IMAGE_LIBS="${IMAGE_LIBS} -ljpeg"
+ use png && IMAGE_LIBS="${IMAGE_LIBS} -lz -lpng"
+ use tiff && IMAGE_LIBS="${IMAGE_LIBS} -ltiff"
+
+ sed -i \
+ -e 's/\(^JPEG.*\)/#\1/g' \
+ -e 's/\(^PNG.*\)/#\1/g' \
+ -e 's/\(^TIFF.*\)/#\1/g' \
+ -e "s/\(^LIBS = .*\)/\1${IMAGE_LIBS}/g" Makefile
+
+ # /usr/bin/gzip => /bin/gzip
+ sed -i -e 's#/usr\(/bin/gzip\)#'"${EPREFIX}"'\1#g' config.h
+
+ # Fix installation of ps docs
+ sed -i -e 's#$(DESTDIR)$(LIBDIR)#$(LIBDIR)#g' Makefile
+}
+
+src_compile() {
+ append-flags -DUSE_GETCWD -DLINUX -DUSLEEP
+ use jpeg && append-flags -DDOJPEG
+ use png && append-flags -DDOPNG
+ use tiff && append-flags -DDOTIFF -DUSE_TILED_TIFF_BOTLEFT_FIX
+
+ emake \
+ CC="$(tc-getCC)" CCOPTS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
+ PREFIX="${EPREFIX}"/usr \
+ DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
+ LIBDIR="${T}"
+}
+
+src_install() {
+ dodir /usr/bin
+ dodir /usr/share/man/man1
+
+ emake \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}"/usr \
+ DOCDIR="${EPREFIX}/usr/share/doc/${PF}" \
+ LIBDIR="${T}" install
+
+ dodoc CHANGELOG BUGS IDEAS
+ newicon "${WORKDIR}"/${P}.png ${PN}.png
+ make_desktop_entry xv "" "" "Graphics;Viewer"
+}
diff --git a/media-gfx/xzgv/Manifest b/media-gfx/xzgv/Manifest
new file mode 100644
index 000000000000..337776b38af9
--- /dev/null
+++ b/media-gfx/xzgv/Manifest
@@ -0,0 +1 @@
+DIST xzgv-0.9.1.tar.gz 163419 SHA256 f0b25ecb138d3f53ddc436679f9f7da03b48b503aaad6f271944ff6db91804e6 SHA512 e57d0eb3f34bc63cb9f2d033856eefdeb6363ce55589b8bc52a8c253e211a4e36d3c0691b4559581d4052810fde445c6ec1832b964c40c5365c3869ce72f7361 WHIRLPOOL 19d0cb71cb4313ee5d3e90c5ce4377a5e6a4b7471c30eb511926e06a6fe8410594ce3587bc499204000095731ff2d5aaa7295f91d9123e77a0beb5a02a0c34e4
diff --git a/media-gfx/xzgv/files/xzgv-0.9-asneeded-and-cflags.patch b/media-gfx/xzgv/files/xzgv-0.9-asneeded-and-cflags.patch
new file mode 100644
index 000000000000..8b3c671dbf8a
--- /dev/null
+++ b/media-gfx/xzgv/files/xzgv-0.9-asneeded-and-cflags.patch
@@ -0,0 +1,35 @@
+http://bugs.gentoo.org/500692
+
+--- config.mk
++++ config.mk
+@@ -7,7 +7,7 @@
+ # This is likely to be what you'll want for most systems:
+ #
+ CC=gcc
+-CFLAGS=-O2 -Wall
++CFLAGS+=-Wall
+
+ # Set the awk interpreter to use for a script used while compiling.
+ # (This should be a `new' awk, such as gawk or mawk.)
+--- src/Makefile
++++ src/Makefile
+@@ -9,8 +9,8 @@
+ # This gets definitions for CC, CFLAGS, BINDIR etc.
+ include ../config.mk
+
+-CFLAGS+=`pkg-config --cflags gtk+-2.0` `pkg-config --cflags gdk-pixbuf-2.0`
+-LDFLAGS+=`pkg-config --libs gtk+-2.0` `pkg-config --libs gdk-pixbuf-2.0`
++CFLAGS+=`pkg-config --cflags gtk+-2.0` `pkg-config --cflags gdk-pixbuf-2.0` `pkg-config --cflags x11`
++LIBS=`pkg-config --libs gtk+-2.0` `pkg-config --libs gdk-pixbuf-2.0` `pkg-config --libs x11` -lm
+
+ all: xzgv
+
+@@ -23,7 +23,7 @@
+ backend.o
+
+ xzgv: $(OBJS)
+- $(CC) $(LDFLAGS) -o xzgv $(OBJS)
++ $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o xzgv
+
+ installdirs:
+ /bin/sh ../mkinstalldirs $(BINDIR)
diff --git a/media-gfx/xzgv/metadata.xml b/media-gfx/xzgv/metadata.xml
new file mode 100644
index 000000000000..d78b1f849f9b
--- /dev/null
+++ b/media-gfx/xzgv/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>graphics</herd>
+ <upstream>
+ <remote-id type="sourceforge">xzgv</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/xzgv/xzgv-0.9.1.ebuild b/media-gfx/xzgv/xzgv-0.9.1.ebuild
new file mode 100644
index 000000000000..bd30b006cad1
--- /dev/null
+++ b/media-gfx/xzgv/xzgv-0.9.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Fast and simple GTK+ image viewer"
+HOMEPAGE="http://sourceforge.net/projects/xzgv"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc64 x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+ sys-apps/texinfo
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P/.1}-asneeded-and-cflags.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+ emake -C doc CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake PREFIX="${D}/usr" install
+ dodoc AUTHORS NEWS README TODO
+}
diff --git a/media-gfx/yafaray/Manifest b/media-gfx/yafaray/Manifest
new file mode 100644
index 000000000000..663742b976f0
--- /dev/null
+++ b/media-gfx/yafaray/Manifest
@@ -0,0 +1,2 @@
+DIST YafaRay-blender.0.1.1.zip 37965 SHA256 68041b4c13793c0ef3491dc5ccb3e39ae3f845b9c6f9edadddd3cd71a83abdad
+DIST YafaRay.0.1.1.zip 542063 SHA256 9588f1ee85fae286fcfc0bd6d05fb2c60bfadea0c6f4254fb6dac00a36f7f3a1
diff --git a/media-gfx/yafaray/metadata.xml b/media-gfx/yafaray/metadata.xml
new file mode 100644
index 000000000000..3ec6e16295f6
--- /dev/null
+++ b/media-gfx/yafaray/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+<longdescription lang="en">
+YafaRay is a raytracing open source render engine. Raytracing is a rendering technique for generating realistic images by tracing the path of light through a 3D scene.
+An render engine consists of a "faceless" computer program that interacts with a host 3D application to provide very specific raytracing capabilties "on demand". Blender 3D is the host application of YafaRay.
+</longdescription>
+<use>
+ <flag name="blender">install <pkg>media-gfx/blender</pkg> scripts</flag>
+</use>
+</pkgmetadata>
+
diff --git a/media-gfx/yafaray/yafaray-0.1.1.ebuild b/media-gfx/yafaray/yafaray-0.1.1.ebuild
new file mode 100644
index 000000000000..40f9829feb6c
--- /dev/null
+++ b/media-gfx/yafaray/yafaray-0.1.1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+MY_PN="YafaRay"
+
+inherit multilib
+
+DESCRIPTION="YafaRay is a raytracing open source render engine"
+HOMEPAGE="http://www.yafaray.org/"
+SRC_URI="http://static.yafaray.org/sources/${MY_PN}.${PV}.zip
+ blender? (
+ http://static.yafaray.org/sources/${MY_PN}-blender.${PV}.zip
+ )"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+blender debug qt4"
+
+RDEPEND="
+ dev-libs/libxml2
+ media-libs/freetype
+ media-libs/libpng
+ media-libs/openexr
+ sys-libs/zlib
+ virtual/jpeg
+ blender? ( >=media-gfx/blender-2.49 )
+ qt4? ( dev-qt/qtcore:4
+ dev-qt/qtgui:4 )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-lang/swig
+ >=dev-util/scons-1.0"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ sed -i \
+ -e 's:-Wall::g' \
+ -e 's:-O3 -ffast-math::g' \
+ "${S}"/config/linux2-config.py || die "sed failed"
+ sed -i \
+ -e "s:env.subst('\$YF_PLUGINPATH'):\"/usr/$(get_libdir)/yafaray\":"\
+ "${S}"/tools/writeconfig.py || die "sed failed"
+ # add correct paths for qt-libs
+ echo 'gui_env.Append(CPPPATH = ["/usr/include/qt4"])' >> "${S}"/src/gui/SConscript
+ echo "gui_env.Append(LIBPATH = [\"/usr/$(get_libdir)/qt4\"])" >> "${S}"/src/gui/SConscript
+}
+
+user_config() {
+ echo $@ >> "${S}"/user-config.py
+}
+
+src_configure() {
+ user_config "CCFLAGS=\"${CXXFLAGS}\""
+ user_config "PREFIX=\"${D}/usr\""
+ user_config "BASE_LPATH=\"/usr/$(get_libdir)/\""
+ user_config "YF_LIBOUT=\"\${PREFIX}/$(get_libdir)/\""
+ user_config "YF_PLUGINPATH=\"\${PREFIX}/$(get_libdir)/yafaray/\""
+ if use qt4; then
+ user_config "WITH_YF_QT='true'"
+ user_config "YF_QTDIR='/usr'"
+ fi
+ use debug && user_config "YF_DEBUG='true'"
+}
+
+src_compile() {
+ scons ${MAKEOPTS} || die "scons failed"
+ scons swig || die "scons swig failed"
+}
+
+src_install() {
+ scons install || die "scons install failed"
+ scons swig_install || die "scons swig_install failed"
+
+ if use blender; then
+ cd ../yafaray-blender
+ insinto /usr/share/blender/scripts
+ doins yafaray_ui.py
+ insinto /usr/share/yafaray/blender
+ doins yaf_*.py
+ fi
+}
diff --git a/media-gfx/zbar/Manifest b/media-gfx/zbar/Manifest
new file mode 100644
index 000000000000..5bf4a190846d
--- /dev/null
+++ b/media-gfx/zbar/Manifest
@@ -0,0 +1,2 @@
+DIST zbar-0.10.tar.bz2 592602 SHA256 234efb39dbbe5cef4189cc76f37afbe3cfcfb45ae52493bfe8e191318bdbadc6 SHA512 76cb8a469e3ac9ea7932a95c500cf933501249cdb8dce4df558bf5681bd44c62111327b494e6e887079a5fd30b32154887dcc12962e6d27b1453f55457483db4 WHIRLPOOL b4d8f6b2f6deb52fc7a60721888c3bbec2f4a94d5e29488167908e8a448ca698d64db7f78fb22408d4e3360eda44fd82195a0d762b71d203ca87d549461cde7f
+DIST zbar-0.10_p20121015.zip 991578 SHA256 1e2ba2a6f27bcc93b74e57ff46cc69c0f5c8d22ae277aa3d6c9da6892b892abe SHA512 7bb74ea5b096093b283c44787547ad0b886281628d012aa7b03ddb477732feb1e12d4d5a661191d34b53b7b272a237f67840e219b0ac5e2803da478a1ddba7a1 WHIRLPOOL be6307740b7e15c344c05c60a842d2ad01c6954ada71677cb8dbcbd0720a35f7f86d673a0f92a98d5968dc8394e9917c2a80880cb17a8d54bdc16827aa5d1eeb
diff --git a/media-gfx/zbar/files/zbar-0.10-errors.patch b/media-gfx/zbar/files/zbar-0.10-errors.patch
new file mode 100644
index 000000000000..63328ce664bb
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.10-errors.patch
@@ -0,0 +1,10 @@
+--- zbar-0.10/include/zbar/Exception.h
++++ zbar-0.10/include/zbar/Exception.h
+@@ -32,6 +32,7 @@
+
+ #include <exception>
+ #include <new>
++#include <cstddef>
+
+ namespace zbar {
+
diff --git a/media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch b/media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch
new file mode 100644
index 000000000000..b25827a0b998
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.10-no-v4l1-check.patch
@@ -0,0 +1,74 @@
+--- zbar-0.10/configure.ac
++++ zbar-0.10/configure.ac
+@@ -147,19 +147,13 @@
+ with_video="no"
+ AS_IF([test "x$enable_video" != "xno"],
+ [AS_IF([test "x$win32" = "xno"],
+- [AC_CHECK_HEADERS([linux/videodev.h], [with_video="v4l1"],
+- [AC_MSG_FAILURE([test for video support failed!
+-rebuild your kernel to include video4linux support or
+-configure --disable-video to skip building video support.])])
+- AC_CHECK_HEADERS([linux/videodev2.h], [with_video="v4l2"],
++ [AC_CHECK_HEADERS([linux/videodev2.h], [with_video="v4l2"],
+ [AC_MSG_WARN([v4l2 API not detected, upgrade your kernel!])])],
+ [AC_CHECK_HEADERS([vfw.h], [with_video="vfw"],
+ [AC_MSG_FAILURE([test for VfW video support failed!
+ configure --disable-video to skip building vidoe support.])])])
+ ])
+ AM_CONDITIONAL([HAVE_VIDEO], [test "x$enable_video" != "xno"])
+-AM_CONDITIONAL([HAVE_V4L1],
+- [test "x$with_video" = "xv4l1" || test "x$with_video" = "xv4l2"])
+ AM_CONDITIONAL([HAVE_V4L2], [test "x$with_video" = "xv4l2"])
+
+ dnl X
+--- zbar-0.10/zbar/Makefile.am.inc
++++ zbar-0.10/zbar/Makefile.am.inc
+@@ -53,12 +53,9 @@
+ zbar_libzbar_la_SOURCES += zbar/processor/posix.h zbar/processor/posix.c
+ endif
+
+-if HAVE_V4L1
+-zbar_libzbar_la_SOURCES += zbar/video/v4l1.c
+ if HAVE_V4L2
+ zbar_libzbar_la_SOURCES += zbar/video/v4l2.c
+ endif
+-endif
+ if WIN32
+ if HAVE_VIDEO
+ zbar_libzbar_la_SOURCES += zbar/video/vfw.c
+--- zbar-0.10/zbar/video/v4l2.c
++++ zbar-0.10/zbar/video/v4l2.c
+@@ -39,6 +39,9 @@
+ # include <sys/mman.h>
+ #endif
+ #include <linux/videodev2.h>
++#include <sys/stat.h>
++#include <unistd.h>
++#include <fcntl.h>
+
+ #include "video.h"
+ #include "image.h"
+@@ -507,3 +507,23 @@
+ vdo->dq = v4l2_dq;
+ return(0);
+ }
++
++int _zbar_video_open (zbar_video_t *vdo,
++ const char *dev)
++{
++ vdo->fd = open(dev, O_RDWR);
++ if(vdo->fd < 0)
++ return(err_capture_str(vdo, SEV_ERROR, ZBAR_ERR_SYSTEM, __func__,
++ "opening video device '%s'", dev));
++ zprintf(1, "opened camera device %s (fd=%d)\n", dev, vdo->fd);
++
++ int rc = -1;
++ if(vdo->intf != VIDEO_V4L1)
++ rc = _zbar_v4l2_probe(vdo);
++
++ if(rc && vdo->fd >= 0) {
++ close(vdo->fd);
++ vdo->fd = -1;
++ }
++ return(rc);
++}
diff --git a/media-gfx/zbar/files/zbar-0.10-python-crash.patch b/media-gfx/zbar/files/zbar-0.10-python-crash.patch
new file mode 100644
index 000000000000..a6f7a96e34db
--- /dev/null
+++ b/media-gfx/zbar/files/zbar-0.10-python-crash.patch
@@ -0,0 +1,19 @@
+https://sourceforge.net/p/zbar/patches/37/
+
+fix from Debian for crashes when importing the python module.
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702499
+
+this doesn't happen on some arches as the data naturally ends up with zero
+data after the structure, but on some (like arm), it isn't so we crash when
+python walks the list.
+
+--- a/python/imagescanner.c
++++ b/python/imagescanner.c
+@@ -68,6 +68,7 @@ imagescanner_get_results (zbarImageScanner *self,
+
+ static PyGetSetDef imagescanner_getset[] = {
+ { "results", (getter)imagescanner_get_results, },
++ { NULL },
+ };
+
+ static PyObject*
diff --git a/media-gfx/zbar/metadata.xml b/media-gfx/zbar/metadata.xml
new file mode 100644
index 000000000000..dd85699ec75d
--- /dev/null
+++ b/media-gfx/zbar/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">zbar</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-gfx/zbar/zbar-0.10-r5.ebuild b/media-gfx/zbar/zbar-0.10-r5.ebuild
new file mode 100644
index 000000000000..96d5787182e2
--- /dev/null
+++ b/media-gfx/zbar/zbar-0.10-r5.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils flag-o-matic python-single-r1
+
+DESCRIPTION="Library and tools for reading barcodes from images or video"
+HOMEPAGE="http://zbar.sourceforge.net/"
+SRC_URI="mirror://sourceforge/zbar/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="gtk imagemagick jpeg python qt4 static-libs +threads v4l X xv"
+
+RDEPEND="sys-devel/gettext
+ gtk? ( dev-libs/glib:2 x11-libs/gtk+:2 )
+ imagemagick? (
+ || ( media-gfx/imagemagick
+ media-gfx/graphicsmagick[imagemagick] ) )
+ jpeg? ( virtual/jpeg:0 )
+ python? ( ${PYTHON_DEPS}
+ gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}] ) )
+ qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 )
+ X? ( x11-libs/libXext
+ xv? ( x11-libs/libXv ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-no-v4l1-check.patch
+ epatch "${FILESDIR}"/${P}-errors.patch
+ epatch "${FILESDIR}"/${P}-python-crash.patch
+
+ use python && python_fix_shebang examples/upcrpc.py test/*.py
+
+ sed -i -e '/AM_INIT_AUTOMAKE/s:-Werror ::' configure.ac || die #423581
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -DNDEBUG
+ econf \
+ $(use_with jpeg) \
+ $(use_with gtk) \
+ $(use_with imagemagick) \
+ $(use_with python) \
+ $(use_with qt4 qt) \
+ $(use_enable static-libs static) \
+ $(use_enable threads pthread) \
+ $(use_with X x) \
+ $(use_with xv xv) \
+ $(use_enable v4l video)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc HACKING NEWS README TODO
+ rm -r "${ED}"/usr/share/doc/${PN}
+ prune_libtool_files --all
+}
diff --git a/media-gfx/zbar/zbar-0.10_p20121015.ebuild b/media-gfx/zbar/zbar-0.10_p20121015.ebuild
new file mode 100644
index 000000000000..7beedc913b7a
--- /dev/null
+++ b/media-gfx/zbar/zbar-0.10_p20121015.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils flag-o-matic python-single-r1
+
+DESCRIPTION="Library and tools for reading barcodes from images or video"
+HOMEPAGE="http://zbar.sourceforge.net/"
+SRC_URI="http://dev.gentoo.org/~xmw/zbar-0.10_p20121015.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="gtk imagemagick jpeg python qt4 static-libs +threads v4l X xv"
+
+RDEPEND="sys-devel/gettext
+ gtk? ( dev-libs/glib:2 x11-libs/gtk+:2 )
+ imagemagick? (
+ || ( media-gfx/imagemagick
+ media-gfx/graphicsmagick[imagemagick] ) )
+ jpeg? ( virtual/jpeg:0 )
+ python? ( ${PYTHON_DEPS}
+ gtk? ( >=dev-python/pygtk-2[${PYTHON_USEDEP}] ) )
+ qt4? ( dev-qt/qtcore:4 dev-qt/qtgui:4 )
+ X? ( x11-libs/libXext
+ xv? ( x11-libs/libXv ) )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_unpack() {
+ #vcs-snapshot doesn't work on .zip
+ default
+ mv * ${P} || die
+}
+
+src_prepare() {
+ #epatch "${FILESDIR}"/${P}-no-v4l1-check.patch
+ epatch "${FILESDIR}"/${PN}-0.10-errors.patch
+ epatch "${FILESDIR}"/${PN}-0.10-python-crash.patch
+
+ use python && python_fix_shebang examples/upcrpc.py test/*.py
+
+ sed -e '/AM_INIT_AUTOMAKE/s: -Werror : :' \
+ -e '/^AM_CFLAGS=/s: -Werror::' \
+ -i configure.ac || die
+ eautoreconf
+}
+
+src_configure() {
+ append-cppflags -DNDEBUG
+ econf \
+ $(use_with jpeg) \
+ $(use_with gtk) \
+ $(use_with imagemagick) \
+ $(use_with python) \
+ $(use_with qt4 qt) \
+ $(use_enable static-libs static) \
+ $(use_enable threads pthread) \
+ $(use_with X x) \
+ $(use_with xv xv) \
+ $(use_enable v4l video)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc HACKING NEWS README TODO
+ rm -r "${ED}"/usr/share/doc/${PN}
+ prune_libtool_files --all
+}
diff --git a/media-gfx/zgv/Manifest b/media-gfx/zgv/Manifest
new file mode 100644
index 000000000000..74aeab0c5c94
--- /dev/null
+++ b/media-gfx/zgv/Manifest
@@ -0,0 +1 @@
+DIST zgv-5.9.tar.gz 395525 RMD160 1d1c47c77adc732c581d9db1189243a94c510586 SHA1 e29b81bb51401376b43397de3857e8ed846a7cad SHA256 92e5d848fb51a77dc0ebb0ab383c1499c23aaff01f5445e9b0d75e067a8a64ba
diff --git a/media-gfx/zgv/files/zgv-5.9-Makefile-QA.patch b/media-gfx/zgv/files/zgv-5.9-Makefile-QA.patch
new file mode 100644
index 000000000000..e4569547d175
--- /dev/null
+++ b/media-gfx/zgv/files/zgv-5.9-Makefile-QA.patch
@@ -0,0 +1,56 @@
+diff -NrU5 zgv-5.9.original/src/Makefile zgv-5.9/src/Makefile
+--- zgv-5.9.original/src/Makefile 2009-09-28 15:31:29.000000000 -0600
++++ zgv-5.9/src/Makefile 2009-09-28 15:56:26.000000000 -0600
+@@ -45,11 +45,11 @@
+ readbmp.o readtga.o readpng.o readpcx.o \
+ readxvpic.o readmrf.o readxbm.o readxpm.o \
+ modesel.o readpcd.o readtiff.o readprf.o zgv_io.o
+
+ zgv: $(ZGV_OBJS)
+- $(CC) $(CFLAGS) -o zgv $(ZGV_OBJS) $(ZGV_LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o zgv $(ZGV_OBJS) $(ZGV_LIBS)
+
+ bdf2h: bdf2h.o
+ $(CC) $(CFLAGS) -o bdf2h bdf2h.o
+
+ install-info: install-info.c
+@@ -59,28 +59,28 @@
+ # installation. Not nice to put this in the install target,
+ # but it's likely to cause problems if I don't.
+ #
+ install: all
+ @if [ "$(BACKEND)" = SVGALIB ]; then \
+- echo $(RM) /usr/bin/zgv; \
+- $(RM) /usr/bin/zgv; \
+- echo install -m 4755 -o root -g root -s zgv $(BINDIR); \
+- install -m 4755 -o root -g root -s zgv $(BINDIR); \
++ echo echo /usr/bin/zgv; \
++ echo /usr/bin/zgv; \
++ echo install -m 0755 -o root -g root zgv $(BINDIR); \
++ install -m 0755 -o root -g root zgv $(BINDIR); \
+ fi
+ @if [ "$(BACKEND)" = SDL ]; then \
+- echo $(RM) /usr/bin/zgv-sdl; \
+- $(RM) /usr/bin/zgv-sdl; \
+- echo install -m 755 -s zgv $(BINDIR)/zgv-sdl; \
+- install -m 755 -s zgv $(BINDIR)/zgv-sdl; \
++ echo echo /usr/bin/zgv-sdl; \
++ echo /usr/bin/zgv-sdl; \
++ echo install -m 755 zgv $(BINDIR)/zgv-sdl; \
++ install -m 755 zgv $(BINDIR)/zgv-sdl; \
+ fi
+
+ uninstall:
+- $(RM) $(BINDIR)/zgv $(BINDIR)/zgv-sdl
++ echo $(BINDIR)/zgv $(BINDIR)/zgv-sdl
+
+ clean:
+- $(RM) *.o *~ zgv bdf2h fontbmps.h install-info
+- $(RM) rcfile_opt.h rcfile_var.h rcfile_short.h
++ echo *.o *~ zgv bdf2h fontbmps.h install-info
++ echo rcfile_opt.h rcfile_var.h rcfile_short.h
+
+ # Dependancies
+ 3deffects.o: 3deffects.c 3deffects.h font.h readnbkey.h zgv.h \
+ rc_config.h rcfile.h mousecur.h rbmenu.h
+ bdf2h.o: bdf2h.c
diff --git a/media-gfx/zgv/files/zgv-5.9-cmyk-yccl-fix.diff b/media-gfx/zgv/files/zgv-5.9-cmyk-yccl-fix.diff
new file mode 100644
index 000000000000..e510a4ba9ec2
--- /dev/null
+++ b/media-gfx/zgv/files/zgv-5.9-cmyk-yccl-fix.diff
@@ -0,0 +1,64 @@
+--- zgv-5.9/src/readjpeg.c Sun Oct 31 14:54:26 2004
++++ zgv/src/readjpeg.c Wed Sep 21 21:03:22 2005
+@@ -92,11 +92,13 @@
+ int *real_width,int *real_height)
+ {
+ static FILE *in;
++static int cmyk;
+ struct my_error_mgr jerr;
+ int row_stride; /* physical row width in output buffer */
+ int tmp,f;
+-unsigned char *ptr;
++unsigned char *ptr,*ptr2;
+
++cmyk=0;
+ use_errmsg=0;
+ theimage=NULL;
+ howfar=howfarfunc;
+@@ -161,6 +163,15 @@
+ pal[f]=pal[256+f]=pal[512+f]=f;
+ }
+
++if(cinfo.jpeg_color_space==JCS_CMYK)
++ cmyk=1;
++
++if(cinfo.jpeg_color_space==JCS_YCCK)
++ {
++ cmyk=1;
++ cinfo.out_color_space=JCS_CMYK;
++ }
++
+ width=cinfo.image_width;
+ height=cinfo.image_height;
+
+@@ -191,7 +202,7 @@
+ }
+
+ if(WH_BAD(width,height) ||
+- (theimage=(byte *)malloc(pixelsize*width*height))==NULL)
++ (theimage=(byte *)malloc(pixelsize*width*(height+cmyk)))==NULL)
+ {
+ jpegerr("Out of memory"); /* XXX misleading if width/height are bad */
+ longjmp(jerr.setjmp_buffer,1);
+@@ -222,7 +233,20 @@
+ while(cinfo.output_scanline<height)
+ {
+ jpeg_read_scanlines(&cinfo,&ptr,1);
+- for(f=0;f<width;f++) { tmp=*ptr; *ptr=ptr[2]; ptr[2]=tmp; ptr+=3; }
++ if(!cmyk)
++ for(f=0;f<width;f++) { tmp=*ptr; *ptr=ptr[2]; ptr[2]=tmp; ptr+=3; }
++ else
++ {
++ ptr2=ptr;
++ for(f=0;f<width;f++,ptr+=3,ptr2+=4)
++ {
++ tmp=ptr2[3];
++ ptr[0]=(tmp*ptr2[2])/255;
++ ptr[1]=(tmp*ptr2[1])/255;
++ ptr[2]=(tmp*ptr2[0])/255;
++ }
++ }
++
+ if(howfar!=NULL) howfar(cinfo.output_scanline,height);
+ }
+
diff --git a/media-gfx/zgv/files/zgv-5.9-libpng15.patch b/media-gfx/zgv/files/zgv-5.9-libpng15.patch
new file mode 100644
index 000000000000..2f12532831de
--- /dev/null
+++ b/media-gfx/zgv/files/zgv-5.9-libpng15.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/389591
+
+--- src/readpng.c
++++ src/readpng.c
+@@ -63,7 +63,7 @@
+ use_errmsg=1;
+
+ /* cleanup is done after jump back, so just do that now... */
+-longjmp(png_ptr->jmpbuf,1);
++longjmp(png_jmpbuf(png_ptr), 1);
+ }
+
+
+@@ -132,7 +132,7 @@
+ return(_PICERR_NOMEM);
+ }
+
+-if(setjmp(png_ptr->jmpbuf))
++if(setjmp(png_jmpbuf(png_ptr)))
+ {
+ /* if we get here, there was an error. */
+ /* don't use local variables here, they may have been blasted */
diff --git a/media-gfx/zgv/metadata.xml b/media-gfx/zgv/metadata.xml
new file mode 100644
index 000000000000..59e2b8f78cb5
--- /dev/null
+++ b/media-gfx/zgv/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ <name>Default assignee for orphaned packages</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/media-gfx/zgv/zgv-5.9.ebuild b/media-gfx/zgv/zgv-5.9.ebuild
new file mode 100644
index 000000000000..e879822d40ed
--- /dev/null
+++ b/media-gfx/zgv/zgv-5.9.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A svgalib console image viewer"
+HOMEPAGE="http://www.svgalib.org/rus/zgv/"
+SRC_URI="http://www.svgalib.org/rus/zgv/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86"
+IUSE=""
+
+RDEPEND=">=media-libs/svgalib-1.4.2
+ virtual/jpeg
+ media-libs/libpng
+ >=media-libs/tiff-3.5.5
+ >=sys-libs/zlib-1.1.4
+ sys-apps/gawk"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i -e "/^CFLAGS=/s:=.*:=${CFLAGS}:" config.mk || die
+ sed -i -e 's:$(RM):echo:' doc/Makefile || die
+
+ epatch \
+ "${FILESDIR}"/${P}-Makefile-QA.patch \
+ "${FILESDIR}"/${P}-cmyk-yccl-fix.diff \
+ "${FILESDIR}"/${P}-libpng15.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dodir /usr/bin /usr/share/info /usr/share/man/man1
+
+ emake \
+ PREFIX="${D}"/usr \
+ INFODIR="${D}"/usr/share/info \
+ MANDIR="${D}"/usr/share/man/man1 \
+ install
+
+ dodoc AUTHORS ChangeLog INSTALL NEWS README* SECURITY TODO
+
+ # Fix info files
+ cd "${D}"/usr/share/info
+ rm dir*
+ mv zgv zgv.info
+ for i in 1 2 3 4 ; do
+ mv zgv-$i zgv.info-$i
+ done
+}