BLD Add DISTDIR variable. ### Description

Adds `DISTDIR` env variable that points to the directory where libraries should be copied to when building shared libraries with recipe.

### Checklists

- [x] Add new / update outdated documentation

From 54c2a9faeb0b0169172c5ab53367e6092f132c5a Mon Sep 17 00:00:00 2001
From: Gyeongjae Choi <def6488@gmail.com>
Date: Mon, 9 May 2022 12:07:44 +0000
Subject: [PATCH 2/3] Add library loading path

TODO: Remove this patch when XGBoost version is updated.
(Upstream PR: https://github.com/dmlc/xgboost/pull/7954)

---
 python-package/xgboost/libpath.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xgboost/libpath.py b/xgboost/libpath.py
index f7a7d9cd..1ab41cbe 100644
--- a/xgboost/libpath.py
+++ b/xgboost/libpath.py
@@ -43,8 +43,7 @@ def find_lib_path() -> List[str]:
             # directory here
             dll_path.append(os.path.join(curr_path, './windows/Release/'))
         dll_path = [os.path.join(p, 'xgboost.dll') for p in dll_path]
-    elif sys.platform.startswith('linux') or sys.platform.startswith(
-            'freebsd'):
+    elif sys.platform.startswith(('linux', 'freebsd', 'emscripten')):
         dll_path = [os.path.join(p, 'libxgboost.so') for p in dll_path]
     elif sys.platform == 'darwin':
         dll_path = [os.path.join(p, 'libxgboost.dylib') for p in dll_path]
-- 
2.35.1


From 54c2a9faeb0b0169172c5ab53367e6092f132c5a Mon Sep 17 00:00:00 2001
From: Gyeongjae Choi <def6488@gmail.com>
Date: Mon, 9 May 2022 12:07:44 +0000
Subject: [PATCH 2/3] Add library loading path

TODO: Remove this patch when XGBoost version is updated.
(Upstream PR: https://github.com/dmlc/xgboost/pull/7954)

---
 python-package/xgboost/libpath.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xgboost/libpath.py b/xgboost/libpath.py
index f7a7d9cd..1ab41cbe 100644
--- a/xgboost/libpath.py
+++ b/xgboost/libpath.py
@@ -43,8 +43,7 @@ def find_lib_path() -> List[str]:
             # directory here
             dll_path.append(os.path.join(curr_path, './windows/Release/'))
         dll_path = [os.path.join(p, 'xgboost.dll') for p in dll_path]
-    elif sys.platform.startswith('linux') or sys.platform.startswith(
-            'freebsd'):
+    elif sys.platform.startswith(('linux', 'freebsd', 'emscripten')):
         dll_path = [os.path.join(p, 'libxgboost.so') for p in dll_path]
     elif sys.platform == 'darwin':
         dll_path = [os.path.join(p, 'libxgboost.dylib') for p in dll_path]
-- 
2.35.1

