Skip to content

Commit 90d0063

Browse files
ViralBShahKristofferC
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 <[email protected]> (cherry picked from commit 441ebf9)
1 parent 4fd544f commit 90d0063

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 OPENSSL MPFR NGHTTP2 \
@@ -60,8 +62,19 @@ $(foreach module, $(STDLIBS), $(eval $(call symlink_target,$$(JULIAHOME)/stdlib/
6062

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

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

0 commit comments

Comments
 (0)