summary refs log tree commit diff
path: root/pkgs/development/tools/misc/bsdbuild
diff options
context:
space:
mode:
authorRam Kromberg <ramkromberg@mail.com>2016-09-06 00:28:42 +0300
committerFranz Pletz <fpletz@fnordicwalking.de>2016-09-05 23:28:42 +0200
commitccd5c6e47cd5c29a2b7dccf36dafda7b769c2f32 (patch)
tree4693241e4a989671b9b055dbf46203df9f7510b2 /pkgs/development/tools/misc/bsdbuild
parent875c286ba39a93b36274bb8ccecdd33a5af83b00 (diff)
downloadnixpkgs-ccd5c6e47cd5c29a2b7dccf36dafda7b769c2f32.tar
nixpkgs-ccd5c6e47cd5c29a2b7dccf36dafda7b769c2f32.tar.gz
nixpkgs-ccd5c6e47cd5c29a2b7dccf36dafda7b769c2f32.tar.bz2
nixpkgs-ccd5c6e47cd5c29a2b7dccf36dafda7b769c2f32.tar.lz
nixpkgs-ccd5c6e47cd5c29a2b7dccf36dafda7b769c2f32.tar.xz
nixpkgs-ccd5c6e47cd5c29a2b7dccf36dafda7b769c2f32.tar.zst
nixpkgs-ccd5c6e47cd5c29a2b7dccf36dafda7b769c2f32.zip
bsdbuild: init at 3.1 (#18069)
Diffstat (limited to 'pkgs/development/tools/misc/bsdbuild')
-rw-r--r--pkgs/development/tools/misc/bsdbuild/default.nix68
1 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/bsdbuild/default.nix b/pkgs/development/tools/misc/bsdbuild/default.nix
new file mode 100644
index 00000000000..0fd9f143ce9
--- /dev/null
+++ b/pkgs/development/tools/misc/bsdbuild/default.nix
@@ -0,0 +1,68 @@
+{ stdenv, fetchurl, perl, libtool, pkgconfig, gettext, groff, ed }:
+
+stdenv.mkDerivation rec {
+  name = "bsdbuild-${version}";
+  version = "3.1";
+
+  src = fetchurl {
+    url = "http://stable.hypertriton.com/bsdbuild/${name}.tar.gz";
+    sha256 = "1zrdjh7a6z4khhfw9zrp490afq306cpl5v8wqz2z55ys7k1n5ifl";
+  };
+
+  buildInputs = [ perl groff ed ];
+  nativeBuildInputs = [ pkgconfig libtool gettext ];
+
+  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 = {
+    homepage = http://bsdbuild.hypertriton.com;
+    description = "A cross-platform build system.";
+
+    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).
+    '';
+
+    license = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}