/[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.17 - (hide annotations) (download)
Wed Oct 24 21:43:54 2012 UTC (5 years, 8 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +1 -1 lines
FILE REMOVED
Package move x11-libs/openmotif to x11-libs/motif.

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.17 # $Header: /var/cvsroot/gentoo-x86/x11-libs/openmotif/openmotif-2.3.3-r1.ebuild,v 1.16 2012/05/06 00:58:45 aballier 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 aballier 1.16 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
16 ulm 1.3 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     fetch bindist
22 ulm 1.4 ) ) )"
23 ulm 1.1
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 naota 1.14 || ( dev-util/byacc sys-freebsd/freebsd-ubin )
33 ulm 1.1 x11-misc/xbitmaps"
34     RDEPEND="${RDEPEND}
35     doc? ( app-doc/openmotif-manual )"
36    
37     pkg_nofetch() {
38     local line
39     while read line; do einfo "${line}"; done <<-EOF
40 ulm 1.4 From the Open Motif license: "The rights granted under this license are
41     limited solely to distribution and sublicensing of the contribution(s)
42     on, with, or for operating systems which are themselves open source
43     programs. Contact The Open Group for a license allowing distribution and
44     sublicensing of the original program on, with, or for operating systems
45     which are not open source programs."
46 ulm 1.1
47 ulm 1.4 If above conditions are fulfilled, you may download the file:
48 ulm 1.1 ${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