--- gdal-1.2.5.ebuild 2004-12-01 13:14:53.700642064 -0600 +++ gdal-1.2.5.ebuild.fixed 2004-12-01 13:20:00.133057256 -0600 @@ -29,12 +29,12 @@ jasper? ( media-libs/jasper ) odbc? ( dev-db/unixODBC ) sqlite? ( dev-db/sqlite ) - hdf4? ( dev-libs/hdf )" - -# DEPEND=${DEPEND}"netcdf? ( app-sci/netcdf )" + hdf4? ( dev-libs/hdf ) + netcdf? ( app-sci/netcdf )" src_compile() { MYCONF=" --prefix=${D}/usr " + # Python always wants to go directly to /usr/lib not sandbox if use python; then python_version @@ -47,12 +47,17 @@ else MYCONF="${MYCONF} --with-cfitsio=no " fi -# Netcdf currently breaks build -# if use netcdf; then -# MYCONF="${MYCONF} --with-netcdf=/usr " -# else - MYCONF="${MYCONF} --with-netcdf=no " -# fi + +# Netcdf has symbol collisions with HDF4 -- can't use both + if use netcdf; then + MYCONF="${MYCONF} --with-netcdf=/usr --with-hdf4=no " + else + if use hdf4; then + MYCONF="${MYCONF} --with-netcdf=no --with-hdf4=yes " + else + MYCONF="${MYCONF} --with-netcdf=no --with-hdf4=no " + fi + fi if use png; then MYCONF="${MYCONF} --with-png=/usr/lib " else @@ -61,12 +66,12 @@ if use tiff; then MYCONF="${MYCONF} --with-libtiff=/usr/lib " else - MYCONF="${MYCONF} --with-libtiff=no " + MYCONF="${MYCONF} --with-libtiff=internal " fi if use geotiff; then MYCONF="${MYCONF} --with-geotiff=/usr/lib " else - MYCONF="${MYCONF} --with-geotiff=no " + MYCONF="${MYCONF} --with-geotiff=internal " fi if use jpeg; then MYCONF="${MYCONF} --with-jpeg=/usr/lib " @@ -83,11 +88,6 @@ else MYCONF="${MYCONF} --with-ogdi=no " fi - if use hdf4; then - MYCONF="${MYCONF} --with-hdf4=yes " - else - MYCONF="${MYCONF} --with-hdf4=no " - fi if use jasper; then MYCONF="${MYCONF} --with-jasper=/usr/lib " else @@ -118,15 +118,15 @@ else MYCONF="${MYCONF} --with-geos=no " fi - echo ${MYCONF} - ./configure ${MYCONF} || die "Error: econf failed!" + ./configure ${MYCONF} || die "Error: configure failed!" emake -j1 || die "Error: emake failed!" } src_install() { - make install \ - || die "Error: make install failed!" + einstall || die "Error: einstall failed!" + # TNX to "acrux" sed -i "s|${D}/usr|/usr|g" ${D}/usr/bin/gdal-config \ || die "Error: failed to clean-up gdal-config" + dodoc ChangeLog NEWS VERSION }