Skip to content

Commit

Permalink
Use libusb from a tarball
Browse files Browse the repository at this point in the history
Now that Wasm support is included in release tarballs, we don't need to include libusb as a submodule anymore.
  • Loading branch information
RReverser committed Dec 5, 2024
1 parent 9f261ed commit 8f75242
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
node_modules
/deps/*
!/deps/libgphoto2
!/deps/libusb
/src/api.o
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,19 @@ $(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

## 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

Expand Down
2 changes: 1 addition & 1 deletion build/libapi.mjs

Large diffs are not rendered by default.

Binary file modified build/libapi.wasm
Binary file not shown.
1 change: 0 additions & 1 deletion deps/libusb
Submodule libusb deleted from 2db389

0 comments on commit 8f75242

Please sign in to comment.