From d0877003475ecb3ea18a256239a9948fe0f28035 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 31 Mar 2017 15:31:34 +0200 Subject: [PATCH] Fix perl build --- perl/Makefile | 2 +- perl/Makefile.config.in | 1 - perl/configure.ac | 2 -- perl/local.mk | 46 +++++++++++++++++++---------------------- 4 files changed, 22 insertions(+), 29 deletions(-) diff --git a/perl/Makefile b/perl/Makefile index 41a32576e..cf655ae3d 100644 --- a/perl/Makefile +++ b/perl/Makefile @@ -1,6 +1,6 @@ makefiles = local.mk -GLOBAL_CXXFLAGS += -std=c++11 -g -Wall +GLOBAL_CXXFLAGS += -std=c++14 -g -Wall -include nix/config.h -include Makefile.config diff --git a/perl/Makefile.config.in b/perl/Makefile.config.in index 901d1283e..c87d4817e 100644 --- a/perl/Makefile.config.in +++ b/perl/Makefile.config.in @@ -16,4 +16,3 @@ perl = @perl@ perllibdir = @perllibdir@ nixstoredir = @nixstoredir@ nixsysconfdir = @nixsysconfdir@ -perlbindings = @perlbindings@ diff --git a/perl/configure.ac b/perl/configure.ac index dea2b6140..d617c7853 100644 --- a/perl/configure.ac +++ b/perl/configure.ac @@ -99,8 +99,6 @@ AC_SUBST(nixlocalstatedir) AC_SUBST(nixsysconfdir) AC_SUBST(nixstoredir) -AC_SUBST(perlbindings, "yes") - # Expand all variables in config.status. test "$prefix" = NONE && prefix=$ac_default_prefix test "$exec_prefix" = NONE && exec_prefix='${prefix}' diff --git a/perl/local.mk b/perl/local.mk index 1793ececf..35113bd96 100644 --- a/perl/local.mk +++ b/perl/local.mk @@ -10,38 +10,34 @@ nix_perl_modules := $(nix_perl_sources:.in=) $(foreach x, $(nix_perl_modules), $(eval $(call install-data-in, $(x), $(perllibdir)/Nix))) -ifeq ($(perlbindings), yes) - - lib/Nix/Store.cc: lib/Nix/Store.xs +lib/Nix/Store.cc: lib/Nix/Store.xs $(trace-gen) xsubpp $^ -output $@ - libraries += Store +libraries += Store - Store_DIR := lib/Nix +Store_DIR := lib/Nix - Store_SOURCES := $(Store_DIR)/Store.cc +Store_SOURCES := $(Store_DIR)/Store.cc - Store_CXXFLAGS = \ - -I$(shell $(perl) -e 'use Config; print $$Config{archlibexp};')/CORE \ - -D_FILE_OFFSET_BITS=64 \ - -Wno-unknown-warning-option -Wno-unused-variable -Wno-literal-suffix \ - -Wno-reserved-user-defined-literal -Wno-duplicate-decl-specifier -Wno-pointer-bool-conversion \ - $(NIX_CFLAGS) +Store_CXXFLAGS = \ + -I$(shell $(perl) -e 'use Config; print $$Config{archlibexp};')/CORE \ + -D_FILE_OFFSET_BITS=64 \ + -Wno-unknown-warning-option -Wno-unused-variable -Wno-literal-suffix \ + -Wno-reserved-user-defined-literal -Wno-duplicate-decl-specifier -Wno-pointer-bool-conversion \ + $(NIX_CFLAGS) - Store_LDFLAGS := $(SODIUM_LIBS) $(NIX_LIBS) - - ifeq (CYGWIN,$(findstring CYGWIN,$(OS))) - archlib = $(shell perl -E 'use Config; print $$Config{archlib};') - libperl = $(shell perl -E 'use Config; print $$Config{libperl};') - Store_LDFLAGS += $(shell find ${archlib} -name ${libperl}) - endif - - Store_ALLOW_UNDEFINED = 1 - - Store_FORCE_INSTALL = 1 - - Store_INSTALL_DIR = $(perllibdir)/auto/Nix/Store +Store_LDFLAGS := $(SODIUM_LIBS) $(NIX_LIBS) +ifeq (CYGWIN,$(findstring CYGWIN,$(OS))) + archlib = $(shell perl -E 'use Config; print $$Config{archlib};') + libperl = $(shell perl -E 'use Config; print $$Config{libperl};') + Store_LDFLAGS += $(shell find ${archlib} -name ${libperl}) endif +Store_ALLOW_UNDEFINED = 1 + +Store_FORCE_INSTALL = 1 + +Store_INSTALL_DIR = $(perllibdir)/auto/Nix/Store + clean-files += lib/Nix/Config.pm lib/Nix/Store.cc Makefile.config