diff options
author | Guillermo Ramos | 2012-08-24 18:46:21 +0000 |
---|---|---|
committer | Guillermo Ramos | 2012-08-24 18:46:21 +0000 |
commit | 0061e706120b83f0a9e0d5b333d5a1fda5088005 (patch) | |
tree | 620268e0ccee5866143cbf62ad4eab34f0228cc0 | |
parent | 96cb1bf905e2d8cf0e204801e5f8ba7a0c3e6d73 (diff) | |
download | exheres-0061e706120b83f0a9e0d5b333d5a1fda5088005.tar.gz |
razercfg-0.17 freq patch
-rw-r--r-- | packages/sys-apps/razercfg/files/razercfg-0.17-freq.patch | 40 | ||||
-rw-r--r-- | packages/sys-apps/razercfg/razercfg-0.17.exheres-0 | 7 |
2 files changed, 46 insertions, 1 deletions
diff --git a/packages/sys-apps/razercfg/files/razercfg-0.17-freq.patch b/packages/sys-apps/razercfg/files/razercfg-0.17-freq.patch new file mode 100644 index 0000000..c6a2da4 --- /dev/null +++ b/packages/sys-apps/razercfg/files/razercfg-0.17-freq.patch @@ -0,0 +1,40 @@ +diff --git a/librazer/librazer.c b/librazer/librazer.c +index 766972d..ed74dcd 100644 +--- a/librazer/librazer.c ++++ b/librazer/librazer.c +@@ -425,7 +425,34 @@ static bool mouse_apply_one_config(struct config_file *f, + } + goto error; + } else if (strcasecmp(item, "freq") == 0) { +- //TODO ++ int profile, freq, i; ++ enum razer_mouse_freq *freqs; ++ ++ err = parse_int_int_pair(value, &profile, &freq); ++ if (err == 1) { ++ prof = m->get_active_profile(m); ++ profile = prof->nr + 1; ++ } else if (err) ++ goto error; ++ if (profile < 1 || freq < 1) ++ goto error; ++ prof = find_prof(m, profile - 1); ++ if (!prof) ++ goto error; ++ nr = m->supported_freqs(m, &freqs); ++ if (nr <= 0) ++ goto error; ++ for (i = 0; i < nr; i++) { ++ if (freqs[i] != freq) ++ continue; ++ err = prof->set_freq(prof, freqs[i]); ++ razer_free_freq_list(freqs, nr); ++ if (err) ++ goto error; ++ goto ok; ++ } ++ razer_free_freq_list(freqs, nr); ++ goto error; + } else if (strcasecmp(item, "led") == 0) { + bool on; + struct razer_led *leds, *led; diff --git a/packages/sys-apps/razercfg/razercfg-0.17.exheres-0 b/packages/sys-apps/razercfg/razercfg-0.17.exheres-0 index 64b961e..a70ffc2 100644 --- a/packages/sys-apps/razercfg/razercfg-0.17.exheres-0 +++ b/packages/sys-apps/razercfg/razercfg-0.17.exheres-0 @@ -9,8 +9,8 @@ SUMMARY="Utility for advanced configuration of Razer mice (DeathAdder, Krait, La HOMEPAGE="http://bues.ch/cms/hacking/razercfg.html" DOWNLOADS="http://bues.ch/${PN}/${PNV}.tar.bz2" -LICENCES="GPL-2" PLATFORMS="~amd64 ~x86" +LICENCES="GPL-2" SLOT="0" MYOPTIONS="pm-utils qt4" @@ -21,7 +21,12 @@ DEPENDENCIES=" qt4? ( dev-python/PyQt4 ) " +BUGS_TO="Michael Büsch <m@bues.ch>" + +DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/${PNV}-freq.patch ) + src_prepare() { + default edo sed -i \ -e '/ldconfig/{N;d}' \ -e "s:/etc/udev/rules.d/:/${LIBDIR}/udev/rules.d/:" \ |