2016-07-27 18:34:26 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, libtool
|
|
|
|
, xlibsWrapper, xbitmaps, libXrender, libXmu, libXt
|
|
|
|
, expat, libjpeg, libpng, libiconv
|
|
|
|
, flex
|
|
|
|
, libXp, libXau
|
2017-08-20 08:01:11 +01:00
|
|
|
, demoSupport ? false
|
2016-07-27 18:34:26 +01:00
|
|
|
}:
|
|
|
|
# refer to the gentoo package
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "motif";
|
2016-07-27 18:34:26 +01:00
|
|
|
version = "2.3.6";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "mirror://sourceforge/motif/${pname}-${version}.tar.gz";
|
2016-07-27 18:34:26 +01:00
|
|
|
sha256 = "1ksqbp0bzdw6wcrx8s4hj4ivvxmw54hz85l2xfigb87cxmmhx0gs";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2016-07-30 11:42:36 +01:00
|
|
|
libtool
|
2016-07-27 18:34:26 +01:00
|
|
|
xlibsWrapper xbitmaps libXrender libXmu libXt
|
|
|
|
expat libjpeg libpng libiconv
|
2016-07-30 11:42:36 +01:00
|
|
|
];
|
2016-07-27 18:34:26 +01:00
|
|
|
|
2017-08-20 08:01:11 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig flex ];
|
2016-07-27 18:34:26 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ libXp libXau ];
|
|
|
|
|
2016-08-02 16:04:52 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2016-07-27 18:34:26 +01:00
|
|
|
makeFlags = [ "CFLAGS=-fno-strict-aliasing" ];
|
|
|
|
|
2017-08-20 08:01:11 +01:00
|
|
|
prePatch = ''
|
|
|
|
rm lib/Xm/Xm.h
|
|
|
|
'' + stdenv.lib.optionalString (!demoSupport) ''
|
|
|
|
sed '/^SUBDIRS =,^$/s/\<demos\>//' -i Makefile.{am,in}
|
|
|
|
'';
|
2016-07-30 11:42:36 +01:00
|
|
|
|
|
|
|
patches = [ ./Remove-unsupported-weak-refs-on-darwin.patch
|
|
|
|
./Use-correct-header-for-malloc.patch
|
|
|
|
./Add-X.Org-to-bindings-file.patch
|
2017-08-20 08:01:11 +01:00
|
|
|
];
|
2016-07-27 18:34:26 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2019-04-15 00:25:45 +01:00
|
|
|
homepage = https://motif.ics.com;
|
2016-07-27 18:34:26 +01:00
|
|
|
description = "Unix standard widget-toolkit and window-manager";
|
2016-07-30 11:42:36 +01:00
|
|
|
platforms = with platforms; linux ++ darwin;
|
2016-07-27 18:34:26 +01:00
|
|
|
license = with licenses; [ lgpl21 ];
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|