From aeb2768c5bf9c00d2f27beb2a476bf6ac47cd0a2 Mon Sep 17 00:00:00 2001
From: ruki <waruqi@gmail.com>
Date: Sun, 20 Nov 2022 22:23:08 +0800
Subject: [PATCH] improve libusb

---
 packages/l/libusb/xmake.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/packages/l/libusb/xmake.lua b/packages/l/libusb/xmake.lua
index 19d951222..f64b74976 100644
--- a/packages/l/libusb/xmake.lua
+++ b/packages/l/libusb/xmake.lua
@@ -88,6 +88,9 @@ package("libusb")
         local configs = {}
         table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
         table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
+        if package:config("pic") ~= false then
+            table.insert(configs, "--with-pic")
+        end
         local cflags, ldflags
         if package:is_plat("linux") then
             cflags = "-I" .. package:dep("eudev"):installdir("include")