pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wip/nix: more work towards making it build.



Module Name:	pkgsrc-wip
Committed By:	ng0 <ng0%NetBSD.org@localhost>
Pushed By:	ng0
Date:		Fri Nov 1 17:26:06 2019 +0000
Changeset:	0828246026493040c4e724d2c286fd306aec6cb8

Modified Files:
	nix/Makefile
	nix/TODO
	nix/distinfo
Added Files:
	nix/patches/patch-src_libexpr_primops_fetchGit.cc
	nix/patches/patch-src_nix_main.cc

Log Message:
wip/nix: more work towards making it build.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0828246026493040c4e724d2c286fd306aec6cb8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 nix/Makefile                                      | 53 +++++++++++++++--------
 nix/TODO                                          |  8 +++-
 nix/distinfo                                      |  2 +
 nix/patches/patch-src_libexpr_primops_fetchGit.cc | 15 +++++++
 nix/patches/patch-src_nix_main.cc                 | 15 +++++++
 5 files changed, 75 insertions(+), 18 deletions(-)

diffs:
diff --git a/nix/Makefile b/nix/Makefile
index 881e6a5c39..584a6fd49e 100644
--- a/nix/Makefile
+++ b/nix/Makefile
@@ -1,23 +1,25 @@
 # $NetBSD$
 
-DISTNAME=	nix-2.3.1
-CATEGORIES=	wip
-MASTER_SITES=	${MASTER_SITE_GITHUB:=NixOS/}
+DISTNAME=		nix-2.3.1
+CATEGORIES=		wip
+MASTER_SITES=		${MASTER_SITE_GITHUB:=NixOS/}
 
-MAINTAINER=	ng0%NetBSD.org@localhost
-HOMEPAGE=	https://github.com/NixOS/nix/
-COMMENT=	Purely functional package manager
-LICENSE=	gnu-lgpl-v2.1
+MAINTAINER=		ng0%NetBSD.org@localhost
+HOMEPAGE=		https://github.com/NixOS/nix/
+COMMENT=		Purely functional package manager
+LICENSE=		gnu-lgpl-v2.1
 
-USE_TOOLS+=	pkg-config flex bash gmake bison
-USE_TOOLS+=	automake autoconf autoreconf
-USE_LANGUAGES=	c c++
-GNU_CONFIGURE=	YES
+USE_TOOLS+=		pkg-config flex bash bison gmake
+USE_TOOLS+=		automake autoconf autoreconf
+USE_LANGUAGES=		c c++
+GNU_CONFIGURE=		YES
 
 PKGCONFIG_OVERRIDE+=	src/libexpr/nix-expr.pc.in
 PKGCONFIG_OVERRIDE+=	src/libmain/nix-main.pc.in
 PKGCONFIG_OVERRIDE+=	src/libstore/nix-store.pc.in
 
+.include "../../mk/bsd.prefs.mk"
+
 CONFIGURE_ARGS+=	--with-sandbox-shell=/bin/sh
 CONFIGURE_ARGS+=	--enable-gc
 
@@ -26,8 +28,11 @@ CONFIGURE_ARGS+=	--enable-gc
 CONFIGURE_ENV+=		ac_cv_header_aws_s3_S3Client_h=no
 #CONFIGURE_ENV+=		EDITLINE_CFLAGS=${BUILDLINK_PREFIX.editlinereadline:Q}/include
 #CONFIGURE_ENV+=		EDITLINE_LIBS=${BUILDLINK_PREFIX.editlinereadline:Q}/lib
-CONFIGURE_ENV+=		EDITLINE_CFLAGS=${BUILDLINK_PREFIX.editline:Q}/include
-CONFIGURE_ENV+=		EDITLINE_LIBS=${BUILDLINK_PREFIX.editline:Q}/lib
+#CONFIGURE_ENV+=		EDITLINE_CFLAGS=${BUILDLINK_PREFIX.editlinereadline:Q}/include/readline
+CONFIGURE_ENV+=		EDITLINE_CFLAGS="-DREADLINE"
+CONFIGURE_ENV+=		EDITLINE_LIBS=${BUILDLINK_PREFIX.editlinereadline:Q}/lib
+#CONFIGURE_ENV+=		EDITLINE_CFLAGS=${BUILDLINK_PREFIX.editline:Q}/include/readline
+#CONFIGURE_ENV+=		EDITLINE_LIBS=${BUILDLINK_PREFIX.editline:Q}/lib
 CONFIGURE_ENV+=		LIBLZMA_CFLAGS=${BUILDLINK_PREFIX.lzmalib:Q}/include
 CONFIGURE_ENV+=		LIBLZMA_LIBS=${BUILDLINK_PREFIX.lzmalib:Q}/lib
 CONFIGURE_ENV+=		BOOST_ROOT=${BUILDLINK_PREFIX.boost:Q}/lib
@@ -37,16 +42,16 @@ CONFIGURE_ENV+=		BOOST_ROOT=${BUILDLINK_PREFIX.boost:Q}/lib
 MAKE_ARGS+=	libutil_ALLOW_UNDEFINED=yes
 
 # verbose build
-MAKE_ENV+=	V=1
+# MAKE_ENV+=	V=1
 # Disable hardcoded -O3
-MAKE_ENV+=	OPTIMIZE=0
+# MAKE_ENV+=	OPTIMIZE=0
 
 # checking for aws/s3/S3Client.h... (cached) no
-# ./configure: 7003: Syntax error: "(" unexpected (expecting "fi")
+# ./configure: 7863: Syntax error: "(" unexpected (expecting "fi")
 # *** Error code 2
 # hack configure.ac bashism, work on an upstream fix for this,
 # thanks 0mp%FreeBSD.org@localhost for this tiny detail:
-CONFIG_SHELL=		${BASH}
+CONFIG_SHELL=		${TOOLS_PATH.bash}
 
 # incomplete, remove once the docs build
 CONFIGURE_ARGS+=	--disable-doc-gen
@@ -69,6 +74,20 @@ SUBST_SED.docbook2+=	-e 's,http://docbook.org/xml/5.0/rng/docbook.rng,${PREFIX}/
 BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
 BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl
 
+#.if ${OPSYS} == "NetBSD"
+#USE_BUILTIN.editline=	yes
+#READLINE_DEFAULT=	readline
+#.endif
+
+#.include "../../mk/readline.buildlink3.mk"
+# .if ${READLINE_TYPE} == "readline"
+# SUBST_CLASSES+=		editline
+# SUBST_MESSAGE.editline=	Fixing editline header.
+# SUBST_STAGE.editline=	pre-configure
+# SUBST_FILES.editline=	src/nix/repl.cc
+# SUBST_SED.editline=	-e "s,editline\.h,readline\.h,g"
+# .endif
+
 pre-configure:
 	cd ${WRKSRC} && ${SH} bootstrap.sh
 
diff --git a/nix/TODO b/nix/TODO
index f07be9d8e2..89beeee5fb 100644
--- a/nix/TODO
+++ b/nix/TODO
@@ -1,3 +1,9 @@
 * port to NetBSD?
   There is a high probability that in addition to packaging, supported platforms
-  must be tested and non-supported (like NetBSD host) ported to.
\ No newline at end of file
+  must be tested and non-supported (like NetBSD host) ported to.
+
+* building TODO:
+  LD     src/libutil/libnixutil.so
+/usr/pkg/lib: file not recognized: file format not recognized
+gmake: *** [mk/lib.mk:104: src/libutil/libnixutil.so] Error 1
+gmake: *** Waiting for unfinished jobs....
diff --git a/nix/distinfo b/nix/distinfo
index 16b5029458..432c3232e7 100644
--- a/nix/distinfo
+++ b/nix/distinfo
@@ -4,3 +4,5 @@ SHA1 (nix-2.3.1.tar.gz) = 7a08687d40b3f2fd80d3e315195e956eab787f10
 RMD160 (nix-2.3.1.tar.gz) = 65fe91b3cd5ea9ebf2a1fdaa848a8ffb02f2043e
 SHA512 (nix-2.3.1.tar.gz) = 47b2455cd9527bd6dae1eb35351c679e230b69429315be73b2c49c7d649044e5e39d09d6d95d5c946061548d2aa25eff62535655a6033a6740ab40641f02c11d
 Size (nix-2.3.1.tar.gz) = 894698 bytes
+SHA1 (patch-src_libexpr_primops_fetchGit.cc) = f2dedfdf5c0e579ac94fdad91f64c5dc679efe96
+SHA1 (patch-src_nix_main.cc) = 3e10eea84c4e9371952393837d8900c92a107a08
diff --git a/nix/patches/patch-src_libexpr_primops_fetchGit.cc b/nix/patches/patch-src_libexpr_primops_fetchGit.cc
new file mode 100644
index 0000000000..3a7e58ddd6
--- /dev/null
+++ b/nix/patches/patch-src_libexpr_primops_fetchGit.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Missing include on NetBSD.
+
+--- src/libexpr/primops/fetchGit.cc~	2019-11-01 16:57:52.564146995 +0000
++++ src/libexpr/primops/fetchGit.cc	2019-11-01 16:59:08.187456642 +0000
+@@ -6,6 +6,8 @@
+ #include "hash.hh"
+ 
+ #include <sys/time.h>
++#include <sys/wait.h>
++
+ 
+ #include <regex>
+ 
diff --git a/nix/patches/patch-src_nix_main.cc b/nix/patches/patch-src_nix_main.cc
new file mode 100644
index 0000000000..46c336b8da
--- /dev/null
+++ b/nix/patches/patch-src_nix_main.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Upstream commit b811bd2172bc9796f42b87996f455d4e5e4382ba
+Missing include.
+
+--- src/nix/main.cc~
++++ src/nix/main.cc
+@@ -15,6 +15,7 @@
+ #include <sys/socket.h>
+ #include <ifaddrs.h>
+ #include <netdb.h>
++#include <netinet/in.h>
+ 
+ extern std::string chrootHelperName;
+ 


Home | Main Index | Thread Index | Old Index