1 { lib, stdenv, fetchurl, perl, libtool, pkg-config, gettext, mandoc, ed }:
3 stdenv.mkDerivation rec {
8 url = "http://stable.hypertriton.com/bsdbuild/${pname}-${version}.tar.gz";
9 sha256 = "1zrdjh7a6z4khhfw9zrp490afq306cpl5v8wqz2z55ys7k1n5ifl";
12 buildInputs = [ perl mandoc ed ];
13 nativeBuildInputs = [ pkg-config libtool gettext ];
16 #ignore unfamiliar flags
17 substituteInPlace configure \
18 --replace '--sbindir=*' '--sbindir=* | --includedir=* | --oldincludedir=*'
19 #same for packages using bsdbuild
20 substituteInPlace mkconfigure.pl \
21 --replace '--sbindir=*' '--sbindir=* | --includedir=* | --oldincludedir=*'
22 #insert header for missing NULL macro
23 for f in db4.pm sdl_ttf.pm mysql.pm uim.pm strlcpy.pm getpwuid.pm \
24 getaddrinfo.pm strtoll.pm free_null.pm getpwnam_r.pm \
25 gettimeofday.pm gethostbyname.pm xinerama.pm strsep.pm \
26 fontconfig.pm gettext.pm pthreads.pm strlcat.pm kqueue.pm wgl.pm \
27 alsa.pm crypt.pm cracklib.pm freesg-rg.pm edacious.pm mmap.pm \
28 agar.pm x11.pm x11.pm execvp.pm agar-core.pm dyld.pm getopt.pm \
29 strtold.pm sdl_image.pm shl_load.pm glx.pm percgi.pm timerfd.pm \
30 glob.pm dlopen.pm freesg.pm csidl.pm perl.pm select.pm \
31 portaudio.pm etubestore.pm;
33 ed -s -v BSDBuild/$f << EOF
44 "--with-libtool=${libtool}/bin/libtool"
46 "--with-gettext=${gettext}"
51 homepage = "http://bsdbuild.hypertriton.com";
52 description = "Cross-platform build system";
55 BSDBuild is a cross-platform build system. Derived from the
56 traditional 4.4BSD make libraries, BSDBuild allows BSD-style
57 Makefiles (without BSD make extensions), and works natively
58 under most operating systems and make flavors. Since BSDBuild
59 is implemented as a library (as opposed to a macro package),
60 Makefiles are edited directly, as opposed to being compiled
61 (however, if the build directory is separate from the source
62 directory, BSDBuild will produce the required Makefiles in place).
65 license = lib.licenses.bsd3;
66 platforms = lib.platforms.linux;