New comment by yopito on void-packages repository https://github.com/void-linux/void-packages/issues/23964#issuecomment-682203662 Comment: ``` $ git format-patch -1 0001-New-package-doublecmd-0.9.9.patch ``` ``` $ cat 0001-New-package-doublecmd-0.9.9.patch From dd01d7c29a2f68d4d21a4ffde453c0505eb6f080 Mon Sep 17 00:00:00 2001 From: yopito Date: Mon, 24 Aug 2020 23:33:17 +0200 Subject: [PATCH] New package: doublecmd 0.9.9 request https://github.com/void-linux/void-packages/issues/23964 --- srcpkgs/doublecmd-gtk2 | 1 + srcpkgs/doublecmd/patches/fix-install.patch | 21 +++++++ srcpkgs/doublecmd/patches/lazbuild.patch | 13 ++++ srcpkgs/doublecmd/template | 67 +++++++++++++++++++++ srcpkgs/doublecmd/update | 1 + 5 files changed, 103 insertions(+) create mode 120000 srcpkgs/doublecmd-gtk2 create mode 100644 srcpkgs/doublecmd/patches/fix-install.patch create mode 100644 srcpkgs/doublecmd/patches/lazbuild.patch create mode 100644 srcpkgs/doublecmd/template create mode 100644 srcpkgs/doublecmd/update diff --git a/srcpkgs/doublecmd-gtk2 b/srcpkgs/doublecmd-gtk2 new file mode 120000 index 0000000000..158ec6a12e --- /dev/null +++ b/srcpkgs/doublecmd-gtk2 @@ -0,0 +1 @@ +doublecmd \ No newline at end of file diff --git a/srcpkgs/doublecmd/patches/fix-install.patch b/srcpkgs/doublecmd/patches/fix-install.patch new file mode 100644 index 0000000000..edd6961332 --- /dev/null +++ b/srcpkgs/doublecmd/patches/fix-install.patch @@ -0,0 +1,21 @@ +* no lib suffix +* doublecmd.zdli is nonexistant + +--- install/linux/install.sh.ORIG ++++ install/linux/install.sh +@@ -14,6 +14,7 @@ + else + LIB_SUFFIX= + fi ++LIB_SUFFIX= + + # Parse input parameters + CKNAME=$(basename "$0") +@@ -70,7 +70,6 @@ + + # Copy files + cp -a doublecmd $DC_INSTALL_DIR/ +-cp -a doublecmd.zdli $DC_INSTALL_DIR/ + cp -a doublecmd.ext.example $DC_INSTALL_DIR/ + cp -a pixmaps.txt $DC_INSTALL_DIR/ + cp -a multiarc.ini $DC_INSTALL_DIR/ diff --git a/srcpkgs/doublecmd/patches/lazbuild.patch b/srcpkgs/doublecmd/patches/lazbuild.patch new file mode 100644 index 0000000000..99a8cd520c --- /dev/null +++ b/srcpkgs/doublecmd/patches/lazbuild.patch @@ -0,0 +1,13 @@ +XXX lazarusdir should be expressed using XBPS_* shell variables for crossbuild ? + +--- build.sh.ORIG ++++ build.sh +@@ -15,7 +15,7 @@ + # default - compiling DC only (using by default) + + # path to lazbuild +-export lazbuild=$(which lazbuild) ++export lazbuild="/usr/bin/lazbuild --lazarusdir=/usr/lib/lazarus" + + # Set up widgetset: gtk or gtk2 or qt + # Set up processor architecture: i386 or x86_64 diff --git a/srcpkgs/doublecmd/template b/srcpkgs/doublecmd/template new file mode 100644 index 0000000000..82ff5781f3 --- /dev/null +++ b/srcpkgs/doublecmd/template @@ -0,0 +1,67 @@ +# Template file for 'doublecmd' +# XXX multiple licenses ? +# XXX gtk3 toolkit fails +# XXX crossbuild support +# XXX plugin support: need additional dep ? +pkgname=doublecmd +version=0.9.9 +revision=1 +archs="x86_64 i686" # as lazarus +make_build_args="all" +hostmakedepends="lazarus" +makedepends="gtk+-devel" +short_desc="Twin-panel (commander-style) file manager - qt5 toolkit" +maintainer="Orphaned " +license="GPL-2.0-or-later" +homepage="https://doublecmd.sourceforge.io/" +distfiles="${SOURCEFORGE_SITE}/doublecmd/doublecmd-${version}-src.tar.gz" +checksum=5e5198fbcb8e560d01143d136aa2772f836c5cb17656bde63c860ea14816d8b2 +nopie=yes + +post_patch() { + # duplicate source code to build for each toolkit + cd .. + cp -a ${wrksrc} build.qt5 + cp -a ${wrksrc} build.gtk2 + mv build.qt5 build.gtk2 ${wrksrc}/. +} + +do_build() { + # XXX crossbuild broken. wrong expression or usage ? + #if [ -n "$XBPS_TARGET_MACHINE" ]; then + # export CPU_TARGET=$XBPS_TARGET_MACHINE + #fi + + msg_normal "${pkgname}-${version}: building for toolkit qt5 ...\n" + pushd build.qt5 + ./build.sh $make_build_args qt5 + popd + + msg_normal "${pkgname}-${version}: building for toolkit gtk2 ...\n" + pushd build.gtk2 + ./build.sh $make_build_args gtk2 + popd +} + +do_install() { + # main package (qt5) + msg_normal "${pkgname}-${version}: install for toolkit qt5 ...\n" + pushd build.qt5 + ./install/linux/install.sh --install-prefix=$DESTDIR + popd + + # gtk2 package + msg_normal "${pkgname}-${version}: install for toolkit gtk2 ...\n" + pushd build.gtk2 + ./install/linux/install.sh --install-prefix=$DESTDIR/gtk2 + popd +} + +doublecmd-gtk2_package() { + short_desc="${short_desc/qt5/gtk2}" + conflicts="doublecmd" + pkg_install() { + mv ${DESTDIR}/gtk2/* ${PKGDESTDIR}/. + rmdir ${DESTDIR}/gtk2 + } +} diff --git a/srcpkgs/doublecmd/update b/srcpkgs/doublecmd/update new file mode 100644 index 0000000000..9f6123634b --- /dev/null +++ b/srcpkgs/doublecmd/update @@ -0,0 +1 @@ +ignore="*.qt* *.gtk*" -- 2.28.0 ```