pkgsrc-WIP-changes archive

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

make pkglint happy, make compile work on netbsd with gsed, fix some bashisms



Module Name:	pkgsrc-wip
Committed By:	Matthew Sporleder <msporleder%gmail.com@localhost>
Pushed By:	mspo
Date:		Mon May 8 23:00:57 2017 -0400
Changeset:	4d03831b6253710db0fca9037e9cb9da775c8d70

Modified Files:
	elixir/Makefile
	elixir/PLIST
	elixir/distinfo
Added Files:
	elixir/patches/patch-Makefile
	elixir/patches/patch-bin_elixir

Log Message:
make pkglint happy, make compile work on netbsd with gsed, fix some bashisms

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

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

diffstat:
 elixir/Makefile                 | 14 +++++------
 elixir/PLIST                    |  8 +++---
 elixir/distinfo                 |  2 ++
 elixir/patches/patch-Makefile   | 56 +++++++++++++++++++++++++++++++++++++++++
 elixir/patches/patch-bin_elixir | 22 ++++++++++++++++
 5 files changed, 91 insertions(+), 11 deletions(-)

diffs:
diff --git a/elixir/Makefile b/elixir/Makefile
index 36d9c39edd..1e5b3461d0 100644
--- a/elixir/Makefile
+++ b/elixir/Makefile
@@ -1,6 +1,7 @@
 # $NetBSD$
 
 DISTNAME=		elixir-1.4.2
+PKGREVISION=	1
 CATEGORIES=		lang
 MASTER_SITES=		${MASTER_SITE_GITHUB:=elixir-lang/}
 EXTRACT_SUFX=		.zip
@@ -15,15 +16,14 @@ GITHUB_TAG=		v${PKGVERSION_NOREV}
 BUILD_DEPENDS+=		erlang>=18.0:../../lang/erlang
 
 WRKSRC=			${WRKDIR}/${PKGBASE}-${PKGVERSION_NOREV}
+CHECK_INTERPRETER_SKIP+=	bin/mix
+CHECK_INTERPRETER_SKIP+=	lib/elixir/bin/mix
 
 USE_TOOLS+=	gmake gsed
+BUILD_TARGET= compile
+MAKE_ENV+=	SED=gsed
 
-SUBST_CLASSES+=		fix-paths
-SUBST_STAGE.fix-paths=	post-extract
-SUBST_FILES.fix-paths=	Makefile
-SUBST_SED.fix-paths=	-e 's,/share/man/,/man/,g'
-
-do-build:
-	cd ${WRKSRC} && ${GMAKE}
+#do-build:
+#	cd ${WRKSRC} && ${GMAKE}
 
 .include "../../mk/bsd.pkg.mk"
diff --git a/elixir/PLIST b/elixir/PLIST
index 569f2d35b6..f99e0c19ff 100644
--- a/elixir/PLIST
+++ b/elixir/PLIST
@@ -385,7 +385,7 @@ lib/elixir/lib/mix/ebin/Elixir.Mix.TasksServer.beam
 lib/elixir/lib/mix/ebin/Elixir.Mix.Utils.beam
 lib/elixir/lib/mix/ebin/Elixir.Mix.beam
 lib/elixir/lib/mix/ebin/mix.app
-share/man/man1/elixir.1
-share/man/man1/elixirc.1
-share/man/man1/iex.1
-share/man/man1/mix.1
+man/man1/elixir.1
+man/man1/elixirc.1
+man/man1/iex.1
+man/man1/mix.1
diff --git a/elixir/distinfo b/elixir/distinfo
index c425f777ea..ff47869ac6 100644
--- a/elixir/distinfo
+++ b/elixir/distinfo
@@ -4,3 +4,5 @@ SHA1 (elixir-1.4.2.zip) = a674d09dbae9acf6c5ae46707dbfc81a613bc70e
 RMD160 (elixir-1.4.2.zip) = c0ae698076b5dea2681497716fc4f8d25c52e77e
 SHA512 (elixir-1.4.2.zip) = 44030cbab6680fd237c3f1b6f0edef7a92b06776e224e2d48a848b70950d35de550123a78924dee9015ff20f273285c0ee0f221b7bb9f138f4e0ea7033e4d3c1
 Size (elixir-1.4.2.zip) = 2055662 bytes
+SHA1 (patch-Makefile) = 938cedb5da9ededfb91b2410ff4097ec419a7563
+SHA1 (patch-bin_elixir) = 29007e4eb0ffac8c891856a3034618733fa971c4
diff --git a/elixir/patches/patch-Makefile b/elixir/patches/patch-Makefile
new file mode 100644
index 0000000000..19ad6d8742
--- /dev/null
+++ b/elixir/patches/patch-Makefile
@@ -0,0 +1,56 @@
+$NetBSD$
+add SED to use gsed for -i, fix man paths, and do not install .orig
+
+--- Makefile.orig	2017-02-16 14:15:31.000000000 +0000
++++ Makefile
+@@ -1,6 +1,7 @@
+ REBAR ?= "$(CURDIR)/rebar"
+ PREFIX ?= /usr/local
+ SHARE_PREFIX ?= $(PREFIX)/share
++SED ?= sed
+ CANONICAL :=
+ ELIXIRC := bin/elixirc --verbose --ignore-module-conflict
+ ERLC := erlc -I lib/elixir/include
+@@ -105,7 +106,7 @@ install: compile
+ 		$(INSTALL_DATA) $$dir/ebin/* "$(DESTDIR)$(PREFIX)/$(LIBDIR)/elixir/$$dir/ebin"; \
+ 	done
+ 	$(Q) $(INSTALL_DIR) "$(DESTDIR)$(PREFIX)/$(LIBDIR)/elixir/bin"
+-	$(Q) $(INSTALL_PROGRAM) $(filter-out %.ps1, $(filter-out %.bat, $(wildcard bin/*))) "$(DESTDIR)$(PREFIX)/$(LIBDIR)/elixir/bin"
++	$(Q) $(INSTALL_PROGRAM) $(filter-out %.ps1, $(filter-out %.bat, $(filter-out %.orig, $(wildcard bin/*)))) "$(DESTDIR)$(PREFIX)/$(LIBDIR)/elixir/bin"
+ 	$(Q) $(INSTALL_DIR) "$(DESTDIR)$(PREFIX)/$(BINDIR)"
+ 	$(Q) for file in "$(DESTDIR)$(PREFIX)"/$(LIBDIR)/elixir/bin/* ; do \
+ 		ln -sf "../$(LIBDIR)/elixir/bin/$${file##*/}" "$(DESTDIR)$(PREFIX)/$(BINDIR)/" ; \
+@@ -236,14 +237,14 @@ build_man: man/iex.1 man/elixir.1
+ 
+ man/iex.1:
+ 	$(Q) cp man/iex.1.in man/iex.1
+-	$(Q) sed -i.bak "/{COMMON}/r common" man/iex.1
+-	$(Q) sed -i.bak "/{COMMON}/d" man/iex.1
++	$(Q) $(SED) -i.bak "/{COMMON}/r common" man/iex.1
++	$(Q) $(SED) -i.bak "/{COMMON}/d" man/iex.1
+ 	$(Q) rm man/iex.1.bak
+ 
+ man/elixir.1:
+ 	$(Q) cp man/elixir.1.in man/elixir.1
+-	$(Q) sed -i.bak "/{COMMON}/r common" man/elixir.1
+-	$(Q) sed -i.bak "/{COMMON}/d" man/elixir.1
++	$(Q) $(SED) -i.bak "/{COMMON}/r common" man/elixir.1
++	$(Q) $(SED) -i.bak "/{COMMON}/d" man/elixir.1
+ 	$(Q) rm man/elixir.1.bak
+ 
+ clean_man:
+@@ -251,9 +252,9 @@ clean_man:
+ 	rm -f man/iex.1
+ 
+ install_man: build_man
+-	$(Q) mkdir -p $(DESTDIR)$(SHARE_PREFIX)/man/man1
+-	$(Q) $(INSTALL_DATA) man/elixir.1  $(DESTDIR)$(SHARE_PREFIX)/man/man1
+-	$(Q) $(INSTALL_DATA) man/elixirc.1 $(DESTDIR)$(SHARE_PREFIX)/man/man1
+-	$(Q) $(INSTALL_DATA) man/iex.1     $(DESTDIR)$(SHARE_PREFIX)/man/man1
+-	$(Q) $(INSTALL_DATA) man/mix.1     $(DESTDIR)$(SHARE_PREFIX)/man/man1
++	$(Q) mkdir -p $(DESTDIR)$(PREFIX)/man/man1
++	$(Q) $(INSTALL_DATA) man/elixir.1  $(DESTDIR)$(PREFIX)/man/man1
++	$(Q) $(INSTALL_DATA) man/elixirc.1 $(DESTDIR)$(PREFIX)/man/man1
++	$(Q) $(INSTALL_DATA) man/iex.1     $(DESTDIR)$(PREFIX)/man/man1
++	$(Q) $(INSTALL_DATA) man/mix.1     $(DESTDIR)$(PREFIX)/man/man1
+ 	$(MAKE) clean_man
diff --git a/elixir/patches/patch-bin_elixir b/elixir/patches/patch-bin_elixir
new file mode 100644
index 0000000000..dc1bd91fa9
--- /dev/null
+++ b/elixir/patches/patch-bin_elixir
@@ -0,0 +1,22 @@
+$NetBSD$
+== is a bash-ism and file is /bin/sh
+
+--- /dev/null	2017-05-09 01:40:57.000000000 +0000
++++ bin/elixir
+@@ -74,14 +74,14 @@ while [ $I -le $# ]; do
+     --logger-otp-reports)
+         I=$(expr $I + 1)
+         eval "VAL=\${$I}"
+-        if [ "$VAL" == 'true' ] || [ "$VAL" == 'false' ]; then
++        if [ "$VAL" = 'true' ] || [ "$VAL" = 'false' ]; then
+             ERL="$ERL -logger handle_otp_reports "$VAL""
+         fi
+         ;;
+     --logger-sasl-reports)
+         I=$(expr $I + 1)
+         eval "VAL=\${$I}"
+-        if [ "$VAL" == 'true' ] || [ "$VAL" == 'false' ]; then
++        if [ "$VAL" = 'true' ] || [ "$VAL" = 'false' ]; then
+             ERL="$ERL -logger handle_sasl_reports "$VAL""
+         fi
+         ;;


Home | Main Index | Thread Index | Old Index