/[gentoo-x86]/x11-libs/openmotif/openmotif-2.3.3-r1.ebuild
Gentoo

Contents of /x11-libs/openmotif/openmotif-2.3.3-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Fri Jan 6 00:04:40 2012 UTC (6 years, 5 months ago) by ulm
Branch: MAIN
Changes since 1.2: +19 -43 lines
Generate UIL and WML parsers with byacc instead of bison, bug 355795.
Ebuild updated to EAPI 4. Dropped some keywords.

(Portage version: 2.1.10.44/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20