From 04fe56b4e1326f814871508cf17f840fd5f21e12 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Thu, 8 May 2025 17:14:19 +0300 Subject: [PATCH] Initial Commit --- pkg.info | 9 +++++++ source-files/imlib2-config.patch | 42 ++++++++++++++++++++++++++++++++ source.sh | 31 +++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 pkg.info create mode 100644 source-files/imlib2-config.patch create mode 100644 source.sh diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..bf0ed09 --- /dev/null +++ b/pkg.info @@ -0,0 +1,9 @@ +name: idesk +description: Program that shows users icons on their desktop +version: 0.7.8 +url: https://sourceforge.net/projects/idesk/ +license: GPL +architecture: any +depends: ["gcc","imlib2","libpng","libxft","libxpm"] +make_depends: ["git","pkgconf"] +type: source diff --git a/source-files/imlib2-config.patch b/source-files/imlib2-config.patch new file mode 100644 index 0000000..e123b02 --- /dev/null +++ b/source-files/imlib2-config.patch @@ -0,0 +1,42 @@ +From 7ed7fae76d2896e02c115448b569d964dab895ee Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Fri, 15 Jul 2022 08:22:12 +0100 +Subject: [PATCH] build: use pkg-config to find imlib2 + +imlib2 1.7.5+ drops imlib2-config, hence pkg-config +must now be used to find it. + +Bug: https://bugs.gentoo.org/828962 +Closes: https://github.com/neagix/idesk/issues/7 +--- + configure.in | 17 ++++------------- + 1 file changed, 4 insertions(+), 13 deletions(-) + +diff --git a/configure.in b/configure.in +index 805585d..b7a1032 100644 +--- a/configure.in ++++ b/configure.in +@@ -94,19 +94,10 @@ LIBS="$LIBS $Xext_lib" + + dnl Imlib2 detection + +-AC_PATH_GENERIC(imlib2, , [ +- AC_SUBST(IMLIB_LIBS) +- AC_SUBST(IMLIB_CXXFLAGS) ], +- AC_MSG_ERROR(Cannot find imlib2: Is imlib2-config in the path? +- You need Imlib2 to build Idesk. Verify that you have Imlib2-dev)) +- +-dnl the above doesn't work for some reason :/ +-IMLIB_LIBS=`imlib2-config --libs` +-IMLIB_CFLAGS=`imlib2-config --cflags` +-AC_SUBST(IMLIB_LIBS) +-AC_SUBST(IMLIB_CXXFLAGS) +- +-CXXFLAGS="$CXXFLAGS $IMLIB_CXXFLAGS" ++PKG_PROG_PKG_CONFIG ++PKG_CHECK_MODULES([IMLIB], [imlib2 > 1.0]) ++ ++CXXFLAGS="$CXXFLAGS $IMLIB_CFLAGS" + LIBS="$LIBS $IMLIB_LIBS" + + diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..22d7b43 --- /dev/null +++ b/source.sh @@ -0,0 +1,31 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +REPO="https://github.com/neagix/idesk" +FILENAME="${DOWNLOAD##*/}" + +# The prepare function is executed in the root of the temp directory +# This function is used for downloading files and putting them into the correct location +prepare() { + git clone "$REPO" --branch v"$BPM_PKG_VERSION" "$BPM_SOURCE" + + cd "$BPM_SOURCE" + git apply ../imlib2-config.patch +} + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + autoreconf --install + ./configure --prefix=/usr + make +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + make DESTDIR="$BPM_OUTPUT" install + + install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/idesk/COPYING +}