tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
gdal: unbreak the python lib
Charles Strahan
11 years ago
1645795c
165456bb
+35
-1
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
gdal
default.nix
python.patch
+18
-1
pkgs/development/libraries/gdal/default.nix
···
13
14
buildInputs = [ unzip libjpeg libtiff libpng python pythonPackages.numpy proj openssl ];
15
0
0
0
0
0
0
16
# Don't use optimization for gcc >= 4.3. That's said to be causing segfaults.
17
# Unset CC and CXX as they confuse libtool.
18
preConfigure = "export CFLAGS=-O0 CXXFLAGS=-O0; unset CC CXX";
···
31
"--with-geos=${geos}/bin/geos-config"# optional
32
];
33
0
0
0
0
0
0
0
0
0
0
0
0
34
meta = {
35
description = "Translator library for raster geospatial data formats";
36
homepage = http://www.gdal.org/;
37
license = stdenv.lib.licenses.mit;
38
maintainers = [ stdenv.lib.maintainers.marcweber ];
39
platforms = stdenv.lib.platforms.linux;
40
-
broken = true; # http://hydra.nixos.org/build/21344907/nixlog/1/raw
41
};
42
})
···
13
14
buildInputs = [ unzip libjpeg libtiff libpng python pythonPackages.numpy proj openssl ];
15
16
+
patches = [
17
+
# This ensures that the python package is installed into gdal's prefix,
18
+
# rather than trying to install into python's prefix.
19
+
./python.patch
20
+
];
21
+
22
# Don't use optimization for gcc >= 4.3. That's said to be causing segfaults.
23
# Unset CC and CXX as they confuse libtool.
24
preConfigure = "export CFLAGS=-O0 CXXFLAGS=-O0; unset CC CXX";
···
37
"--with-geos=${geos}/bin/geos-config"# optional
38
];
39
40
+
# Prevent this:
41
+
#
42
+
# Checking .pth file support in /nix/store/xkrmb8xnvqxzjwsdmasqmsdh1a5y2y99-gdal-1.11.2/lib/python2.7/site-packages/
43
+
# /nix/store/pbi1lgank10fy0xpjckbdpgacqw34dsz-python-2.7.9/bin/python -E -c pass
44
+
# TEST FAILED: /nix/store/xkrmb8xnvqxzjwsdmasqmsdh1a5y2y99-gdal-1.11.2/lib/python2.7/site-packages/ does NOT support .pth files
45
+
# error: bad install directory or PYTHONPATH
46
+
preBuild = ''
47
+
pythonInstallDir=$out/lib/${python.libPrefix}/site-packages
48
+
mkdir -p $pythonInstallDir
49
+
export PYTHONPATH=''${PYTHONPATH:+''${PYTHONPATH}:}$pythonInstallDir
50
+
'';
51
+
52
meta = {
53
description = "Translator library for raster geospatial data formats";
54
homepage = http://www.gdal.org/;
55
license = stdenv.lib.licenses.mit;
56
maintainers = [ stdenv.lib.maintainers.marcweber ];
57
platforms = stdenv.lib.platforms.linux;
0
58
};
59
})
+17
pkgs/development/libraries/gdal/python.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
diff --git a/swig/python/GNUmakefile.old b/swig/python/GNUmakefile
2
+
index b4d5e90..2160b83 100644
3
+
--- a/swig/python/GNUmakefile
4
+
+++ b/swig/python/GNUmakefile
5
+
@@ -67,11 +67,7 @@ egg:
6
+
7
+
install:
8
+
9
+
-ifeq ($(PY_HAVE_SETUPTOOLS),1)
10
+
- $(PYTHON) setup.py install
11
+
-else
12
+
$(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
13
+
-endif
14
+
15
+
for f in $(SCRIPTS) ; do $(INSTALL) ./scripts/$$f $(DESTDIR)$(INST_BIN) ; done
16
+
17
+