0

I'm trying to install Elixir 1.5 and OTP 20. I did this:

pkg install erlang-runtime20

portsnap fetch extract update

and I've changed /usr/ports/lang/elixir/Makefile to point to the latest version of Elixir and erlang:

PORTVERSION= 1.5.1
BUILD_DEPENDS=  erlang>=20:lang/erlang
RUN_DEPENDS=    erlang>=20:lang/erlang

And

make makesum

And here comes an exception:

$ sudo make install
===>  License APACHE20 accepted by the user
===>   elixir-1.5.1_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by elixir-1.5.1_1 for building
===>  Extracting for elixir-1.5.1_1
=> SHA256 Checksum OK for elixir/1.5.1/Docs.zip.
=> SHA256 Checksum OK for elixir/1.5.1/elixir-lang-elixir-v1.5.1_GH0.tar.gz.
===>  Patching for elixir-1.5.1_1
===>  Applying FreeBSD patches for elixir-1.5.1_1
1 out of 2 hunks failed--saving rejects to Makefile.rej
=> FreeBSD patch patch-Makefile failed to apply cleanly.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/elixir
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/elixir

How to fix it?

Jodari
  • 89
  • 1
  • 1
  • 6

1 Answers1

1

Well, you can't just bump PORTVERSION and expect things to work. Either mail maintainer asking for a port update, or get your hands wet - figure out what that patch do, should it still be applied, refresh it if it is still needed.

To generate a new patch copy original Makefile to Makefile.orig, edit Makefile, and then run make makepatch.

arrowd
  • 319
  • 1
  • 8
  • `or get your hands wet - figure out what that patch do,` --> but there's only file to edit -- Makefile and I've edited it already and appropriately – Jodari Aug 16 '17 at 01:53
  • There are 2 Makefiles - port one in `/usr/ports/lang/elixir`, and elixir one in `lang/elixir/work`. The latter appear after `make extract` step. So, extract it, take a look at **elixir** Makefile and fix the patch using `make makepatch`. – arrowd Aug 16 '17 at 07:36
  • when should I've run "make extract"? – Jodari Aug 16 '17 at 08:11
  • `So, extract it, ` - extract what? how? – Jodari Aug 16 '17 at 08:15
  • Ok, lets start over. `cd /usr/ports/lang/elixir ; make clean ; make extract ; cd work/elixir-1.5.1/ ; cp Makefile Makefile.orig ; ; make makepatch ; make build`. – arrowd Aug 16 '17 at 08:16
  • thx, i'll try... – Jodari Aug 16 '17 at 08:17
  • and I won't need to edit the main Makefile? – Jodari Aug 16 '17 at 08:21
  • It depends on what problems you will face next. If there wouldn't be any, then only change to main `Makefile` you should do is `PORTVERSION` change. – arrowd Aug 16 '17 at 08:23