2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2020-08-03 20:21:14 +01:00
|
|
|
, fetchurl
|
2020-09-07 17:20:28 +01:00
|
|
|
, qmake
|
2020-08-03 20:21:14 +01:00
|
|
|
}:
|
2012-08-27 12:17:02 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-08-03 20:21:14 +01:00
|
|
|
version = "3.17.0";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "dxflib";
|
2012-08-27 12:17:02 +01:00
|
|
|
src = fetchurl {
|
2020-08-03 20:21:14 +01:00
|
|
|
url = "http://www.qcad.org/archives/dxflib/${pname}-${version}-src.tar.gz";
|
|
|
|
sha256 = "09yjgzh8677pzkkr7a59pql5d11451c22pxksk2my30mapxsri96";
|
2012-08-27 12:17:02 +01:00
|
|
|
};
|
2020-08-03 20:21:14 +01:00
|
|
|
nativeBuildInputs = [
|
2020-09-07 17:20:28 +01:00
|
|
|
qmake
|
2020-08-03 20:21:14 +01:00
|
|
|
];
|
2021-01-12 11:50:23 +00:00
|
|
|
dontWrapQtApps = true;
|
2020-08-03 20:21:14 +01:00
|
|
|
preConfigure = ''
|
|
|
|
sed -i 's/CONFIG += staticlib/CONFIG += shared/' dxflib.pro
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
install -d -m 0755 $out/lib
|
|
|
|
cp -pr *.so* $out/lib
|
|
|
|
install -d -m 0755 $out/include/dxflib
|
|
|
|
cp -pr src/*.h $out/include/dxflib
|
2021-01-19 06:50:56 +00:00
|
|
|
# Generate pkg-config file
|
2020-08-03 20:21:14 +01:00
|
|
|
install -d -m 0755 $out/lib/pkgconfig
|
|
|
|
cat << 'EOF' > $out/lib/pkgconfig/dxflib.pc
|
|
|
|
prefix=${placeholder "out"}
|
|
|
|
libdir=${placeholder "out"}/lib
|
|
|
|
includedir=${placeholder "out"}/include
|
|
|
|
Name: dxflib
|
|
|
|
Description: A C++ library for reading and writing DXF files
|
|
|
|
Version: %{version}
|
|
|
|
Libs: -L${placeholder "out"}/lib -ldxflib
|
|
|
|
Cflags: -I${placeholder "out"}/include/dxflib
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
doCheck = true;
|
2012-08-27 12:17:02 +01:00
|
|
|
|
|
|
|
meta = {
|
2021-01-21 17:00:13 +00:00
|
|
|
maintainers = with lib.maintainers; [raskin];
|
|
|
|
platforms = lib.platforms.linux;
|
2021-01-16 04:20:42 +00:00
|
|
|
description = "DXF file format library";
|
2012-08-27 12:17:02 +01:00
|
|
|
};
|
|
|
|
}
|