1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
82
  
83
  
84
  
85
  
86
  
87
  
88
  
89
  
90
  
91
  
92
  
93
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
112
  
113
  
114
  
115
  
116
  
117
  
118
  
119
  
120
  
121
  
122
  
123
  
124
  
125
  
126
  
127
  
128
  
129
  
130
  
131
  
132
  
133
  
134
  
135
  
136
  
137
  
138
  
139
  
140
  
141
  
142
  
143
  
144
  
145
  
146
  
147
  
148
  
149
  
150
  
151
  
152
  
153
  
154
  
155
  
156
  
157
  
158
  
159
  
160
  
161
  
162
  
163
  
164
  
165
  
166
  
167
  
168
  
169
  
170
  
171
  
172
  
173
  
174
  
175
  
176
  
177
  
178
  
179
  
180
  
181
  
# -*- sh -*- 
# Copyright 1999-2008 Gentoo Foundation 
# Distributed under the terms of the GNU General Public License v2 
# $Header$ 
 
EAPI="5" 
 
inherit eutils multilib 
 
DESCRIPTION="Pike programming language and runtime" 
HOMEPAGE="http://pike.lysator.liu.se/" 
# Get the alpha/beta designator (if any). 
MY_PR="${PV//[0-9._]/}" 
MY_PR="${MY_PR:-all}" 
# Strip the alpha/beta designator. 
MY_PV="${PV/_*/}" 
SRC_URI="http://pike.lysator.liu.se/pub/pike/${MY_PR}/${MY_PV}/Pike-v${MY_PV}.tar.gz" 
 
MY_RELEASE="${MY_PV%.*}" 
MY_MAJOR="${MY_PV//.[0-9.]*/}" 
MY_MINOR="${MY_RELEASE/[0-9]./}" 
 
LICENSE="GPL-2 LGPL-2.1 MPL-1.1" 
SLOT="0/${MY_RELEASE}" 
 
MY_STABLE="no" 
case ${MY_MINOR} in 
        *0|*2|*4|*6|*8) 
                # Even minor means stable release. 
                MY_STABLE="yes" 
        ;; 
esac 
 
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~sparc ~x86 ~x86-fbsd" 
 
if [[ ${MY_PR} == all && ${MY_STABLE} == yes ]]; then 
        # Stable branch and not an alpha or beta release. 
        KEYWORDS="alpha amd64 hppa ia64 mips ppc sparc x86 x86-fbsd" 
fi 
 
IUSE="bzip2 debug doc fftw gdbm glut gnome gtk gtk1 hardened java jpeg kerberos msql mysql odbc opengl oracle pcre pdf scanner sdl sqlite svg test tiff truetype vcdiff webp zlib" 
 
DEPEND="dev-libs/nettle 
        dev-libs/gmp 
        media-libs/giflib 
        bzip2? ( app-arch/bzip2 ) 
        fftw? ( sci-libs/fftw ) 
        gdbm? ( sys-libs/gdbm ) 
        gtk1? ( =x11-libs/gtk+-1.2* ) 
        gtk? ( >x11-libs/gtk+-2 ) 
        gtk? ( gnome? ( gnome-base/libgnome gnome-base/libgnomeui gnome-base/libglade ) ) 
        gtk? ( opengl? ( x11-libs/gtkglarea ) ) 
        java? ( virtual/jdk virtual/libffi ) 
        jpeg? ( virtual/jpeg ) 
        kerberos? ( virtual/krb5 net-libs/libgssglue ) 
        msql? ( dev-db/msql ) 
        mysql? ( || ( virtual/libmysqlclient <dev-db/mysql-5.6 <dev-db/mariadb-10 ) ) 
        odbc? ( dev-db/libiodbc ) 
        opengl? ( virtual/opengl glut? ( media-libs/freeglut ) ) 
        oracle? ( || ( dev-db/oracle-instantclient[sdk] dev-db/oracle-instantclient-basic ) ) 
        pcre? ( dev-libs/libpcre ) 
        pdf? ( media-libs/pdflib ) 
        !x86-fbsd? ( scanner? ( media-gfx/sane-backends ) ) 
        sdl? ( media-libs/libsdl media-libs/sdl-mixer ) 
        sqlite? ( dev-db/sqlite ) 
        svg? ( gnome-base/librsvg ) 
        test? ( sys-devel/m4 ) 
        tiff? ( media-libs/tiff ) 
        truetype? ( >media-libs/freetype-2 ) 
        vcdiff? ( dev-util/open-vcdiff ) 
        webp? ( media-libs/libwebp ) 
        zlib? ( sys-libs/zlib )" 
 
RDEPEND="dev-libs/nettle 
        dev-libs/gmp 
        media-libs/giflib 
        bzip2? ( app-arch/bzip2 ) 
        fftw? ( sci-libs/fftw ) 
        gdbm? ( sys-libs/gdbm ) 
        gtk1? ( =x11-libs/gtk+-1.2* ) 
        gtk? ( >x11-libs/gtk+-2 ) 
        gtk? ( gnome? ( gnome-base/libgnome gnome-base/libgnomeui gnome-base/libglade ) ) 
        gtk? ( opengl? ( x11-libs/gtkglarea ) ) 
        java? ( virtual/jdk virtual/libffi ) 
        jpeg? ( virtual/jpeg ) 
        kerberos? ( virtual/krb5 net-libs/libgssglue ) 
        msql? ( dev-db/msql ) 
        mysql? ( || ( virtual/libmysqlclient <dev-db/mysql-5.6 <dev-db/mariadb-10 ) ) 
        odbc? ( dev-db/libiodbc ) 
        opengl? ( virtual/opengl glut? ( media-libs/freeglut ) ) 
        oracle? ( || ( dev-db/oracle-instantclient dev-db/oracle-instantclient-basic ) ) 
        pcre? ( dev-libs/libpcre ) 
        pdf? ( media-libs/pdflib ) 
        !x86-fbsd? ( scanner? ( media-gfx/sane-backends ) ) 
        sdl? ( media-libs/libsdl media-libs/sdl-mixer ) 
        sqlite? ( dev-db/sqlite ) 
        svg? ( gnome-base/librsvg ) 
        tiff? ( media-libs/tiff ) 
        truetype? ( >media-libs/freetype-2 ) 
        vcdiff? ( dev-util/open-vcdiff ) 
        webp? ( media-libs/libwebp ) 
        zlib? ( sys-libs/zlib )" 
 
S=${WORKDIR}/Pike-v${MY_PV} 
 
src_compile() { 
        local myconf="" 
        # ffmpeg is broken atm #110136 
        myconf="${myconf} --without-_Ffmpeg" 
        # on hardened, disable runtime-generated code 
        # otherwise let configure work it out for itself 
        use hardened && myconf="${myconf} --without-machine-code" 
 
        make \ 
                CONFIGUREARGS=" \ 
                        --prefix=/usr \ 
                        --disable-make_conf \ 
                        --disable-noopty-retry \ 
                        --without-cdebug \ 
                        --without-bundles \ 
                        --without-ssleay \ 
                        --with-crypt \ 
                        --with-gif \ 
                        --with-gmp \ 
                        --with-bignums \ 
                        $(use_with bzip2 Bz2) \ 
                        $(use_with debug rtldebug) \ 
                        $(use_with fftw) \ 
                        $(use_with gdbm) \ 
                        $(use_with gtk1 GTK1) \ 
                        $(use_with gtk GTK2) \ 
                        $(use_with java Java) \ 
                        $(use_with jpeg jpeglib) \ 
                        $(use_with kerberos Kerberos) \ 
                        $(use_with kerberos gssapi) \ 
                        $(use_with msql) \ 
                        $(use_with mysql) \ 
                        $(use_with odbc Odbc) \ 
                        $(use_with opengl GL) \ 
                        $(use_with oracle) \ 
                        $(use opengl && use_with glut GLUT) \ 
                        $(use opengl || use_with opengl GLUT) \ 
                        $(use_with pcre _Regexp_PCRE) \ 
                        $(use_with pdf libpdf) \ 
                        $(use_with scanner sane) \ 
                        $(use_with sdl SDL) \ 
                        $(use_with sdl SDL_mixer) \ 
                        $(use_with svg) \ 
                        $(use_with tiff tifflib) \ 
                        $(use_with truetype freetype) \ 
                        $(use_with vcdiff) \ 
                        $(use_with webp _Image_WebP) \ 
                        $(use_with zlib) \ 
                        ${myconf} \ 
                        " || die "compilation failed" 
 
        if use doc; then 
                PATH="${S}/bin:${PATH}" make doc || die "doc failed" 
        fi 
} 
 
src_install() { 
        # do not remove modules to avoid sandbox violation. 
        # The sandbox really ought to allow deletion of files 
        # that belong to previous installs of the ebuild, or 
        # even better: hide them. 
        sed -i s/rm\(mod\+\"\.o\"\)\;/break\;/ "${S}"/bin/install.pike || die "Failed to modify install.pike (1)" 
        sed -i 's/\(Array.map *( *files_to_delete *- *files_to_not_delete, *rm *);\)/; \/\/ \1/' "${S}"/bin/install.pike || die "Failed to modify install.pike (2)" 
        if use doc ; then 
                make INSTALLARGS="--traditional" buildroot="${D}" install || die 
                einfo "Installing 60MB of docs, this could take some time ..." 
                dohtml -r "${S}"/refdoc/traditional_manual "${S}"/refdoc/modref 
        else 
                make INSTALLARGS="--traditional" buildroot="${D}" install_nodoc || die 
        fi 
        # Installation is a bit broken.. remove the doc sources. 
        rm -rf "${D}/usr/doc" 
        # Install the man pages in the proper location. 
        rm -rf "${D}/usr/man" && doman "${S}/man/pike.1" 
}