diff options
author | fuzzard <fuzzard@kodi.tv> | 2022-03-14 19:14:52 +1000 |
---|---|---|
committer | fuzzard <fuzzard@kodi.tv> | 2022-03-15 20:27:43 +1000 |
commit | 54f7a910bb618486fdcaecd6d0cfa09af3fb125e (patch) | |
tree | 739fee6375fb8a6cf21c73aae340268c662251c1 /tools/depends/target | |
parent | 47a9322dafc02ee19c44e10fe8451926e13ebe36 (diff) |
[tools/depends][target] libnfs use cmake build
Patch has been sent and accepted upstream. Remove next release update
Patch only effects build, so i dont see a reason to do a hash bump until a
release is made upstream.
Diffstat (limited to 'tools/depends/target')
-rw-r--r-- | tools/depends/target/libnfs/001-fix-cmake-build.patch | 25 | ||||
-rw-r--r-- | tools/depends/target/libnfs/LIBNFS-VERSION | 1 | ||||
-rw-r--r-- | tools/depends/target/libnfs/Makefile | 26 |
3 files changed, 41 insertions, 11 deletions
diff --git a/tools/depends/target/libnfs/001-fix-cmake-build.patch b/tools/depends/target/libnfs/001-fix-cmake-build.patch new file mode 100644 index 0000000000..fe59fffca5 --- /dev/null +++ b/tools/depends/target/libnfs/001-fix-cmake-build.patch @@ -0,0 +1,25 @@ +--- a/cmake/Macros.cmake ++++ b/cmake/Macros.cmake +@@ -12,4 +12,12 @@ + add_library(${name} OBJECT ${SOURCES} ${HEADERS}) + target_include_directories(${name} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>) + set(CORE_LIBRARIES "${name};${CORE_LIBRARIES}" CACHE INTERNAL "") ++ ++ # no need to install core libs if we build shared library ++ if(NOT BUILD_SHARED_LIBS) ++ install(TARGETS ${name} EXPORT libnfs ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ endif() + endfunction() +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -116,6 +116,7 @@ + + install(FILES mount/libnfs-raw-mount.h + nfs/libnfs-raw-nfs.h ++ nfs4/libnfs-raw-nfs4.h + nlm/libnfs-raw-nlm.h + nsm/libnfs-raw-nsm.h + portmap/libnfs-raw-portmap.h diff --git a/tools/depends/target/libnfs/LIBNFS-VERSION b/tools/depends/target/libnfs/LIBNFS-VERSION index dbe9fb8775..ec25ff92f2 100644 --- a/tools/depends/target/libnfs/LIBNFS-VERSION +++ b/tools/depends/target/libnfs/LIBNFS-VERSION @@ -2,3 +2,4 @@ LIBNAME=libnfs VERSION=5.0.1 ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz SHA512=71f2dcfa8945c1cb6402f5fca10b1f7a4720f7589807d6130eb55361f05ef4684f9cc9a177ece4e13d3847ac6606924115fac7b27749cecc2f5aca6fa9c63ebf +BYPRODUCT=libnfs.a diff --git a/tools/depends/target/libnfs/Makefile b/tools/depends/target/libnfs/Makefile index 30ce28152b..ee8bb3048b 100644 --- a/tools/depends/target/libnfs/Makefile +++ b/tools/depends/target/libnfs/Makefile @@ -1,31 +1,35 @@ include ../../Makefile.include LIBNFS-VERSION ../../download-files.include -DEPS= ../../Makefile.include Makefile LIBNFS-VERSION ../../download-files.include +DEPS= ../../Makefile.include Makefile LIBNFS-VERSION ../../download-files.include \ + 001-fix-cmake-build.patch # configuration settings -CONFIGURE=./configure --prefix=$(PREFIX) --disable-shared --disable-utils --disable-examples --disable-werror +CMAKE_OPTIONS=-DBUILD_SHARED_LIBS=OFF \ + -DENABLE_TESTS=OFF \ + -DENABLE_DOCUMENTATION=OFF \ + -DENABLE_UTILS=OFF \ + -DENABLE_EXAMPLES=OFF -LIBDYLIB=$(PLATFORM)/lib/.libs/$(LIBNAME).a +LIBDYLIB=$(PLATFORM)/build/lib/$(BYPRODUCT) all: .installed-$(PLATFORM) - $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) $(DEPS) -rm -rf $(PLATFORM); mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - cd $(PLATFORM); ./bootstrap - cd $(PLATFORM); $(CONFIGURE) + cd $(PLATFORM); mkdir -p build + cd $(PLATFORM); patch -p1 -i ../001-fix-cmake-build.patch + cd $(PLATFORM)/build; $(CMAKE) $(CMAKE_OPTIONS) .. $(LIBDYLIB): $(PLATFORM) - $(MAKE) -C $(PLATFORM) + $(MAKE) -C $(PLATFORM)/build .installed-$(PLATFORM): $(LIBDYLIB) - $(MAKE) -C $(PLATFORM) install + $(MAKE) -C $(PLATFORM)/build install touch $@ clean: - $(MAKE) -C $(PLATFORM) clean - rm -r .installed-$(PLATFORM) - rm -rf $(PLATFORM) + $(MAKE) -C $(PLATFORM)/build clean + rm -f .installed-$(PLATFORM) distclean:: rm -rf $(PLATFORM) .installed-$(PLATFORM) |