From 305cb680f6a4a9cc706329aa23e1076549e001f4 Mon Sep 17 00:00:00 2001 From: Nikolay Orlyuk Date: Thu, 29 Nov 2012 02:09:56 +0200 Subject: [PATCH 1/4] dev-lang/fsharp introduced with scm version --- ...0001-Respect-with-gacdir-path-to-gac.patch | 138 ++++++++++++++++++ .../0002-use-only-relative-symlinks.patch | 60 ++++++++ packages/dev-lang/fsharp/fsharp-scm.exheres-0 | 29 ++++ 3 files changed, 227 insertions(+) create mode 100644 packages/dev-lang/fsharp/files/0001-Respect-with-gacdir-path-to-gac.patch create mode 100644 packages/dev-lang/fsharp/files/0002-use-only-relative-symlinks.patch create mode 100644 packages/dev-lang/fsharp/fsharp-scm.exheres-0 diff --git a/packages/dev-lang/fsharp/files/0001-Respect-with-gacdir-path-to-gac.patch b/packages/dev-lang/fsharp/files/0001-Respect-with-gacdir-path-to-gac.patch new file mode 100644 index 0000000..1c96f18 --- /dev/null +++ b/packages/dev-lang/fsharp/files/0001-Respect-with-gacdir-path-to-gac.patch @@ -0,0 +1,138 @@ +Upstream: pull request https://github.com/fsharp/fsharp/pull/74 + +From 0d2277a02a512fbbce17449cb8e0c4f697ff3538 Mon Sep 17 00:00:00 2001 +From: Nikolay Orlyuk +Date: Wed, 28 Nov 2012 22:49:46 +0200 +Subject: [PATCH 1/2] Respect --with-gacdir=/path/to/gac + +Use parameter of --with-gacdir and MONODIR as a source for ROOTDIR in +gacutil. +--- + config.make.in | 1 + + configure.ac | 4 ++++ + src/fsharp/targets.make | 61 ++++++++++++++++++++++++------------------------- + 3 files changed, 35 insertions(+), 31 deletions(-) + +diff --git a/config.make.in b/config.make.in +index baea343..5ef0e68 100644 +--- a/config.make.in ++++ b/config.make.in +@@ -4,6 +4,7 @@ topdir := @abs_top_srcdir@/ + builddir := @abs_top_builddir@/ + libdir := ${prefix}/lib/ + bindir := ${prefix}/bin/ ++monorootdir := @MONOROOTDIR@/ + monodir := @MONODIR@/ + monolibdir2 := $(monodir)2.0/ + +diff --git a/configure.ac b/configure.ac +index 16736fc..4f79618 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -57,7 +57,11 @@ fi + if ! test -e $MONODIR/2.0/mscorlib.dll; then + AC_ERROR(Couldn't find the mono gac directory or mscorlib.dll in the usual places. Set --with-gacdir=) + fi ++ ++MONOROOTDIR=$(cd "$MONODIR/.." && pwd) ++ + AC_SUBST(MONODIR) ++AC_SUBST(MONOROOTDIR) + + if test "x$MONO_SGEN" = "xno"; then + mono_gc_options= +diff --git a/src/fsharp/targets.make b/src/fsharp/targets.make +index 99cedc3..8265cc1 100644 +--- a/src/fsharp/targets.make ++++ b/src/fsharp/targets.make +@@ -144,57 +144,56 @@ install-bin-4: TARGET := $(TARGET_4_0) + # + install-lib-2 install-lib-2-1 install-lib-4: + @echo "Installing $(ASSEMBLY)" +- @mkdir -p $(DESTDIR)/$(libdir) +- @mkdir -p $(DESTDIR)/$(libdir)mono/$(TARGET) +- gacutil -i $(outdir)$(ASSEMBLY) -root $(DESTDIR)/$(libdir) -package $(TARGET) ++ @mkdir -p $(DESTDIR)$(monodir)/$(TARGET) ++ gacutil -i $(outdir)$(ASSEMBLY) -root $(DESTDIR)$(monorootdir) -package $(TARGET) + @if test -e $(outdir)Microsoft.FSharp.targets; then \ +- mkdir -p $(DESTDIR)/$(libdir)mono/Microsoft\ F#/v$(TARGET)/; \ +- mkdir -p $(DESTDIR)/$(libdir)mono/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/; \ +- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/$(ASSEMBLY) $(DESTDIR)/$(libdir)mono/Microsoft\ F#/v$(TARGET)/$(ASSEMBLY); \ +- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/$(ASSEMBLY) $(DESTDIR)/$(libdir)mono/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY); \ +- $(INSTALL_LIB) $(outdir)Microsoft.FSharp.targets $(DESTDIR)/$(libdir)mono/$(TARGET)/; \ +- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)/$(libdir)mono/Microsoft\ F#/v$(TARGET)/Microsoft.FSharp.targets; \ +- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)/$(libdir)mono/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.targets; \ ++ mkdir -p $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/; \ ++ mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/; \ ++ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/$(ASSEMBLY); \ ++ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY); \ ++ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.targets $(DESTDIR)$(monodir)/$(TARGET)/; \ ++ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/Microsoft.FSharp.targets; \ ++ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.targets; \ + fi + @if test -e $(outdir)$(NAME).xml; then \ +- $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)/$(libdir)mono/gac/$(NAME)/$(VERSION)__$(TOKEN); \ +- ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml $(DESTDIR)/$(libdir)mono/$(TARGET)/$(NAME).xml; \ ++ $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \ ++ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml $(DESTDIR)$(monodir)/$(TARGET)/$(NAME).xml; \ + fi + @if test -e $(outdir)$(NAME).sigdata; then \ +- $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)/$(libdir)mono/gac/$(NAME)/$(VERSION)__$(TOKEN); \ +- ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata $(DESTDIR)/$(libdir)mono/$(TARGET)/$(NAME).sigdata; \ ++ $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \ ++ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata $(DESTDIR)$(monodir)/$(TARGET)/$(NAME).sigdata; \ + fi + @if test -e $(outdir)$(NAME).optdata; then \ +- $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)/$(libdir)mono/gac/$(NAME)/$(VERSION)__$(TOKEN); \ +- ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata $(DESTDIR)/$(libdir)mono/$(TARGET)/$(NAME).optdata; \ ++ $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \ ++ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata $(DESTDIR)$(monodir)/$(TARGET)/$(NAME).optdata; \ + fi + + install-lib-4-5: install-lib-4 +- @if test -e $(DESTDIR)$(libdir)mono/4.5/; then \ +- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(ASSEMBLY) $(DESTDIR)$(libdir)mono/4.5/$(ASSEMBLY); \ +- if test -e $(DESTDIR)$(libdir)mono/4.0/$(ASSEMBLY).config; then \ +- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(ASSEMBLY).config $(DESTDIR)$(libdir)mono/4.5/$(ASSEMBLY).config; \ ++ @if test -e $(DESTDIR)$(monodir)/4.5/; then \ ++ ln -fs $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY) $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY); \ ++ if test -e $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config; then \ ++ ln -fs $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY).config; \ + fi; \ +- if test -e $(DESTDIR)$(libdir)mono/4.0/$(NAME).sigdata; then \ +- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(NAME).sigdata $(DESTDIR)$(libdir)mono/4.5/$(NAME).sigdata; \ ++ if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).sigdata; then \ ++ ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).sigdata $(DESTDIR)$(monodir)/4.5/$(NAME).sigdata; \ + fi; \ +- if test -e $(DESTDIR)$(libdir)mono/4.0/$(NAME).xml; then \ +- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(NAME).xml $(DESTDIR)$(libdir)mono/4.5/$(NAME).xml; \ ++ if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).xml; then \ ++ ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).xml $(DESTDIR)$(monodir)/4.5/$(NAME).xml; \ + fi; \ +- if test -e $(DESTDIR)$(libdir)mono/4.0/$(NAME).optdata; then \ +- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(NAME).optdata $(DESTDIR)$(libdir)mono/4.5/$(NAME).optdata; \ ++ if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).optdata; then \ ++ ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).optdata $(DESTDIR)$(monodir)/4.5/$(NAME).optdata; \ + fi; \ + fi + + # The binaries fsc.exe and fsi.exe only get installed for Mono 4.0 profile + # This also installs 'fsharpc' and 'fsharpi' + install-bin-4: +- sed -e 's,[@]DIR[@],$(libdir)mono/$(TARGET),g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' < $(topdir)launcher > $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) ++ sed -e 's,[@]DIR[@],$(monodir)/$(TARGET),g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' < $(topdir)launcher > $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) + chmod +x $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) +- @mkdir -p $(DESTDIR)/$(libdir) +- @mkdir -p $(DESTDIR)/$(bindir) +- $(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$(libdir)mono/$(TARGET) +- $(INSTALL_BIN) $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) $(DESTDIR)/$(bindir) ++ @mkdir -p $(DESTDIR)$(monodir)/$(TARGET) ++ @mkdir -p $(DESTDIR)$(bindir) ++ $(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$(monodir)/$(TARGET) ++ $(INSTALL_BIN) $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) $(DESTDIR)$(bindir) + + + $(objdir) $(objdir)$(TARGET_2_0) $(objdir)$(TARGET_2_1) $(objdir)$(TARGET_4_0): +-- +1.8.0 + diff --git a/packages/dev-lang/fsharp/files/0002-use-only-relative-symlinks.patch b/packages/dev-lang/fsharp/files/0002-use-only-relative-symlinks.patch new file mode 100644 index 0000000..190f58e --- /dev/null +++ b/packages/dev-lang/fsharp/files/0002-use-only-relative-symlinks.patch @@ -0,0 +1,60 @@ +Upstream: pull request https://github.com/fsharp/fsharp/pull/74 + +From 4287a749b6f79b32c9cfbf948e584041f0ee1c76 Mon Sep 17 00:00:00 2001 +From: Nikolay Orlyuk +Date: Thu, 29 Nov 2012 01:24:10 +0200 +Subject: [PATCH 2/2] use only relative symlinks + +Many linux distributives uses DESTDIR for sandbox and then relocate all +files under root causing absolute (to DESTDIR) symlinks to be broken. +--- + src/fsharp/targets.make | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/fsharp/targets.make b/src/fsharp/targets.make +index 8265cc1..25a465a 100644 +--- a/src/fsharp/targets.make ++++ b/src/fsharp/targets.make +@@ -149,11 +149,11 @@ install-lib-2 install-lib-2-1 install-lib-4: + @if test -e $(outdir)Microsoft.FSharp.targets; then \ + mkdir -p $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/; \ + mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/; \ +- ln -fs $(DESTDIR)$(monodir)/$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/$(ASSEMBLY); \ +- ln -fs $(DESTDIR)$(monodir)/$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY); \ ++ ln -fs ../../$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/$(ASSEMBLY); \ ++ ln -fs ../../../../../$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY); \ + $(INSTALL_LIB) $(outdir)Microsoft.FSharp.targets $(DESTDIR)$(monodir)/$(TARGET)/; \ +- ln -fs $(DESTDIR)$(monodir)/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/Microsoft.FSharp.targets; \ +- ln -fs $(DESTDIR)$(monodir)/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.targets; \ ++ ln -fs ../../$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/Microsoft.FSharp.targets; \ ++ ln -fs ../../../../../$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.targets; \ + fi + @if test -e $(outdir)$(NAME).xml; then \ + $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \ +@@ -170,18 +170,18 @@ install-lib-2 install-lib-2-1 install-lib-4: + + install-lib-4-5: install-lib-4 + @if test -e $(DESTDIR)$(monodir)/4.5/; then \ +- ln -fs $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY) $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY); \ ++ ln -fs ../4.0/$(ASSEMBLY) $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY); \ + if test -e $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config; then \ +- ln -fs $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY).config; \ ++ ln -fs ../4.0/$(ASSEMBLY).config $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY).config; \ + fi; \ + if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).sigdata; then \ +- ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).sigdata $(DESTDIR)$(monodir)/4.5/$(NAME).sigdata; \ ++ ln -fs ../4.0/$(NAME).sigdata $(DESTDIR)$(monodir)/4.5/$(NAME).sigdata; \ + fi; \ + if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).xml; then \ +- ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).xml $(DESTDIR)$(monodir)/4.5/$(NAME).xml; \ ++ ln -fs ../4.0/$(NAME).xml $(DESTDIR)$(monodir)/4.5/$(NAME).xml; \ + fi; \ + if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).optdata; then \ +- ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).optdata $(DESTDIR)$(monodir)/4.5/$(NAME).optdata; \ ++ ln -fs ../4.0/$(NAME).optdata $(DESTDIR)$(monodir)/4.5/$(NAME).optdata; \ + fi; \ + fi + +-- +1.8.0 + diff --git a/packages/dev-lang/fsharp/fsharp-scm.exheres-0 b/packages/dev-lang/fsharp/fsharp-scm.exheres-0 new file mode 100644 index 0000000..71b8784 --- /dev/null +++ b/packages/dev-lang/fsharp/fsharp-scm.exheres-0 @@ -0,0 +1,29 @@ +# Copyright 2012 Nikolay Orlyuk +# Distributed under the terms of the GNU General Public License v2 + +require github \ + autotools [ supported_automake=[ 1.12 ] supported_autoconf=[ 2.5 ] ] + +SUMMARY="The F# compiler, core library and core tools (open source edition)" + +LICENCES="Apache-2.0" +SLOT="0" +PLATFORMS="~amd64" +MYOPTIONS="" + +DEPENDENCIES=" + build: + virtual/pkg-config + build+run: + dev-lang/mono[>=2.9] +" + +BUGS_TO="virkony@gmail.com" + +DEFAULT_SRC_PREPARE_PATCHES=( + "${FILES}/0001-Respect-with-gacdir-path-to-gac.patch" + "${FILES}/0002-use-only-relative-symlinks.patch" +) + +DEFAULT_SRC_CONFIGURE_PARAMS=( --with-gacdir=/usr/${LIBDIR:-lib}/mono/gac ) + From 16c97f86b1c72238fcfff70d0d01bafa98b577c8 Mon Sep 17 00:00:00 2001 From: Nikolay Orlyuk Date: Wed, 5 Dec 2012 08:25:08 +0200 Subject: [PATCH 2/4] dev-lang/fsharp remove applied patches --- ...0001-Respect-with-gacdir-path-to-gac.patch | 138 ------------------ .../0002-use-only-relative-symlinks.patch | 60 -------- packages/dev-lang/fsharp/fsharp-scm.exheres-0 | 5 - 3 files changed, 203 deletions(-) delete mode 100644 packages/dev-lang/fsharp/files/0001-Respect-with-gacdir-path-to-gac.patch delete mode 100644 packages/dev-lang/fsharp/files/0002-use-only-relative-symlinks.patch diff --git a/packages/dev-lang/fsharp/files/0001-Respect-with-gacdir-path-to-gac.patch b/packages/dev-lang/fsharp/files/0001-Respect-with-gacdir-path-to-gac.patch deleted file mode 100644 index 1c96f18..0000000 --- a/packages/dev-lang/fsharp/files/0001-Respect-with-gacdir-path-to-gac.patch +++ /dev/null @@ -1,138 +0,0 @@ -Upstream: pull request https://github.com/fsharp/fsharp/pull/74 - -From 0d2277a02a512fbbce17449cb8e0c4f697ff3538 Mon Sep 17 00:00:00 2001 -From: Nikolay Orlyuk -Date: Wed, 28 Nov 2012 22:49:46 +0200 -Subject: [PATCH 1/2] Respect --with-gacdir=/path/to/gac - -Use parameter of --with-gacdir and MONODIR as a source for ROOTDIR in -gacutil. ---- - config.make.in | 1 + - configure.ac | 4 ++++ - src/fsharp/targets.make | 61 ++++++++++++++++++++++++------------------------- - 3 files changed, 35 insertions(+), 31 deletions(-) - -diff --git a/config.make.in b/config.make.in -index baea343..5ef0e68 100644 ---- a/config.make.in -+++ b/config.make.in -@@ -4,6 +4,7 @@ topdir := @abs_top_srcdir@/ - builddir := @abs_top_builddir@/ - libdir := ${prefix}/lib/ - bindir := ${prefix}/bin/ -+monorootdir := @MONOROOTDIR@/ - monodir := @MONODIR@/ - monolibdir2 := $(monodir)2.0/ - -diff --git a/configure.ac b/configure.ac -index 16736fc..4f79618 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -57,7 +57,11 @@ fi - if ! test -e $MONODIR/2.0/mscorlib.dll; then - AC_ERROR(Couldn't find the mono gac directory or mscorlib.dll in the usual places. Set --with-gacdir=) - fi -+ -+MONOROOTDIR=$(cd "$MONODIR/.." && pwd) -+ - AC_SUBST(MONODIR) -+AC_SUBST(MONOROOTDIR) - - if test "x$MONO_SGEN" = "xno"; then - mono_gc_options= -diff --git a/src/fsharp/targets.make b/src/fsharp/targets.make -index 99cedc3..8265cc1 100644 ---- a/src/fsharp/targets.make -+++ b/src/fsharp/targets.make -@@ -144,57 +144,56 @@ install-bin-4: TARGET := $(TARGET_4_0) - # - install-lib-2 install-lib-2-1 install-lib-4: - @echo "Installing $(ASSEMBLY)" -- @mkdir -p $(DESTDIR)/$(libdir) -- @mkdir -p $(DESTDIR)/$(libdir)mono/$(TARGET) -- gacutil -i $(outdir)$(ASSEMBLY) -root $(DESTDIR)/$(libdir) -package $(TARGET) -+ @mkdir -p $(DESTDIR)$(monodir)/$(TARGET) -+ gacutil -i $(outdir)$(ASSEMBLY) -root $(DESTDIR)$(monorootdir) -package $(TARGET) - @if test -e $(outdir)Microsoft.FSharp.targets; then \ -- mkdir -p $(DESTDIR)/$(libdir)mono/Microsoft\ F#/v$(TARGET)/; \ -- mkdir -p $(DESTDIR)/$(libdir)mono/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/; \ -- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/$(ASSEMBLY) $(DESTDIR)/$(libdir)mono/Microsoft\ F#/v$(TARGET)/$(ASSEMBLY); \ -- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/$(ASSEMBLY) $(DESTDIR)/$(libdir)mono/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY); \ -- $(INSTALL_LIB) $(outdir)Microsoft.FSharp.targets $(DESTDIR)/$(libdir)mono/$(TARGET)/; \ -- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)/$(libdir)mono/Microsoft\ F#/v$(TARGET)/Microsoft.FSharp.targets; \ -- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)/$(libdir)mono/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.targets; \ -+ mkdir -p $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/; \ -+ mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/; \ -+ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/$(ASSEMBLY); \ -+ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY); \ -+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.targets $(DESTDIR)$(monodir)/$(TARGET)/; \ -+ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/Microsoft.FSharp.targets; \ -+ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.targets; \ - fi - @if test -e $(outdir)$(NAME).xml; then \ -- $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)/$(libdir)mono/gac/$(NAME)/$(VERSION)__$(TOKEN); \ -- ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml $(DESTDIR)/$(libdir)mono/$(TARGET)/$(NAME).xml; \ -+ $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \ -+ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml $(DESTDIR)$(monodir)/$(TARGET)/$(NAME).xml; \ - fi - @if test -e $(outdir)$(NAME).sigdata; then \ -- $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)/$(libdir)mono/gac/$(NAME)/$(VERSION)__$(TOKEN); \ -- ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata $(DESTDIR)/$(libdir)mono/$(TARGET)/$(NAME).sigdata; \ -+ $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \ -+ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata $(DESTDIR)$(monodir)/$(TARGET)/$(NAME).sigdata; \ - fi - @if test -e $(outdir)$(NAME).optdata; then \ -- $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)/$(libdir)mono/gac/$(NAME)/$(VERSION)__$(TOKEN); \ -- ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata $(DESTDIR)/$(libdir)mono/$(TARGET)/$(NAME).optdata; \ -+ $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \ -+ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata $(DESTDIR)$(monodir)/$(TARGET)/$(NAME).optdata; \ - fi - - install-lib-4-5: install-lib-4 -- @if test -e $(DESTDIR)$(libdir)mono/4.5/; then \ -- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(ASSEMBLY) $(DESTDIR)$(libdir)mono/4.5/$(ASSEMBLY); \ -- if test -e $(DESTDIR)$(libdir)mono/4.0/$(ASSEMBLY).config; then \ -- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(ASSEMBLY).config $(DESTDIR)$(libdir)mono/4.5/$(ASSEMBLY).config; \ -+ @if test -e $(DESTDIR)$(monodir)/4.5/; then \ -+ ln -fs $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY) $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY); \ -+ if test -e $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config; then \ -+ ln -fs $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY).config; \ - fi; \ -- if test -e $(DESTDIR)$(libdir)mono/4.0/$(NAME).sigdata; then \ -- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(NAME).sigdata $(DESTDIR)$(libdir)mono/4.5/$(NAME).sigdata; \ -+ if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).sigdata; then \ -+ ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).sigdata $(DESTDIR)$(monodir)/4.5/$(NAME).sigdata; \ - fi; \ -- if test -e $(DESTDIR)$(libdir)mono/4.0/$(NAME).xml; then \ -- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(NAME).xml $(DESTDIR)$(libdir)mono/4.5/$(NAME).xml; \ -+ if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).xml; then \ -+ ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).xml $(DESTDIR)$(monodir)/4.5/$(NAME).xml; \ - fi; \ -- if test -e $(DESTDIR)$(libdir)mono/4.0/$(NAME).optdata; then \ -- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(NAME).optdata $(DESTDIR)$(libdir)mono/4.5/$(NAME).optdata; \ -+ if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).optdata; then \ -+ ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).optdata $(DESTDIR)$(monodir)/4.5/$(NAME).optdata; \ - fi; \ - fi - - # The binaries fsc.exe and fsi.exe only get installed for Mono 4.0 profile - # This also installs 'fsharpc' and 'fsharpi' - install-bin-4: -- sed -e 's,[@]DIR[@],$(libdir)mono/$(TARGET),g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' < $(topdir)launcher > $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) -+ sed -e 's,[@]DIR[@],$(monodir)/$(TARGET),g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' < $(topdir)launcher > $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) - chmod +x $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) -- @mkdir -p $(DESTDIR)/$(libdir) -- @mkdir -p $(DESTDIR)/$(bindir) -- $(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$(libdir)mono/$(TARGET) -- $(INSTALL_BIN) $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) $(DESTDIR)/$(bindir) -+ @mkdir -p $(DESTDIR)$(monodir)/$(TARGET) -+ @mkdir -p $(DESTDIR)$(bindir) -+ $(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$(monodir)/$(TARGET) -+ $(INSTALL_BIN) $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) $(DESTDIR)$(bindir) - - - $(objdir) $(objdir)$(TARGET_2_0) $(objdir)$(TARGET_2_1) $(objdir)$(TARGET_4_0): --- -1.8.0 - diff --git a/packages/dev-lang/fsharp/files/0002-use-only-relative-symlinks.patch b/packages/dev-lang/fsharp/files/0002-use-only-relative-symlinks.patch deleted file mode 100644 index 190f58e..0000000 --- a/packages/dev-lang/fsharp/files/0002-use-only-relative-symlinks.patch +++ /dev/null @@ -1,60 +0,0 @@ -Upstream: pull request https://github.com/fsharp/fsharp/pull/74 - -From 4287a749b6f79b32c9cfbf948e584041f0ee1c76 Mon Sep 17 00:00:00 2001 -From: Nikolay Orlyuk -Date: Thu, 29 Nov 2012 01:24:10 +0200 -Subject: [PATCH 2/2] use only relative symlinks - -Many linux distributives uses DESTDIR for sandbox and then relocate all -files under root causing absolute (to DESTDIR) symlinks to be broken. ---- - src/fsharp/targets.make | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/fsharp/targets.make b/src/fsharp/targets.make -index 8265cc1..25a465a 100644 ---- a/src/fsharp/targets.make -+++ b/src/fsharp/targets.make -@@ -149,11 +149,11 @@ install-lib-2 install-lib-2-1 install-lib-4: - @if test -e $(outdir)Microsoft.FSharp.targets; then \ - mkdir -p $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/; \ - mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/; \ -- ln -fs $(DESTDIR)$(monodir)/$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/$(ASSEMBLY); \ -- ln -fs $(DESTDIR)$(monodir)/$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY); \ -+ ln -fs ../../$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/$(ASSEMBLY); \ -+ ln -fs ../../../../../$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY); \ - $(INSTALL_LIB) $(outdir)Microsoft.FSharp.targets $(DESTDIR)$(monodir)/$(TARGET)/; \ -- ln -fs $(DESTDIR)$(monodir)/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/Microsoft.FSharp.targets; \ -- ln -fs $(DESTDIR)$(monodir)/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.targets; \ -+ ln -fs ../../$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/Microsoft.FSharp.targets; \ -+ ln -fs ../../../../../$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.targets; \ - fi - @if test -e $(outdir)$(NAME).xml; then \ - $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \ -@@ -170,18 +170,18 @@ install-lib-2 install-lib-2-1 install-lib-4: - - install-lib-4-5: install-lib-4 - @if test -e $(DESTDIR)$(monodir)/4.5/; then \ -- ln -fs $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY) $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY); \ -+ ln -fs ../4.0/$(ASSEMBLY) $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY); \ - if test -e $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config; then \ -- ln -fs $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY).config; \ -+ ln -fs ../4.0/$(ASSEMBLY).config $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY).config; \ - fi; \ - if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).sigdata; then \ -- ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).sigdata $(DESTDIR)$(monodir)/4.5/$(NAME).sigdata; \ -+ ln -fs ../4.0/$(NAME).sigdata $(DESTDIR)$(monodir)/4.5/$(NAME).sigdata; \ - fi; \ - if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).xml; then \ -- ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).xml $(DESTDIR)$(monodir)/4.5/$(NAME).xml; \ -+ ln -fs ../4.0/$(NAME).xml $(DESTDIR)$(monodir)/4.5/$(NAME).xml; \ - fi; \ - if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).optdata; then \ -- ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).optdata $(DESTDIR)$(monodir)/4.5/$(NAME).optdata; \ -+ ln -fs ../4.0/$(NAME).optdata $(DESTDIR)$(monodir)/4.5/$(NAME).optdata; \ - fi; \ - fi - --- -1.8.0 - diff --git a/packages/dev-lang/fsharp/fsharp-scm.exheres-0 b/packages/dev-lang/fsharp/fsharp-scm.exheres-0 index 71b8784..715794a 100644 --- a/packages/dev-lang/fsharp/fsharp-scm.exheres-0 +++ b/packages/dev-lang/fsharp/fsharp-scm.exheres-0 @@ -20,10 +20,5 @@ DEPENDENCIES=" BUGS_TO="virkony@gmail.com" -DEFAULT_SRC_PREPARE_PATCHES=( - "${FILES}/0001-Respect-with-gacdir-path-to-gac.patch" - "${FILES}/0002-use-only-relative-symlinks.patch" -) - DEFAULT_SRC_CONFIGURE_PARAMS=( --with-gacdir=/usr/${LIBDIR:-lib}/mono/gac ) From 2a2577bf914ba8509af66bc1348f1a653bd88f77 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 12 Oct 2016 09:33:34 +0200 Subject: [PATCH 3/4] dev-lang/fsharp: unbreak build * NuGet needs network * NuGet is still broken, so https -> http Change-Id: I0a85e5d00c2d7d939ba28b1a51fbda95afe9cdc9 Reviewed-on: https://galileo.mailstation.de/gerrit/7392 Reviewed-by: Jenkins Reviewed-by: Nikolay Orlyuk --- packages/dev-lang/fsharp/fsharp-scm.exheres-0 | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/packages/dev-lang/fsharp/fsharp-scm.exheres-0 b/packages/dev-lang/fsharp/fsharp-scm.exheres-0 index 715794a..c5e885b 100644 --- a/packages/dev-lang/fsharp/fsharp-scm.exheres-0 +++ b/packages/dev-lang/fsharp/fsharp-scm.exheres-0 @@ -20,5 +20,34 @@ DEPENDENCIES=" BUGS_TO="virkony@gmail.com" -DEFAULT_SRC_CONFIGURE_PARAMS=( --with-gacdir=/usr/${LIBDIR:-lib}/mono/gac ) +DEFAULT_SRC_CONFIGURE_PARAMS=( --with-gacdir="/usr/$(exhost --target)/lib/mono/gac" ) + +DEFAULT_SRC_COMPILE_PARAMS=( -j1 ) + +src_prepare() { + # ssl with NuGet seems broken + # https://github.com/fsharp/fsharp/issues/617 + edo sed -i \ + -e 's#https://www.nuget.org/api/v2/#http://www.nuget.org/api/v2/#' \ + .nuget/NuGet.Config + + autotools_src_prepare +} + +src_compile() { + # uses NuGet to build, no easy way around, + # unless you like the alternative in e.g. games-strategy/openra + esandbox disable_net + default + esandbox enable_net +} + +src_install() { + esandbox disable_net + default + esandbox enable_net + + # delete empty directories + edo find "${IMAGE}" -type d -empty -delete +} From 8d1a9a48e57e3ebbcf57ac6d8efb3f0f5d4a94d7 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Thu, 20 Oct 2016 22:23:25 +0200 Subject: [PATCH 4/4] dev-lang/fsharp: rm obsolete workaround Change-Id: I4283f2df703cdf3bde2e06fb85f9ee12b4a8dd8d --- packages/dev-lang/fsharp/fsharp-scm.exheres-0 | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/dev-lang/fsharp/fsharp-scm.exheres-0 b/packages/dev-lang/fsharp/fsharp-scm.exheres-0 index c5e885b..f51e256 100644 --- a/packages/dev-lang/fsharp/fsharp-scm.exheres-0 +++ b/packages/dev-lang/fsharp/fsharp-scm.exheres-0 @@ -15,7 +15,7 @@ DEPENDENCIES=" build: virtual/pkg-config build+run: - dev-lang/mono[>=2.9] + dev-lang/mono[>=4.2.2.30-r1] " BUGS_TO="virkony@gmail.com" @@ -24,16 +24,6 @@ DEFAULT_SRC_CONFIGURE_PARAMS=( --with-gacdir="/usr/$(exhost --target)/lib/mono/g DEFAULT_SRC_COMPILE_PARAMS=( -j1 ) -src_prepare() { - # ssl with NuGet seems broken - # https://github.com/fsharp/fsharp/issues/617 - edo sed -i \ - -e 's#https://www.nuget.org/api/v2/#http://www.nuget.org/api/v2/#' \ - .nuget/NuGet.Config - - autotools_src_prepare -} - src_compile() { # uses NuGet to build, no easy way around, # unless you like the alternative in e.g. games-strategy/openra