Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 105760 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 105760