/[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.1 - (hide annotations) (download)
Sun Oct 10 15:47:30 2010 UTC (8 years ago) by ulm
Branch: MAIN
Revbump to remove blocker against SLOT 2.2. No changes to the ebuild.

(Portage version: 2.1.9.14/cvs/Linux x86_64, RepoMan options: --force)

1 ulm 1.1 # Copyright 1999-2010 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.3.ebuild,v 1.10 2010/10/10 13:18:46 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 unicode xft"
17     # 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     x11-misc/xbitmaps"
34     RDEPEND="${RDEPEND}
35     !x11-libs/motif-config
36     !x11-libs/lesstif
37     doc? ( app-doc/openmotif-manual )"
38    
39     pkg_nofetch() {
40     local line
41     while read line; do einfo "${line}"; done <<-EOF
42     From the Open Motif license: "This software is subject to an open
43     license. It may only be used on, with or for operating systems which
44     are themselves open source systems. You must contact The Open Group
45     for a license allowing distribution and sublicensing of this software
46     on, with, or for operating systems which are not open source programs."
47    
48     If you have got such a license, you may download the file:
49     ${SRC_URI}
50     and place it in ${DISTDIR}.
51     EOF
52     }
53    
54     pkg_setup() {
55     # clean up orphaned cruft left over by motif-config
56     local i l count=0
57     for i in "${EROOT}"/usr/bin/{mwm,uil,xmbind} \
58     "${EROOT}"/usr/include/{Xm,uil,Mrm} \
59     "${EROOT}"/usr/$(get_libdir)/lib{Xm,Uil,Mrm}.*; do
60     [[ -L "${i}" ]] || continue
61     l=$(readlink "${i}")
62     if [[ ${l} == *openmotif-* || ${l} == *lesstif-* ]]; then
63     einfo "Cleaning up orphaned ${i} symlink ..."
64     rm -f "${i}"
65     fi
66     done
67    
68     cd "${EROOT}"/usr/share/man
69     for i in $(find . -type l); do
70     l=$(readlink "${i}")
71     if [[ ${l} == *-openmotif-* || ${l} == *-lesstif-* ]]; then
72     (( count++ ))
73     rm -f "${i}"
74     fi
75     done
76     [[ ${count} -ne 0 ]] && \
77     einfo "Cleaned up ${count} orphaned symlinks in ${EROOT}/usr/share/man"
78     }
79    
80     src_prepare() {
81     epatch "${FILESDIR}/${PN}-2.3.2-darwin.patch"
82     epatch "${FILESDIR}/${PN}-2.3.2-sanitise-paths.patch"
83     epatch "${FILESDIR}/${PN}-2.3.2-libpng14.patch"
84     [[ ${CHOST} == *-solaris2.11 ]] \
85     && epatch "${FILESDIR}/${PN}-2.3.2-solaris-2.11.patch"
86    
87     # disable compilation of demo binaries
88     sed -i -e '/^SUBDIRS/{:x;/\\$/{N;bx;};s/[ \t\n\\]*demos//;}' Makefile.am
89    
90     # add X.Org vendor string to aliases for virtual bindings
91     echo -e '"The X.Org Foundation"\t\t\t\t\tpc' >>bindings/xmbind.alias
92    
93     AT_M4DIR=. eautoreconf
94     }
95    
96     src_configure() {
97     # get around some LANG problems in make (#15119)
98     LANG=C
99    
100     # bug #80421
101     filter-flags -ftracer
102    
103     # multilib includes don't work right in this package...
104     has_multilib_profile && append-flags "-I$(get_ml_incdir)"
105    
106     # feel free to fix properly if you care
107     append-flags -fno-strict-aliasing
108    
109     # For Solaris Xos_r.h :(
110     [[ ${CHOST} == *-solaris2.11 ]] && append-flags -DNEED_XOS_R_H=1
111    
112     if use !elibc_glibc && use !elibc_uclibc && use unicode; then
113     # libiconv detection in configure script doesn't always work
114     # http://bugs.motifzone.net/show_bug.cgi?id=1423
115     export LIBS="${LIBS} -liconv"
116     fi
117    
118     econf --with-x \
119     $(use_enable unicode utf8) \
120     $(use_enable xft) \
121     $(use_enable jpeg) \
122     $(use_enable png)
123     }
124    
125     src_compile() {
126     emake -j1 MWMRCDIR="${EPREFIX}"/etc/X11/mwm || die "emake failed"
127     }
128    
129     src_install() {
130     emake -j1 DESTDIR="${D}" MWMRCDIR="${EPREFIX}"/etc/X11/mwm install \
131     || die "emake install failed"
132    
133     # mwm default configs
134     insinto /usr/share/X11/app-defaults
135     newins "${FILESDIR}"/Mwm.defaults Mwm
136    
137     if use examples; then
138     emake -j1 -C demos DESTDIR="${D}" install-data \
139     || die "installation of demos failed"
140     dodir /usr/share/doc/${PF}/demos
141     mv "${ED}"/usr/share/Xm/* "${ED}"/usr/share/doc/${PF}/demos
142     fi
143     rm -rf "${ED}"/usr/share/Xm
144    
145     dodoc BUGREPORT ChangeLog README RELEASE RELNOTES TODO
146     }
147    
148     pkg_postinst() {
149     local line
150     while read line; do elog "${line}"; done <<-EOF
151     From the Open Motif 2.3.0 (upstream) release notes:
152     "Open Motif 2.3 is an updated version of 2.2. Any applications
153     built against a previous 2.x release of Open Motif will be binary
154     compatible with this release."
155    
156     If you have binary-only applications requiring libXm.so.3, you may
157     therefore create a symlink from libXm.so.3 to libXm.so.4.
158     Please note, however, that there will be no Gentoo support for this.
159     Alternatively, you may install x11-libs/openmotif-compat-2.2* for
160     the Open Motif 2.2 libraries.
161     EOF
162     }

  ViewVC Help
Powered by ViewVC 1.1.20