Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-libs/fltk/
Date: Mon, 08 Apr 2019 19:23:12
Message-Id: 1554751385.ff5d95a9972275e1c45b676e4dd4f8fd425077ea.jer@gentoo
1 commit: ff5d95a9972275e1c45b676e4dd4f8fd425077ea
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 8 19:22:28 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 8 19:23:05 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff5d95a9
7
8 x11-libs/fltk: Version 1.3.5
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 x11-libs/fltk/Manifest | 1 +
14 x11-libs/fltk/fltk-1.3.5.ebuild | 190 ++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 191 insertions(+)
16
17 diff --git a/x11-libs/fltk/Manifest b/x11-libs/fltk/Manifest
18 index e99aaaf51d5..b00e46dfe50 100644
19 --- a/x11-libs/fltk/Manifest
20 +++ b/x11-libs/fltk/Manifest
21 @@ -1,2 +1,3 @@
22 DIST fltk-1.3.3-source.tar.gz 4986376 BLAKE2B 866d26cd8d7d1e985010f7601598ec87b44674f55d019239ebc0cbf8d70e04d9d1bce7a7c8463740bcd4c4a8ffcc8ef5e44b3f0cb591358d53d513844605c868 SHA512 277ba27e35c20e2d4fc5296bf418c5ab78c821870476e21d49f723765b99b3a559eed4ecd5215ac26d53a1091ada003e17f1553194cebaa97dd854809dd2885d
23 DIST fltk-1.3.4-source.tar.gz 5284217 BLAKE2B 87da82cd04abe81cf095b92b997d4ca0fb7d77fbbb5602848f88ad79e5e41c9bff64b7c948b408b83833fcb658c07b3fe487f55c30357484fab444faca7e990f SHA512 92c236e426ad9b2a2954a6fc401bc9bf4c4c46d47b08f8c9b879da6031ac158ef9b944f28a8bea64d18072d1af8ceaa09c00abebd745fb76dd628636424446c2
24 +DIST fltk-1.3.5-source.tar.gz 5261324 BLAKE2B df05989d6581b570c689e29e9f31e5fc85fa91dee1296d70b5f5c3b4aab527749850ea78bec3ef5947151b21598c3bb04e52f78b5e6db179e7fd922627862b5e SHA512 db7ea7c5f3489195a48216037b9371a50f1119ae7692d66f71b6711e5ccf78814670581bae015e408dee15c4bba921728309372c1cffc90113cdc092e8540821
25
26 diff --git a/x11-libs/fltk/fltk-1.3.5.ebuild b/x11-libs/fltk/fltk-1.3.5.ebuild
27 new file mode 100644
28 index 00000000000..008a5a20c95
29 --- /dev/null
30 +++ b/x11-libs/fltk/fltk-1.3.5.ebuild
31 @@ -0,0 +1,190 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +inherit autotools fdo-mime flag-o-matic multilib-minimal
37 +
38 +DESCRIPTION="C++ user interface toolkit for X and OpenGL"
39 +HOMEPAGE="http://www.fltk.org/"
40 +SRC_URI="http://fltk.org/pub/${PN}/${PV}/${P}-source.tar.gz"
41 +
42 +SLOT="1"
43 +LICENSE="FLTK LGPL-2"
44 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
45 +IUSE="cairo debug doc examples games +opengl static-libs +threads +xft +xinerama"
46 +
47 +RDEPEND="
48 + >=media-libs/libpng-1.2:0=[${MULTILIB_USEDEP}]
49 + sys-libs/zlib[${MULTILIB_USEDEP}]
50 + virtual/jpeg:0=[${MULTILIB_USEDEP}]
51 + x11-libs/libICE[${MULTILIB_USEDEP}]
52 + x11-libs/libSM[${MULTILIB_USEDEP}]
53 + x11-libs/libXcursor[${MULTILIB_USEDEP}]
54 + x11-libs/libXext[${MULTILIB_USEDEP}]
55 + x11-libs/libXfixes[${MULTILIB_USEDEP}]
56 + x11-libs/libXt[${MULTILIB_USEDEP}]
57 + cairo? ( x11-libs/cairo[${MULTILIB_USEDEP},X] )
58 + opengl? (
59 + virtual/glu[${MULTILIB_USEDEP}]
60 + virtual/opengl[${MULTILIB_USEDEP}]
61 + )
62 + xft? ( x11-libs/libXft[${MULTILIB_USEDEP}] )
63 + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
64 +"
65 +DEPEND="
66 + ${RDEPEND}
67 + virtual/pkgconfig
68 + x11-base/xorg-proto
69 + doc? ( app-doc/doxygen )
70 +"
71 +DOCS=(
72 + ANNOUNCEMENT
73 + CHANGES
74 + CHANGES_1.0
75 + CHANGES_1.1
76 + CREDITS
77 + README
78 + README.abi-version.txt
79 + README.Cairo.txt
80 + README.CMake.txt
81 + README.MSWindows.txt
82 + README.OSX.txt
83 + README.Unix.txt
84 +)
85 +FLTK_GAMES="
86 + blocks
87 + checkers
88 + sudoku
89 +"
90 +PATCHES=(
91 + "${FILESDIR}"/${PN}-1.3.0-share.patch
92 + "${FILESDIR}"/${PN}-1.3.3-fltk-config.patch
93 + "${FILESDIR}"/${PN}-1.3.3-makefile-dirs.patch
94 + "${FILESDIR}"/${PN}-1.3.3-visibility.patch
95 + "${FILESDIR}"/${PN}-1.3.4-conf-tests.patch
96 +)
97 +
98 +src_prepare() {
99 + default
100 +
101 + rm -rf zlib jpeg png || die
102 +
103 + sed -i \
104 + -e 's:@HLINKS@::g' FL/Makefile.in || die
105 + # docs in proper docdir
106 + sed -i \
107 + -e "/^docdir/s:fltk:${PF}/html:" \
108 + -e "/SILENT:/d" \
109 + makeinclude.in || die
110 + sed -e "s/7/${PV}/" \
111 + < "${FILESDIR}"/FLTKConfig.cmake \
112 + > CMake/FLTKConfig.cmake || die
113 + sed -e 's:-Os::g' -i configure.ac || die
114 +
115 + # also in Makefile:config.guess config.sub:
116 + cp misc/config.{guess,sub} . || die
117 +
118 + cp fluid/{,x-}fluid.desktop || die
119 +
120 + eaclocal
121 + eautoconf
122 + multilib_copy_sources
123 +}
124 +
125 +multilib_src_configure() {
126 + unset FLTK_LIBDIRS
127 +
128 + local FLTK_INCDIR=${EPREFIX}/usr/include/fltk
129 + local FLTK_LIBDIR=${EPREFIX}/usr/$(get_libdir)/fltk
130 + FLTK_LIBDIRS+=${FLTK_LIBDIRS+:}${FLTK_LIBDIR}
131 +
132 + multilib_is_native_abi && use prefix &&
133 + append-ldflags -Wl,-rpath -Wl,"${FLTK_LIBDIR}"
134 +
135 + econf \
136 + $(use_enable cairo) \
137 + $(use_enable debug) \
138 + $(use_enable opengl gl) \
139 + $(use_enable threads) \
140 + $(use_enable xft) \
141 + $(use_enable xinerama) \
142 + --disable-localjpeg \
143 + --disable-localpng \
144 + --disable-localzlib \
145 + --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
146 + --enable-largefile \
147 + --enable-shared \
148 + --enable-xcursor \
149 + --enable-xdbe \
150 + --enable-xfixes \
151 + --includedir=${FLTK_INCDIR} \
152 + --libdir=${FLTK_LIBDIR}
153 +}
154 +
155 +multilib_src_compile() {
156 + # Prevent reconfigure on non-native ABIs.
157 + touch -r makeinclude config.{guess,sub} || die
158 +
159 + default
160 +
161 + if multilib_is_native_abi; then
162 + emake -C fluid
163 + use doc && emake -C documentation html
164 + use games && emake -C test ${FLTK_GAMES}
165 + fi
166 +}
167 +
168 +multilib_src_test() {
169 + emake -C fluid
170 + emake -C test
171 +}
172 +
173 +multilib_src_install() {
174 + default
175 +
176 + if multilib_is_native_abi; then
177 + emake -C fluid DESTDIR="${D}" install-linux install
178 +
179 + use doc && \
180 + emake -C documentation DESTDIR="${D}" install
181 +
182 + use games && \
183 + emake -C test DESTDIR="${D}" install-linux
184 + fi
185 +}
186 +
187 +multilib_src_install_all() {
188 + for app in fluid $(usex games "${FLTK_GAMES}" ''); do
189 + dosym \
190 + /usr/share/icons/hicolor/32x32/apps/${app}.png \
191 + /usr/share/pixmaps/${app}.png
192 + done
193 +
194 + if use examples; then
195 + insinto /usr/share/doc/${PF}/examples
196 + doins test/*.{h,cxx,fl} test/demo.menu
197 + fi
198 +
199 + insinto /usr/share/cmake/Modules
200 + doins CMake/FLTK*.cmake
201 +
202 + echo "LDPATH=${FLTK_LIBDIRS}" > 99fltk || die
203 + echo "FLTK_DOCDIR=${EPREFIX}/usr/share/doc/${PF}/html" >> 99fltk || die
204 + doenvd 99fltk
205 +
206 + # FIXME: This is bad, but building only shared libraries is hardly supported
207 + # FIXME: The executables in test/ are linking statically against libfltk
208 + if ! use static-libs; then
209 + rm "${ED}"/usr/lib*/fltk/*.a || die
210 + fi
211 +
212 + find "${D}" -name '*.la' -delete || die
213 +}
214 +
215 +pkg_postinst() {
216 + fdo-mime_desktop_database_update
217 +}
218 +
219 +pkg_postrm() {
220 + fdo-mime_desktop_database_update
221 +}