diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2012-01-27 14:27:56 +0100 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2012-01-27 14:27:56 +0100 |
commit | 6cc3a23ea1231ea627394677df2bebdc403acb38 (patch) | |
tree | 14c20984a10df92c0b5cbb3b4477f0358cf8b01f /community/electricsheep | |
parent | 8e40bdbb2496be15fdba2e683af427bc2333be42 (diff) | |
parent | 3741146d50cb93e8985f8aac937e36d35ee76446 (diff) |
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts:
community-staging/torcs/PKGBUILD
community/fceux/PKGBUILD
core/gcc/PKGBUILD
core/wireless_tools/PKGBUILD
extra/gtk-xfce-engine/PKGBUILD
extra/gtk2/PKGBUILD
multilib-testing/lib32-glibc/PKGBUILD
multilib/gcc-multilib/PKGBUILD
multilib/lib32-sdl/PKGBUILD
testing/kdebase-runtime/PKGBUILD
testing/kdelibs/PKGBUILD
testing/libarchive/PKGBUILD
testing/systemd/PKGBUILD
testing/systemd/systemd.install
testing/udev/PKGBUILD
Diffstat (limited to 'community/electricsheep')
-rw-r--r-- | community/electricsheep/PKGBUILD | 12 | ||||
-rw-r--r-- | community/electricsheep/PKGBUILD.svn | 60 | ||||
-rw-r--r-- | community/electricsheep/electricsheep-pref-segfault.patch | 270 |
3 files changed, 337 insertions, 5 deletions
diff --git a/community/electricsheep/PKGBUILD b/community/electricsheep/PKGBUILD index 41402f4b6..f2ac0230c 100644 --- a/community/electricsheep/PKGBUILD +++ b/community/electricsheep/PKGBUILD @@ -1,24 +1,26 @@ -# $Id: PKGBUILD 58393 2011-11-12 17:16:52Z ibiru $ +# $Id: PKGBUILD 62754 2012-01-25 20:28:55Z ebelanger $ # Maintainer: Eric Bélanger <eric@archlinux.org> pkgname=electricsheep pkgver=2.7b12 -pkgrel=4 +pkgrel=5 pkgdesc="A screensaver that realize the collective dream of sleeping computers from all over the internet" arch=('i686' 'x86_64' 'mips64el') url="http://community.electricsheep.org/" license=('GPL') -depends=('curl' 'expat' 'flam3' 'ffmpeg' 'mplayer' 'libglade') +depends=('curl' 'flam3' 'ffmpeg' 'mplayer' 'libglade') makedepends=('xscreensaver') optdepends=('xscreensaver: to use electricsheep with xscreensaver') source=(ftp://ftp.archlinux.org/other/community/${pkgname}/${pkgname}-${pkgver}.tar.bz2 - electricsheep-ffmpeg.patch) + electricsheep-ffmpeg.patch electricsheep-pref-segfault.patch) sha1sums=('fd1c307912905ba456189efbb546ef0fe336fa32' - 'd6816e27c2a2f6c74ae61c99ad2d7fb28b1d1825') + 'd6816e27c2a2f6c74ae61c99ad2d7fb28b1d1825' + 'bdf0f66fdbb5741671e8bb127bd76ef236d0e44a') build() { cd "${srcdir}/${pkgname}-${pkgver}" patch -p1 -i "${srcdir}/electricsheep-ffmpeg.patch" + patch -p1 -i "${srcdir}/electricsheep-pref-segfault.patch" ./configure --prefix=/usr make } diff --git a/community/electricsheep/PKGBUILD.svn b/community/electricsheep/PKGBUILD.svn new file mode 100644 index 000000000..2fc8a26ff --- /dev/null +++ b/community/electricsheep/PKGBUILD.svn @@ -0,0 +1,60 @@ +# $Id: PKGBUILD 57680 2011-11-01 05:03:57Z ebelanger $ +# Maintainer: Eric Bélanger <eric@archlinux.org> +# Contributor: Alexander Rødseth <rodseth@gmail.com> +pkgname=electricsheep +pkgver=2.7b34 +pkgrel=1 +pkgdesc="Screensaver that realize the collective dream of computers all over the internet" +arch=('x86_64' 'i686') +url="http://community.electricsheep.org/" +license=('GPL') +depends=('curl' 'expat' 'flam3' 'ffmpeg' 'mplayer' 'libglade' 'tinyxml' 'boost' 'gtk2' 'lua') +#subversion libgtk2.0 libgl1-mesa libavcodec libavformat libswscale liblua5 libcurl4-openssl libxml2 libjpeg8 libgtop2 libboost libboost-filesystem libboost-thread libtinyxml libglut3 +makedepends=('xscreensaver') +optdepends=('xscreensaver: to use electricsheep with xscreensaver') +_fixed_revision=107 + +build() { + cd "$srcdir" + + msg2 "Checking out svn revision $_fixed_revision (in lack of a Linux release for $pkgver)..." + if [[ -d "$pkgname/.svn" ]]; then + (cd "$pkgname" && svn up -r $_fixed_revision) + else + svn co \ + http://electricsheep.googlecode.com/svn/trunk/ \ + --config-dir ./ -r $_fixed_revision "$pkgname" + fi + + msg2 "Setting up build directory..." + rm -rf "$srcdir/$pkgname-build" + cp -r "$srcdir/$pkgname" "$srcdir/$pkgname-build" + cd "$srcdir/$pkgname-build/client_generic" + + #patch -p1 -i ../electricsheep-ffmpeg.patch + msg2 "Configuring..." + ./autogen.sh + ./configure --prefix=/usr + + msg2 "Compiling..." + make +} + +package() { + cd "$srcdir/$pkgname-build/client_generic" + + install -d "$pkgdir/usr/share/applications/screensavers" + install -d "$pkgdir/usr/lib/gnome-screensaver/gnome-screensaver" + make DESTDIR="$pkgdir" \ + GNOME_SCREENSAVER_DATADIR="$pkgdir/usr/share/applications/screensavers" \ + GNOME_SCREENSAVER_PRIVEXEDIR="$pkgdir/usr/lib/gnome-screensaver/gnome-screensaver" \ + install + install -Dm644 electricsheep.desktop.kde \ + "$pkgdir/usr/share/kde4/services/ScreenSavers/electricsheep.desktop" + install -Dm644 electricsheep.xml \ + "$pkgdir/usr/share/xscreensaver/config/electricsheep.xml" + install -Dm755 electricsheep-saver \ + "$pkgdir/usr/bin/electricsheep-saver" +} + +# vim:set ts=2 sw=2 et: diff --git a/community/electricsheep/electricsheep-pref-segfault.patch b/community/electricsheep/electricsheep-pref-segfault.patch new file mode 100644 index 000000000..83bcd8a0f --- /dev/null +++ b/community/electricsheep/electricsheep-pref-segfault.patch @@ -0,0 +1,270 @@ +diff -Naur electricsheep-2.7b12/electricsheep.c electricsheep-2.7~b12+svn20091224/electricsheep.c +--- electricsheep-2.7b12/electricsheep.c 2009-07-09 04:10:05.000000000 -0400 ++++ electricsheep-2.7~b12+svn20091224/electricsheep.c 2009-12-24 18:03:01.000000000 -0500 +@@ -564,6 +566,12 @@ + n++; + } + } ++ if (n < 1) { ++ if (debug) { ++ fprintf(logout, "median rank undefined\n"); ++ } ++ return; ++ } + qsort(tms, n, sizeof(int), compare_ints); + if (0 && debug) { + for (i = 0; i < n; i++) +@@ -1915,7 +1923,7 @@ + if (-1 == (decoder_pid = fork())) { + perror("decoder fork"); + } else if (0 == decoder_pid) { +- char *argv[20]; ++ char *argv[25]; + int c = 0; + /* child */ + snprintf(fps, 24, "%g", prefs.frame_rate); +@@ -1934,6 +1942,7 @@ + cleanup_and_exit(1); + } + argv[c++] = "mplayer"; ++ argv[c++] = "-nolirc"; + argv[c++] = "-cache"; + argv[c++] = "8192"; + argv[c++] = "-really-quiet"; +diff -Naur electricsheep-2.7b12/electricsheep.h electricsheep-2.7~b12+svn20091224/electricsheep.h +--- electricsheep-2.7b12/electricsheep.h 2009-07-09 04:10:05.000000000 -0400 ++++ electricsheep-2.7~b12+svn20091224/electricsheep.h 2009-12-24 18:03:01.000000000 -0500 +@@ -74,4 +74,4 @@ + void init_list_cmd (char *buf); + void get_end_element(void *userData, const char *name); + void character_handler(void *userData, const XML_Char *s, int len); +-char *encry(char *pw); ++char *encry(char *pw, char *nick); +diff -Naur electricsheep-2.7b12/electricsheep-preferences.c electricsheep-2.7~b12+svn20091224/electricsheep-preferences.c +--- electricsheep-2.7b12/electricsheep-preferences.c 2009-07-09 04:10:05.000000000 -0400 ++++ electricsheep-2.7~b12+svn20091224/electricsheep-preferences.c 2009-12-24 18:03:01.000000000 -0500 +@@ -108,8 +108,9 @@ + prefs.password = strdup(""); + } else { + char *pw = (char*)gtk_entry_get_text(password_entry); ++ pw = strdup(pw); + if (strcmp(pw, pw_marker)) +- prefs.password = encry(pw); ++ prefs.password = encry(pw, prefs.nick); + } + prefs.video_driver = (char*)gtk_entry_get_text(video_driver_entry); + prefs.frame_rate = gtk_spin_button_get_value(frame_rate_spin); +@@ -207,72 +208,72 @@ + void get_widgets(GladeXML *xml) { + title_label = (GtkLabel *) glade_xml_get_widget(xml, "titleLabel"); + if (NULL == title_label) { +- fprintf(stderr, "titleLabel not found\n"); ++ fprintf(logout, "titleLabel not found\n"); + exit(1); + } + test_label = (GtkLabel *) glade_xml_get_widget(xml, "testLabel"); + if (NULL == test_label) { +- fprintf(stderr, "testLabel not found\n"); ++ fprintf(logout, "testLabel not found\n"); + exit(1); + } + test_button = (GtkButton *) glade_xml_get_widget(xml, "testButton"); + if (NULL == test_button) { +- fprintf(stderr, "testButton not found\n"); ++ fprintf(logout, "testButton not found\n"); + exit(1); + } + nick_entry = (GtkEntry *) glade_xml_get_widget(xml, "nickEntry"); + if (NULL == nick_entry) { +- fprintf(stderr, "nickEntry not found\n"); ++ fprintf(logout, "nickEntry not found\n"); + exit(1); + } + url_entry = (GtkEntry *) glade_xml_get_widget(xml, "urlEntry"); + if (NULL == url_entry) { +- fprintf(stderr, "urlEntry not found\n"); ++ fprintf(logout, "urlEntry not found\n"); + exit(1); + } + password_entry = (GtkEntry *) glade_xml_get_widget(xml, "passEntry"); + if (NULL == password_entry) { +- fprintf(stderr, "passEntry not found\n"); ++ fprintf(logout, "passEntry not found\n"); + exit(1); + } + video_driver_entry = (GtkEntry *) glade_xml_get_widget(xml, "vdEntry"); + if (NULL == video_driver_entry) { +- fprintf(stderr, "vdEntry not found\n"); ++ fprintf(logout, "vdEntry not found\n"); + exit(1); + } + frame_rate_spin = (GtkSpinButton *) glade_xml_get_widget(xml, "frameSpin"); + if (NULL == frame_rate_spin) { +- fprintf(stderr, "frameSpin not found\n"); ++ fprintf(logout, "frameSpin not found\n"); + exit(1); + } + nrepeats_spin = (GtkSpinButton *) glade_xml_get_widget(xml, "repeatSpin"); + if (NULL == nrepeats_spin) { +- fprintf(stderr, "repeatSpin not found\n"); ++ fprintf(logout, "repeatSpin not found\n"); + exit(1); + } + cache_spin = (GtkSpinButton *) glade_xml_get_widget(xml, "cacheSpin"); + if (NULL == cache_spin) { +- fprintf(stderr, "cacheSpin not found\n"); ++ fprintf(logout, "cacheSpin not found\n"); + exit(1); + } + no_animation_check = (GtkCheckButton *) glade_xml_get_widget(xml, "noanimCheck"); + if (NULL == no_animation_check) { +- fprintf(stderr, "noanimCheck not found\n"); ++ fprintf(logout, "noanimCheck not found\n"); + exit(1); + } + standalone_check = (GtkCheckButton *) glade_xml_get_widget(xml, "standaloneCheck"); + if (NULL == standalone_check) { +- fprintf(stderr, "standaloneCheck not found\n"); ++ fprintf(logout, "standaloneCheck not found\n"); + exit(1); + } + hide_errors_check = (GtkCheckButton *) glade_xml_get_widget(xml, "hideCheck"); + if (NULL == hide_errors_check) { +- fprintf(stderr, "hideCheck not found\n"); ++ fprintf(logout, "hideCheck not found\n"); + exit(1); + } + save_frames_check = (GtkCheckButton *) glade_xml_get_widget(xml, "saveCheck"); + if (NULL == save_frames_check) { +- fprintf(stderr, "saveCheck not found\n"); ++ fprintf(logout, "saveCheck not found\n"); + exit(1); + } + } +diff -Naur electricsheep-2.7b12/utils.c electricsheep-2.7~b12+svn20091224/utils.c +--- electricsheep-2.7b12/utils.c 2009-07-09 04:10:05.000000000 -0400 ++++ electricsheep-2.7~b12+svn20091224/utils.c 2009-12-24 18:03:01.000000000 -0500 +@@ -69,19 +70,23 @@ + } + } + +-char *encry(char *pw) { ++ ++char *encry(char *pw, char *nick) { ++ static char *salt = "sh33p"; + unsigned char digest[16]; + char md5_pw[33]; ++ char *pw_salted = malloc(strlen(pw) + strlen(salt) + strlen(nick) + 1); + int i, j; +- md5_buffer(pw, strlen(pw), digest); ++ sprintf(pw_salted, "%s%s%s", pw, salt, nick); ++ md5_buffer(pw_salted, strlen(pw_salted), digest); + for (i = 0, j = 0; i < sizeof(digest); i++) { + char *hex_digits = "0123456789ABCDEF"; +- + md5_pw[j++] = hex_digits[digest[i] >> 4]; + md5_pw[j++] = hex_digits[digest[i] & 0x0F]; + } + md5_pw[j] = 0; + free(pw); ++ free(pw_salted); + return strdup(md5_pw); + } + +@@ -97,10 +102,11 @@ + free(prefs->url); + prefs->url = strdup(atts[i+1]); + } else if (!strcmp("password", atts[i])) { +- free(prefs->password); +- prefs->password = encry(strdup(atts[i+1])); ++ free(prefs->password); ++ /* assume nick comes before pw in the xml XXX */ ++ prefs->password = encry(strdup(atts[i+1]), prefs->nick); + } else if (!strcmp("password_md5", atts[i])) { +- free(prefs->password); ++ free(prefs->password); + prefs->password = strdup(atts[i+1]); + } else if (!strcmp("video_driver", atts[i])) { + free(prefs->video_driver); +@@ -133,7 +139,7 @@ + } else if (!strcmp("version", atts[i])) { + // nothing to check + } else { +- fprintf(stderr, "ignoring attribute %s\n", atts[i]); ++ fprintf(logout, "ignoring attribute %s\n", atts[i]); + } + i += 2; + } +@@ -146,7 +152,7 @@ + if (argc > 2) + strcpy(rc_file, argv[2]); + else { +- fprintf(stderr, ++ fprintf(logout, + "%s: --preferences option requires a file name argument.\n", + argv[0]); + exit(1); +@@ -155,7 +161,7 @@ + } + hom = getenv("HOME"); + if (!hom) { +- fprintf(stderr, "%s: HOME envar not defined\n", argv[0]); ++ fprintf(logout, "%s: HOME envar not defined\n", argv[0]); + exit(1); + } + snprintf(rc_file, PATH_MAX, "%s/.electricsheep/preferences.xml", hom); +@@ -281,15 +287,15 @@ + + int mysystem(char *cmd, char *msg) { + int n; +- if (0) fprintf(stderr, "subprocess; (%s)\n", cmd); ++ if (0) fprintf(logout, "subprocess; (%s)\n", cmd); + if (0 != (n = interruptable_system(cmd))) { + if (SIGINT != n) { + if (!prefs.hide_errors) +- fprintf(stderr, "subprocess error: %s, %d=%d<<8+%d\n", ++ fprintf(logout, "subprocess error: %s, %d=%d<<8+%d\n", + msg, n, n>>8, n&255); + return 1; + } +- fprintf(stderr, "control-c during %s, exiting\n", msg); ++ fprintf(logout, "control-c during %s, exiting\n", msg); + cleanup_and_exit(1); + } + return 0; +@@ -325,7 +331,7 @@ + int bytes_read; + void *buff = XML_GetBuffer(parser, XML_BUFF_SIZE); + if (buff == NULL) { +- fprintf(stderr, "unable to allocate buffer.\n"); ++ fprintf(logout, "unable to allocate buffer.\n"); + exit(1); + } + +@@ -334,7 +340,7 @@ + break; + + if (! XML_ParseBuffer(parser, bytes_read, bytes_read == 0)) { +- fprintf(stderr, "parse error.\n"); ++ fprintf(logout, "parse error.\n"); + exit(1); + } + } +@@ -441,7 +447,7 @@ + + void init_curl_cmd(int registration) { + +- if (debug) fprintf(stderr, "init_curl_cmd %d\n", registration); ++ if (debug) fprintf(logout, "init_curl_cmd %d\n", registration); + + if (prefs.proxy_name) { + snprintf(curl_cmd, MAXBUF, "nice -n %d curl --location --proxy %s", +@@ -472,7 +478,7 @@ + } + } + server = dream_server; +- if (debug) fprintf(stderr, "curl_cmd = %s\nserver = %s\n", curl_cmd, server); ++ if (debug) fprintf(logout, "curl_cmd = %s\nserver = %s\n", curl_cmd, server); + } + + void init_list_cmd (char *buf) { |