/[gentoo-x86]/x11-libs/openmotif/openmotif-2.3.2-r2.ebuild
Gentoo

Contents of /x11-libs/openmotif/openmotif-2.3.2-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.21 - (show annotations) (download)
Sun Jan 15 22:10:58 2012 UTC (2 years, 7 months ago) by ulm
Branch: MAIN
Changes since 1.20: +10 -10 lines
Add RESTRICT="fetch bindist" on Solaris, since it is no longer open source.
Update message in pkg_nofetch().

(Portage version: 2.1.10.44/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/openmotif-2.3.2-r2.ebuild,v 1.20 2011/12/19 08:43:01 ulm Exp $
4
5 EAPI=3
6
7 inherit autotools eutils flag-o-matic multilib
8
9 DESCRIPTION="Open Motif"
10 HOMEPAGE="http://www.motifzone.net/"
11 SRC_URI="ftp://ftp.ics.com/openmotif/${PV%.*}/${PV}/${P}.tar.gz"
12
13 LICENSE="MOTIF MIT"
14 SLOT="0"
15 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~ppc-aix ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
16 IUSE="doc examples jpeg png static-libs unicode xft"
17 # license allows distribution only for "open source operating systems"
18 RESTRICT="!kernel_linux? (
19 !kernel_FreeBSD? (
20 !kernel_Darwin? (
21 fetch bindist
22 ) ) )"
23
24 RDEPEND="x11-libs/libXmu
25 x11-libs/libXp
26 unicode? ( virtual/libiconv )
27 xft? ( x11-libs/libXft )
28 jpeg? ( virtual/jpeg )
29 png? ( >=media-libs/libpng-1.4 )"
30 DEPEND="${RDEPEND}
31 sys-devel/flex
32 x11-misc/xbitmaps"
33 RDEPEND="${RDEPEND}
34 doc? ( app-doc/openmotif-manual )"
35
36 pkg_nofetch() {
37 local line
38 while read line; do einfo "${line}"; done <<-EOF
39 From the Open Motif license: "The rights granted under this license are
40 limited solely to distribution and sublicensing of the contribution(s)
41 on, with, or for operating systems which are themselves open source
42 programs. Contact The Open Group for a license allowing distribution and
43 sublicensing of the original program on, with, or for operating systems
44 which are not open source programs."
45
46 If above conditions are fulfilled, you may download the file:
47 ${SRC_URI}
48 and place it in ${DISTDIR}.
49 EOF
50 }
51
52 src_prepare() {
53 epatch "${FILESDIR}/${PN}-2.3.1-multilist-stipple.patch" #215984
54 epatch "${FILESDIR}/${PN}-2.3.1-ac-editres.patch" #82081
55 epatch "${FILESDIR}/${P}-ldflags.patch" #293573
56 epatch "${FILESDIR}/${P}-ddd-layout.patch" #303887
57 epatch "${FILESDIR}/${P}-sanitise-paths.patch"
58 epatch "${FILESDIR}/${P}-libpng14.patch"
59 [[ ${CHOST} == *-solaris2.11 ]] \
60 && epatch "${FILESDIR}/${P}-solaris-2.11.patch"
61
62 # disable compilation of demo binaries
63 sed -i -e '/^SUBDIRS/{:x;/\\$/{N;bx;};s/[ \t\n\\]*demos//;}' Makefile.am
64
65 # add X.Org vendor string to aliases for virtual bindings
66 echo -e '"The X.Org Foundation"\t\t\t\t\tpc' >>bindings/xmbind.alias
67
68 AT_M4DIR=. eautoreconf
69 }
70
71 src_configure() {
72 # get around some LANG problems in make (#15119)
73 LANG=C
74
75 # bug #80421
76 filter-flags -ftracer
77
78 # feel free to fix properly if you care
79 append-flags -fno-strict-aliasing
80
81 # For Solaris Xos_r.h :(
82 [[ ${CHOST} == *-solaris2.11 ]] && append-flags -DNEED_XOS_R_H=1
83
84 if use !elibc_glibc && use !elibc_uclibc && use unicode; then
85 # libiconv detection in configure script doesn't always work
86 # http://bugs.motifzone.net/show_bug.cgi?id=1423
87 export LIBS="${LIBS} -liconv"
88 fi
89
90 econf --with-x \
91 $(use_enable static-libs static) \
92 $(use_enable unicode utf8) \
93 $(use_enable xft) \
94 $(use_enable jpeg) \
95 $(use_enable png)
96 }
97
98 src_compile() {
99 emake -j1 || die "emake failed"
100 }
101
102 src_install() {
103 emake -j1 DESTDIR="${D}" install || die "emake install failed"
104
105 # mwm default configs
106 insinto /usr/share/X11/app-defaults
107 newins "${FILESDIR}"/Mwm.defaults Mwm
108
109 dodir /etc/X11/mwm
110 mv -f "${ED}"/usr/$(get_libdir)/X11/system.mwmrc "${ED}"/etc/X11/mwm
111 dosym /etc/X11/mwm/system.mwmrc /usr/$(get_libdir)/X11/system.mwmrc
112
113 if use examples; then
114 emake -j1 -C demos DESTDIR="${D}" install-data \
115 || die "installation of demos failed"
116 dodir /usr/share/doc/${PF}/demos
117 mv "${ED}"/usr/share/Xm/* "${ED}"/usr/share/doc/${PF}/demos
118 fi
119 rm -rf "${ED}"/usr/share/Xm
120
121 # don't install libtool archives
122 rm -f "${ED}"/usr/$(get_libdir)/*.la
123
124 dodoc BUGREPORT ChangeLog README RELEASE RELNOTES TODO
125 }
126
127 pkg_postinst() {
128 local line
129 while read line; do elog "${line}"; done <<-EOF
130 From the Open Motif 2.3.0 (upstream) release notes:
131 "Open Motif 2.3 is an updated version of 2.2. Any applications
132 built against a previous 2.x release of Open Motif will be binary
133 compatible with this release."
134
135 If you have binary-only applications requiring libXm.so.3, you may
136 therefore create a symlink from libXm.so.3 to libXm.so.4.
137 Please note, however, that there will be no Gentoo support for this.
138 Alternatively, you may install slot 2.2 of x11-libs/openmotif for
139 the Open Motif 2.2 libraries.
140 EOF
141 }

  ViewVC Help
Powered by ViewVC 1.1.20