Skip to content

Commit 44101d1

Browse files
ViralBShahgbaraldi
authored andcommitted
Remove GPL libraries from the Julia build for binary-dist target (#59627)
Currently we support removing GPL dependencies in the full source build. This will also remove the GPL dependencies from the binary-dist target when built with JLLs. I almost feel like it would be simpler to have a new SuiteSparse_NOGPL_jll package. Then in the default build, things stay as they are. In the no gpl build use the new JLL. In the no GPL build, if someone then tries to use a GPL SuiteSparse library, a warning can be printed asking them to get a different build of Julia. @DilumAluthge @andreasnoack @giordano Thoughts? Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
1 parent f49d330 commit 44101d1

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

stdlib/Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ include $(JULIAHOME)/deps/*.version
1515

1616
VERSDIR := v$(shell cut -d. -f1-2 < $(JULIAHOME)/VERSION)
1717
DIRS := $(build_datarootdir)/julia/stdlib/$(VERSDIR) $(build_prefix)/manifest/$(VERSDIR)
18+
LIBDIR := $(build_datarootdir)/lib/julia
19+
1820
$(foreach dir,$(DIRS),$(eval $(call dir_target,$(dir))))
1921

2022
JLLS = DSFMT GMP CURL LIBGIT2 LLVM LIBSSH2 LIBUV MBEDTLS MPFR NGHTTP2 \
@@ -61,8 +63,19 @@ $(foreach module, $(STDLIBS), $(eval $(call symlink_target,$$(JULIAHOME)/stdlib/
6163

6264
STDLIBS_LINK_TARGETS := $(addprefix $(build_datarootdir)/julia/stdlib/$(VERSDIR)/,$(STDLIBS))
6365

66+
remove-gpl-libs:
67+
ifeq ($(USE_GPL_LIBS),0)
68+
@echo Removing GPL libs...
69+
-rm -f $(LIBDIR)/libcholmod*
70+
-rm -f $(LIBDIR)/libklu_cholmod*
71+
-rm -f $(LIBDIR)/librbio*
72+
-rm -f $(LIBDIR)/libspqr*
73+
-rm -f $(LIBDIR)/libumfpack*
74+
endif
75+
6476
getall get: $(addprefix get-, $(STDLIBS_EXT) $(JLL_NAMES))
65-
install: version-check $(addprefix install-, $(STDLIBS_EXT) $(JLL_NAMES)) $(STDLIBS_LINK_TARGETS)
77+
78+
install: version-check $(addprefix install-, $(STDLIBS_EXT) $(JLL_NAMES)) $(STDLIBS_LINK_TARGETS) remove-gpl-libs
6679
version-check: $(addprefix version-check-, $(STDLIBS_EXT))
6780
uninstall: $(addprefix uninstall-, $(STDLIBS_EXT))
6881
extstdlibclean:

0 commit comments

Comments
 (0)