Lines 45-50
Link Here
|
45 |
|
45 |
|
46 |
src_unpack() { |
46 |
src_unpack() { |
47 |
unpack ${A} |
47 |
unpack ${A} |
|
|
48 |
epatch ${FILESDIR}/${P}-installpathfix.patch |
48 |
cd ${S} |
49 |
cd ${S} |
49 |
elibtoolize --patch-only |
50 |
elibtoolize --patch-only |
50 |
gnuconfig_update |
51 |
gnuconfig_update |
Lines 53-59
Link Here
|
53 |
if built_with_use sci-libs/hdf szip ; then |
54 |
if built_with_use sci-libs/hdf szip ; then |
54 |
einfo "Found HDF4 compiled with szip. Nice." |
55 |
einfo "Found HDF4 compiled with szip. Nice." |
55 |
else |
56 |
else |
56 |
ewarn "HDF4 must be compiled with szip USE flag!" |
57 |
ewarn "HDF4 (sci-libs/hdf) must be compiled with szip USE flag!" |
57 |
einfo "Emerge HDF with szip USE flag and then emerge GDAL." |
58 |
einfo "Emerge HDF with szip USE flag and then emerge GDAL." |
58 |
die "HDF4 not merged with szip use flag" |
59 |
die "HDF4 not merged with szip use flag" |
59 |
fi |
60 |
fi |
Lines 62-77
Link Here
|
62 |
|
63 |
|
63 |
src_compile() { |
64 |
src_compile() { |
64 |
distutils_python_version |
65 |
distutils_python_version |
65 |
# This package uses old borked automake/autoconf and libtool, so |
|
|
66 |
# it doesn't work without ${D} (or with econf and einstall). |
67 |
|
68 |
pkg_conf="--prefix=${D}usr --exec-prefix=${D}usr --bindir=${D}usr/bin \ |
69 |
--datadir=${D}usr/share/gdal --includedir=${D}usr/include/gdal \ |
70 |
--libdir=${D}usr/$(get_libdir) --mandir=${D}usr/share/man \ |
71 |
--with-pymoddir=${D}usr/lib/python${PYVER}/site-packages \ |
72 |
--enable-static=no --enable-shared=yes --with-gnu-ld" |
73 |
|
74 |
# the above should make libtool behave for the most part |
75 |
|
66 |
|
76 |
use_conf="$(use_with jpeg) $(use_with png) $(use_with mysql) \ |
67 |
use_conf="$(use_with jpeg) $(use_with png) $(use_with mysql) \ |
77 |
$(use_with postgres pg) $(use_with fits cfitsio) \ |
68 |
$(use_with postgres pg) $(use_with fits cfitsio) \ |
Lines 101-122
Link Here
|
101 |
fi |
92 |
fi |
102 |
|
93 |
|
103 |
if useq python ; then |
94 |
if useq python ; then |
104 |
use_conf="--with-pymoddir=${D}usr/lib/python${PYVER}/site-packages \ |
95 |
use_conf="--with-pymoddir=/usr/lib/python${PYVER}/site-packages \ |
105 |
${use_conf}" |
96 |
${use_conf}" |
106 |
else |
97 |
else |
107 |
use_conf="--with-python=no ${use_conf}" |
98 |
use_conf="--with-python=no ${use_conf}" |
108 |
fi |
99 |
fi |
109 |
|
100 |
|
110 |
# Fix doc path just in case |
101 |
# Fix doc path just in case |
111 |
sed -i -e "s:@exec_prefix@/doc:${D}usr/share/doc/${PF}/html:g" GDALmake.opt.in |
102 |
sed -i -e "s:@exec_prefix@/doc:/usr/share/doc/${PF}/html:g" GDALmake.opt.in |
112 |
|
103 |
|
113 |
./configure --with-pymoddir=${D}usr/lib/python${PYVER}/site-packages \ |
104 |
econf ${use_conf} || die 'configure failed' |
114 |
${pkg_conf} ${use_conf} |
|
|
115 |
|
105 |
|
116 |
# Patch libtool here since it's not created until after configure runs |
|
|
117 |
sed -i -e "s:hardcode_into_libs=yes:hardcode_into_libs=no:g" libtool |
118 |
echo '#undef GDAL_PREFIX' >> port/cpl_config.h |
119 |
echo '#define GDAL_PREFIX "/usr"' >> port/cpl_config.h |
120 |
emake || die "emake failed" |
106 |
emake || die "emake failed" |
121 |
if useq doc ; then |
107 |
if useq doc ; then |
122 |
emake docs || die "emake docs failed" |
108 |
emake docs || die "emake docs failed" |
Lines 126-134
Link Here
|
126 |
src_install() { |
112 |
src_install() { |
127 |
# einstall causes sandbox violations on /usr/lib/libgdal.so |
113 |
# einstall causes sandbox violations on /usr/lib/libgdal.so |
128 |
make DESTDIR=${D} install || die "make install failed" |
114 |
make DESTDIR=${D} install || die "make install failed" |
129 |
dosed "s:${D}usr:/usr:g" /usr/bin/gdal-config |
|
|
130 |
dosed "s:/usr/local/bin/perl:/usr/bin/perl:g" ${S}/Doxyfile.man |
131 |
dosed "s:$(INST_DOCS)/gdal:$(INST_DOCS)/html:g" GNUmakefile |
132 |
dodoc Doxyfile.man Doxyfile HOWTO-RELEASE NEWS |
115 |
dodoc Doxyfile.man Doxyfile HOWTO-RELEASE NEWS |
133 |
if useq doc ; then |
116 |
if useq doc ; then |
134 |
dohtml html/*.* || die "install html failed" |
117 |
dohtml html/*.* || die "install html failed" |