Use libusb from a tarball

Now that Wasm support is included in release tarballs, we don't need to include libusb as a submodule anymore.
This commit is contained in:
Ingvar Stepanyan
2024-12-05 15:31:53 +00:00
parent 9f261eda0c
commit 8f7524219b
6 changed files with 7 additions and 8 deletions

1
.gitignore vendored
View File

@@ -2,5 +2,4 @@
node_modules
/deps/*
!/deps/libgphoto2
!/deps/libusb
/src/api.o

3
.gitmodules vendored
View File

@@ -2,6 +2,3 @@
path = deps/libgphoto2
url = https://github.com/RReverser/libgphoto2
branch = em
[submodule "libusb"]
path = deps/libusb
url = https://github.com/libusb/libusb

View File

@@ -49,7 +49,11 @@ $(SYSROOT)/lib/libltdl.la: deps/libtool/Makefile | $(SYSROOT)
## libusb
deps/libusb/Makefile: CONFIGURE_ARGS = --host=wasm32
deps/libusb/configure:
mkdir -p deps/libusb
curl -L https://github.com/libusb/libusb/releases/download/v1.0.27/libusb-1.0.27.tar.bz2 | tar jx --strip 1 -C deps/libusb
deps/libusb/Makefile: CONFIGURE_ARGS = --host=wasm32-emscripten
$(SYSROOT)/lib/libusb-1.0.la: deps/libusb/Makefile
$(MAKE) -C deps/libusb install
@@ -57,7 +61,7 @@ $(SYSROOT)/lib/libusb-1.0.la: deps/libusb/Makefile
## libgphoto2
deps/libgphoto2/Makefile: | $(SYSROOT)/lib/libusb-1.0.la
deps/libgphoto2/Makefile: CONFIGURE_ARGS = --host=wasm32 \
deps/libgphoto2/Makefile: CONFIGURE_ARGS = --host=wasm32-emscripten \
--without-libxml-2.0 --disable-nls --disable-ptpip --disable-disk \
--with-camlibs=ptp2

2
build/libapi.mjs generated

File diff suppressed because one or more lines are too long

BIN
build/libapi.wasm generated

Binary file not shown.

1
deps/libusb vendored

Submodule deps/libusb deleted from 2db3897d7e