2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, perl, libtool, pkg-config, gettext, mandoc, ed }:
|
2016-09-05 22:28:42 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "bsdbuild";
|
2016-09-05 22:28:42 +01:00
|
|
|
version = "3.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "http://stable.hypertriton.com/bsdbuild/${pname}-${version}.tar.gz";
|
2016-09-05 22:28:42 +01:00
|
|
|
sha256 = "1zrdjh7a6z4khhfw9zrp490afq306cpl5v8wqz2z55ys7k1n5ifl";
|
|
|
|
};
|
|
|
|
|
2016-09-15 01:32:08 +01:00
|
|
|
buildInputs = [ perl mandoc ed ];
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config libtool gettext ];
|
2016-09-05 22:28:42 +01:00
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
#ignore unfamiliar flags
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace '--sbindir=*' '--sbindir=* | --includedir=* | --oldincludedir=*'
|
|
|
|
#same for packages using bsdbuild
|
|
|
|
substituteInPlace mkconfigure.pl \
|
|
|
|
--replace '--sbindir=*' '--sbindir=* | --includedir=* | --oldincludedir=*'
|
|
|
|
#insert header for missing NULL macro
|
|
|
|
for f in db4.pm sdl_ttf.pm mysql.pm uim.pm strlcpy.pm getpwuid.pm \
|
|
|
|
getaddrinfo.pm strtoll.pm free_null.pm getpwnam_r.pm \
|
|
|
|
gettimeofday.pm gethostbyname.pm xinerama.pm strsep.pm \
|
|
|
|
fontconfig.pm gettext.pm pthreads.pm strlcat.pm kqueue.pm wgl.pm \
|
|
|
|
alsa.pm crypt.pm cracklib.pm freesg-rg.pm edacious.pm mmap.pm \
|
|
|
|
agar.pm x11.pm x11.pm execvp.pm agar-core.pm dyld.pm getopt.pm \
|
|
|
|
strtold.pm sdl_image.pm shl_load.pm glx.pm percgi.pm timerfd.pm \
|
|
|
|
glob.pm dlopen.pm freesg.pm csidl.pm perl.pm select.pm \
|
|
|
|
portaudio.pm etubestore.pm;
|
|
|
|
do
|
|
|
|
ed -s -v BSDBuild/$f << EOF
|
|
|
|
/#include
|
|
|
|
i
|
|
|
|
#include <stddef.h>
|
|
|
|
.
|
|
|
|
w
|
|
|
|
EOF
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-libtool=${libtool}/bin/libtool"
|
|
|
|
"--enable-nls=yes"
|
|
|
|
"--with-gettext=${gettext}"
|
|
|
|
"--with-manpages=yes"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://bsdbuild.hypertriton.com";
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "A cross-platform build system";
|
2016-09-05 22:28:42 +01:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
BSDBuild is a cross-platform build system. Derived from the
|
|
|
|
traditional 4.4BSD make libraries, BSDBuild allows BSD-style
|
|
|
|
Makefiles (without BSD make extensions), and works natively
|
|
|
|
under most operating systems and make flavors. Since BSDBuild
|
|
|
|
is implemented as a library (as opposed to a macro package),
|
|
|
|
Makefiles are edited directly, as opposed to being compiled
|
|
|
|
(however, if the build directory is separate from the source
|
|
|
|
directory, BSDBuild will produce the required Makefiles in place).
|
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
platforms = lib.platforms.linux;
|
2016-09-05 22:28:42 +01:00
|
|
|
};
|
|
|
|
}
|