2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-08-20 17:08:02 +00:00
|
|
|
, fetchurl
|
2020-09-25 04:45:31 +00:00
|
|
|
, qmake
|
2020-08-20 17:08:02 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-10-11 16:52:03 +00:00
|
|
|
version = "3.26.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "dxflib";
|
|
|
|
src = fetchurl {
|
2021-10-11 16:52:03 +00:00
|
|
|
url = "https://qcad.org/archives/dxflib/${pname}-${version}-src.tar.gz";
|
|
|
|
sha256 = "0pwic33mj6bp4axai5jiyn4xqf31y0xmb1i0pcf55b2h9fav8zah";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
nativeBuildInputs = [
|
2020-09-25 04:45:31 +00:00
|
|
|
qmake
|
2020-08-20 17:08:02 +00:00
|
|
|
];
|
2021-02-19 19:06:45 +00:00
|
|
|
dontWrapQtApps = true;
|
2020-08-20 17:08:02 +00: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-02-05 17:12:51 +00:00
|
|
|
# Generate pkg-config file
|
2020-08-20 17:08:02 +00: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;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
2021-10-11 16:52:03 +00:00
|
|
|
homepage = "https://qcad.org/en/90-dxflib";
|
2021-02-05 17:12:51 +00:00
|
|
|
maintainers = with lib.maintainers; [raskin];
|
|
|
|
platforms = lib.platforms.linux;
|
2021-01-17 00:15:33 +00:00
|
|
|
description = "DXF file format library";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|