sys-apps/gawk: stable 5.0.1 for ppc64, bug #725374
[gentoo.git] / media-gfx / argyllcms / argyllcms-2.1.2-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit flag-o-matic multiprocessing toolchain-funcs udev
7
8 MY_P="Argyll_V${PV}"
9
10 DESCRIPTION="Open source, ICC compatible color management system"
11 HOMEPAGE="http://www.argyllcms.com/"
12 SRC_URI="http://www.argyllcms.com/${MY_P}_src.zip"
13
14 LICENSE="AGPL-3"
15 SLOT="0"
16 KEYWORDS="~amd64 ~arm64 ~hppa ~x86"
17 IUSE="doc libressl"
18
19 RDEPEND="
20         media-libs/tiff:0
21         sys-libs/zlib
22         virtual/jpeg:0
23         x11-libs/libX11
24         x11-libs/libXau
25         x11-libs/libXdmcp
26         x11-libs/libXext
27         x11-libs/libXinerama
28         x11-libs/libXrandr
29         x11-libs/libXxf86vm
30         x11-libs/libXScrnSaver
31         !libressl? ( dev-libs/openssl:0= )
32         libressl? ( dev-libs/libressl:0= )"
33 DEPEND="${RDEPEND}"
34 BDEPEND="app-arch/unzip
35         dev-util/ftjam"
36
37 PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
38
39 S="${WORKDIR}/${MY_P}"
40
41 src_compile() {
42         # Make it respect LDFLAGS
43         echo "LINKFLAGS += ${LDFLAGS} ;" >> Jamtop
44
45         # Evil hack to get --as-needed working. The build system unfortunately lists all
46         # the shared libraries by default on the command line _before_ the object to be built...
47         echo "STDLIBS += -ldl -lrt -lX11 -lXext -lXxf86vm -lXinerama -lXrandr -lXau -lXdmcp -lXss -ltiff -ljpeg ;" >> Jamtop
48
49         append-cflags -DUNIX -D_THREAD_SAFE
50
51         sed \
52                 -e 's:CCFLAGS:CFLAGS:g' \
53                 -e "s:ar rusc:$(tc-getAR) rusc:g" \
54                 -i Jambase || die
55
56         tc-export CC RANLIB
57
58         jam -dx -fJambase "-j$(makeopts_jobs)" || die
59 }
60
61 src_install() {
62         jam -dx -fJambase install || die
63
64         rm bin/License.txt || die
65
66         pushd bin > /dev/null
67         local binname
68         for binname in * ; do
69                 newbin ${binname} argyll-${binname}
70         done
71         popd > /dev/null
72
73         dodoc log.txt Readme.txt ttbd.txt notes.txt
74         if use doc;  then
75                 docinto html
76                 dodoc doc/*html doc/*jpg doc/*gif
77         fi
78
79         insinto /usr/share/${PN}
80         doins -r ref
81
82         udev_dorules usb/55-Argyll.rules
83 }
84
85 pkg_postinst() {
86         elog "If you have a Spyder2 you need to extract the firmware"
87         elog "from the CVSpyder.dll of the windows driver package"
88         elog "and store it as /usr/share/color/spyd2PLD.bin"
89         echo
90         elog "For further info on setting up instrument access read"
91         elog "http://www.argyllcms.com/doc/Installing_Linux.html"
92         echo
93 }