gnustep: add setup hook for make

Adding a setup-hook for gnustep-make.
This commit is contained in:
Artyom Shalkhakov 2014-12-10 22:28:55 +06:00 committed by Matthew Bauer
parent 4cbeef463c
commit ea3dcb3264
11 changed files with 238 additions and 80 deletions

View File

@ -1,17 +1,18 @@
{ buildEnv
, stdenv, fetchurl, gnustep_builder, gnustep_base, gnustep_back, gnustep_gui
{ stdenv, fetchurl, gnustep_base, gnustep_back, gnustep_make, gnustep_gui
}:
let
version = "1.2.18";
in
gnustep_builder.mkDerivation rec {
stdenv.mkDerivation rec {
name = "gorm-${version}";
src = fetchurl {
url = "ftp://ftp.gnustep.org/pub/gnustep/dev-apps/gorm-${version}.tar.gz";
sha256 = "1vpzvmsnynlq5dv6rw9vbk1zzsim6z7b2kprrlm8dknyq0r1sdrq";
};
deps = [ gnustep_base gnustep_back gnustep_gui ];
patches = [ ./fix-gs-makefiles.patch ];
buildInputs = [ gnustep_make gnustep_base gnustep_back gnustep_gui ];
propagatedBuildInputs = [ gnustep_base gnustep_back gnustep_gui ];
meta = {
description = "Gorm stands for Graphical Object Relationship Modeller and is an easy-to-use interface designer for GNUstep";
@ -21,7 +22,6 @@ gnustep_builder.mkDerivation rec {
license = stdenv.lib.licenses.lgpl2Plus;
maintainers = with stdenv.lib.maintainers; [ ashalkhakov ];
platforms = stdenv.lib.platforms.all;
broken = true;
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -0,0 +1,28 @@
diff -ru gorm-1.2.20/GNUmakefile gorm-1.2.20.patched/GNUmakefile
--- gorm-1.2.20/GNUmakefile 2010-05-30 12:55:26.000000000 +0600
+++ gorm-1.2.20.patched/GNUmakefile 2014-12-10 22:21:18.000000000 +0600
@@ -24,6 +24,23 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+ifeq ($(GNUSTEP_MAKEFILES),)
+ GNUSTEP_MAKEFILES := $(shell gnustep-config --variable=GNUSTEP_MAKEFILES 2>/dev/null)
+ ifeq ($(GNUSTEP_MAKEFILES),)
+ $(warning )
+ $(warning Unable to obtain GNUSTEP_MAKEFILES setting from gnustep-config!)
+ $(warning Perhaps gnustep-make is not properly installed,)
+ $(warning so gnustep-config is not in your PATH.)
+ $(warning )
+ $(warning Your PATH is currently $(PATH))
+ $(warning )
+ endif
+endif
+
+ifeq ($(GNUSTEP_MAKEFILES),)
+ $(error You need to set GNUSTEP_MAKEFILES before compiling!)
+endif
+
PACKAGE_NAME = gorm
export PACKAGE_NAME
include $(GNUSTEP_MAKEFILES)/common.make
Only in gorm-1.2.20.patched/: GNUmakefile~

View File

@ -1,20 +1,18 @@
{ buildEnv
, stdenv, fetchurl
, gnustep_builder
, gnustep_base, gnustep_back, gnustep_gui
{ stdenv, fetchurl
, gnustep_base, gnustep_back, gnustep_make, gnustep_gui
}:
let
version = "0.6.2";
in
gnustep_builder.mkDerivation rec {
stdenv.mkDerivation rec {
name = "projectcenter-${version}";
src = fetchurl {
url = "ftp://ftp.gnustep.org/pub/gnustep/dev-apps/ProjectCenter-${version}.tar.gz";
sha256 = "0wwlbpqf541apw192jb633d634zkpjhcrrkd1j80y9hihphll465";
};
# patches = [ ./fixup-preamble.patch ];
deps = [ gnustep_base gnustep_back gnustep_gui ];
buildInputs = [ gnustep_make gnustep_base gnustep_back gnustep_gui ];
propagatedBuildInputs = [ gnustep_base gnustep_back gnustep_gui ];
meta = {
description = "ProjectCenter is GNUstep's integrated development environment (IDE) and allows a rapid development and easy managment of ProjectCenter running on GNUstep applications, tools and frameworks.";
@ -24,7 +22,6 @@ gnustep_builder.mkDerivation rec {
license = stdenv.lib.licenses.lgpl2Plus;
maintainers = with stdenv.lib.maintainers; [ ashalkhakov ];
platforms = stdenv.lib.platforms.all;
broken = true;
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -2,8 +2,7 @@
, cairo
, clang
, fetchurl
, gnustep_base, gnustep_gui
, gnustep_builder
, gnustep_base, gnustep_make, gnustep_gui
, xlibs
, x11
, freetype
@ -13,14 +12,13 @@
let
version = "0.24.0";
in
gnustep_builder.mkDerivation rec {
stdenv.mkDerivation rec {
name = "gnustep-back-${version}";
src = fetchurl {
url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-back-0.24.0.tar.gz";
sha256 = "0qixbilkkrqxrhhj9hnp7ygd5gs23b3qbbgk3gaxj73d0xqfvhjz";
};
buildInputs = [ cairo clang freetype pkgconfig x11 ];
deps = [ gnustep_base gnustep_gui ];
buildInputs = [ cairo clang gnustep_base gnustep_gui gnustep_make freetype pkgconfig x11 ];
meta = {
description = "GNUstep-back is a generic backend for GNUstep.";

View File

@ -1,5 +1,5 @@
{ aspell, audiofile
, gnustep_builder
, gnustep_make
, clang, cups
, fetchurl
, gmp, gnutls
@ -15,7 +15,7 @@
let
version = "1.24.7";
in
gnustep_builder.mkDerivation {
stdenv.mkDerivation {
name = "gnustep-base-${version}";
src = fetchurl {
url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-base-1.24.7.tar.gz";
@ -24,7 +24,7 @@ gnustep_builder.mkDerivation {
buildInputs = [
aspell audiofile
clang cups
gmp gnutls
gmp gnustep_make gnutls
libffi
libjpeg libtiff libpng giflib libungif
libxml2 libxslt libiconv

View File

@ -1,22 +1,22 @@
{
clang
, fetchurl
, gnustep_make
, gnustep_base
, gnustep_builder
#, xlibs, x11, freetype
#, pkgconfig
, stdenv }:
let
version = "0.24.0";
in
gnustep_builder.mkDerivation rec {
stdenv.mkDerivation rec {
name = "gnustep-gui-${version}";
src = fetchurl {
url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-gui-0.24.0.tar.gz";
sha256 = "0d6jzfcyacxjzrr2p398ysvs1akv1fcmngfzxxbfxa947miydjxg";
};
buildInputs = [ clang ];
deps = [ gnustep_base ];
buildInputs = [ clang gnustep_make gnustep_base ];
propagatedBuildInputs = [ gnustep_base ];
patches = [ ./fixup-gui-makefile-installdir.patch ./fixup-gui-tools-preamble.patch ./fixup-gui-textconverters-preamble.patch ];
meta = {
description = "GNUstep-gui is a GUI class library of GNUstep.";

View File

@ -1,47 +0,0 @@
{ stdenv, gnustep_make, buildEnv}:
with stdenv.lib;
{
mkDerivation =
args @ { name, src, deps ? [], buildInputs ? [], propagatedBuildInputs ? [], ... }:
let
GNUSTEP_env =
# buildEnv fails if there is only one path to symlink
if deps == null || length deps < 1 then gnustep_make
else buildEnv {
name = "gnustep-env-for-${name}";
paths = [ gnustep_make ] ++ deps;
pathsToLink = [ "/bin" "/sbin" "/lib" "/include" "/share" ];
};
in
stdenv.mkDerivation (args // {
GNUSTEP_conf = gnustep_make.gnustepConfigTemplate;
inherit GNUSTEP_env;
GNUSTEP_MAKEFILES = "${GNUSTEP_env}/share/GNUstep/Makefiles";
GNUSTEP_INSTALLATION_DOMAIN = "SYSTEM";
buildInputs = buildInputs ++ deps ++ [ gnustep_make ];
propagatedBuildInputs = propagatedBuildInputs ++ deps;
preConfigure = ''
cp $GNUSTEP_conf $(pwd)/GNUstep-build.conf
substituteInPlace $(pwd)/GNUstep-build.conf \
--subst-var-by gnustepMakefiles $GNUSTEP_MAKEFILES \
--subst-var-by systemApps "$GNUSTEP_env/lib/GNUstep/Applications" \
--subst-var-by systemAdminApps "$GNUSTEP_env/lib/GNUstep/Applications" \
--subst-var-by systemWebApps "$GNUSTEP_env/lib/GNUstep/WebApplications" \
--subst-var-by systemTools "$GNUSTEP_env/bin" \
--subst-var-by systemAdminTools "$GNUSTEP_env/sbin" \
--subst-var-by systemLibrary "$GNUSTEP_env/lib" \
--subst-var-by systemHeaders "$GNUSTEP_env/include" \
--subst-var-by systemLibraries "$GNUSTEP_env/lib" \
--subst-var-by systemDoc "$GNUSTEP_env/share/GNUstep/Documentation" \
--subst-var-by systemDocMan "$GNUSTEP_env/share/man" \
--subst-var-by systemDocInfo "$GNUSTEP_env/share/info"
export GNUSTEP_CONFIG_FILE=$(pwd)/GNUstep-build.conf
. $GNUSTEP_MAKEFILES/GNUstep.sh
'';
buildFlags = "GNUSTEP_MAKEFILES=${GNUSTEP_env}/share/GNUstep/Makefiles";
configureFlags = "GNUSTEP_MAKEFILES=${GNUSTEP_env}/share/GNUstep/Makefiles";
installFlags = "GNUSTEP_SYSTEM_APPS=\${out}/lib/GNUstep/Applications GNUSTEP_SYSTEM_ADMIN_APPS=\${out}/lib/GNUstep/Applications GNUSTEP_SYSTEM_WEB_APPS=\${out}/lib/GNUstep/WebApplications GNUSTEP_SYSTEM_TOOLS=\${out}/bin GNUSTEP_SYSTEM_ADMIN_TOOLS=\${out}/sbin GNUSTEP_SYSTEM_LIBRARY=\${out}/lib GNUSTEP_SYSTEM_HEADERS=\${out}/include GNUSTEP_SYSTEM_LIBRARIES=\${out}/lib GNUSTEP_SYSTEM_DOC=\${out}/share/GNUstep/Documentation GNUSTEP_SYSTEM_DOC_MAN=\${out}/share/man GNUSTEP_SYSTEM_DOC_INFO=\${out}/share/info GNUSTEP_SYSTEM_LIBRARIES=\${out}/lib GNUSTEP_HEADERS=\${out}/include DESTDIR_GNUSTEP_MAKEFILES=\${out}/share/GNUstep/Makefiles";
});
}

View File

@ -10,7 +10,8 @@ stdenv.mkDerivation rec {
};
configureFlags = "--with-installation-domain=SYSTEM";
buildInputs = [ clang which libobjc2 ];
gnustepConfigTemplate = ./GNUstep.conf;
patches = [ ./gs-makefiles-additional.patch ];
setupHook = ./setup-hook.sh;
meta = {
description = "GNUstep-make is a build manager for GNUstep.";

View File

@ -0,0 +1,154 @@
diff -ru gnustep-make-2.6.6/common.make gnustep-make-2.6.6.patched/common.make
--- gnustep-make-2.6.6/common.make 2013-03-04 17:21:55.000000000 +0600
+++ gnustep-make-2.6.6.patched/common.make 2014-12-09 21:29:10.000000000 +0600
@@ -135,7 +135,9 @@
endif
# Then include makefiles with flags/config options installed by the
# libraries themselves
--include $(GNUSTEP_MAKEFILES)/Additional/*.make
+ifneq ($(NIX_GNUSTEP_MAKEFILES_ADDITIONAL),)
+-include $(NIX_GNUSTEP_MAKEFILES_ADDITIONAL)
+endif
#
# Determine target specific settings
Only in gnustep-make-2.6.6.patched/: common.make~
Only in gnustep-make-2.6.6.patched/: configure.ac~
diff -ru gnustep-make-2.6.6/GNUmakefile.in gnustep-make-2.6.6.patched/GNUmakefile.in
--- gnustep-make-2.6.6/GNUmakefile.in 2013-09-20 12:13:15.000000000 +0600
+++ gnustep-make-2.6.6.patched/GNUmakefile.in 2014-12-07 20:35:27.000000000 +0600
@@ -173,7 +173,6 @@
"$(makedir)/$(GNUSTEP_TARGET_CPU)" \
"$(makedir)/$(GNUSTEP_TARGET_DIR)" \
"$(makedir)/$(GNUSTEP_TARGET_LDIR)" \
- "$(makedir)/Additional" \
"$(makedir)/Auxiliary" \
"$(makedir)/Master" \
"$(makedir)/Instance" \
@@ -314,7 +313,6 @@
-rmdir "$(makedir)/Instance"
-rmdir "$(makedir)/Master"
-rmdir "$(makedir)/Auxiliary"
- -rmdir "$(makedir)/Additional"
-rmdir "$(makedir)/$(GNUSTEP_TARGET_LDIR)"
-rmdir "$(makedir)/$(GNUSTEP_TARGET_DIR)"
-rmdir "$(makedir)/$(GNUSTEP_TARGET_CPU)"
diff -ru gnustep-make-2.6.6/gnustep-config.in gnustep-make-2.6.6.patched/gnustep-config.in
--- gnustep-make-2.6.6/gnustep-config.in 2013-07-02 16:06:24.000000000 +0600
+++ gnustep-make-2.6.6.patched/gnustep-config.in 2014-12-09 21:29:49.000000000 +0600
@@ -66,6 +66,7 @@
echo " --variable=OBJCXX"
echo " --variable=GNUMAKE"
echo " --variable=GNUSTEP_MAKEFILES"
+ echo " --variable=NIX_GNUSTEP_MAKEFILES_ADDITIONAL"
echo " --variable=GNUSTEP_USER_DEFAULTS_DIR"
echo " --variable=GNUSTEP_HOST"
echo " --variable=GNUSTEP_HOST_CPU"
@@ -153,6 +154,8 @@
export GNUSTEP_MAKEFILES
+export NIX_GNUSTEP_MAKEFILES_ADDITIONAL
+
#
# If all they want to know if GNUSTEP_MAKEFILES or anything that
# we can compute only using GNUSTEP_MAKEFILES, we can print it out
@@ -168,6 +171,8 @@
exit 0;;
--variable=GNUSTEP_MAKEFILES) echo "$GNUSTEP_MAKEFILES"
exit 0;;
+ --variable=NIX_GNUSTEP_MAKEFILES_ADDITIONAL) echo "$NIX_GNUSTEP_MAKEFILES_ADDITIONAL"
+ exit 0;;
--variable=GNUMAKE) echo "@GNUMAKE@"
exit 0;;
--debug-flags) @GNUMAKE@ -s -f "$GNUSTEP_MAKEFILES/empty.make" print-gnustep-make-objc-flags quiet=yes debug=yes 2>/dev/null
Only in gnustep-make-2.6.6.patched/: gnustep-config.in~
diff -ru gnustep-make-2.6.6/GNUstep.csh.in gnustep-make-2.6.6.patched/GNUstep.csh.in
--- gnustep-make-2.6.6/GNUstep.csh.in 2011-05-03 13:40:10.000000000 +0600
+++ gnustep-make-2.6.6.patched/GNUstep.csh.in 2014-12-09 20:14:05.000000000 +0600
@@ -130,6 +130,10 @@
setenv GNUSTEP_MAKEFILES "@GNUSTEP_MAKEFILES@"
endif
+if ( ! ${?NIX_GNUSTEP_MAKEFILES_ADDITIONAL} ) then
+ setenv NIX_GNUSTEP_MAKEFILES_ADDITIONAL "@NIX_GNUSTEP_MAKEFILES_ADDITIONAL@"
+endif
+
if ( "${GNUSTEP_MAKE_STRICT_V2_MODE}" == "yes" ) then
unsetenv GNUSTEP_USER_DIR
unsetenv GNUSTEP_USER_ROOT
Only in gnustep-make-2.6.6.patched/: GNUstep.csh.in~
diff -ru gnustep-make-2.6.6/GNUstep.sh.in gnustep-make-2.6.6.patched/GNUstep.sh.in
--- gnustep-make-2.6.6/GNUstep.sh.in 2012-02-21 20:21:38.000000000 +0600
+++ gnustep-make-2.6.6.patched/GNUstep.sh.in 2014-12-09 20:14:19.000000000 +0600
@@ -173,6 +173,10 @@
fi
export GNUSTEP_MAKEFILES
+if [ -z "$NIX_GNUSTEP_MAKEFILES_ADDITIONAL" ]; then
+ NIX_GNUSTEP_MAKEFILES_ADDITIONAL=@NIX_GNUSTEP_MAKEFILES_ADDITIONAL@
+fi
+export NIX_GNUSTEP_MAKEFILES_ADDITIONAL
if [ "$GNUSTEP_MAKE_STRICT_V2_MODE" = "yes" ]; then
# Make sure this is never set in gnustep-make v2 strict mode; it
Only in gnustep-make-2.6.6.patched/: GNUstep.sh.in~
diff -ru gnustep-make-2.6.6/GNUstep-strict-v2.conf.in gnustep-make-2.6.6.patched/GNUstep-strict-v2.conf.in
--- gnustep-make-2.6.6/GNUstep-strict-v2.conf.in 2008-01-15 20:35:36.000000000 +0600
+++ gnustep-make-2.6.6.patched/GNUstep-strict-v2.conf.in 2014-12-07 22:04:56.000000000 +0600
@@ -47,7 +47,6 @@
# Traditionally, this is /usr/GNUstep/System/Library/Makefiles
GNUSTEP_MAKEFILES=@GNUSTEP_MAKEFILES@
-
# This is where the user home directories are. Only used to provide
# NSUserDirectory in gnustep-base. Never used anywhere else.
GNUSTEP_SYSTEM_USERS_DIR=@GNUSTEP_SYSTEM_USERS_DIR@
Only in gnustep-make-2.6.6.patched/: GNUstep-strict-v2.conf.in~
diff -ru gnustep-make-2.6.6/library-combo.make gnustep-make-2.6.6.patched/library-combo.make
--- gnustep-make-2.6.6/library-combo.make 2012-02-21 19:53:02.000000000 +0600
+++ gnustep-make-2.6.6.patched/library-combo.make 2014-12-09 20:15:05.000000000 +0600
@@ -142,7 +142,7 @@
#
# Third-party foundations not using make package
# Our own foundation will install a base.make file into
-# $GNUSTEP_MAKEFILES/Additional/ to set the needed flags
+# $NIX_GNUSTEP_MAKEFILES_ADDITIONAL to set the needed flags
#
ifeq ($(FOUNDATION_LIB), nx)
# -framework Foundation is used both to find headers, and to link
@@ -166,7 +166,7 @@
#
# FIXME - Ask Helge to move this inside his libFoundation, and have
-# it installed as a $(GNUSTEP_MAKEFILES)/Additional/libFoundation.make
+# it installed as a $(NIX_GNUSTEP_MAKEFILES_ADDITIONAL)/libFoundation.make
#
ifeq ($(FOUNDATION_LIB),fd)
-include $(GNUSTEP_MAKEFILES)/libFoundation.make
@@ -193,7 +193,7 @@
GUI_LIBS =
#
# Third-party GUI libraries - our own sets its flags into
-# $(GNUSTEP_MAKEFILES)/Additional/gui.make
+# $(NIX_GNUSTEP_MAKEFILES_ADDITIONAL)/gui.make
#
ifeq ($(GUI_LIB), nx)
GUI_DEFINE = -DNeXT_GUI_LIBRARY=1
Only in gnustep-make-2.6.6.patched/: library-combo.make~
Only in gnustep-make-2.6.6.patched/: result
diff -ru gnustep-make-2.6.6/rules.make gnustep-make-2.6.6.patched/rules.make
--- gnustep-make-2.6.6/rules.make 2013-07-04 16:05:44.000000000 +0600
+++ gnustep-make-2.6.6.patched/rules.make 2014-12-09 21:31:04.000000000 +0600
@@ -667,7 +667,9 @@
exit 1$(END_ECHO)
endif
-$(GNUSTEP_MAKEFILES)/Additional/*.make: ;
+ifneq ($(NIX_GNUSTEP_MAKEFILES_ADDITIONAL),)
+$(NIX_GNUSTEP_MAKEFILES_ADDITIONAL): ;
+endif
$(GNUSTEP_MAKEFILES)/Master/*.make: ;
Only in gnustep-make-2.6.6.patched/: rules.make~

View File

@ -0,0 +1,29 @@
# this path is used by some packages to install additional makefiles
export DESTDIR_GNUSTEP_MAKEFILES=$out/share/GNUstep/Makefiles
installFlagsArray=( \
"GNUSTEP_INSTALLATION_DOMAIN=SYSTEM" \
"GNUSTEP_SYSTEM_APPS=$out/lib/GNUstep/Applications" \
"GNUSTEP_SYSTEM_ADMIN_APPS=$out/lib/GNUstep/Applications" \
"GNUSTEP_SYSTEM_WEB_APPS=$out/lib/GNUstep/WebApplications" \
"GNUSTEP_SYSTEM_TOOLS=$out/bin" \
"GNUSTEP_SYSTEM_ADMIN_TOOLS=$out/sbin" \
"GNUSTEP_SYSTEM_LIBRARY=$out/lib" \
"GNUSTEP_SYSTEM_HEADERS=$out/include" \
"GNUSTEP_SYSTEM_LIBRARIES=$out/lib" \
"GNUSTEP_SYSTEM_DOC=$out/share/GNUstep/Documentation" \
"GNUSTEP_SYSTEM_DOC_MAN=$out/share/man" \
"GNUSTEP_SYSTEM_DOC_INFO=$out/share/info" \
"GNUSTEP_SYSTEM_LIBRARIES=$out/lib" \
"GNUSTEP_HEADERS=$out/include" \
)
addGSMakefilesPath () {
local filename
for filename in $1/share/GNUstep/Makefiles/Additional/*.make ; do
export NIX_GNUSTEP_MAKEFILES_ADDITIONAL="$NIX_GNUSTEP_MAKEFILES_ADDITIONAL $filename"
done
}
envHooks=(${envHooks[@]} addGSMakefilesPath)

View File

@ -6444,12 +6444,10 @@ in
gnumake42 = callPackage ../development/tools/build-managers/gnumake/4.2 { };
gnumake = self.gnumake42;
gnustep_builder = import ../development/tools/build-managers/gnustep-make/build-gnustep-package.nix { stdenv = clangStdenv; inherit gnustep_make; inherit buildEnv; };
gnustep_back = callPackage ../development/libraries/gnustep-back { };
gnustep_base = callPackage ../development/libraries/gnustep-base { giflib = giflib_4_1; };
gnustep_back = callPackage ../development/libraries/gnustep-back { stdenv = clangStdenv; };
gnustep_base = callPackage ../development/libraries/gnustep-base { stdenv = clangStdenv; giflib = giflib_4_1; };
gnustep_make = callPackage ../development/tools/build-managers/gnustep-make { stdenv = clangStdenv; };
gnustep_gui = callPackage ../development/libraries/gnustep-gui { };
gnustep_gui = callPackage ../development/libraries/gnustep-gui { stdenv = clangStdenv; };
gob2 = callPackage ../development/tools/misc/gob2 { };