]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
Update upstream and improve build
authorMathieu Baudier <redacted>
Mon, 23 Jun 2025 08:47:02 +0000 (10:47 +0200)
committerMathieu Baudier <redacted>
Mon, 23 Jun 2025 09:44:54 +0000 (11:44 +0200)
debian/changelog
debian/cmake/debian-ggml.cmake [deleted file]
debian/patches/0001-improve-cmake-build.patch
debian/rules

index 4623ac5e759c6a632af259c219b9107f26ed41d5..bd7f23de23b14b72ea61e7734045f7b25af0c387 100644 (file)
@@ -1,7 +1,7 @@
-ggml (0.0.2015-1) unstable; urgency=medium
+ggml (0.0.2199-1) unstable; urgency=medium
 
   * Update upstream
 
   Closes: #1096105
 
- -- Mathieu Baudier <mbaudier@argeo.org>  Sun, 25 May 2025 10:27:36 +0000
+ -- Mathieu Baudier <mbaudier@argeo.org>  Mon, 23 Jun 2025 08:33:37 +0000
diff --git a/debian/cmake/debian-ggml.cmake b/debian/cmake/debian-ggml.cmake
deleted file mode 100644 (file)
index b7ff693..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-set(GGML_BUILD_NUMBER 2015)
-
index f3eb25b18f9367d4ef9e2f6e573cbc7e22cb3a85..45ad82847de7e96f47db1bf5aa111893c9e2d999 100644 (file)
@@ -7,10 +7,10 @@ Subject: improve-cmake-build
  1 file changed, 4 insertions(+)
 
 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 0002ac1..48687f0 100644
+index 17c9366..90871d3 100644
 --- a/src/CMakeLists.txt
 +++ b/src/CMakeLists.txt
-@@ -353,5 +353,9 @@ if (BUILD_SHARED_LIBS)
+@@ -379,5 +379,9 @@ if (BUILD_SHARED_LIBS)
          set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)
          target_compile_definitions(${target} PRIVATE GGML_BUILD)
          target_compile_definitions(${target} PUBLIC  GGML_SHARED)
index 2690d72a76d67a275cce499f3db64465975868bc..c9a36db4f8e27a1ad15da8a26018a2c73af2a4fc 100755 (executable)
@@ -5,10 +5,12 @@
 LC_ALL := C.UTF-8
 export LC_ALL
 
-# multiarch
+# For multiarch
 include /usr/share/dpkg/architecture.mk
+# For DEB_VERSION_UPSTREAM
+include /usr/share/dpkg/pkg-info.mk
 
-build_multiarch=build/$(DEB_HOST_MULTIARCH)
+install_bin=debian/tmp/usr/bin
 install_lib_multiarch=debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
 install_libexec_multiarch=debian/tmp/usr/libexec/$(DEB_HOST_MULTIARCH)
 
@@ -33,18 +35,17 @@ endif
 
 %:
 # Use build/ for output, so that it is in the .gitignore of upstream
-       dh $@ --buildsystem=cmake --builddirectory=$(build_multiarch)
+       dh $@ --buildsystem=cmake
 
 override_dh_auto_configure:
        dh_auto_configure -- \
+       -DGGML_BUILD_NUMBER=$(subst 0.0.,,$(DEB_VERSION_UPSTREAM)) \
        -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \
-       -DCMAKE_SKIP_BUILD_RPATH=ON \
-       -DCMAKE_PROJECT_ggml_INCLUDE=debian/cmake/debian-ggml.cmake \
-       -DCMAKE_BUILD_TYPE=Release \
+       -DCMAKE_BUILD_TYPE=RelWithDebInfo \
        -DBUILD_SHARED_LIBS=ON \
        -DGGML_CCACHE=OFF \
        -DGGML_STANDALONE=ON \
-       -DGGML_BUILD_TESTS=OFF \
+       -DGGML_BUILD_TESTS=ON \
        -DGGML_BUILD_EXAMPLES=OFF \
        -DGGML_CPU_AARCH64=$(GGML_CPU_AARCH64) \
        -DGGML_BACKEND_DL=ON \
@@ -60,13 +61,10 @@ override_dh_auto_configure:
 override_dh_auto_install:
        dh_auto_install
        
-       # Since no CMake install configuration is available for the libggml-* backend target:
-       # - we set CMAKE_SKIP_BUILD_RPATH=ON during build
-       # - we install the backends explicitly in libexec so that executables can be installed with them
+       # Move backends *.so to libexec, as we don't want them lurking in /usr/bin 
        mkdir -p $(install_libexec_multiarch)/ggml
-       for file in $(build_multiarch)/bin/libggml-*.so; do \
-       #patchelf --set-soname $$(basename "$$file") $$file; \
-               install -t $(install_libexec_multiarch)/ggml $$file; \
+       for file in $(install_bin)/libggml-*.so; do \
+               mv $$file $(install_libexec_multiarch)/ggml; \
        done
 
 override_dh_installexamples: