summaryrefslogtreecommitdiff
path: root/community/adesklets
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/adesklets
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/adesklets')
-rw-r--r--community/adesklets/PKGBUILD52
-rw-r--r--community/adesklets/adesklets.install31
-rw-r--r--community/adesklets/fontconfig-2.4.patch50
3 files changed, 133 insertions, 0 deletions
diff --git a/community/adesklets/PKGBUILD b/community/adesklets/PKGBUILD
new file mode 100644
index 000000000..d7f97a0c7
--- /dev/null
+++ b/community/adesklets/PKGBUILD
@@ -0,0 +1,52 @@
+# $Id: PKGBUILD 26100 2010-09-13 15:56:15Z schuay $
+# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+# Contributor: Fubar
+
+pkgname=adesklets
+pkgver=0.6.1
+pkgrel=11
+pkgdesc="An imlib2-based system to have interactive 'desklets'."
+arch=('i686' 'x86_64')
+url="http://adesklets.sourceforge.net/"
+license=('GPL2')
+depends=('imlib2' 'fontconfig' 'python2' 'perl' 'ttf-bitstream-vera' 'libx11')
+install=$pkgname.install
+options=('!emptydirs')
+source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2 \
+ fontconfig-2.4.patch)
+
+md5sums=('cd390c9398449c5566033e2e4792bccb'
+ '0374aec97670c90713fcabc2710e2160')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ #patch for fontconfig => 2.4
+ patch -Np0 -i ${srcdir}/fontconfig-2.4.patch
+
+ autoreconf
+ ./configure --prefix=/usr
+
+ #makefile Fix
+ sed -i 's/\/bin\/sh//' doc/Makefile
+
+ #python2 fix
+ for file in checkin installer submit; do
+ sed -i 's_/usr/bin/env python_/usr/bin/env python2_' utils/${pkgname}_${file}
+ done
+
+ make
+}
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} INSTALLDIRS=vendor install
+
+ rm ${pkgdir}/usr/share/info/dir
+
+ #remove the font stuff
+ rm -f ${pkgdir}/usr/share/adesklets/{FONT_LICENSE,Vera.ttf}
+
+ find ${pkgdir} -name '.packlist' -exec rm '{}' \;
+ find ${pkgdir} -name 'perllocal.pod' -exec rm '{}' \;
+}
diff --git a/community/adesklets/adesklets.install b/community/adesklets/adesklets.install
new file mode 100644
index 000000000..cae17e499
--- /dev/null
+++ b/community/adesklets/adesklets.install
@@ -0,0 +1,31 @@
+infodir=/usr/share/info
+filelist=(adesklets.info adesklets_fr.info)
+
+post_install() {
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+
+ getent group adesklets > /dev/null || usr/sbin/groupadd -g 107 adesklets
+cat << EOF
+
+==> To be able to save configs of adesklets
+==> add your user to the adesklets group:
+==> # gpasswd -a USERNAME adesklets
+
+EOF
+}
+
+post_upgrade() {
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
+
+post_remove() {
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+
+ usr/sbin/groupdel adesklets &>/dev/null
+}
diff --git a/community/adesklets/fontconfig-2.4.patch b/community/adesklets/fontconfig-2.4.patch
new file mode 100644
index 000000000..e7a1ad5ca
--- /dev/null
+++ b/community/adesklets/fontconfig-2.4.patch
@@ -0,0 +1,50 @@
+--- configure.ac
++++ configure.ac
+@@ -1,4 +1,4 @@
+-dnl Initialize autoconf and automake
++nl Initialize autoconf and automake
+ AC_INIT
+ AC_CONFIG_SRCDIR(src/main.c)
+ AC_PREREQ(2.52)
+@@ -428,7 +428,18 @@ AC_TRY_LINK(
+ #include <fontconfig/fontconfig.h>
+ , FcInit(),
+ AC_MSG_RESULT([yes])
+-AC_DEFINE(HAVE_FONTCONFIG_FONTCONFIG_H,1,[Define to 1 if you have the <fontconfig/fontconfig.h> header file.]),
++AC_DEFINE(HAVE_FONTCONFIG_FONTCONFIG_H,1,[Define to 1 if you have the <fontconfig/fontconfig.h> header file.])
++
++AC_MSG_CHECKING([For fontconfig FcFini()])
++AC_TRY_LINK(
++#include <fontconfig/fontconfig.h>
++, FcFini(),
++AC_MSG_RESULT([yes])
++AC_DEFINE(HAVE_FONTCONFIG_FCFINI,1,[Define to 1 if FcFini() call exists])
++,
++AC_MSG_RESULT([no]))
++
++,
+ AC_MSG_RESULT([no])
+ FONTCONFIG_LIBS=
+ FONTCONFIG_CFLAGS=
+--- src/xwindow.c
++++ src/xwindow.c
+@@ -123,9 +123,17 @@
+ if ((strlen((char*)file)>4) &&
+ (strstr((char*)file+strlen((char*)file)-4,".ttf")))
+ imlib_add_path_to_font_path(dirname((char*)file));
+- FcFontSetDestroy(fs);
+- FcObjectSetDestroy(os);
+ }
++#ifdef HAVE_FONTCONFIG_FCFINI
++ FcFini();
++#else
++ /* On FontConfig >= 2.4, this causes a segfault, probably due to the new
++ caching mechanism: we don't have to care, since FcFini() always exists,
++ and does the dirty dessalocation job just fine.
++ */
++ if (fs) FcFontSetDestroy(fs);
++ FcObjectSetDestroy(os);
++#endif
+ }
+ #endif
+ imlib_add_path_to_font_path(".");