summaryrefslogtreecommitdiffstats
path: root/patches/0002-build-Allow-overriding-opkg-state-dir-prefix.patch
blob: 4b727aade5f14667f8b3880913caadbe39a68a33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 96e92e8411ddde1fcb15cde07542a71d89849584 Mon Sep 17 00:00:00 2001
From: Patrick McDermott <patrick.mcdermott@libiquity.com>
Date: Sat, 6 Apr 2019 12:00:22 -0400
Subject: [PATCH 2/6] build: Allow overriding opkg state dir prefix

Signed-off-by: Patrick McDermott <patrick.mcdermott@libiquity.com>
---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5ad0b36..9acd6b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,7 @@ SET(HOST_CPU "" CACHE STRING "Override Host CPU")
 SET(BUILD_CPU "" CACHE STRING "Override Host CPU")
 SET(CONF_FILE "/etc/opkg.conf" CACHE STRING "Override default configuration file path")
 SET(LOCK_FILE "/var/lock/opkg.lock" CACHE STRING "Override lock file path")
+SET(STATE_DIR_PREFIX "/usr/lib" CACHE STRING "Override opkg state directory prefix")
 SET(PATH_SPEC "/usr/sbin:/usr/bin:/sbin:/bin" CACHE STRING "Override default PATH value")
 SET(VERSION "" CACHE STRING "Override version")
 
@@ -41,7 +42,7 @@ ADD_DEFINITIONS(-Os -Wall --std=gnu99 -g3 -Wmissing-declarations
 	-DOPKGETCDIR="/etc"
 	-DOPKGCONFFILE="${CONF_FILE}"
 	-DOPKGLOCKFILE="${LOCK_FILE}"
-	-DOPKGLIBDIR="/usr/lib"
+	-DOPKGLIBDIR="${STATE_DIR_PREFIX}"
 	-DHOST_CPU_STR="${HOST_CPU}"
 	-DBUILD_CPU=${BUILD_CPU}
 	-DPATH_SPEC="${PATH_SPEC}"
-- 
2.11.0