From 02299bbd11067242f6bfa90966e9e7eec7d6f681 Mon Sep 17 00:00:00 2001 From: Matheus Date: Sat, 27 Jun 2026 13:32:54 -0300 Subject: [PATCH] ports: xfile --- patches/xfile/jinx-working-patch.patch | 18 ++++++++++ recipes/xfile | 49 ++++++++++++++++++++++++++ source-recipes/xfile | 5 +++ 3 files changed, 72 insertions(+) create mode 100644 patches/xfile/jinx-working-patch.patch create mode 100644 recipes/xfile create mode 100644 source-recipes/xfile diff --git a/patches/xfile/jinx-working-patch.patch b/patches/xfile/jinx-working-patch.patch new file mode 100644 index 00000000..5902466f --- /dev/null +++ b/patches/xfile/jinx-working-patch.patch @@ -0,0 +1,18 @@ +diff --git xfile-clean/src/res/prefs.ad xfile-workdir/src/res/prefs.ad +index 8a95e7d..700d911 100644 +--- xfile-clean/src/res/prefs.ad ++++ xfile-workdir/src/res/prefs.ad +@@ -28,7 +28,7 @@ XFile*toolsMenu.terminal.positionIndex: 0 + ! Environment variables used by the file type database + !----------------------------------------------------------------------------- + XFile.variable.terminal: xterm -e +-XFile.variable.textEditor: xedit ++XFile.variable.textEditor: xnedit + XFile.variable.imageViewer: ximaging + XFile.variable.imageEditor: xpaint + XFile.variable.audioPlayer: mplayer +@@ -47,4 +47,3 @@ XFile.variable.webBrowser: links -g + *FileList.lookupTimeout: 3 + *FileList.shortenLabels: 0 + *FileList.caseSensitive: False +- diff --git a/recipes/xfile b/recipes/xfile new file mode 100644 index 00000000..350eb85c --- /dev/null +++ b/recipes/xfile @@ -0,0 +1,49 @@ +name=xfile +revision=2 +from_source=xfile +imagedeps="build-essential" +hostdeps="xgcc xbinutils pkgconfig" +deps="base openmotif libx11 libxinerama libxpm libxt libxft fontconfig" + +configure() { + cp -rp ${source_dir}/* . + ln -sf ../mf/Makefile.generic src/Makefile +} + +build() { + make -C src -j${parallelism} \ + CC=x86_64-astral-gcc \ + PREFIX=${prefix} \ + MANDIR=${prefix}/share/man \ + SHAREDIR=${prefix}/share/xfile \ + APPLRESDIR=/etc/X11/app-defaults \ + INCDIRS="-I${sysroot_dir}${prefix}/include -I${sysroot_dir}${prefix}/include/X11" \ + LIBDIRS="-L${sysroot_dir}${prefix}/lib" \ + X_LIBS="-lX11 -lXinerama -lXm -lXt -lXpm $(x86_64-astral-pkg-config --libs xft fontconfig)" \ + CFLAGS="${CFLAGS}" \ + LDFLAGS="${LDFLAGS}" +} + +package() { + install -d ${dest_dir}${prefix}/bin + install -m755 src/xfile ${dest_dir}${prefix}/bin/xfile + ln -sf xfile ${dest_dir}${prefix}/bin/xfile-open + + install -d ${dest_dir}${prefix}/share/man/man1 + install -m644 src/xfile.1 ${dest_dir}${prefix}/share/man/man1/xfile.1 + + install -d ${dest_dir}/etc/X11/app-defaults + install -m644 src/xfile.ad ${dest_dir}/etc/X11/app-defaults/XFile + + install -d ${dest_dir}${prefix}/share/xfile/types + install -m644 src/default.db ${dest_dir}${prefix}/share/xfile/types/system.db + + install -d ${dest_dir}${prefix}/share/xfile/icons + install -m644 src/icons/*.xpm ${dest_dir}${prefix}/share/xfile/icons/ + install -m644 src/icons/README ${dest_dir}${prefix}/share/xfile/README.icons + + if [ -f src/xbm/cabinet.xpm ]; then + install -d ${dest_dir}${prefix}/share/pixmaps + install -m644 src/xbm/cabinet.xpm ${dest_dir}${prefix}/share/pixmaps/xfile_48x48.xpm + fi +} diff --git a/source-recipes/xfile b/source-recipes/xfile new file mode 100644 index 00000000..d56827ce --- /dev/null +++ b/source-recipes/xfile @@ -0,0 +1,5 @@ +name=xfile +version=1.2.0 +source_method=tarball +tarball_url="https://fastestcode.org/dl/xfile-src-${version}.tar.xz" +tarball_sha512="69befa5638f33ff82f1d4d24bb29fd953c6320f16f24af63f823819e349840a1b02fc486dfdac17675af818f742ecbbb03e15cfae7e70c5617d5a70043996d4d"