]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
guix: remove linuxdeployqt
authortobtoht <tob@featherwallet.org>
Fri, 24 Mar 2023 13:22:59 +0000 (14:22 +0100)
committertobtoht <tob@featherwallet.org>
Fri, 24 Mar 2023 14:38:40 +0000 (15:38 +0100)
contrib/AppImage/build-appimage.sh
contrib/depends/packages/native_linuxdeployqt.mk [deleted file]
contrib/depends/packages/native_patchelf.mk [deleted file]
contrib/depends/packages/packages.mk
contrib/guix/manifest.scm

index 9dff56893dafcc44c07b65002d1db51850863cd9..3bd064d415f98b9cb33ace05020fec3057df3bde 100755 (executable)
@@ -3,41 +3,42 @@
 set -e
 unset SOURCE_DATE_EPOCH
 
+# Manually create the AppImage (reproducibly) since linuxdeployqt is not able to create cross-compiled AppImages
+
 APPDIR="$PWD/feather.AppDir"
 
 mkdir -p "$APPDIR"
 mkdir -p "$APPDIR/usr/share/applications/"
 mkdir -p "$APPDIR/usr/bin"
 mkdir -p "$APPDIR/usr/lib"
-mkdir -p "$APPDIR/usr/plugins"
 
 cp "src/assets/feather.desktop" "$APPDIR/usr/share/applications/feather.desktop"
+cp "src/assets/feather.desktop" "$APPDIR/feather.desktop"
 cp "src/assets/images/appicons/64x64.png" "$APPDIR/feather.png"
 cp "build/bin/feather" "$APPDIR/usr/bin/feather"
 chmod +x "$APPDIR/usr/bin/feather"
 
-# libgcc_s.so.1 not found
-export LD_LIBRARY_PATH=/feather/contrib/depends/x86_64-linux-gnu/lib/:/gnu/store:/gnu/store/0wfxmi621h9xn4169xzhzd1p5g91cj9m-gcc-cross-x86_64-linux-gnu-10.3.0-lib/x86_64-linux-gnu/lib/
+mkdir -p "${APPDIR}/usr/lib"
+
+XCB_LIBS=(libxcb-cursor.so.0 libxcb-render.so.0 libxcb-xfixes.so.0 libxcb-icccm.so.4 libxcb-render-util.so.0
+          libxcb-xkb.so.1 libxcb-image.so.0 libxcb-shape.so.0 libxkbcommon.so.0 libxcb-keysyms.so.1
+          libxcb-shm.so.0 libxkbcommon-x11.so.0 libxcb-randr.so.0 libxcb-sync.so.1)
 
-# linuxdeployqt glibc moaning bypass
-mkdir -p "$APPDIR/usr/share/doc/libc6"
-touch "$APPDIR/usr/share/doc/libc6/copyright"
+for lib in "${XCB_LIBS[@]}"
+do
+    echo "${lib}"
+    cp "/feather/contrib/depends/${HOST}/lib/${lib}" "${APPDIR}/usr/lib/"
+    "${HOST}-strip" "${APPDIR}/usr/lib/${lib}"
+    patchelf --set-rpath "\$ORIGIN" "${APPDIR}/usr/lib/${lib}"
+done
 
-# TODO: linuxdeployqt can't build ARM appimages on x86_64, skip this step for ARM builds
-case "$HOST" in
-    x86_64*)
-        linuxdeployqt feather.AppDir/usr/share/applications/feather.desktop -verbose=2 -bundle-non-qt-libs -unsupported-allow-new-glibc
-        rm "$APPDIR/AppRun"
-        ;;
-esac
+patchelf --set-rpath "\$ORIGIN/../lib" "$APPDIR/usr/bin/feather"
 
 cp "contrib/AppImage/AppRun" "$APPDIR/"
 chmod +x "$APPDIR/AppRun"
 
 find feather.AppDir/ -exec touch -h -a -m -t 202101010100.00 {} \;
 
-# Manually create AppImage (reproducibly)
-
 mksquashfs feather.AppDir feather.squashfs -info -root-owned -no-xattrs -noappend -fstime 0
 # mksquashfs writes a timestamp to the header
 printf '\x00\x00\x00\x00' | dd conv=notrunc of=feather.squashfs bs=1 seek=$((0x8))
diff --git a/contrib/depends/packages/native_linuxdeployqt.mk b/contrib/depends/packages/native_linuxdeployqt.mk
deleted file mode 100644 (file)
index 2c2ae69..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-package=native_linuxdeployqt
-$(package)_version=8
-$(package)_download_path=https://github.com/probonopd/linuxdeployqt/archive/refs/tags/
-$(package)_file_name=8.tar.gz
-$(package)_sha256_hash=5597279392431aef16997c4b6892b5aa044392f7e8869439ebea33945a8bdbad
-$(package)_dependencies=qt
-
-define $(package)_config_cmds
-    qmake
-endef
-
-define $(package)_build_cmds
-    $(MAKE)
-endef
-
-define $(package)_stage_cmds
-    $(MAKE) INSTALL_ROOT=$($(package)_staging_dir) install
-endef
\ No newline at end of file
diff --git a/contrib/depends/packages/native_patchelf.mk b/contrib/depends/packages/native_patchelf.mk
deleted file mode 100644 (file)
index 8abb753..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-package=native_patchelf
-$(package)_version=0.14.5
-$(package)_download_path=https://github.com/NixOS/patchelf/releases/download/$($(package)_version)/
-$(package)_file_name=patchelf-$($(package)_version).tar.gz
-$(package)_sha256_hash=113ada3f1ace08f0a7224aa8500f1fa6b08320d8f7df05ff58585286ec5faa6f
-
-define $(package)_config_cmds
-    ./configure --prefix=$(build_prefix)
-endef
-
-define $(package)_build_cmds
-    $(MAKE)
-endef
-
-define $(package)_stage_cmds
-    $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
\ No newline at end of file
index e21e4657b81caf8ec14f4a744e19118689253825..84ead77adf87eb7fcb348296ddbad35a6c3a5145 100644 (file)
@@ -2,7 +2,7 @@ packages := boost openssl libiconv unbound qrencode zbar sodium polyseed hidapi
 native_packages := native_libxcb native_xcb_proto native_libXau native_xproto native_libxkbcommon native_libxcb_util native_libxcb_util_render native_libxcb_util_keysyms native_libxcb_util_image native_libxcb_util_cursor native_libxcb_util_wm native_qt native_protobuf
 
 linux_packages := eudev liblzma libarchive libfuse libsquashfuse libappimage appimage_runtime
-linux_native_packages = native_patchelf
+linux_native_packages =
 
 darwin_packages :=
 darwin_native_packages = darwin_sdk native_cctools native_libtapi native_clang
index 50fe0ba939ad8bf54b893b6888f96b8c2fdaaa45..b786f60e67c0a4067db09359dabb173bc0c59f26 100644 (file)
@@ -33,7 +33,6 @@
              (gnu packages shells)
              (gnu packages tls)
              (gnu packages version-control)
-             (gnu packages qt)
              (guix build-system gnu)
              (guix build-system perl)
              (guix build-system python)
@@ -286,45 +285,6 @@ parse, modify and abstract ELF, PE and MachO formats.")
                                            "glibc-2.27-fcommon.patch"
                                            "glibc-2.27-guix-prefix.patch"))))))
 
-(define-public linuxdeployqt
-  (package
-    (name "linuxdeployqt")
-    (version "b4697483c98120007019c3456914cfd1dba58384")
-    (source
-      (origin
-        (method git-fetch)
-        (uri (git-reference
-               (url "https://github.com/probonopd/linuxdeployqt")
-               (commit version)))
-        (file-name (git-file-name name version))
-        (sha256
-          (base32
-            "0zp1c5pya39g5nwkly1ix58svj08lfsfmv530jyf2ya7m4vvkhfs"))))
-    (build-system gnu-build-system)
-    (arguments
-        `(#:phases
-           (modify-phases %standard-phases
-             (replace 'configure
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (let ((out (assoc-ref outputs "out")))
-                   (invoke "qmake"
-                     (string-append "PREFIX=" out)
-                     "linuxdeployqt.pro"))))
-             (replace 'install
-               ;; Messes up for some reason.
-               (lambda* (#:key outputs #:allow-other-keys)
-                 (let* ((out (assoc-ref outputs "out"))
-                        (bin (string-append out "/bin")))
-                   (install-file "bin/linuxdeployqt" bin)
-                   #t))))))
-    (native-inputs (list qtbase-5))
-    (home-page "https://github.com/probonopd/linuxdeployqt")
-    (synopsis "Linux deploy tool")
-    (description "Makes Linux applications self-contained by copying in the libraries
-    and plugins that the application uses, and optionally generates an AppImage.
-    Can be used for Qt and other applications ")
-    (license license:gpl3+)))
-
 (define-public ldid
   (package
     (name "ldid")
@@ -393,7 +353,6 @@ parse, modify and abstract ELF, PE and MachO formats.")
         gperf
         gettext-minimal
         squashfs-tools
-        linuxdeployqt
         ;; Native GCC 10 toolchain
         gcc-toolchain-10
         (list gcc-toolchain-10 "static")