diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-11-18 17:13:56 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2012-11-18 17:13:56 -0300 |
commit | e5e6eaf7e3cad31a74862656283728197b715178 (patch) | |
tree | 2b6c997f1bf5d936019a1dfc741b192208270e1b | |
parent | 7eff80609dcc365658c94f899d4a3a298e8fb5dd (diff) | |
parent | dcb01f130dac1b244e0ed9fe0041d92a130ab427 (diff) |
Merge branch 'master' of ssh://gparabola/srv/git/abslibre
292 files changed, 16977 insertions, 9623 deletions
diff --git a/.gitignore b/.gitignore index 4b972ed8e..6dc4e19af 100755 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ #*# src/ pkg/ -*.pkg.tar.* -*.src.tar.* *.log +*.tar* +*.tgz +*.zip diff --git a/kernels/linux-libre-lts-rt/PKGBUILD b/kernels/linux-libre-lts-rt/PKGBUILD index daf2d1c16..976b2995c 100755 --- a/kernels/linux-libre-lts-rt/PKGBUILD +++ b/kernels/linux-libre-lts-rt/PKGBUILD @@ -11,12 +11,12 @@ pkgbase=linux-libre-lts-rt # Build stock -LIBRE-LTS-RT kernel #pkgbase=linux-libre-custom # Build kernel with a different name _basekernel=3.0 -_releasever=43 -_rtpatchver=rt65 +_releasever=51 +_rtpatchver=rt75 _pkgver=${_basekernel}.${_releasever} pkgver=${_basekernel}.${_releasever}_${_rtpatchver} pkgrel=1 -_lxopkgver=${_basekernel}.43 # nearly always the same as pkgver +_lxopkgver=${_basekernel}.50 # nearly always the same as pkgver arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org/" license=('GPL2') @@ -35,10 +35,12 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn 'change-default-console-loglevel.patch' 'i915-fix-ghost-tv-output.patch' 'ext4-options.patch' + 'module-symbol-waiting-3.0.patch' + 'module-init-wait-3.0.patch' "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2") md5sums=('5f64180fe7df4e574dac5911b78f5067' - 'c4b4e6d908e70fc6f991a1789a3ac620' - 'bcca49907b1c1e74f6ff6afced5ff959' + 'fb3c742b1f8b01131534a22348cfa712' + '904669e437a0bb19e95022964430ad4a' '7266f5e7af09cc6e4b15d7a952e3b350' '5387f0cf51652c071190789569adf9c7' '85f04a9555bdc295f7c387a6564f0c81' @@ -47,8 +49,10 @@ md5sums=('5f64180fe7df4e574dac5911b78f5067' '04b21c79df0a952c22d681dd4f4562df' '9d3c56a4b999c8bfbd4018089a62f662' '263725f20c0b9eb9c353040792d644e5' - 'c8299cf750a84e12d60b372c8ca7e1e8' - '2c4870ef22f87ef885f3be392d1aaa90') + 'f36222e7ce20c8e4dc27376f9be60f6c' + '670931649c60fcb3ef2e0119ed532bd4' + '8a71abc4224f575008f974a099b5cf6f' + 'e2cc9f33fb26b254b6b65f8981aebf13') if [ "$CARCH" != "mips64el" ]; then # Don't use the Loongson-specific patches on non-mips64el arches. unset source[${#source[@]}-1] @@ -90,6 +94,11 @@ build() { # https://bugs.archlinux.org/task/28653 patch -Np1 -i "${srcdir}/ext4-options.patch" + # fix module initialisation + # https://bugs.archlinux.org/task/32122 + patch -Np1 -i "${srcdir}/module-symbol-waiting-3.0.patch" + patch -Np1 -i "${srcdir}/module-init-wait-3.0.patch" + if [ "$CARCH" == "mips64el" ]; then sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre-lts-rt|" Makefile sed -r "s|^( SUBLEVEL = ).*|\1$_sublevel|" \ @@ -102,7 +111,7 @@ build() { # https://git.kernel.org/?p=linux/hotplug/udev.git;a=blob_plain;f=README # and make USB storage support builtin (e.g. for booting from USB # disks without slowly loading an initramfs) - sed -ri -e "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" \ + sed -ri \ -e "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" \ -e "s|CONFIG_UEVENT_HELPER_PATH=.*|CONFIG_UEVENT_HELPER_PATH=\"\"|g" \ -e "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_localversionname}\"|g" \ diff --git a/kernels/linux-libre-lts-rt/ext4-options.patch b/kernels/linux-libre-lts-rt/ext4-options.patch index 812b05f04..ef1b2417d 100755 --- a/kernels/linux-libre-lts-rt/ext4-options.patch +++ b/kernels/linux-libre-lts-rt/ext4-options.patch @@ -46,4 +46,4 @@ index 502c61f..30de9cd 100644 +#endif default: ext4_msg(sb, KERN_ERR, - "Unrecognized mount option \"%s\" "
\ No newline at end of file + "Unrecognized mount option \"%s\" " diff --git a/kernels/linux-libre-lts-rt/linux-libre-lts-rt.install b/kernels/linux-libre-lts-rt/linux-libre-lts-rt.install index d2f0ae05a..5f31cc3d4 100755 --- a/kernels/linux-libre-lts-rt/linux-libre-lts-rt.install +++ b/kernels/linux-libre-lts-rt/linux-libre-lts-rt.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME=-lts-rt -KERNEL_VERSION=3.0.43-1-rt65-LIBRE-LTS-RT +KERNEL_VERSION=3.0.51-1-rt75-LIBRE-LTS-RT # set a sane PATH to ensure that critical utils like depmod will be found export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' diff --git a/kernels/linux-libre-lts-rt/module-init-wait-3.0.patch b/kernels/linux-libre-lts-rt/module-init-wait-3.0.patch new file mode 100644 index 000000000..1bcfd2491 --- /dev/null +++ b/kernels/linux-libre-lts-rt/module-init-wait-3.0.patch @@ -0,0 +1,77 @@ +From: Rusty Russell <rusty@rustcorp.com.au> +Date: Fri, 28 Sep 2012 05:01:03 +0000 (+0930) +Subject: module: wait when loading a module which is currently initializing. +X-Git-Tag: v3.7-rc1~2^2~32 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=9bb9c3be568346538 + +module: wait when loading a module which is currently initializing. + +The original module-init-tools module loader used a fnctl lock on the +.ko file to avoid attempts to simultaneously load a module. +Unfortunately, you can't get an exclusive fcntl lock on a read-only +fd, making this not work for read-only mounted filesystems. +module-init-tools has a hacky sleep-and-loop for this now. + +It's not that hard to wait in the kernel, and only return -EEXIST once +the first module has finished loading (or continue loading the module +if the first one failed to initialize for some reason). It's also +consistent with what we do for dependent modules which are still loading. + +Suggested-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> +Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> +--- + +diff --git a/kernel/module.c b/kernel/module.c +index 63cf6e7..74bc195 100644 +--- a/kernel/module.c ++++ b/kernel/module.c +@@ -2845,6 +2845,20 @@ static int post_relocation(struct module *mod, const struct load_info *info) + return module_finalize(info->hdr, info->sechdrs, mod); + } + ++/* Is this module of this name done loading? No locks held. */ ++static bool finished_loading(const char *name) ++{ ++ struct module *mod; ++ bool ret; ++ ++ mutex_lock(&module_mutex); ++ mod = find_module(name); ++ ret = !mod || mod->state != MODULE_STATE_COMING; ++ mutex_unlock(&module_mutex); ++ ++ return ret; ++} ++ + /* Allocate and load the module: note that size of section 0 is always + zero, and we rely on this for optional sections. */ + static struct module *load_module(void __user *umod, +@@ -2852,7 +2866,7 @@ static struct module *load_module(void __user *umod, + const char __user *uargs) + { + struct load_info info = { NULL, }; +- struct module *mod; ++ struct module *mod, *old; + long err; + + pr_debug("load_module: umod=%p, len=%lu, uargs=%p\n", +@@ -2918,8 +2932,18 @@ static struct module *load_module(void __user *umod, + * function to insert in a way safe to concurrent readers. + * The mutex protects against concurrent writers. + */ ++again: + mutex_lock(&module_mutex); +- if (find_module(mod->name)) { ++ if ((old = find_module(mod->name)) != NULL) { ++ if (old->state == MODULE_STATE_COMING) { ++ /* Wait in case it fails to load. */ ++ mutex_unlock(&module_mutex); ++ err = wait_event_interruptible(module_wq, ++ finished_loading(mod->name)); ++ if (err) ++ goto free_arch_cleanup; ++ goto again; ++ } + err = -EEXIST; + goto unlock; + } diff --git a/kernels/linux-libre-lts-rt/module-symbol-waiting-3.0.patch b/kernels/linux-libre-lts-rt/module-symbol-waiting-3.0.patch new file mode 100644 index 000000000..b87a38ff5 --- /dev/null +++ b/kernels/linux-libre-lts-rt/module-symbol-waiting-3.0.patch @@ -0,0 +1,66 @@ +From: Rusty Russell <rusty@rustcorp.com.au> +Date: Fri, 28 Sep 2012 05:01:03 +0000 (+0930) +Subject: module: fix symbol waiting when module fails before init +X-Git-Tag: v3.7-rc1~2^2~33 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6f13909f4fe9652f1 + +module: fix symbol waiting when module fails before init + +We use resolve_symbol_wait(), which blocks if the module containing +the symbol is still loading. However: + +1) The module_wq we use is only woken after calling the modules' init + function, but there are other failure paths after the module is + placed in the linked list where we need to do the same thing. + +2) wake_up() only wakes one waiter, and our waitqueue is shared by all + modules, so we need to wake them all. + +3) wake_up_all() doesn't imply a memory barrier: I feel happier calling + it after we've grabbed and dropped the module_mutex, not just after + the state assignment. + +Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> +--- + +diff --git a/kernel/module.c b/kernel/module.c +index 7f2ee45f..63cf6e7 100644 +--- a/kernel/module.c ++++ b/kernel/module.c +@@ -2959,7 +2959,7 @@ static struct module *load_module(void __user *umod, + /* Unlink carefully: kallsyms could be walking list. */ + list_del_rcu(&mod->list); + module_bug_cleanup(mod); +- ++ wake_up_all(&module_wq); + ddebug: + dynamic_debug_remove(info.debug); + unlock: +@@ -3034,7 +3034,7 @@ SYSCALL_DEFINE3(init_module, void __user *, umod, + blocking_notifier_call_chain(&module_notify_list, + MODULE_STATE_GOING, mod); + free_module(mod); +- wake_up(&module_wq); ++ wake_up_all(&module_wq); + return ret; + } + if (ret > 0) { +@@ -3046,9 +3046,8 @@ SYSCALL_DEFINE3(init_module, void __user *, umod, + dump_stack(); + } + +- /* Now it's a first class citizen! Wake up anyone waiting for it. */ ++ /* Now it's a first class citizen! */ + mod->state = MODULE_STATE_LIVE; +- wake_up(&module_wq); + blocking_notifier_call_chain(&module_notify_list, + MODULE_STATE_LIVE, mod); + +@@ -3071,6 +3070,7 @@ SYSCALL_DEFINE3(init_module, void __user *, umod, + mod->init_ro_size = 0; + mod->init_text_size = 0; + mutex_unlock(&module_mutex); ++ wake_up_all(&module_wq); + + return 0; + } diff --git a/kernels/linux-libre-rt/3.4.4-fix-backlight-regression.patch b/kernels/linux-libre-rt/3.4.4-fix-backlight-regression.patch deleted file mode 100755 index a0cf0b1db..000000000 --- a/kernels/linux-libre-rt/3.4.4-fix-backlight-regression.patch +++ /dev/null @@ -1,38 +0,0 @@ -Subject: Still use ACPI backlight control if _DOS doesn't exist - -This is a regression introduced by commit -ea9f8856bd6d4ed45885b06a338f7362cd6c60e5 - -https://bugzilla.kernel.org/show_bug.cgi?id=43168 - -Some platforms don't have _DOS control method, but the ACPI -backlight still works. -We do not want to lose the backlight control ability on these platforms. - -CC : Igor Murzov <intergalactic.anonymous@gmail.com> -Signed-off-by: Zhang Rui <rui.zhang@intel.com> ---- - drivers/acpi/video.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -Index: rtd3/drivers/acpi/video.c -=================================================================== ---- rtd3.orig/drivers/acpi/video.c -+++ rtd3/drivers/acpi/video.c -@@ -565,8 +565,14 @@ acpi_video_bus_DOS(struct acpi_video_bus - video->dos_setting = arg0.integer.value; - status = acpi_evaluate_object(video->device->handle, "_DOS", - &args, NULL); -- if (ACPI_FAILURE(status)) -- return -EIO; -+ if (ACPI_FAILURE(status)) { -+ /* -+ * some platforms don't have _DOS, but the ACPI -+ * backlight control still works -+ */ -+ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No _DOS\n")); -+ return 0; -+ } - - return 0; - } diff --git a/kernels/linux-libre-rt/PKGBUILD b/kernels/linux-libre-rt/PKGBUILD index 455905e98..30361d313 100755 --- a/kernels/linux-libre-rt/PKGBUILD +++ b/kernels/linux-libre-rt/PKGBUILD @@ -10,13 +10,13 @@ pkgbase=linux-libre-rt # Build stock -LIBRE-RT kernel #pkgbase=linux-libre-custom # Build kernel with a different name -_basekernel=3.4 -_releasever=11 -_rtpatchver=rt19 +_basekernel=3.6 +_releasever=6 +_rtpatchver=rt17 _pkgver=${_basekernel}.${_releasever} pkgver=${_basekernel}.${_releasever}_${_rtpatchver} pkgrel=1 -_lxopkgver=${_basekernel}.11 # nearly always the same as pkgver +_lxopkgver=${_basekernel}.6 # nearly always the same as pkgver arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org/" license=('GPL2') @@ -24,7 +24,7 @@ makedepends=('xmlto' 'docbook-xsl') options=('!strip') source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gnu/linux-libre-${_basekernel}-gnu.tar.xz" "http://linux-libre.fsfla.org/pub/linux-libre/releases/${_pkgver}-gnu/patch-${_basekernel}-gnu-${_pkgver}-gnu.xz" - "http://www.kernel.org/pub/linux/kernel/projects/rt/3.4/patch-${_pkgver}-${_rtpatchver}.patch.xz" + "http://www.kernel.org/pub/linux/kernel/projects/rt/${_basekernel}/patch-${_pkgver}-${_rtpatchver}.patch.xz" # the main kernel config files 'config.i686' 'config.x86_64' # standard config files for mkinitcpio ramdisk @@ -33,22 +33,22 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-gn 'Kbuild.platforms' 'boot-logo.patch' 'change-default-console-loglevel.patch' - 'i915-fix-ghost-tv-output.patch' - '3.4.4-fix-backlight-regression.patch' + 'module-symbol-waiting-3.6.patch' + 'module-init-wait-3.6.patch' "http://www.linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/debuginfo/linux-patches-${_lxopkgver}-gnu_0loongsonlibre_mipsel.tar.bz2") -md5sums=('a5e128ca059cceb8b69148b41ff4ac6f' - '00eaf4013fc8cfe73498d910b0b5c826' - 'be2541bbe5455203b054c6acc3f999bf' - 'd176ceb303ecfb2303d9659ea2dd91c7' - 'bcb219ab37ed19912126189cfca30538' +md5sums=('a2312edd0265b5b07bd4b50afae2b380' + '887e4a0fd0fb10da9410f5d1a75466b8' + '20cd3b6ed53047a633d1e2b1ba32973e' + '11161582d9050710ccfecbe077fc5a63' + 'ac8f20b0cd83acb9525b5557e1fafeaf' '82496e68851d1960543a07ba51cdb44a' '2967cecc3af9f954ccc822fd63dca6ff' '8267264d9a8966e57fdacd1fa1fc65c4' '04b21c79df0a952c22d681dd4f4562df' '9d3c56a4b999c8bfbd4018089a62f662' - '263725f20c0b9eb9c353040792d644e5' - '80a46681386bb87813989faeb92bdd9a' - '4537ac9f15f96430c431d0ac22f43b80') + '670931649c60fcb3ef2e0119ed532bd4' + '8a71abc4224f575008f974a099b5cf6f' + 'a281ee5d89a016d72840bddb2d742635') if [ "$CARCH" != "mips64el" ]; then # Don't use the Loongson-specific patches on non-mips64el arches. unset source[${#source[@]}-1] @@ -71,24 +71,16 @@ build() { # Add freedo as boot logo patch -Np1 -i "${srcdir}/boot-logo.patch" - # Some chips detect a ghost TV output - # mailing list discussion: http://lists.freedesktop.org/archives/intel-gfx/2011-April/010371.html - # Arch Linux bug report: FS#19234 - # - # It is unclear why this patch wasn't merged upstream, it was accepted, - # then dropped because the reasoning was unclear. However, it is clearly - # needed. - patch -Np1 -i "${srcdir}/i915-fix-ghost-tv-output.patch" - - # Fix backlight control on some laptops: - # https://bugzilla.kernel.org/show_bug.cgi?id=43168 - patch -Np1 -i "${srcdir}/3.4.4-fix-backlight-regression.patch" - # set DEFAULT_CONSOLE_LOGLEVEL to 4 (same value as the 'quiet' kernel param) # remove this when a Kconfig knob is made available by upstream # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch" + # fix module initialisation + # https://bugs.archlinux.org/task/32122 + patch -Np1 -i "${srcdir}/module-symbol-waiting-3.6.patch" + patch -Np1 -i "${srcdir}/module-init-wait-3.6.patch" + if [ "$CARCH" == "mips64el" ]; then sed -i "s|^EXTRAVERSION.*|EXTRAVERSION =-libre-rt|" Makefile sed -r "s|^( SUBLEVEL = ).*|\1$_sublevel|" \ @@ -101,7 +93,7 @@ build() { # https://git.kernel.org/?p=linux/hotplug/udev.git;a=blob_plain;f=README # and make USB storage support builtin (e.g. for booting from USB # disks without slowly loading an initramfs) - sed -ri -e "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" \ + sed -ri \ -e "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" \ -e "s|CONFIG_UEVENT_HELPER_PATH=.*|CONFIG_UEVENT_HELPER_PATH=\"\"|g" \ -e "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_localversionname}\"|g" \ @@ -165,7 +157,7 @@ build() { _package() { pkgdesc="The ${pkgbase} kernel and modules with realtime preemption" [ "${pkgbase}" = "linux-libre" ] && groups=('base') - depends=('coreutils' 'kmod') + depends=('coreutils' 'linux-libre-firmware' 'kmod') optdepends=('crda: to set the correct wireless channels of your country') provides=("kernel26${_kernelname}=${pkgver}" "linux${_kernelname}=${pkgver}") conflicts=("kernel26${_kernelname}" "kernel26-libre${_kernelname}" "linux${_kernelname}") diff --git a/kernels/linux-libre-rt/config.i686 b/kernels/linux-libre-rt/config.i686 index 31ce556cf..45ba4f3ca 100755..100644 --- a/kernels/linux-libre-rt/config.i686 +++ b/kernels/linux-libre-rt/config.i686 @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/i386 3.4.0 Kernel Configuration +# Linux/i386 3.6.5 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y @@ -9,10 +9,6 @@ CONFIG_X86=y CONFIG_INSTRUCTION_DECODER=y CONFIG_OUTPUT_FORMAT="elf32-i386" CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" -CONFIG_GENERIC_CMOS_UPDATE=y -CONFIG_CLOCKSOURCE_WATCHDOG=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y @@ -26,9 +22,7 @@ CONFIG_GENERIC_GPIO=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -# CONFIG_GENERIC_TIME_VSYSCALL is not set CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_DEFAULT_IDLE=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y @@ -46,11 +40,12 @@ CONFIG_HAVE_INTEL_TXT=y CONFIG_X86_32_SMP=y CONFIG_X86_HT=y CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx" -CONFIG_KTIME_SCALAR=y CONFIG_ARCH_CPU_PROBE_RELEASE=y +CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_HAVE_IRQ_WORK=y CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y # # General setup @@ -78,7 +73,7 @@ CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE_SYSCTL=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y -# CONFIG_FHANDLE is not set +CONFIG_FHANDLE=y CONFIG_TASKSTATS=y CONFIG_TASK_DELAY_ACCT=y CONFIG_TASK_XACCT=y @@ -101,6 +96,20 @@ CONFIG_IRQ_DOMAIN=y # CONFIG_IRQ_DOMAIN_DEBUG is not set CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y +CONFIG_CLOCKSOURCE_WATCHDOG=y +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y +CONFIG_GENERIC_CMOS_UPDATE=y + +# +# Timers subsystem +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y # # RCU Subsystem @@ -108,8 +117,8 @@ CONFIG_SPARSE_IRQ=y CONFIG_TREE_PREEMPT_RCU=y CONFIG_PREEMPT_RCU=y CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 # CONFIG_RCU_FANOUT_EXACT is not set -CONFIG_RCU_FAST_NO_HZ=y # CONFIG_TREE_RCU_TRACE is not set # CONFIG_RCU_BOOST is not set CONFIG_IKCONFIG=y @@ -124,22 +133,21 @@ CONFIG_CPUSETS=y CONFIG_PROC_PID_CPUSET=y CONFIG_CGROUP_CPUACCT=y CONFIG_RESOURCE_COUNTERS=y -CONFIG_CGROUP_MEM_RES_CTLR=y -CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y -# CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED is not set -CONFIG_CGROUP_MEM_RES_CTLR_KMEM=y +CONFIG_MEMCG=y +CONFIG_MEMCG_SWAP=y +# CONFIG_MEMCG_SWAP_ENABLED is not set +CONFIG_MEMCG_KMEM=y +# CONFIG_CGROUP_HUGETLB is not set # CONFIG_CGROUP_PERF is not set CONFIG_CGROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y CONFIG_CFS_BANDWIDTH=y -CONFIG_RT_GROUP_SCHED=y CONFIG_BLK_CGROUP=y # CONFIG_DEBUG_BLK_CGROUP is not set # CONFIG_CHECKPOINT_RESTORE is not set CONFIG_NAMESPACES=y CONFIG_UTS_NS=y CONFIG_IPC_NS=y -CONFIG_USER_NS=y CONFIG_PID_NS=y CONFIG_NET_NS=y CONFIG_SCHED_AUTOGROUP=y @@ -181,18 +189,20 @@ CONFIG_HAVE_PERF_EVENTS=y # Kernel Performance Events And Counters # CONFIG_PERF_EVENTS=y -CONFIG_PERF_COUNTERS=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_PCI_QUIRKS=y # CONFIG_COMPAT_BRK is not set CONFIG_SLAB=y +# CONFIG_SLUB is not set CONFIG_PROFILING=y CONFIG_TRACEPOINTS=y CONFIG_HAVE_OPROFILE=y CONFIG_OPROFILE_NMI_TIMER=y -# CONFIG_KPROBES is not set +CONFIG_KPROBES=y CONFIG_JUMP_LABEL=y +CONFIG_UPROBES=y CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_KRETPROBES=y CONFIG_USER_RETURN_NOTIFIER=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y @@ -200,7 +210,9 @@ CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_OPTPROBES=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_HAVE_HW_BREAKPOINT=y @@ -211,6 +223,9 @@ CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_HAVE_CMPXCHG_LOCAL=y CONFIG_HAVE_CMPXCHG_DOUBLE=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP_FILTER=y # # GCOV-based kernel profiling @@ -304,11 +319,6 @@ CONFIG_FREEZER=y # Processor type and features # CONFIG_ZONE_DMA=y -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y CONFIG_SMP=y CONFIG_X86_MPPARSE=y # CONFIG_X86_BIGSMP is not set @@ -317,7 +327,7 @@ CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y CONFIG_X86_32_IRIS=m CONFIG_SCHED_OMIT_FRAME_POINTER=y CONFIG_PARAVIRT_GUEST=y -# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set +CONFIG_PARAVIRT_TIME_ACCOUNTING=y # CONFIG_XEN_PRIVILEGED_GUEST is not set CONFIG_KVM_CLOCK=y CONFIG_KVM_GUEST=y @@ -383,6 +393,7 @@ CONFIG_SCHED_MC=y # CONFIG_IRQ_TIME_ACCOUNTING is not set CONFIG_PREEMPT=y CONFIG_PREEMPT_RT_BASE=y +CONFIG_HAVE_PREEMPT_LAZY=y # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT__LL is not set @@ -429,6 +440,7 @@ CONFIG_SPARSEMEM_STATIC=y CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y CONFIG_ARCH_DISCARD_MEMBLOCK=y +CONFIG_MEMORY_ISOLATION=y CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_COMPACTION=y @@ -442,7 +454,9 @@ CONFIG_KSM=y CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y CONFIG_MEMORY_FAILURE=y +CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_CLEANCACHE=y +CONFIG_FRONTSWAP=y # CONFIG_HIGHPTE is not set CONFIG_X86_CHECK_BIOS_CORRUPTION=y CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y @@ -487,12 +501,16 @@ CONFIG_HIBERNATION=y CONFIG_PM_STD_PARTITION="" CONFIG_PM_SLEEP=y CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=100 +CONFIG_PM_WAKELOCKS_GC=y CONFIG_PM_RUNTIME=y CONFIG_PM=y CONFIG_PM_DEBUG=y CONFIG_PM_ADVANCED_DEBUG=y # CONFIG_PM_TEST_SUSPEND is not set -CONFIG_CAN_PM_TRACE=y +CONFIG_PM_SLEEP_DEBUG=y # CONFIG_PM_TRACE_RTC is not set CONFIG_ACPI=y CONFIG_ACPI_SLEEP=y @@ -580,6 +598,7 @@ CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set CONFIG_INTEL_IDLE=y # @@ -622,7 +641,6 @@ CONFIG_PCI_LABEL=y CONFIG_ISA_DMA_API=y CONFIG_ISA=y # CONFIG_EISA is not set -# CONFIG_MCA is not set # CONFIG_SCx200 is not set CONFIG_OLPC=y CONFIG_OLPC_XO1_PM=y @@ -668,6 +686,7 @@ CONFIG_RAPIDIO=y CONFIG_RAPIDIO_TSI721=y CONFIG_RAPIDIO_DISC_TIMEOUT=30 # CONFIG_RAPIDIO_ENABLE_RX_TX_PORTS is not set +CONFIG_RAPIDIO_DMA_ENGINE=y CONFIG_RAPIDIO_DEBUG=y CONFIG_RAPIDIO_TSI57X=y CONFIG_RAPIDIO_CPS_XX=y @@ -695,6 +714,7 @@ CONFIG_PACKET=y CONFIG_UNIX=y CONFIG_UNIX_DIAG=m CONFIG_XFRM=y +CONFIG_XFRM_ALGO=m CONFIG_XFRM_USER=m # CONFIG_XFRM_SUB_POLICY is not set # CONFIG_XFRM_MIGRATE is not set @@ -721,6 +741,7 @@ CONFIG_IP_PIMSM_V1=y CONFIG_IP_PIMSM_V2=y # CONFIG_ARPD is not set CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m @@ -812,6 +833,8 @@ CONFIG_NF_CONNTRACK_SIP=m CONFIG_NF_CONNTRACK_TFTP=m CONFIG_NF_CT_NETLINK=m CONFIG_NF_CT_NETLINK_TIMEOUT=m +CONFIG_NF_CT_NETLINK_HELPER=m +CONFIG_NETFILTER_NETLINK_QUEUE_CT=y CONFIG_NETFILTER_TPROXY=m CONFIG_NETFILTER_XTABLES=m @@ -833,6 +856,7 @@ CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_TARGET_CT=m CONFIG_NETFILTER_XT_TARGET_DSCP=m CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m CONFIG_NETFILTER_XT_TARGET_LED=m CONFIG_NETFILTER_XT_TARGET_LOG=m @@ -993,7 +1017,6 @@ CONFIG_IP_NF_ARP_MANGLE=m # CONFIG_NF_DEFRAG_IPV6=m CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m CONFIG_IP6_NF_IPTABLES=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m @@ -1043,6 +1066,7 @@ CONFIG_IP_DCCP_CCID3=y # CONFIG_IP_DCCP_CCID3_DEBUG is not set CONFIG_IP_DCCP_TFRC_LIB=y CONFIG_IP_SCTP=m +CONFIG_NET_SCTPPROBE=m # CONFIG_SCTP_DBG_MSG is not set # CONFIG_SCTP_DBG_OBJCNT is not set # CONFIG_SCTP_HMAC_NONE is not set @@ -1084,11 +1108,11 @@ CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set CONFIG_PHONET=m CONFIG_IEEE802154=m CONFIG_IEEE802154_6LOWPAN=m +CONFIG_MAC802154=m CONFIG_NET_SCHED=y # @@ -1112,6 +1136,8 @@ CONFIG_NET_SCH_DRR=m CONFIG_NET_SCH_MQPRIO=m CONFIG_NET_SCH_CHOKE=m CONFIG_NET_SCH_QFQ=m +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m CONFIG_NET_SCH_INGRESS=m CONFIG_NET_SCH_PLUG=m @@ -1147,6 +1173,7 @@ CONFIG_NET_SCH_FIFO=y # CONFIG_DCB is not set CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_BLA=y # CONFIG_BATMAN_ADV_DEBUG is not set CONFIG_OPENVSWITCH=m CONFIG_RPS=y @@ -1159,6 +1186,7 @@ CONFIG_BQL=y # Network testing # CONFIG_NET_PKTGEN=m +CONFIG_NET_TCPPROBE=m CONFIG_NET_DROP_MONITOR=y CONFIG_HAMRADIO=y @@ -1261,6 +1289,7 @@ CONFIG_BT_HCIUART_H4=y CONFIG_BT_HCIUART_BCSP=y CONFIG_BT_HCIUART_ATH3K=y CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_3WIRE=y CONFIG_BT_HCIBCM203X=m CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m @@ -1284,14 +1313,13 @@ CONFIG_WEXT_PROC=y CONFIG_WEXT_SPY=y CONFIG_WEXT_PRIV=y CONFIG_CFG80211=m -CONFIG_NL80211_TESTMODE=y +# CONFIG_NL80211_TESTMODE is not set # CONFIG_CFG80211_DEVELOPER_WARNINGS is not set # CONFIG_CFG80211_REG_DEBUG is not set CONFIG_CFG80211_DEFAULT_PS=y # CONFIG_CFG80211_DEBUGFS is not set # CONFIG_CFG80211_INTERNAL_REGDB is not set CONFIG_CFG80211_WEXT=y -CONFIG_WIRELESS_EXT_SYSFS=y CONFIG_LIB80211=m CONFIG_LIB80211_CRYPT_WEP=m CONFIG_LIB80211_CRYPT_CCMP=m @@ -1306,6 +1334,7 @@ CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" CONFIG_MAC80211_MESH=y CONFIG_MAC80211_LEDS=y # CONFIG_MAC80211_DEBUGFS is not set +# CONFIG_MAC80211_MESSAGE_TRACING is not set # CONFIG_MAC80211_DEBUG_MENU is not set CONFIG_WIMAX=m CONFIG_WIMAX_DEBUG_LEVEL=8 @@ -1324,6 +1353,8 @@ CONFIG_CEPH_LIB=m # CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set CONFIG_NFC=m CONFIG_NFC_NCI=m +CONFIG_NFC_HCI=m +# CONFIG_NFC_SHDLC is not set # CONFIG_NFC_LLCP is not set # @@ -1352,7 +1383,9 @@ CONFIG_EXTRA_FIRMWARE="" # CONFIG_GENERIC_CPU_DEVICES is not set CONFIG_REGMAP=y CONFIG_REGMAP_I2C=m +CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y +# CONFIG_CMA is not set CONFIG_CONNECTOR=y CONFIG_PROC_EVENTS=y CONFIG_MTD=m @@ -1483,7 +1516,6 @@ CONFIG_MTD_UBI=m CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MTD_UBI_BEB_RESERVE=1 # CONFIG_MTD_UBI_GLUEBI is not set -# CONFIG_MTD_UBI_DEBUG is not set CONFIG_OF=y # @@ -1495,7 +1527,6 @@ CONFIG_OF_PROMTREE=y CONFIG_OF_ADDRESS=y CONFIG_OF_IRQ=y CONFIG_OF_DEVICE=y -CONFIG_OF_GPIO=y CONFIG_OF_I2C=m CONFIG_OF_NET=y CONFIG_OF_MDIO=m @@ -1583,7 +1614,8 @@ CONFIG_SENSORS_APDS990X=m CONFIG_HMC6352=m CONFIG_DS1682=m CONFIG_VMWARE_BALLOON=m -CONFIG_BMP085=m +CONFIG_BMP085=y +CONFIG_BMP085_I2C=m # CONFIG_PCH_PHUB is not set CONFIG_USB_SWITCH_FSA9480=m CONFIG_C2PORT=m @@ -1599,9 +1631,6 @@ CONFIG_EEPROM_93CX6=m CONFIG_CB710_CORE=m # CONFIG_CB710_DEBUG is not set CONFIG_CB710_DEBUG_ASSUMPTIONS=y -CONFIG_IWMC3200TOP=m -# CONFIG_IWMC3200TOP_DEBUG is not set -# CONFIG_IWMC3200TOP_DEBUGFS is not set # # Texas Instruments shared transport line discipline @@ -1613,6 +1642,7 @@ CONFIG_SENSORS_LIS3_I2C=m # Altera FPGA firmware download module # CONFIG_ALTERA_STAPL=m +CONFIG_INTEL_MEI=m CONFIG_HAVE_IDE=y # CONFIG_IDE is not set @@ -1642,7 +1672,6 @@ CONFIG_SCSI_MULTI_LUN=y # CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_LOGGING is not set # CONFIG_SCSI_SCAN_ASYNC is not set -CONFIG_SCSI_WAIT_SCAN=m # # SCSI Transports @@ -1748,6 +1777,7 @@ CONFIG_SCSI_PAS16=m CONFIG_SCSI_QLOGIC_FAS=m CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_TCM_QLA2XXX=m CONFIG_SCSI_QLA_ISCSI=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_LPFC_DEBUG_FS is not set @@ -1901,7 +1931,6 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m # CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not set -# CONFIG_DM_DEBUG_SPACE_MAPS is not set CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_LOG_USERSPACE=m @@ -1920,6 +1949,7 @@ CONFIG_TCM_PSCSI=m CONFIG_LOOPBACK_TARGET=m CONFIG_TCM_FC=m CONFIG_ISCSI_TARGET=m +CONFIG_SBP_TARGET=m CONFIG_FUSION=y CONFIG_FUSION_SPI=m CONFIG_FUSION_FC=m @@ -1956,10 +1986,13 @@ CONFIG_EQUALIZER=m CONFIG_MII=m CONFIG_IEEE802154_DRIVERS=m CONFIG_IEEE802154_FAKEHARD=m +CONFIG_IEEE802154_FAKELB=m CONFIG_IFB=m CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m CONFIG_NET_TEAM_MODE_ROUNDROBIN=m CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m CONFIG_MACVLAN=m CONFIG_MACVTAP=m # CONFIG_NETPOLL is not set @@ -2099,10 +2132,13 @@ CONFIG_E1000=m CONFIG_E1000E=m CONFIG_IGB=m CONFIG_IGB_DCA=y +CONFIG_IGB_PTP=y CONFIG_IGBVF=m CONFIG_IXGB=m CONFIG_IXGBE=m +CONFIG_IXGBE_HWMON=y CONFIG_IXGBE_DCA=y +CONFIG_IXGBE_PTP=y CONFIG_IXGBEVF=m CONFIG_NET_VENDOR_I825XX=y CONFIG_ELPLUS=m @@ -2192,8 +2228,8 @@ CONFIG_EPIC100=m CONFIG_SMSC9420=m CONFIG_NET_VENDOR_STMICRO=y CONFIG_STMMAC_ETH=m -CONFIG_STMMAC_PLATFORM=m -CONFIG_STMMAC_PCI=m +# CONFIG_STMMAC_PLATFORM is not set +CONFIG_STMMAC_PCI=y # CONFIG_STMMAC_DEBUG_FS is not set # CONFIG_STMMAC_DA is not set CONFIG_STMMAC_RING=y @@ -2211,6 +2247,12 @@ CONFIG_NET_VENDOR_VIA=y CONFIG_VIA_RHINE=m # CONFIG_VIA_RHINE_MMIO is not set CONFIG_VIA_VELOCITY=m +CONFIG_NET_VENDOR_WIZNET=y +CONFIG_WIZNET_W5100=m +CONFIG_WIZNET_W5300=m +# CONFIG_WIZNET_BUS_DIRECT is not set +# CONFIG_WIZNET_BUS_INDIRECT is not set +CONFIG_WIZNET_BUS_ANY=y CONFIG_NET_VENDOR_XIRCOM=y CONFIG_PCMCIA_XIRC2PS=m # CONFIG_FDDI is not set @@ -2230,6 +2272,7 @@ CONFIG_CICADA_PHY=m CONFIG_VITESSE_PHY=m CONFIG_SMSC_PHY=m CONFIG_BROADCOM_PHY=m +CONFIG_BCM87XX_PHY=m CONFIG_ICPLUS_PHY=m CONFIG_REALTEK_PHY=m CONFIG_NATIONAL_PHY=m @@ -2237,6 +2280,8 @@ CONFIG_STE10XP=m CONFIG_LSI_ET1011C_PHY=m CONFIG_MICREL_PHY=m # CONFIG_MDIO_BITBANG is not set +CONFIG_MDIO_BUS_MUX=m +CONFIG_MDIO_BUS_MUX_GPIO=m CONFIG_PLIP=m CONFIG_PPP=m CONFIG_PPP_BSDCOMP=m @@ -2255,7 +2300,6 @@ CONFIG_SLHC=m # CONFIG_SLIP_COMPRESSED is not set # CONFIG_SLIP_SMART is not set # CONFIG_SLIP_MODE_SLIP6 is not set -# CONFIG_TR is not set # # USB Network Adapters @@ -2370,6 +2414,7 @@ CONFIG_BRCMUTIL=m CONFIG_BRCMSMAC=m CONFIG_BRCMFMAC=m CONFIG_BRCMFMAC_SDIO=y +# CONFIG_BRCMFMAC_SDIO_OOB is not set CONFIG_BRCMFMAC_USB=y # CONFIG_BRCMDBG is not set CONFIG_HOSTAP=m @@ -2390,13 +2435,13 @@ CONFIG_IPW2200_QOS=y CONFIG_LIBIPW=m # CONFIG_LIBIPW_DEBUG is not set CONFIG_IWLWIFI=m +CONFIG_IWLDVM=m # # Debugging Options # # CONFIG_IWLWIFI_DEBUG is not set CONFIG_IWLWIFI_DEVICE_TRACING=y -CONFIG_IWLWIFI_DEVICE_TESTMODE=y # CONFIG_IWLWIFI_P2P is not set # CONFIG_IWLWIFI_EXPERIMENTAL_MFP is not set CONFIG_IWLEGACY=m @@ -2407,9 +2452,6 @@ CONFIG_IWL3945=m # iwl3945 / iwl4965 Debugging Options # # CONFIG_IWLEGACY_DEBUG is not set -CONFIG_IWM=m -# CONFIG_IWM_DEBUG is not set -CONFIG_IWM_TRACING=y CONFIG_LIBERTAS=m CONFIG_LIBERTAS_USB=m CONFIG_LIBERTAS_CS=m @@ -2438,6 +2480,7 @@ CONFIG_RT2800PCI=m CONFIG_RT2800PCI_RT33XX=y CONFIG_RT2800PCI_RT35XX=y CONFIG_RT2800PCI_RT53XX=y +CONFIG_RT2800PCI_RT3290=y CONFIG_RT2500USB=m CONFIG_RT73USB=m CONFIG_RT2800USB=m @@ -2460,25 +2503,26 @@ CONFIG_RTL8192CU=m CONFIG_RTLWIFI=m # CONFIG_RTLWIFI_DEBUG is not set CONFIG_RTL8192C_COMMON=m +CONFIG_WL_TI=y CONFIG_WL1251=m CONFIG_WL1251_SDIO=m -CONFIG_WL12XX_MENU=m CONFIG_WL12XX=m -CONFIG_WL12XX_SDIO=m +CONFIG_WL18XX=m +CONFIG_WLCORE=m +CONFIG_WLCORE_SDIO=m CONFIG_WL12XX_PLATFORM_DATA=y CONFIG_ZD1211RW=m # CONFIG_ZD1211RW_DEBUG is not set CONFIG_MWIFIEX=m CONFIG_MWIFIEX_SDIO=m CONFIG_MWIFIEX_PCIE=m +CONFIG_MWIFIEX_USB=m # # WiMAX Wireless Broadband devices # CONFIG_WIMAX_I2400M=m CONFIG_WIMAX_I2400M_USB=m -CONFIG_WIMAX_I2400M_SDIO=m -# CONFIG_WIMAX_IWMC3200_SDIO is not set CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 # CONFIG_WAN is not set CONFIG_VMXNET3=m @@ -2637,6 +2681,7 @@ CONFIG_INPUT=y CONFIG_INPUT_FF_MEMLESS=m CONFIG_INPUT_POLLDEV=m CONFIG_INPUT_SPARSEKMAP=m +CONFIG_INPUT_MATRIXKMAP=m # # Userland interfaces @@ -2665,6 +2710,7 @@ CONFIG_KEYBOARD_TCA6416=m CONFIG_KEYBOARD_TCA8418=m CONFIG_KEYBOARD_MATRIX=m # CONFIG_KEYBOARD_LM8323 is not set +CONFIG_KEYBOARD_LM8333=m # CONFIG_KEYBOARD_MAX7359 is not set CONFIG_KEYBOARD_MCS=m CONFIG_KEYBOARD_MPR121=m @@ -2752,13 +2798,16 @@ CONFIG_TOUCHSCREEN_ILI210X=m CONFIG_TOUCHSCREEN_GUNZE=m CONFIG_TOUCHSCREEN_ELO=m CONFIG_TOUCHSCREEN_WACOM_W8001=m +CONFIG_TOUCHSCREEN_WACOM_I2C=m CONFIG_TOUCHSCREEN_MAX11801=m CONFIG_TOUCHSCREEN_MCS5000=m +CONFIG_TOUCHSCREEN_MMS114=m CONFIG_TOUCHSCREEN_MTOUCH=m CONFIG_TOUCHSCREEN_INEXIO=m CONFIG_TOUCHSCREEN_MK712=m CONFIG_TOUCHSCREEN_HTCPEN=m CONFIG_TOUCHSCREEN_PENMOUNT=m +CONFIG_TOUCHSCREEN_EDT_FT5X06=m CONFIG_TOUCHSCREEN_TOUCHRIGHT=m CONFIG_TOUCHSCREEN_TOUCHWIN=m CONFIG_TOUCHSCREEN_UCB1400=m @@ -2768,6 +2817,7 @@ CONFIG_TOUCHSCREEN_WM9705=y CONFIG_TOUCHSCREEN_WM9712=y CONFIG_TOUCHSCREEN_WM9713=y CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_MC13783=m CONFIG_TOUCHSCREEN_USB_EGALAX=y CONFIG_TOUCHSCREEN_USB_PANJIT=y CONFIG_TOUCHSCREEN_USB_3M=y @@ -2792,11 +2842,11 @@ CONFIG_TOUCHSCREEN_TSC2007=m CONFIG_TOUCHSCREEN_ST1232=m CONFIG_TOUCHSCREEN_TPS6507X=m CONFIG_INPUT_MISC=y -CONFIG_INPUT_AB8500_PONKEY=m CONFIG_INPUT_AD714X=m CONFIG_INPUT_AD714X_I2C=m CONFIG_INPUT_BMA150=m CONFIG_INPUT_PCSPKR=m +CONFIG_INPUT_MC13783_PWRBUTTON=m CONFIG_INPUT_MMA8450=m CONFIG_INPUT_MPU3050=m CONFIG_INPUT_APANEL=m @@ -2943,7 +2993,6 @@ CONFIG_TCG_ATMEL=m CONFIG_TCG_INFINEON=m CONFIG_TELCLOCK=m CONFIG_DEVPORT=y -CONFIG_RAMOOPS=m CONFIG_I2C=m CONFIG_I2C_BOARDINFO=y CONFIG_I2C_COMPAT=y @@ -2986,6 +3035,7 @@ CONFIG_I2C_SCMI=m # # I2C system bus drivers (mostly embedded / system-on-chip) # +CONFIG_I2C_DESIGNWARE_CORE=m CONFIG_I2C_DESIGNWARE_PCI=m CONFIG_I2C_EG20T=m # CONFIG_I2C_GPIO is not set @@ -3044,6 +3094,7 @@ CONFIG_DP83640_PHY=m CONFIG_PTP_1588_CLOCK_PCH=m CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y CONFIG_GPIO_SYSFS=y # @@ -3052,11 +3103,13 @@ CONFIG_GPIO_SYSFS=y # CONFIG_GPIO_GENERIC_PLATFORM is not set # CONFIG_GPIO_IT8761E is not set CONFIG_GPIO_SCH=m +CONFIG_GPIO_ICH=m # CONFIG_GPIO_VX855 is not set # # I2C GPIO expanders: # +CONFIG_GPIO_ARIZONA=m # CONFIG_GPIO_MAX7300 is not set # CONFIG_GPIO_MAX732X is not set # CONFIG_GPIO_PCA953X is not set @@ -3067,6 +3120,7 @@ CONFIG_GPIO_SCH=m # PCI GPIO expanders: # CONFIG_GPIO_CS5535=y +CONFIG_GPIO_AMD8111=m # CONFIG_GPIO_LANGWELL is not set # CONFIG_GPIO_PCH is not set # CONFIG_GPIO_ML_IOH is not set @@ -3105,6 +3159,7 @@ CONFIG_BATTERY_OLPC=m # CONFIG_CHARGER_LP8727 is not set # CONFIG_CHARGER_GPIO is not set # CONFIG_CHARGER_SMB347 is not set +CONFIG_POWER_AVS=y CONFIG_HWMON=y CONFIG_HWMON_VID=m # CONFIG_HWMON_DEBUG_CHIP is not set @@ -3143,6 +3198,7 @@ CONFIG_SENSORS_G760A=m CONFIG_SENSORS_GL518SM=m CONFIG_SENSORS_GL520SM=m # CONFIG_SENSORS_GPIO_FAN is not set +CONFIG_SENSORS_HIH6130=m CONFIG_SENSORS_CORETEMP=m CONFIG_SENSORS_IBMAEM=m CONFIG_SENSORS_IBMPEX=m @@ -3206,6 +3262,7 @@ CONFIG_SENSORS_SCH5636=m CONFIG_SENSORS_ADS1015=m CONFIG_SENSORS_ADS7828=m CONFIG_SENSORS_AMC6821=m +CONFIG_SENSORS_INA2XX=m CONFIG_SENSORS_THMC50=m CONFIG_SENSORS_TMP102=m CONFIG_SENSORS_TMP401=m @@ -3225,6 +3282,7 @@ CONFIG_SENSORS_W83L786NG=m CONFIG_SENSORS_W83627HF=m CONFIG_SENSORS_W83627EHF=m CONFIG_SENSORS_APPLESMC=m +CONFIG_SENSORS_MC13783_ADC=m # # ACPI drivers @@ -3255,6 +3313,7 @@ CONFIG_IB700_WDT=m CONFIG_IBMASR=m CONFIG_WAFER_WDT=m CONFIG_I6300ESB_WDT=m +CONFIG_IE6XX_WDT=m CONFIG_ITCO_WDT=m CONFIG_ITCO_VENDOR_SUPPORT=y CONFIG_IT8712F_WDT=m @@ -3323,6 +3382,7 @@ CONFIG_BCMA=m CONFIG_BCMA_BLOCKIO=y CONFIG_BCMA_HOST_PCI_POSSIBLE=y CONFIG_BCMA_HOST_PCI=y +CONFIG_BCMA_DRIVER_GMAC_CMN=y # CONFIG_BCMA_DEBUG is not set # @@ -3333,21 +3393,27 @@ CONFIG_MFD_SM501=m CONFIG_MFD_SM501_GPIO=y CONFIG_HTC_PASIC3=m CONFIG_UCB1400_CORE=m +CONFIG_MFD_LM3533=m # CONFIG_TPS6105X is not set CONFIG_TPS65010=m CONFIG_TPS6507X=m CONFIG_MFD_TPS65217=m # CONFIG_MFD_TMIO is not set -CONFIG_MFD_WM8400=m +CONFIG_MFD_ARIZONA=y +CONFIG_MFD_ARIZONA_I2C=m +CONFIG_MFD_WM5102=y +CONFIG_MFD_WM5110=y CONFIG_MFD_PCF50633=m CONFIG_PCF50633_ADC=m CONFIG_PCF50633_GPIO=m +CONFIG_MFD_MC13783=m +CONFIG_MFD_MC13XXX=m +CONFIG_MFD_MC13XXX_I2C=m CONFIG_ABX500_CORE=y -CONFIG_AB8500_CORE=y -# CONFIG_AB8500_DEBUG is not set CONFIG_MFD_CS5535=m # CONFIG_MFD_TIMBERDALE is not set CONFIG_LPC_SCH=m +CONFIG_LPC_ICH=m CONFIG_MFD_RDC321X=m # CONFIG_MFD_JANZ_CMODIO is not set CONFIG_MFD_VX855=m @@ -3358,22 +3424,28 @@ CONFIG_MEDIA_SUPPORT=m # # Multimedia core support # +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_RC_SUPPORT=y CONFIG_MEDIA_CONTROLLER=y CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L2_COMMON=m CONFIG_VIDEO_V4L2_SUBDEV_API=y CONFIG_DVB_CORE=m CONFIG_DVB_NET=y -CONFIG_VIDEO_MEDIA=m # -# Multimedia drivers +# Media drivers # CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_RC_CORE=m -CONFIG_LIRC=m CONFIG_RC_MAP=m +CONFIG_RC_DECODERS=y +CONFIG_LIRC=m +CONFIG_IR_LIRC_CODEC=m CONFIG_IR_NEC_DECODER=m CONFIG_IR_RC5_DECODER=m CONFIG_IR_RC6_DECODER=m @@ -3382,7 +3454,7 @@ CONFIG_IR_SONY_DECODER=m CONFIG_IR_RC5_SZ_DECODER=m CONFIG_IR_SANYO_DECODER=m CONFIG_IR_MCE_KBD_DECODER=m -CONFIG_IR_LIRC_CODEC=m +CONFIG_RC_DEVICES=y CONFIG_RC_ATI_REMOTE=m CONFIG_IR_ENE=m CONFIG_IR_IMON=m @@ -3393,6 +3465,7 @@ CONFIG_IR_NUVOTON=m CONFIG_IR_REDRAT3=m CONFIG_IR_STREAMZAP=m CONFIG_IR_WINBOND_CIR=m +CONFIG_IR_IGUANA=m CONFIG_RC_LOOPBACK=m CONFIG_IR_GPIO_CIR=m CONFIG_MEDIA_ATTACH=y @@ -3419,7 +3492,11 @@ CONFIG_MEDIA_TUNER_MXL5007T=m CONFIG_MEDIA_TUNER_MC44S803=m CONFIG_MEDIA_TUNER_MAX2165=m CONFIG_MEDIA_TUNER_TDA18218=m +CONFIG_MEDIA_TUNER_FC0011=m +CONFIG_MEDIA_TUNER_FC0012=m +CONFIG_MEDIA_TUNER_FC0013=m CONFIG_MEDIA_TUNER_TDA18212=m +CONFIG_MEDIA_TUNER_TUA9001=m CONFIG_VIDEO_V4L2=m CONFIG_VIDEOBUF_GEN=m CONFIG_VIDEOBUF_DMA_SG=m @@ -3500,6 +3577,7 @@ CONFIG_VIDEO_SAA7185=m CONFIG_VIDEO_ADV7170=m CONFIG_VIDEO_ADV7175=m CONFIG_VIDEO_ADV7343=m +CONFIG_VIDEO_ADV7393=m CONFIG_VIDEO_AK881X=m # @@ -3538,6 +3616,10 @@ CONFIG_VIDEO_THS7303=m CONFIG_VIDEO_M52790=m CONFIG_VIDEO_VIVI=m CONFIG_V4L_USB_DRIVERS=y + +# +# Webcam devices +# CONFIG_USB_VIDEO_CLASS=m CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y CONFIG_USB_GSPCA=m @@ -3587,15 +3669,32 @@ CONFIG_USB_GSPCA_VC032X=m CONFIG_USB_GSPCA_VICAM=m CONFIG_USB_GSPCA_XIRLINK_CIT=m CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_VIDEO_CPIA2=m +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_USB_SN9C102=m + +# +# Webcam and/or TV USB devices +# +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_VIDEO_EM28XX_RC=m + +# +# TV USB devices +# +CONFIG_VIDEO_AU0828=m CONFIG_VIDEO_PVRUSB2=m CONFIG_VIDEO_PVRUSB2_SYSFS=y CONFIG_VIDEO_PVRUSB2_DVB=y # CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_HDPVR=m -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_EM28XX_ALSA=m -CONFIG_VIDEO_EM28XX_DVB=m -CONFIG_VIDEO_EM28XX_RC=y CONFIG_VIDEO_TLG2300=m CONFIG_VIDEO_CX231XX=m CONFIG_VIDEO_CX231XX_RC=y @@ -3605,17 +3704,7 @@ CONFIG_VIDEO_TM6000=m CONFIG_VIDEO_TM6000_ALSA=m CONFIG_VIDEO_TM6000_DVB=m CONFIG_VIDEO_USBVISION=m -CONFIG_USB_ET61X251=m -CONFIG_USB_SN9C102=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set -CONFIG_USB_PWC_INPUT_EVDEV=y -CONFIG_VIDEO_CPIA2=m -CONFIG_USB_ZR364XX=m -CONFIG_USB_STKWEBCAM=m -CONFIG_USB_S2255=m CONFIG_V4L_PCI_DRIVERS=y -CONFIG_VIDEO_AU0828=m CONFIG_VIDEO_BT848=m CONFIG_VIDEO_BT848_DVB=y CONFIG_VIDEO_CX18=m @@ -3660,6 +3749,8 @@ CONFIG_I2C_SI470X=m CONFIG_USB_MR800=m CONFIG_USB_DSBR=m CONFIG_RADIO_MAXIRADIO=m +CONFIG_RADIO_SHARK=m +CONFIG_RADIO_SHARK2=m CONFIG_I2C_SI4713=m CONFIG_RADIO_SI4713=m CONFIG_USB_KEENE=m @@ -3730,6 +3821,7 @@ CONFIG_DVB_USB_TECHNISAT_USB2=m CONFIG_DVB_USB_IT913X=m CONFIG_DVB_USB_MXL111SF=m CONFIG_DVB_USB_RTL28XXU=m +CONFIG_DVB_USB_AF9035=m CONFIG_DVB_TTUSB_BUDGET=m CONFIG_DVB_TTUSB_DEC=m CONFIG_SMS_SIANO_MDTV=m @@ -3794,7 +3886,6 @@ CONFIG_DVB_DDBRIDGE=m # # Supported DVB Frontends # -# CONFIG_DVB_FE_CUSTOMISE is not set # # Multistandard (satellite) frontends @@ -3861,6 +3952,7 @@ CONFIG_DVB_EC100=m CONFIG_DVB_STV0367=m CONFIG_DVB_CXD2820R=m CONFIG_DVB_RTL2830=m +CONFIG_DVB_RTL2832=m # # DVB-C (cable) frontends @@ -3879,8 +3971,11 @@ CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m CONFIG_DVB_LGDT3305=m +CONFIG_DVB_LG2160=m CONFIG_DVB_S5H1409=m CONFIG_DVB_AU8522=m +CONFIG_DVB_AU8522_DTV=m +CONFIG_DVB_AU8522_V4L=m CONFIG_DVB_S5H1411=m # @@ -3912,6 +4007,7 @@ CONFIG_DVB_TDA665x=m CONFIG_DVB_IX2505V=m CONFIG_DVB_IT913X_FE=m CONFIG_DVB_M88RS2000=m +CONFIG_DVB_AF9033=m # # Tools to develop new frontends @@ -3960,10 +4056,14 @@ CONFIG_DRM_SIS=m CONFIG_DRM_VIA=m CONFIG_DRM_SAVAGE=m CONFIG_DRM_VMWGFX=m +CONFIG_DRM_VMWGFX_FBCON=y CONFIG_DRM_GMA500=m CONFIG_DRM_GMA600=y CONFIG_DRM_GMA3600=y CONFIG_DRM_UDL=m +CONFIG_DRM_AST=m +CONFIG_DRM_MGAG200=m +CONFIG_DRM_CIRRUS_QEMU=m CONFIG_STUB_POULSBO=m CONFIG_VGASTATE=m CONFIG_VIDEO_OUTPUT_CONTROL=m @@ -4018,7 +4118,9 @@ CONFIG_FB_I810_I2C=y # CONFIG_FB_S3 is not set # CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set -# CONFIG_FB_VIA is not set +CONFIG_FB_VIA=m +CONFIG_FB_VIA_DIRECT_PROCFS=y +CONFIG_FB_VIA_X_COMPATIBILITY=y # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set # CONFIG_FB_3DFX is not set @@ -4037,12 +4139,14 @@ CONFIG_FB_VIRTUAL=m # CONFIG_FB_METRONOME is not set # CONFIG_FB_MB862XX is not set # CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_AUO_K190X is not set # CONFIG_EXYNOS_VIDEO is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=m CONFIG_LCD_PLATFORM=m CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_BACKLIGHT_LM3533=m CONFIG_BACKLIGHT_PROGEAR=m CONFIG_BACKLIGHT_APPLE=m # CONFIG_BACKLIGHT_SAHARA is not set @@ -4073,6 +4177,7 @@ CONFIG_FONT_8x16=y # CONFIG_FONT_SUN8x16 is not set # CONFIG_FONT_SUN12x22 is not set # CONFIG_FONT_10x18 is not set +CONFIG_FONT_AUTOSELECT=y # CONFIG_LOGO is not set CONFIG_SOUND=m CONFIG_SOUND_OSS_CORE=y @@ -4218,7 +4323,6 @@ CONFIG_SND_HDA_INPUT_BEEP_MODE=1 CONFIG_SND_HDA_INPUT_JACK=y CONFIG_SND_HDA_PATCH_LOADER=y CONFIG_SND_HDA_CODEC_REALTEK=y -CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS=y CONFIG_SND_HDA_CODEC_ANALOG=y CONFIG_SND_HDA_CODEC_SIGMATEL=y CONFIG_SND_HDA_CODEC_VIA=y @@ -4276,16 +4380,14 @@ CONFIG_SND_PDAUDIOCF=m # CONFIG_SND_SOC is not set # CONFIG_SOUND_PRIME is not set CONFIG_AC97_BUS=m -CONFIG_HID_SUPPORT=y -CONFIG_HID=m -CONFIG_HIDRAW=y # -# USB Input Devices +# HID support # -CONFIG_USB_HID=m -CONFIG_HID_PID=y -CONFIG_USB_HIDDEV=y +CONFIG_HID=m +CONFIG_HIDRAW=y +CONFIG_UHID=m +CONFIG_HID_GENERIC=m # # Special HID drivers @@ -4294,6 +4396,7 @@ CONFIG_HID_A4TECH=m CONFIG_HID_ACRUX=m CONFIG_HID_ACRUX_FF=y CONFIG_HID_APPLE=m +CONFIG_HID_AUREAL=m CONFIG_HID_BELKIN=m CONFIG_HID_CHERRY=m CONFIG_HID_CHICONY=m @@ -4314,6 +4417,7 @@ CONFIG_HID_GYRATION=m CONFIG_HID_TWINHAN=m CONFIG_HID_KENSINGTON=m CONFIG_HID_LCPOWER=m +CONFIG_HID_LENOVO_TPKBD=m CONFIG_HID_LOGITECH=m CONFIG_HID_LOGITECH_DJ=m CONFIG_LOGITECH_FF=y @@ -4351,12 +4455,18 @@ CONFIG_HID_TOPSEED=m CONFIG_HID_THRUSTMASTER=m CONFIG_THRUSTMASTER_FF=y CONFIG_HID_WACOM=m -CONFIG_HID_WACOM_POWER_SUPPLY=y CONFIG_HID_WIIMOTE=m CONFIG_HID_WIIMOTE_EXT=y CONFIG_HID_ZEROPLUS=m CONFIG_ZEROPLUS_FF=y CONFIG_HID_ZYDACRON=m + +# +# USB HID support +# +CONFIG_USB_HID=m +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB_ARCH_HAS_XHCI=y @@ -4370,8 +4480,6 @@ CONFIG_USB=m # # Miscellaneous USB options # -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set CONFIG_USB_DYNAMIC_MINORS=y CONFIG_USB_SUSPEND=y # CONFIG_USB_OTG is not set @@ -4410,9 +4518,15 @@ CONFIG_USB_R8A66597_HCD=m CONFIG_USB_RENESAS_USBHS_HCD=m CONFIG_USB_WHCI_HCD=m CONFIG_USB_HWA_HCD=m +# CONFIG_USB_HCD_BCMA is not set +# CONFIG_USB_HCD_SSB is not set CONFIG_USB_MUSB_HDRC=m CONFIG_USB_MUSB_TUSB6010=m CONFIG_MUSB_PIO_ONLY=y +CONFIG_USB_CHIPIDEA=m +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +# CONFIG_USB_CHIPIDEA_DEBUG is not set CONFIG_USB_RENESAS_USBHS=m # @@ -4526,6 +4640,7 @@ CONFIG_USB_SERIAL_OPTICON=m CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m CONFIG_USB_SERIAL_ZIO=m CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m # CONFIG_USB_SERIAL_DEBUG is not set # @@ -4552,6 +4667,11 @@ CONFIG_USB_IOWARRIOR=m CONFIG_USB_TEST=m CONFIG_USB_ISIGHTFW=m CONFIG_USB_YUREX=m + +# +# USB Physical Layer drivers +# +CONFIG_USB_ISP1301=m CONFIG_USB_ATM=m CONFIG_USB_SPEEDTOUCH=m CONFIG_USB_CXACRU=m @@ -4562,6 +4682,10 @@ CONFIG_USB_GADGET=m # CONFIG_USB_GADGET_DEBUG_FS is not set CONFIG_USB_GADGET_VBUS_DRAW=2 CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 + +# +# USB Peripheral Controller +# CONFIG_USB_FUSB300=m CONFIG_USB_R8A66597=m CONFIG_USB_RENESAS_USBHS_UDC=m @@ -4569,12 +4693,10 @@ CONFIG_USB_MV_UDC=m CONFIG_USB_GADGET_MUSB_HDRC=m CONFIG_USB_M66592=m CONFIG_USB_AMD5536UDC=m -CONFIG_USB_CI13XXX_PCI=m CONFIG_USB_NET2272=m CONFIG_USB_NET2272_DMA=y CONFIG_USB_NET2280=m CONFIG_USB_GOKU=m -CONFIG_USB_LANGWELL=m CONFIG_USB_EG20T=m CONFIG_USB_DUMMY_HCD=m CONFIG_USB_GADGET_DUALSPEED=y @@ -4594,6 +4716,7 @@ CONFIG_USB_FUNCTIONFS_GENERIC=y CONFIG_USB_FILE_STORAGE=m # CONFIG_USB_FILE_STORAGE_TEST is not set # CONFIG_USB_MASS_STORAGE is not set +CONFIG_USB_GADGET_TARGET=m CONFIG_USB_G_SERIAL=m CONFIG_USB_MIDI_GADGET=m CONFIG_USB_G_PRINTER=m @@ -4613,7 +4736,6 @@ CONFIG_USB_G_WEBCAM=m CONFIG_USB_OTG_UTILS=y # CONFIG_USB_GPIO_VBUS is not set CONFIG_NOP_USB_XCEIV=m -# CONFIG_AB8500_USB is not set CONFIG_UWB=m CONFIG_UWB_HWA=m CONFIG_UWB_WHCI=m @@ -4668,6 +4790,7 @@ CONFIG_LEDS_CLASS=y # LED drivers # CONFIG_LEDS_LM3530=m +CONFIG_LEDS_LM3533=m CONFIG_LEDS_PCA9532=m # CONFIG_LEDS_PCA9532_GPIO is not set # CONFIG_LEDS_GPIO is not set @@ -4681,14 +4804,18 @@ CONFIG_LEDS_BD2802=m CONFIG_LEDS_INTEL_SS4200=m CONFIG_LEDS_LT3593=m CONFIG_LEDS_DELL_NETBOOKS=m +CONFIG_LEDS_MC13783=m CONFIG_LEDS_TCA6507=m +CONFIG_LEDS_LM3556=m CONFIG_LEDS_OT200=m +CONFIG_LEDS_BLINKM=m CONFIG_LEDS_TRIGGERS=y # # LED Triggers # CONFIG_LEDS_TRIGGER_TIMER=m +CONFIG_LEDS_TRIGGER_ONESHOT=m CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_LEDS_TRIGGER_BACKLIGHT=m CONFIG_LEDS_TRIGGER_GPIO=m @@ -4697,6 +4824,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=m # # iptables trigger is under Netfilter config (LED target) # +CONFIG_LEDS_TRIGGER_TRANSIENT=m CONFIG_ACCESSIBILITY=y CONFIG_A11Y_BRAILLE_CONSOLE=y # CONFIG_INFINIBAND is not set @@ -4705,6 +4833,7 @@ CONFIG_EDAC=y # # Reporting subsystems # +CONFIG_EDAC_LEGACY_SYSFS=y # CONFIG_EDAC_DEBUG is not set CONFIG_EDAC_DECODE_MCE=m CONFIG_EDAC_MCE_INJ=m @@ -4784,11 +4913,11 @@ CONFIG_RTC_DRV_BQ4802=m CONFIG_RTC_DRV_RP5C01=m CONFIG_RTC_DRV_V3020=m CONFIG_RTC_DRV_PCF50633=m -CONFIG_RTC_DRV_AB8500=m # # on-CPU RTC drivers # +CONFIG_RTC_DRV_MC13XXX=m CONFIG_DMADEVICES=y # CONFIG_DMADEVICES_DEBUG is not set @@ -4822,6 +4951,7 @@ CONFIG_UIO_AEC=m CONFIG_UIO_SERCOS3=m CONFIG_UIO_PCI_GENERIC=m CONFIG_UIO_NETX=m +# CONFIG_VFIO is not set CONFIG_VIRTIO=y CONFIG_VIRTIO_RING=y @@ -4831,6 +4961,7 @@ CONFIG_VIRTIO_RING=y CONFIG_VIRTIO_PCI=m CONFIG_VIRTIO_BALLOON=m CONFIG_VIRTIO_MMIO=m +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y # # Microsoft Hyper-V guest support @@ -4849,14 +4980,16 @@ CONFIG_PRISM2_USB=m CONFIG_ECHO=m CONFIG_COMEDI=m # CONFIG_COMEDI_DEBUG is not set -CONFIG_COMEDI_MISC_DRIVERS=m +CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB=2048 +CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB=20480 +CONFIG_COMEDI_MISC_DRIVERS=y CONFIG_COMEDI_KCOMEDILIB=m CONFIG_COMEDI_BOND=m CONFIG_COMEDI_TEST=m CONFIG_COMEDI_PARPORT=m CONFIG_COMEDI_SERIAL2002=m CONFIG_COMEDI_SKEL=m -CONFIG_COMEDI_ISA_DRIVERS=m +CONFIG_COMEDI_ISA_DRIVERS=y CONFIG_COMEDI_ACL7225B=m CONFIG_COMEDI_PCL711=m CONFIG_COMEDI_PCL724=m @@ -4868,9 +5001,13 @@ CONFIG_COMEDI_PCL816=m CONFIG_COMEDI_PCL818=m CONFIG_COMEDI_PCM3724=m CONFIG_COMEDI_PCM3730=m +CONFIG_COMEDI_AMPLC_DIO200_ISA=m +CONFIG_COMEDI_AMPLC_PC236_ISA=m +CONFIG_COMEDI_AMPLC_PC263_ISA=m CONFIG_COMEDI_RTI800=m CONFIG_COMEDI_RTI802=m CONFIG_COMEDI_DAS16M1=m +CONFIG_COMEDI_DAS08_ISA=m CONFIG_COMEDI_DAS16=m CONFIG_COMEDI_DAS800=m CONFIG_COMEDI_DAS1800=m @@ -4898,7 +5035,7 @@ CONFIG_COMEDI_PCMMIO=m CONFIG_COMEDI_PCMUIO=m CONFIG_COMEDI_MULTIQ3=m CONFIG_COMEDI_POC=m -CONFIG_COMEDI_PCI_DRIVERS=m +CONFIG_COMEDI_PCI_DRIVERS=y CONFIG_COMEDI_ADDI_APCI_035=m CONFIG_COMEDI_ADDI_APCI_1032=m CONFIG_COMEDI_ADDI_APCI_1500=m @@ -4922,12 +5059,13 @@ CONFIG_COMEDI_ADL_PCI9118=m CONFIG_COMEDI_ADV_PCI1710=m CONFIG_COMEDI_ADV_PCI1723=m CONFIG_COMEDI_ADV_PCI_DIO=m -CONFIG_COMEDI_AMPLC_DIO200=m -CONFIG_COMEDI_AMPLC_PC236=m -CONFIG_COMEDI_AMPLC_PC263=m +CONFIG_COMEDI_AMPLC_DIO200_PCI=m +CONFIG_COMEDI_AMPLC_PC236_PCI=m +CONFIG_COMEDI_AMPLC_PC263_PCI=m CONFIG_COMEDI_AMPLC_PCI224=m CONFIG_COMEDI_AMPLC_PCI230=m CONFIG_COMEDI_CONTEC_PCI_DIO=m +CONFIG_COMEDI_DAS08_PCI=m CONFIG_COMEDI_DT3000=m CONFIG_COMEDI_DYNA_PCI10XX=m CONFIG_COMEDI_UNIOXX5=m @@ -4949,13 +5087,16 @@ CONFIG_COMEDI_NI_6527=m CONFIG_COMEDI_NI_65XX=m CONFIG_COMEDI_NI_660X=m CONFIG_COMEDI_NI_670X=m +CONFIG_COMEDI_NI_LABPC=m CONFIG_COMEDI_NI_PCIDIO=m CONFIG_COMEDI_NI_PCIMIO=m CONFIG_COMEDI_RTD520=m CONFIG_COMEDI_S526=m CONFIG_COMEDI_S626=m CONFIG_COMEDI_SSV_DNP=m -CONFIG_COMEDI_PCMCIA_DRIVERS=m +CONFIG_COMEDI_MITE=m +CONFIG_COMEDI_NI_TIOCMD=m +CONFIG_COMEDI_PCMCIA_DRIVERS=y CONFIG_COMEDI_CB_DAS16_CS=m CONFIG_COMEDI_DAS08_CS=m CONFIG_COMEDI_NI_DAQ_700_CS=m @@ -4963,19 +5104,19 @@ CONFIG_COMEDI_NI_DAQ_DIO24_CS=m CONFIG_COMEDI_NI_LABPC_CS=m CONFIG_COMEDI_NI_MIO_CS=m CONFIG_COMEDI_QUATECH_DAQP_CS=m -CONFIG_COMEDI_USB_DRIVERS=m +CONFIG_COMEDI_USB_DRIVERS=y CONFIG_COMEDI_DT9812=m CONFIG_COMEDI_USBDUX=m CONFIG_COMEDI_USBDUXFAST=m CONFIG_COMEDI_USBDUXSIGMA=m CONFIG_COMEDI_VMK80XX=m -CONFIG_COMEDI_NI_COMMON=m -CONFIG_COMEDI_MITE=m -CONFIG_COMEDI_NI_TIO=m -CONFIG_COMEDI_NI_LABPC=m CONFIG_COMEDI_8255=m -CONFIG_COMEDI_DAS08=m CONFIG_COMEDI_FC=m +CONFIG_COMEDI_AMPLC_DIO200=m +CONFIG_COMEDI_AMPLC_PC236=m +CONFIG_COMEDI_AMPLC_PC263=m +CONFIG_COMEDI_DAS08=m +CONFIG_COMEDI_NI_TIO=m # CONFIG_FB_OLPC_DCON is not set CONFIG_ASUS_OLED=m # CONFIG_PANEL is not set @@ -5001,12 +5142,9 @@ CONFIG_LINE6_USB=m # CONFIG_LINE6_USB_RAW is not set # CONFIG_LINE6_USB_IMPULSE_RESPONSE is not set CONFIG_USB_SERIAL_QUATECH2=m -CONFIG_USB_SERIAL_QUATECH_USB2=m CONFIG_VT6655=m CONFIG_VT6656=m -# CONFIG_VME_BUS is not set CONFIG_DX_SEP=m -# CONFIG_IIO is not set CONFIG_ZRAM=m # CONFIG_ZRAM_DEBUG is not set CONFIG_ZCACHE=y @@ -5044,7 +5182,6 @@ CONFIG_SPEAKUP_SYNTH_TXPRT=m CONFIG_SPEAKUP_SYNTH_DUMMY=m CONFIG_TOUCHSCREEN_CLEARPAD_TM1217=m CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=m -CONFIG_INTEL_MEI=m CONFIG_STAGING_MEDIA=y CONFIG_DVB_AS102=m CONFIG_DVB_CXD2099=m @@ -5082,6 +5219,17 @@ CONFIG_LIRC_ZILOG=m # CONFIG_ANDROID is not set # CONFIG_PHONE is not set CONFIG_USB_WPAN_HCD=m +CONFIG_IPACK_BUS=m +CONFIG_BOARD_TPCI200=m +CONFIG_SERIAL_IPOCTAL=m +CONFIG_WIMAX_GDM72XX=m +CONFIG_WIMAX_GDM72XX_QOS=y +CONFIG_WIMAX_GDM72XX_K_MODE=y +CONFIG_WIMAX_GDM72XX_WIMAX2=y +CONFIG_WIMAX_GDM72XX_USB=y +# CONFIG_WIMAX_GDM72XX_SDIO is not set +CONFIG_WIMAX_GDM72XX_USB_PM=y +CONFIG_CSR_WIFI=m CONFIG_X86_PLATFORM_DEVICES=y CONFIG_ACER_WMI=m CONFIG_ACERHDF=m @@ -5140,6 +5288,7 @@ CONFIG_I8253_LOCK=y CONFIG_CLKBLD_I8253=y CONFIG_IOMMU_API=y CONFIG_IOMMU_SUPPORT=y +CONFIG_OF_IOMMU=y CONFIG_DMAR_TABLE=y CONFIG_INTEL_IOMMU=y # CONFIG_INTEL_IOMMU_DEFAULT_ON is not set @@ -5154,6 +5303,17 @@ CONFIG_INTEL_IOMMU_FLOPPY_WA=y # CONFIG_VIRT_DRIVERS=y # CONFIG_PM_DEVFREQ is not set +CONFIG_EXTCON=m + +# +# Extcon Device Drivers +# +CONFIG_EXTCON_GPIO=m +CONFIG_EXTCON_ARIZONA=m +CONFIG_MEMORY=y +# CONFIG_IIO is not set +# CONFIG_VME_BUS is not set +# CONFIG_PWM is not set # # Firmware Drivers @@ -5166,7 +5326,8 @@ CONFIG_DELL_RBU=m CONFIG_DCDBAS=m CONFIG_DMIID=y CONFIG_DMI_SYSFS=m -# CONFIG_ISCSI_IBFT_FIND is not set +CONFIG_ISCSI_IBFT_FIND=y +CONFIG_ISCSI_IBFT=m # CONFIG_GOOGLE_FIRMWARE is not set # @@ -5213,7 +5374,7 @@ CONFIG_BTRFS_FS_POSIX_ACL=y # CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set CONFIG_NILFS2_FS=m CONFIG_FS_POSIX_ACL=y -CONFIG_EXPORTFS=m +CONFIG_EXPORTFS=y CONFIG_FILE_LOCKING=y CONFIG_FSNOTIFY=y CONFIG_DNOTIFY=y @@ -5228,7 +5389,7 @@ CONFIG_QUOTA_TREE=m CONFIG_QFMT_V1=m CONFIG_QFMT_V2=m CONFIG_QUOTACTL=y -CONFIG_AUTOFS4_FS=m +CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=m CONFIG_CUSE=m CONFIG_GENERIC_ACL=y @@ -5302,11 +5463,9 @@ CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y # CONFIG_JFFS2_RUBIN is not set CONFIG_UBIFS_FS=m -CONFIG_UBIFS_FS_XATTR=y # CONFIG_UBIFS_FS_ADVANCED_COMPR is not set CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y -# CONFIG_UBIFS_FS_DEBUG is not set CONFIG_LOGFS=m CONFIG_CRAMFS=m CONFIG_SQUASHFS=m @@ -5325,6 +5484,9 @@ CONFIG_OMFS_FS=m # CONFIG_QNX6FS_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_PSTORE=y +# CONFIG_PSTORE_CONSOLE is not set +# CONFIG_PSTORE_FTRACE is not set +CONFIG_PSTORE_RAM=m # CONFIG_SYSV_FS is not set CONFIG_UFS_FS=m # CONFIG_UFS_FS_WRITE is not set @@ -5334,9 +5496,11 @@ CONFIG_EXOFS_FS=m CONFIG_ORE=m CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=m -CONFIG_NFS_V3=y +CONFIG_NFS_V2=m +CONFIG_NFS_V3=m CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +# CONFIG_NFS_SWAP is not set # CONFIG_NFS_V4_1 is not set CONFIG_NFS_FSCACHE=y # CONFIG_NFS_USE_LEGACY_DNS is not set @@ -5421,6 +5585,17 @@ CONFIG_NLS_ISO8859_14=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m CONFIG_NLS_UTF8=m CONFIG_DLM=m # CONFIG_DLM_DEBUG is not set @@ -5435,7 +5610,6 @@ CONFIG_ENABLE_WARN_DEPRECATED=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_FRAME_WARN=1024 CONFIG_MAGIC_SYSRQ=y -# CONFIG_MAGIC_SYSRQ_FORCE_PRINTK is not set CONFIG_STRIP_ASM_SYMS=y CONFIG_UNUSED_SYMBOLS=y CONFIG_DEBUG_FS=y @@ -5443,6 +5617,8 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_SECTION_MISMATCH is not set # CONFIG_DEBUG_KERNEL is not set # CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 # CONFIG_SPARSE_RCU_POINTER is not set CONFIG_STACKTRACE=y CONFIG_DEBUG_BUGVERBOSE=y @@ -5450,11 +5626,10 @@ CONFIG_DEBUG_MEMORY_INIT=y CONFIG_ARCH_WANT_FRAME_POINTERS=y CONFIG_FRAME_POINTER=y CONFIG_RCU_CPU_STALL_TIMEOUT=60 -# CONFIG_RCU_CPU_STALL_VERBOSE is not set +CONFIG_RCU_CPU_STALL_VERBOSE=y CONFIG_LKDTM=m CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_NOP_TRACER=y -CONFIG_HAVE_FTRACE_NMI_ENTER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y @@ -5465,7 +5640,6 @@ CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_TRACER_MAX_TRACE=y CONFIG_RING_BUFFER=y -CONFIG_FTRACE_NMI_ENTER=y CONFIG_EVENT_TRACING=y CONFIG_EVENT_POWER_TRACING_DEPRECATED=y CONFIG_CONTEXT_SWITCH_TRACER=y @@ -5486,6 +5660,9 @@ CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_PROFILE_ALL_BRANCHES is not set CONFIG_STACK_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y +CONFIG_KPROBE_EVENT=y +CONFIG_UPROBE_EVENT=y +CONFIG_PROBE_EVENTS=y CONFIG_DYNAMIC_FTRACE=y CONFIG_FUNCTION_PROFILER=y CONFIG_FTRACE_MCOUNT_RECORD=y @@ -5588,6 +5765,8 @@ CONFIG_CRYPTO_WORKQUEUE=y CONFIG_CRYPTO_CRYPTD=m CONFIG_CRYPTO_AUTHENC=m CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_ABLK_HELPER_X86=m +CONFIG_CRYPTO_GLUE_HELPER_X86=m # # Authenticated Encryption with Associated Data @@ -5686,12 +5865,14 @@ CONFIG_HAVE_KVM_EVENTFD=y CONFIG_KVM_APIC_ARCHITECTURE=y CONFIG_KVM_MMIO=y CONFIG_KVM_ASYNC_PF=y +CONFIG_HAVE_KVM_MSI=y CONFIG_VIRTUALIZATION=y CONFIG_KVM=m CONFIG_KVM_INTEL=m CONFIG_KVM_AMD=m CONFIG_KVM_MMU_AUDIT=y CONFIG_VHOST_NET=m +CONFIG_TCM_VHOST=m CONFIG_LGUEST=m CONFIG_BINARY_PRINTF=y @@ -5700,6 +5881,8 @@ CONFIG_BINARY_PRINTF=y # CONFIG_RAID6_PQ=m CONFIG_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_FIND_FIRST_BIT=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_IOMAP=y @@ -5738,6 +5921,8 @@ CONFIG_DECOMPRESS_XZ=y CONFIG_DECOMPRESS_LZO=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_REED_SOLOMON=m +CONFIG_REED_SOLOMON_ENC8=y +CONFIG_REED_SOLOMON_DEC8=y CONFIG_REED_SOLOMON_DEC16=y CONFIG_BCH=m CONFIG_BCH_CONST_PARAMS=y @@ -5753,6 +5938,8 @@ CONFIG_CHECK_SIGNATURE=y CONFIG_CPU_RMAP=y CONFIG_DQL=y CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y CONFIG_LRU_CACHE=m CONFIG_AVERAGE=y CONFIG_CORDIC=m +CONFIG_DDR=y diff --git a/kernels/linux-libre-rt/config.x86_64 b/kernels/linux-libre-rt/config.x86_64 index f8819f623..ed0d731c8 100755..100644 --- a/kernels/linux-libre-rt/config.x86_64 +++ b/kernels/linux-libre-rt/config.x86_64 @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86_64 3.4.0 Kernel Configuration +# Linux/x86_64 3.6.5 Kernel Configuration # CONFIG_64BIT=y # CONFIG_X86_32 is not set @@ -9,11 +9,6 @@ CONFIG_X86=y CONFIG_INSTRUCTION_DECODER=y CONFIG_OUTPUT_FORMAT="elf64-x86-64" CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" -CONFIG_GENERIC_CMOS_UPDATE=y -CONFIG_CLOCKSOURCE_WATCHDOG=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_ARCH_CLOCKSOURCE_DATA=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y @@ -28,9 +23,7 @@ CONFIG_GENERIC_GPIO=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set -CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_DEFAULT_IDLE=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y @@ -48,11 +41,12 @@ CONFIG_HAVE_INTEL_TXT=y CONFIG_X86_64_SMP=y CONFIG_X86_HT=y CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11" -# CONFIG_KTIME_SCALAR is not set CONFIG_ARCH_CPU_PROBE_RELEASE=y +CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_HAVE_IRQ_WORK=y CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y # # General setup @@ -80,7 +74,7 @@ CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE_SYSCTL=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y -# CONFIG_FHANDLE is not set +CONFIG_FHANDLE=y CONFIG_TASKSTATS=y CONFIG_TASK_DELAY_ACCT=y CONFIG_TASK_XACCT=y @@ -99,8 +93,25 @@ CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_PENDING_IRQ=y +CONFIG_IRQ_DOMAIN=y +# CONFIG_IRQ_DOMAIN_DEBUG is not set CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y +CONFIG_CLOCKSOURCE_WATCHDOG=y +CONFIG_ARCH_CLOCKSOURCE_DATA=y +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y +CONFIG_GENERIC_CMOS_UPDATE=y + +# +# Timers subsystem +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y # # RCU Subsystem @@ -108,8 +119,8 @@ CONFIG_SPARSE_IRQ=y CONFIG_TREE_PREEMPT_RCU=y CONFIG_PREEMPT_RCU=y CONFIG_RCU_FANOUT=64 +CONFIG_RCU_FANOUT_LEAF=16 # CONFIG_RCU_FANOUT_EXACT is not set -CONFIG_RCU_FAST_NO_HZ=y # CONFIG_TREE_RCU_TRACE is not set # CONFIG_RCU_BOOST is not set CONFIG_IKCONFIG=y @@ -124,22 +135,21 @@ CONFIG_CPUSETS=y CONFIG_PROC_PID_CPUSET=y CONFIG_CGROUP_CPUACCT=y CONFIG_RESOURCE_COUNTERS=y -CONFIG_CGROUP_MEM_RES_CTLR=y -CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y -# CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED is not set -CONFIG_CGROUP_MEM_RES_CTLR_KMEM=y +CONFIG_MEMCG=y +CONFIG_MEMCG_SWAP=y +# CONFIG_MEMCG_SWAP_ENABLED is not set +CONFIG_MEMCG_KMEM=y +# CONFIG_CGROUP_HUGETLB is not set # CONFIG_CGROUP_PERF is not set CONFIG_CGROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y CONFIG_CFS_BANDWIDTH=y -CONFIG_RT_GROUP_SCHED=y CONFIG_BLK_CGROUP=y # CONFIG_DEBUG_BLK_CGROUP is not set # CONFIG_CHECKPOINT_RESTORE is not set CONFIG_NAMESPACES=y CONFIG_UTS_NS=y CONFIG_IPC_NS=y -CONFIG_USER_NS=y CONFIG_PID_NS=y CONFIG_NET_NS=y CONFIG_SCHED_AUTOGROUP=y @@ -181,18 +191,21 @@ CONFIG_HAVE_PERF_EVENTS=y # Kernel Performance Events And Counters # CONFIG_PERF_EVENTS=y -CONFIG_PERF_COUNTERS=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_PCI_QUIRKS=y +CONFIG_SLUB_DEBUG=y # CONFIG_COMPAT_BRK is not set -CONFIG_SLAB=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y CONFIG_PROFILING=y CONFIG_TRACEPOINTS=y CONFIG_HAVE_OPROFILE=y CONFIG_OPROFILE_NMI_TIMER=y -# CONFIG_KPROBES is not set +CONFIG_KPROBES=y CONFIG_JUMP_LABEL=y +CONFIG_UPROBES=y CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_KRETPROBES=y CONFIG_USER_RETURN_NOTIFIER=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y @@ -201,6 +214,7 @@ CONFIG_HAVE_OPTPROBES=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_ATTRS=y CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_DMA_API_DEBUG=y CONFIG_HAVE_HW_BREAKPOINT=y @@ -209,9 +223,13 @@ CONFIG_HAVE_USER_RETURN_NOTIFIER=y CONFIG_HAVE_PERF_EVENTS_NMI=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y +CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y CONFIG_HAVE_CMPXCHG_LOCAL=y CONFIG_HAVE_CMPXCHG_DOUBLE=y +CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP_FILTER=y # # GCOV-based kernel profiling @@ -305,11 +323,6 @@ CONFIG_FREEZER=y # Processor type and features # CONFIG_ZONE_DMA=y -CONFIG_TICK_ONESHOT=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y CONFIG_SMP=y CONFIG_X86_X2APIC=y CONFIG_X86_MPPARSE=y @@ -317,7 +330,7 @@ CONFIG_X86_MPPARSE=y CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y CONFIG_SCHED_OMIT_FRAME_POINTER=y CONFIG_PARAVIRT_GUEST=y -# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set +CONFIG_PARAVIRT_TIME_ACCOUNTING=y CONFIG_XEN=y CONFIG_XEN_DOM0=y CONFIG_XEN_PRIVILEGED_GUEST=y @@ -364,6 +377,7 @@ CONFIG_SCHED_MC=y # CONFIG_IRQ_TIME_ACCOUNTING is not set CONFIG_PREEMPT=y CONFIG_PREEMPT_RT_BASE=y +CONFIG_HAVE_PREEMPT_LAZY=y # CONFIG_PREEMPT_NONE is not set # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT__LL is not set @@ -413,6 +427,7 @@ CONFIG_SPARSEMEM_VMEMMAP=y CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MEMBLOCK_NODE_MAP=y CONFIG_ARCH_DISCARD_MEMBLOCK=y +CONFIG_MEMORY_ISOLATION=y CONFIG_MEMORY_HOTPLUG=y CONFIG_MEMORY_HOTPLUG_SPARSE=y CONFIG_MEMORY_HOTREMOVE=y @@ -429,7 +444,9 @@ CONFIG_KSM=y CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y CONFIG_MEMORY_FAILURE=y +CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_CLEANCACHE=y +CONFIG_FRONTSWAP=y CONFIG_X86_CHECK_BIOS_CORRUPTION=y CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y CONFIG_X86_RESERVE_LOW=64 @@ -474,12 +491,16 @@ CONFIG_HIBERNATION=y CONFIG_PM_STD_PARTITION="" CONFIG_PM_SLEEP=y CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=100 +CONFIG_PM_WAKELOCKS_GC=y CONFIG_PM_RUNTIME=y CONFIG_PM=y CONFIG_PM_DEBUG=y CONFIG_PM_ADVANCED_DEBUG=y # CONFIG_PM_TEST_SUSPEND is not set -CONFIG_CAN_PM_TRACE=y +CONFIG_PM_SLEEP_DEBUG=y # CONFIG_PM_TRACE_RTC is not set CONFIG_ACPI=y CONFIG_ACPI_SLEEP=y @@ -551,6 +572,7 @@ CONFIG_X86_SPEEDSTEP_LIB=m CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set CONFIG_INTEL_IDLE=y # @@ -622,6 +644,7 @@ CONFIG_RAPIDIO=y CONFIG_RAPIDIO_TSI721=y CONFIG_RAPIDIO_DISC_TIMEOUT=30 # CONFIG_RAPIDIO_ENABLE_RX_TX_PORTS is not set +CONFIG_RAPIDIO_DMA_ENGINE=y CONFIG_RAPIDIO_DEBUG=y CONFIG_RAPIDIO_TSI57X=y CONFIG_RAPIDIO_CPS_XX=y @@ -640,12 +663,13 @@ CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y CONFIG_BINFMT_MISC=y CONFIG_IA32_EMULATION=y CONFIG_IA32_AOUT=m -# CONFIG_X86_X32 is not set +CONFIG_X86_X32=y CONFIG_COMPAT=y CONFIG_COMPAT_FOR_U64_ALIGNMENT=y CONFIG_SYSVIPC_COMPAT=y CONFIG_KEYS_COMPAT=y CONFIG_HAVE_TEXT_POKE_SMP=y +CONFIG_X86_DEV_DMA_OPS=y CONFIG_NET=y CONFIG_COMPAT_NETLINK_MESSAGES=y @@ -656,6 +680,7 @@ CONFIG_PACKET=y CONFIG_UNIX=y CONFIG_UNIX_DIAG=m CONFIG_XFRM=y +CONFIG_XFRM_ALGO=m CONFIG_XFRM_USER=m # CONFIG_XFRM_SUB_POLICY is not set # CONFIG_XFRM_MIGRATE is not set @@ -682,6 +707,7 @@ CONFIG_IP_PIMSM_V1=y CONFIG_IP_PIMSM_V2=y # CONFIG_ARPD is not set CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=m CONFIG_INET_AH=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m @@ -773,6 +799,8 @@ CONFIG_NF_CONNTRACK_SIP=m CONFIG_NF_CONNTRACK_TFTP=m CONFIG_NF_CT_NETLINK=m CONFIG_NF_CT_NETLINK_TIMEOUT=m +CONFIG_NF_CT_NETLINK_HELPER=m +CONFIG_NETFILTER_NETLINK_QUEUE_CT=y CONFIG_NETFILTER_TPROXY=m CONFIG_NETFILTER_XTABLES=m @@ -794,6 +822,7 @@ CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m CONFIG_NETFILTER_XT_TARGET_CT=m CONFIG_NETFILTER_XT_TARGET_DSCP=m CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m CONFIG_NETFILTER_XT_TARGET_LED=m CONFIG_NETFILTER_XT_TARGET_LOG=m @@ -954,7 +983,6 @@ CONFIG_IP_NF_ARP_MANGLE=m # CONFIG_NF_DEFRAG_IPV6=m CONFIG_NF_CONNTRACK_IPV6=m -CONFIG_IP6_NF_QUEUE=m CONFIG_IP6_NF_IPTABLES=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m @@ -1004,6 +1032,7 @@ CONFIG_IP_DCCP_CCID3=y # CONFIG_IP_DCCP_CCID3_DEBUG is not set CONFIG_IP_DCCP_TFRC_LIB=y CONFIG_IP_SCTP=m +CONFIG_NET_SCTPPROBE=m # CONFIG_SCTP_DBG_MSG is not set # CONFIG_SCTP_DBG_OBJCNT is not set # CONFIG_SCTP_HMAC_NONE is not set @@ -1041,11 +1070,11 @@ CONFIG_IPDDP_ENCAP=y CONFIG_IPDDP_DECAP=y # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set CONFIG_PHONET=m CONFIG_IEEE802154=m CONFIG_IEEE802154_6LOWPAN=m +CONFIG_MAC802154=m CONFIG_NET_SCHED=y # @@ -1069,6 +1098,8 @@ CONFIG_NET_SCH_DRR=m CONFIG_NET_SCH_MQPRIO=m CONFIG_NET_SCH_CHOKE=m CONFIG_NET_SCH_QFQ=m +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m CONFIG_NET_SCH_INGRESS=m CONFIG_NET_SCH_PLUG=m @@ -1104,6 +1135,7 @@ CONFIG_NET_SCH_FIFO=y # CONFIG_DCB is not set CONFIG_DNS_RESOLVER=y CONFIG_BATMAN_ADV=m +CONFIG_BATMAN_ADV_BLA=y # CONFIG_BATMAN_ADV_DEBUG is not set CONFIG_OPENVSWITCH=m CONFIG_RPS=y @@ -1111,13 +1143,13 @@ CONFIG_RFS_ACCEL=y CONFIG_XPS=y CONFIG_NETPRIO_CGROUP=m CONFIG_BQL=y -CONFIG_HAVE_BPF_JIT=y CONFIG_BPF_JIT=y # # Network testing # CONFIG_NET_PKTGEN=m +CONFIG_NET_TCPPROBE=m CONFIG_NET_DROP_MONITOR=y CONFIG_HAMRADIO=y @@ -1215,6 +1247,7 @@ CONFIG_BT_HCIUART_H4=y CONFIG_BT_HCIUART_BCSP=y CONFIG_BT_HCIUART_ATH3K=y CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_3WIRE=y CONFIG_BT_HCIBCM203X=m CONFIG_BT_HCIBPA10X=m CONFIG_BT_HCIBFUSB=m @@ -1238,14 +1271,13 @@ CONFIG_WEXT_PROC=y CONFIG_WEXT_SPY=y CONFIG_WEXT_PRIV=y CONFIG_CFG80211=m -CONFIG_NL80211_TESTMODE=y +# CONFIG_NL80211_TESTMODE is not set # CONFIG_CFG80211_DEVELOPER_WARNINGS is not set # CONFIG_CFG80211_REG_DEBUG is not set CONFIG_CFG80211_DEFAULT_PS=y # CONFIG_CFG80211_DEBUGFS is not set # CONFIG_CFG80211_INTERNAL_REGDB is not set CONFIG_CFG80211_WEXT=y -CONFIG_WIRELESS_EXT_SYSFS=y CONFIG_LIB80211=m CONFIG_LIB80211_CRYPT_WEP=m CONFIG_LIB80211_CRYPT_CCMP=m @@ -1260,6 +1292,7 @@ CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" CONFIG_MAC80211_MESH=y CONFIG_MAC80211_LEDS=y # CONFIG_MAC80211_DEBUGFS is not set +# CONFIG_MAC80211_MESSAGE_TRACING is not set # CONFIG_MAC80211_DEBUG_MENU is not set CONFIG_WIMAX=m CONFIG_WIMAX_DEBUG_LEVEL=8 @@ -1278,6 +1311,8 @@ CONFIG_CEPH_LIB=m # CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set CONFIG_NFC=m CONFIG_NFC_NCI=m +CONFIG_NFC_HCI=m +# CONFIG_NFC_SHDLC is not set # CONFIG_NFC_LLCP is not set # @@ -1286,6 +1321,7 @@ CONFIG_NFC_NCI=m CONFIG_PN544_NFC=m CONFIG_NFC_PN533=m CONFIG_NFC_WILINK=m +CONFIG_HAVE_BPF_JIT=y # # Device Drivers @@ -1306,6 +1342,7 @@ CONFIG_SYS_HYPERVISOR=y # CONFIG_GENERIC_CPU_DEVICES is not set CONFIG_REGMAP=y CONFIG_REGMAP_I2C=m +CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y CONFIG_CONNECTOR=y CONFIG_PROC_EVENTS=y @@ -1434,7 +1471,6 @@ CONFIG_MTD_UBI=m CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MTD_UBI_BEB_RESERVE=1 # CONFIG_MTD_UBI_GLUEBI is not set -# CONFIG_MTD_UBI_DEBUG is not set CONFIG_PARPORT=m CONFIG_PARPORT_PC=m CONFIG_PARPORT_SERIAL=m @@ -1515,7 +1551,8 @@ CONFIG_SENSORS_APDS990X=m CONFIG_HMC6352=m CONFIG_DS1682=m CONFIG_VMWARE_BALLOON=m -CONFIG_BMP085=m +CONFIG_BMP085=y +CONFIG_BMP085_I2C=m CONFIG_PCH_PHUB=m CONFIG_USB_SWITCH_FSA9480=m CONFIG_C2PORT=m @@ -1531,9 +1568,6 @@ CONFIG_EEPROM_93CX6=m CONFIG_CB710_CORE=m # CONFIG_CB710_DEBUG is not set CONFIG_CB710_DEBUG_ASSUMPTIONS=y -CONFIG_IWMC3200TOP=m -# CONFIG_IWMC3200TOP_DEBUG is not set -# CONFIG_IWMC3200TOP_DEBUGFS is not set # # Texas Instruments shared transport line discipline @@ -1545,6 +1579,7 @@ CONFIG_SENSORS_LIS3_I2C=m # Altera FPGA firmware download module # CONFIG_ALTERA_STAPL=m +CONFIG_INTEL_MEI=m CONFIG_HAVE_IDE=y # CONFIG_IDE is not set @@ -1574,7 +1609,6 @@ CONFIG_SCSI_MULTI_LUN=y # CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_LOGGING is not set # CONFIG_SCSI_SCAN_ASYNC is not set -CONFIG_SCSI_WAIT_SCAN=m # # SCSI Transports @@ -1668,6 +1702,7 @@ CONFIG_SCSI_IPR=m # CONFIG_SCSI_IPR_DUMP is not set CONFIG_SCSI_QLOGIC_1280=m CONFIG_SCSI_QLA_FC=m +CONFIG_TCM_QLA2XXX=m CONFIG_SCSI_QLA_ISCSI=m CONFIG_SCSI_LPFC=m # CONFIG_SCSI_LPFC_DEBUG_FS is not set @@ -1808,7 +1843,6 @@ CONFIG_DM_CRYPT=m CONFIG_DM_SNAPSHOT=m CONFIG_DM_THIN_PROVISIONING=m # CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not set -# CONFIG_DM_DEBUG_SPACE_MAPS is not set CONFIG_DM_MIRROR=m CONFIG_DM_RAID=m CONFIG_DM_LOG_USERSPACE=m @@ -1827,6 +1861,7 @@ CONFIG_TCM_PSCSI=m CONFIG_LOOPBACK_TARGET=m CONFIG_TCM_FC=m CONFIG_ISCSI_TARGET=m +CONFIG_SBP_TARGET=m CONFIG_FUSION=y CONFIG_FUSION_SPI=m CONFIG_FUSION_FC=m @@ -1864,10 +1899,13 @@ CONFIG_EQUALIZER=m CONFIG_MII=m CONFIG_IEEE802154_DRIVERS=m CONFIG_IEEE802154_FAKEHARD=m +CONFIG_IEEE802154_FAKELB=m CONFIG_IFB=m CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m CONFIG_NET_TEAM_MODE_ROUNDROBIN=m CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m CONFIG_MACVLAN=m CONFIG_MACVTAP=m # CONFIG_NETPOLL is not set @@ -1995,10 +2033,13 @@ CONFIG_E1000=m CONFIG_E1000E=m CONFIG_IGB=m CONFIG_IGB_DCA=y +CONFIG_IGB_PTP=y CONFIG_IGBVF=m CONFIG_IXGB=m CONFIG_IXGBE=m +CONFIG_IXGBE_HWMON=y CONFIG_IXGBE_DCA=y +CONFIG_IXGBE_PTP=y CONFIG_IXGBEVF=m CONFIG_NET_VENDOR_I825XX=y CONFIG_ZNET=m @@ -2071,8 +2112,8 @@ CONFIG_EPIC100=m CONFIG_SMSC9420=m CONFIG_NET_VENDOR_STMICRO=y CONFIG_STMMAC_ETH=m -CONFIG_STMMAC_PLATFORM=m -CONFIG_STMMAC_PCI=m +# CONFIG_STMMAC_PLATFORM is not set +CONFIG_STMMAC_PCI=y # CONFIG_STMMAC_DEBUG_FS is not set # CONFIG_STMMAC_DA is not set CONFIG_STMMAC_RING=y @@ -2090,6 +2131,12 @@ CONFIG_NET_VENDOR_VIA=y CONFIG_VIA_RHINE=m # CONFIG_VIA_RHINE_MMIO is not set CONFIG_VIA_VELOCITY=m +CONFIG_NET_VENDOR_WIZNET=y +CONFIG_WIZNET_W5100=m +CONFIG_WIZNET_W5300=m +# CONFIG_WIZNET_BUS_DIRECT is not set +# CONFIG_WIZNET_BUS_INDIRECT is not set +CONFIG_WIZNET_BUS_ANY=y CONFIG_NET_VENDOR_XIRCOM=y CONFIG_PCMCIA_XIRC2PS=m # CONFIG_FDDI is not set @@ -2109,6 +2156,7 @@ CONFIG_CICADA_PHY=m CONFIG_VITESSE_PHY=m CONFIG_SMSC_PHY=m CONFIG_BROADCOM_PHY=m +CONFIG_BCM87XX_PHY=m CONFIG_ICPLUS_PHY=m CONFIG_REALTEK_PHY=m CONFIG_NATIONAL_PHY=m @@ -2134,7 +2182,6 @@ CONFIG_SLHC=m # CONFIG_SLIP_COMPRESSED is not set # CONFIG_SLIP_SMART is not set # CONFIG_SLIP_MODE_SLIP6 is not set -# CONFIG_TR is not set # # USB Network Adapters @@ -2249,6 +2296,7 @@ CONFIG_BRCMUTIL=m CONFIG_BRCMSMAC=m CONFIG_BRCMFMAC=m CONFIG_BRCMFMAC_SDIO=y +# CONFIG_BRCMFMAC_SDIO_OOB is not set CONFIG_BRCMFMAC_USB=y # CONFIG_BRCMDBG is not set CONFIG_HOSTAP=m @@ -2269,13 +2317,13 @@ CONFIG_IPW2200_QOS=y CONFIG_LIBIPW=m # CONFIG_LIBIPW_DEBUG is not set CONFIG_IWLWIFI=m +CONFIG_IWLDVM=m # # Debugging Options # # CONFIG_IWLWIFI_DEBUG is not set CONFIG_IWLWIFI_DEVICE_TRACING=y -CONFIG_IWLWIFI_DEVICE_TESTMODE=y # CONFIG_IWLWIFI_P2P is not set # CONFIG_IWLWIFI_EXPERIMENTAL_MFP is not set CONFIG_IWLEGACY=m @@ -2286,9 +2334,6 @@ CONFIG_IWL3945=m # iwl3945 / iwl4965 Debugging Options # # CONFIG_IWLEGACY_DEBUG is not set -CONFIG_IWM=m -# CONFIG_IWM_DEBUG is not set -CONFIG_IWM_TRACING=y CONFIG_LIBERTAS=m CONFIG_LIBERTAS_USB=m CONFIG_LIBERTAS_CS=m @@ -2317,6 +2362,7 @@ CONFIG_RT2800PCI=m CONFIG_RT2800PCI_RT33XX=y CONFIG_RT2800PCI_RT35XX=y CONFIG_RT2800PCI_RT53XX=y +CONFIG_RT2800PCI_RT3290=y CONFIG_RT2500USB=m CONFIG_RT73USB=m CONFIG_RT2800USB=m @@ -2339,25 +2385,26 @@ CONFIG_RTL8192CU=m CONFIG_RTLWIFI=m # CONFIG_RTLWIFI_DEBUG is not set CONFIG_RTL8192C_COMMON=m +CONFIG_WL_TI=y CONFIG_WL1251=m CONFIG_WL1251_SDIO=m -CONFIG_WL12XX_MENU=m CONFIG_WL12XX=m -CONFIG_WL12XX_SDIO=m +CONFIG_WL18XX=m +CONFIG_WLCORE=m +CONFIG_WLCORE_SDIO=m CONFIG_WL12XX_PLATFORM_DATA=y CONFIG_ZD1211RW=m # CONFIG_ZD1211RW_DEBUG is not set CONFIG_MWIFIEX=m CONFIG_MWIFIEX_SDIO=m CONFIG_MWIFIEX_PCIE=m +CONFIG_MWIFIEX_USB=m # # WiMAX Wireless Broadband devices # CONFIG_WIMAX_I2400M=m CONFIG_WIMAX_I2400M_USB=m -CONFIG_WIMAX_I2400M_SDIO=m -# CONFIG_WIMAX_IWMC3200_SDIO is not set CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 # CONFIG_WAN is not set CONFIG_XEN_NETDEV_FRONTEND=m @@ -2502,6 +2549,7 @@ CONFIG_INPUT=y CONFIG_INPUT_FF_MEMLESS=m CONFIG_INPUT_POLLDEV=m CONFIG_INPUT_SPARSEKMAP=m +CONFIG_INPUT_MATRIXKMAP=m # # Userland interfaces @@ -2530,6 +2578,7 @@ CONFIG_KEYBOARD_TCA6416=m CONFIG_KEYBOARD_TCA8418=m CONFIG_KEYBOARD_MATRIX=m # CONFIG_KEYBOARD_LM8323 is not set +CONFIG_KEYBOARD_LM8333=m # CONFIG_KEYBOARD_MAX7359 is not set CONFIG_KEYBOARD_MCS=m CONFIG_KEYBOARD_MPR121=m @@ -2612,12 +2661,15 @@ CONFIG_TOUCHSCREEN_ILI210X=m CONFIG_TOUCHSCREEN_GUNZE=m CONFIG_TOUCHSCREEN_ELO=m CONFIG_TOUCHSCREEN_WACOM_W8001=m +CONFIG_TOUCHSCREEN_WACOM_I2C=m CONFIG_TOUCHSCREEN_MAX11801=m CONFIG_TOUCHSCREEN_MCS5000=m +CONFIG_TOUCHSCREEN_MMS114=m CONFIG_TOUCHSCREEN_MTOUCH=m CONFIG_TOUCHSCREEN_INEXIO=m CONFIG_TOUCHSCREEN_MK712=m CONFIG_TOUCHSCREEN_PENMOUNT=m +CONFIG_TOUCHSCREEN_EDT_FT5X06=m CONFIG_TOUCHSCREEN_TOUCHRIGHT=m CONFIG_TOUCHSCREEN_TOUCHWIN=m CONFIG_TOUCHSCREEN_UCB1400=m @@ -2627,6 +2679,7 @@ CONFIG_TOUCHSCREEN_WM9705=y CONFIG_TOUCHSCREEN_WM9712=y CONFIG_TOUCHSCREEN_WM9713=y CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_MC13783=m CONFIG_TOUCHSCREEN_USB_EGALAX=y CONFIG_TOUCHSCREEN_USB_PANJIT=y CONFIG_TOUCHSCREEN_USB_3M=y @@ -2651,11 +2704,11 @@ CONFIG_TOUCHSCREEN_TSC2007=m CONFIG_TOUCHSCREEN_ST1232=m CONFIG_TOUCHSCREEN_TPS6507X=m CONFIG_INPUT_MISC=y -CONFIG_INPUT_AB8500_PONKEY=m CONFIG_INPUT_AD714X=m CONFIG_INPUT_AD714X_I2C=m CONFIG_INPUT_BMA150=m CONFIG_INPUT_PCSPKR=m +CONFIG_INPUT_MC13783_PWRBUTTON=m CONFIG_INPUT_MMA8450=m CONFIG_INPUT_MPU3050=m CONFIG_INPUT_APANEL=m @@ -2798,7 +2851,6 @@ CONFIG_TCG_ATMEL=m CONFIG_TCG_INFINEON=m CONFIG_TELCLOCK=m CONFIG_DEVPORT=y -CONFIG_RAMOOPS=m CONFIG_I2C=m CONFIG_I2C_BOARDINFO=y CONFIG_I2C_COMPAT=y @@ -2841,6 +2893,7 @@ CONFIG_I2C_SCMI=m # # I2C system bus drivers (mostly embedded / system-on-chip) # +CONFIG_I2C_DESIGNWARE_CORE=m CONFIG_I2C_DESIGNWARE_PCI=m CONFIG_I2C_EG20T=m # CONFIG_I2C_GPIO is not set @@ -2904,11 +2957,13 @@ CONFIG_GPIO_SYSFS=y # CONFIG_GPIO_GENERIC_PLATFORM is not set # CONFIG_GPIO_IT8761E is not set CONFIG_GPIO_SCH=m +CONFIG_GPIO_ICH=m # CONFIG_GPIO_VX855 is not set # # I2C GPIO expanders: # +CONFIG_GPIO_ARIZONA=m # CONFIG_GPIO_MAX7300 is not set # CONFIG_GPIO_MAX732X is not set # CONFIG_GPIO_PCA953X is not set @@ -2919,6 +2974,7 @@ CONFIG_GPIO_SCH=m # PCI GPIO expanders: # CONFIG_GPIO_CS5535=m +CONFIG_GPIO_AMD8111=m CONFIG_GPIO_LANGWELL=y # CONFIG_GPIO_PCH is not set # CONFIG_GPIO_ML_IOH is not set @@ -2955,6 +3011,7 @@ CONFIG_TEST_POWER=m # CONFIG_CHARGER_LP8727 is not set # CONFIG_CHARGER_GPIO is not set # CONFIG_CHARGER_SMB347 is not set +CONFIG_POWER_AVS=y CONFIG_HWMON=y CONFIG_HWMON_VID=m # CONFIG_HWMON_DEBUG_CHIP is not set @@ -2993,6 +3050,7 @@ CONFIG_SENSORS_G760A=m CONFIG_SENSORS_GL518SM=m CONFIG_SENSORS_GL520SM=m # CONFIG_SENSORS_GPIO_FAN is not set +CONFIG_SENSORS_HIH6130=m CONFIG_SENSORS_CORETEMP=m CONFIG_SENSORS_IBMAEM=m CONFIG_SENSORS_IBMPEX=m @@ -3056,6 +3114,7 @@ CONFIG_SENSORS_SCH5636=m CONFIG_SENSORS_ADS1015=m CONFIG_SENSORS_ADS7828=m CONFIG_SENSORS_AMC6821=m +CONFIG_SENSORS_INA2XX=m CONFIG_SENSORS_THMC50=m CONFIG_SENSORS_TMP102=m CONFIG_SENSORS_TMP401=m @@ -3075,6 +3134,7 @@ CONFIG_SENSORS_W83L786NG=m CONFIG_SENSORS_W83627HF=m CONFIG_SENSORS_W83627EHF=m CONFIG_SENSORS_APPLESMC=m +CONFIG_SENSORS_MC13783_ADC=m # # ACPI drivers @@ -3105,6 +3165,7 @@ CONFIG_IB700_WDT=m CONFIG_IBMASR=m CONFIG_WAFER_WDT=m CONFIG_I6300ESB_WDT=m +CONFIG_IE6XX_WDT=m CONFIG_ITCO_WDT=m CONFIG_ITCO_VENDOR_SUPPORT=y CONFIG_IT8712F_WDT=m @@ -3166,6 +3227,7 @@ CONFIG_BCMA=m CONFIG_BCMA_BLOCKIO=y CONFIG_BCMA_HOST_PCI_POSSIBLE=y CONFIG_BCMA_HOST_PCI=y +CONFIG_BCMA_DRIVER_GMAC_CMN=y # CONFIG_BCMA_DEBUG is not set # @@ -3176,21 +3238,27 @@ CONFIG_MFD_SM501=m CONFIG_MFD_SM501_GPIO=y CONFIG_HTC_PASIC3=m CONFIG_UCB1400_CORE=m +CONFIG_MFD_LM3533=m # CONFIG_TPS6105X is not set CONFIG_TPS65010=m CONFIG_TPS6507X=m CONFIG_MFD_TPS65217=m # CONFIG_MFD_TMIO is not set -CONFIG_MFD_WM8400=m +CONFIG_MFD_ARIZONA=y +CONFIG_MFD_ARIZONA_I2C=m +CONFIG_MFD_WM5102=y +CONFIG_MFD_WM5110=y CONFIG_MFD_PCF50633=m CONFIG_PCF50633_ADC=m CONFIG_PCF50633_GPIO=m +CONFIG_MFD_MC13783=m +CONFIG_MFD_MC13XXX=m +CONFIG_MFD_MC13XXX_I2C=m CONFIG_ABX500_CORE=y -CONFIG_AB8500_CORE=y -# CONFIG_AB8500_DEBUG is not set CONFIG_MFD_CS5535=m # CONFIG_MFD_TIMBERDALE is not set CONFIG_LPC_SCH=m +CONFIG_LPC_ICH=m CONFIG_MFD_RDC321X=m # CONFIG_MFD_JANZ_CMODIO is not set CONFIG_MFD_VX855=m @@ -3201,22 +3269,28 @@ CONFIG_MEDIA_SUPPORT=m # # Multimedia core support # +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_RC_SUPPORT=y CONFIG_MEDIA_CONTROLLER=y CONFIG_VIDEO_DEV=m CONFIG_VIDEO_V4L2_COMMON=m CONFIG_VIDEO_V4L2_SUBDEV_API=y CONFIG_DVB_CORE=m CONFIG_DVB_NET=y -CONFIG_VIDEO_MEDIA=m # -# Multimedia drivers +# Media drivers # CONFIG_VIDEO_SAA7146=m CONFIG_VIDEO_SAA7146_VV=m CONFIG_RC_CORE=m -CONFIG_LIRC=m CONFIG_RC_MAP=m +CONFIG_RC_DECODERS=y +CONFIG_LIRC=m +CONFIG_IR_LIRC_CODEC=m CONFIG_IR_NEC_DECODER=m CONFIG_IR_RC5_DECODER=m CONFIG_IR_RC6_DECODER=m @@ -3225,7 +3299,7 @@ CONFIG_IR_SONY_DECODER=m CONFIG_IR_RC5_SZ_DECODER=m CONFIG_IR_SANYO_DECODER=m CONFIG_IR_MCE_KBD_DECODER=m -CONFIG_IR_LIRC_CODEC=m +CONFIG_RC_DEVICES=y CONFIG_RC_ATI_REMOTE=m CONFIG_IR_ENE=m CONFIG_IR_IMON=m @@ -3236,6 +3310,7 @@ CONFIG_IR_NUVOTON=m CONFIG_IR_REDRAT3=m CONFIG_IR_STREAMZAP=m CONFIG_IR_WINBOND_CIR=m +CONFIG_IR_IGUANA=m CONFIG_RC_LOOPBACK=m CONFIG_IR_GPIO_CIR=m CONFIG_MEDIA_ATTACH=y @@ -3262,7 +3337,11 @@ CONFIG_MEDIA_TUNER_MXL5007T=m CONFIG_MEDIA_TUNER_MC44S803=m CONFIG_MEDIA_TUNER_MAX2165=m CONFIG_MEDIA_TUNER_TDA18218=m +CONFIG_MEDIA_TUNER_FC0011=m +CONFIG_MEDIA_TUNER_FC0012=m +CONFIG_MEDIA_TUNER_FC0013=m CONFIG_MEDIA_TUNER_TDA18212=m +CONFIG_MEDIA_TUNER_TUA9001=m CONFIG_VIDEO_V4L2=m CONFIG_VIDEOBUF_GEN=m CONFIG_VIDEOBUF_DMA_SG=m @@ -3343,6 +3422,7 @@ CONFIG_VIDEO_SAA7185=m CONFIG_VIDEO_ADV7170=m CONFIG_VIDEO_ADV7175=m CONFIG_VIDEO_ADV7343=m +CONFIG_VIDEO_ADV7393=m CONFIG_VIDEO_AK881X=m # @@ -3381,6 +3461,10 @@ CONFIG_VIDEO_THS7303=m CONFIG_VIDEO_M52790=m CONFIG_VIDEO_VIVI=m CONFIG_V4L_USB_DRIVERS=y + +# +# Webcam devices +# CONFIG_USB_VIDEO_CLASS=m CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y CONFIG_USB_GSPCA=m @@ -3430,15 +3514,32 @@ CONFIG_USB_GSPCA_VC032X=m CONFIG_USB_GSPCA_VICAM=m CONFIG_USB_GSPCA_XIRLINK_CIT=m CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_VIDEO_CPIA2=m +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_USB_SN9C102=m + +# +# Webcam and/or TV USB devices +# +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_VIDEO_EM28XX_RC=m + +# +# TV USB devices +# +CONFIG_VIDEO_AU0828=m CONFIG_VIDEO_PVRUSB2=m CONFIG_VIDEO_PVRUSB2_SYSFS=y CONFIG_VIDEO_PVRUSB2_DVB=y # CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set CONFIG_VIDEO_HDPVR=m -CONFIG_VIDEO_EM28XX=m -CONFIG_VIDEO_EM28XX_ALSA=m -CONFIG_VIDEO_EM28XX_DVB=m -CONFIG_VIDEO_EM28XX_RC=y CONFIG_VIDEO_TLG2300=m CONFIG_VIDEO_CX231XX=m CONFIG_VIDEO_CX231XX_RC=y @@ -3448,17 +3549,7 @@ CONFIG_VIDEO_TM6000=m CONFIG_VIDEO_TM6000_ALSA=m CONFIG_VIDEO_TM6000_DVB=m CONFIG_VIDEO_USBVISION=m -CONFIG_USB_ET61X251=m -CONFIG_USB_SN9C102=m -CONFIG_USB_PWC=m -# CONFIG_USB_PWC_DEBUG is not set -CONFIG_USB_PWC_INPUT_EVDEV=y -CONFIG_VIDEO_CPIA2=m -CONFIG_USB_ZR364XX=m -CONFIG_USB_STKWEBCAM=m -CONFIG_USB_S2255=m CONFIG_V4L_PCI_DRIVERS=y -CONFIG_VIDEO_AU0828=m CONFIG_VIDEO_BT848=m CONFIG_VIDEO_BT848_DVB=y CONFIG_VIDEO_CX18=m @@ -3503,6 +3594,8 @@ CONFIG_I2C_SI470X=m CONFIG_USB_MR800=m CONFIG_USB_DSBR=m CONFIG_RADIO_MAXIRADIO=m +CONFIG_RADIO_SHARK=m +CONFIG_RADIO_SHARK2=m CONFIG_I2C_SI4713=m CONFIG_RADIO_SI4713=m CONFIG_USB_KEENE=m @@ -3572,6 +3665,7 @@ CONFIG_DVB_USB_TECHNISAT_USB2=m CONFIG_DVB_USB_IT913X=m CONFIG_DVB_USB_MXL111SF=m CONFIG_DVB_USB_RTL28XXU=m +CONFIG_DVB_USB_AF9035=m CONFIG_DVB_TTUSB_BUDGET=m CONFIG_DVB_TTUSB_DEC=m CONFIG_SMS_SIANO_MDTV=m @@ -3636,7 +3730,6 @@ CONFIG_DVB_DDBRIDGE=m # # Supported DVB Frontends # -# CONFIG_DVB_FE_CUSTOMISE is not set # # Multistandard (satellite) frontends @@ -3703,6 +3796,7 @@ CONFIG_DVB_EC100=m CONFIG_DVB_STV0367=m CONFIG_DVB_CXD2820R=m CONFIG_DVB_RTL2830=m +CONFIG_DVB_RTL2832=m # # DVB-C (cable) frontends @@ -3721,8 +3815,11 @@ CONFIG_DVB_OR51132=m CONFIG_DVB_BCM3510=m CONFIG_DVB_LGDT330X=m CONFIG_DVB_LGDT3305=m +CONFIG_DVB_LG2160=m CONFIG_DVB_S5H1409=m CONFIG_DVB_AU8522=m +CONFIG_DVB_AU8522_DTV=m +CONFIG_DVB_AU8522_V4L=m CONFIG_DVB_S5H1411=m # @@ -3754,6 +3851,7 @@ CONFIG_DVB_TDA665x=m CONFIG_DVB_IX2505V=m CONFIG_DVB_IT913X_FE=m CONFIG_DVB_M88RS2000=m +CONFIG_DVB_AF9033=m # # Tools to develop new frontends @@ -3796,10 +3894,14 @@ CONFIG_DRM_SIS=m CONFIG_DRM_VIA=m CONFIG_DRM_SAVAGE=m CONFIG_DRM_VMWGFX=m +CONFIG_DRM_VMWGFX_FBCON=y CONFIG_DRM_GMA500=m CONFIG_DRM_GMA600=y CONFIG_DRM_GMA3600=y CONFIG_DRM_UDL=m +CONFIG_DRM_AST=m +CONFIG_DRM_MGAG200=m +CONFIG_DRM_CIRRUS_QEMU=m CONFIG_STUB_POULSBO=m CONFIG_VGASTATE=m CONFIG_VIDEO_OUTPUT_CONTROL=m @@ -3851,7 +3953,9 @@ CONFIG_FB_EFI=y # CONFIG_FB_S3 is not set # CONFIG_FB_SAVAGE is not set # CONFIG_FB_SIS is not set -# CONFIG_FB_VIA is not set +CONFIG_FB_VIA=m +CONFIG_FB_VIA_DIRECT_PROCFS=y +CONFIG_FB_VIA_X_COMPATIBILITY=y # CONFIG_FB_NEOMAGIC is not set # CONFIG_FB_KYRO is not set # CONFIG_FB_3DFX is not set @@ -3871,12 +3975,14 @@ CONFIG_XEN_FBDEV_FRONTEND=m # CONFIG_FB_METRONOME is not set # CONFIG_FB_MB862XX is not set # CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_AUO_K190X is not set # CONFIG_EXYNOS_VIDEO is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=m CONFIG_LCD_PLATFORM=m CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set +CONFIG_BACKLIGHT_LM3533=m CONFIG_BACKLIGHT_PROGEAR=m CONFIG_BACKLIGHT_APPLE=m # CONFIG_BACKLIGHT_SAHARA is not set @@ -3906,6 +4012,7 @@ CONFIG_FONT_8x16=y # CONFIG_FONT_SUN8x16 is not set # CONFIG_FONT_SUN12x22 is not set # CONFIG_FONT_10x18 is not set +CONFIG_FONT_AUTOSELECT=y # CONFIG_LOGO is not set CONFIG_SOUND=m CONFIG_SOUND_OSS_CORE=y @@ -4015,7 +4122,6 @@ CONFIG_SND_HDA_INPUT_BEEP_MODE=1 CONFIG_SND_HDA_INPUT_JACK=y CONFIG_SND_HDA_PATCH_LOADER=y CONFIG_SND_HDA_CODEC_REALTEK=y -CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS=y CONFIG_SND_HDA_CODEC_ANALOG=y CONFIG_SND_HDA_CODEC_SIGMATEL=y CONFIG_SND_HDA_CODEC_VIA=y @@ -4072,16 +4178,14 @@ CONFIG_SND_PDAUDIOCF=m # CONFIG_SND_SOC is not set # CONFIG_SOUND_PRIME is not set CONFIG_AC97_BUS=m -CONFIG_HID_SUPPORT=y -CONFIG_HID=m -CONFIG_HIDRAW=y # -# USB Input Devices +# HID support # -CONFIG_USB_HID=m -CONFIG_HID_PID=y -CONFIG_USB_HIDDEV=y +CONFIG_HID=m +CONFIG_HIDRAW=y +CONFIG_UHID=m +CONFIG_HID_GENERIC=m # # Special HID drivers @@ -4090,6 +4194,7 @@ CONFIG_HID_A4TECH=m CONFIG_HID_ACRUX=m CONFIG_HID_ACRUX_FF=y CONFIG_HID_APPLE=m +CONFIG_HID_AUREAL=m CONFIG_HID_BELKIN=m CONFIG_HID_CHERRY=m CONFIG_HID_CHICONY=m @@ -4110,6 +4215,7 @@ CONFIG_HID_GYRATION=m CONFIG_HID_TWINHAN=m CONFIG_HID_KENSINGTON=m CONFIG_HID_LCPOWER=m +CONFIG_HID_LENOVO_TPKBD=m CONFIG_HID_LOGITECH=m CONFIG_HID_LOGITECH_DJ=m CONFIG_LOGITECH_FF=y @@ -4147,12 +4253,18 @@ CONFIG_HID_TOPSEED=m CONFIG_HID_THRUSTMASTER=m CONFIG_THRUSTMASTER_FF=y CONFIG_HID_WACOM=m -CONFIG_HID_WACOM_POWER_SUPPLY=y CONFIG_HID_WIIMOTE=m CONFIG_HID_WIIMOTE_EXT=y CONFIG_HID_ZEROPLUS=m CONFIG_ZEROPLUS_FF=y CONFIG_HID_ZYDACRON=m + +# +# USB HID support +# +CONFIG_USB_HID=m +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y CONFIG_USB_ARCH_HAS_OHCI=y CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB_ARCH_HAS_XHCI=y @@ -4166,8 +4278,6 @@ CONFIG_USB=m # # Miscellaneous USB options # -CONFIG_USB_DEVICEFS=y -# CONFIG_USB_DEVICE_CLASS is not set CONFIG_USB_DYNAMIC_MINORS=y CONFIG_USB_SUSPEND=y # CONFIG_USB_OTG is not set @@ -4206,9 +4316,15 @@ CONFIG_USB_R8A66597_HCD=m CONFIG_USB_RENESAS_USBHS_HCD=m CONFIG_USB_WHCI_HCD=m CONFIG_USB_HWA_HCD=m +# CONFIG_USB_HCD_BCMA is not set +# CONFIG_USB_HCD_SSB is not set CONFIG_USB_MUSB_HDRC=m CONFIG_USB_MUSB_TUSB6010=m CONFIG_MUSB_PIO_ONLY=y +CONFIG_USB_CHIPIDEA=m +CONFIG_USB_CHIPIDEA_UDC=y +CONFIG_USB_CHIPIDEA_HOST=y +# CONFIG_USB_CHIPIDEA_DEBUG is not set CONFIG_USB_RENESAS_USBHS=m # @@ -4322,6 +4438,7 @@ CONFIG_USB_SERIAL_OPTICON=m CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m CONFIG_USB_SERIAL_ZIO=m CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m # CONFIG_USB_SERIAL_DEBUG is not set # @@ -4348,6 +4465,11 @@ CONFIG_USB_IOWARRIOR=m CONFIG_USB_TEST=m CONFIG_USB_ISIGHTFW=m CONFIG_USB_YUREX=m + +# +# USB Physical Layer drivers +# +CONFIG_USB_ISP1301=m CONFIG_USB_ATM=m CONFIG_USB_SPEEDTOUCH=m CONFIG_USB_CXACRU=m @@ -4358,13 +4480,16 @@ CONFIG_USB_GADGET=m # CONFIG_USB_GADGET_DEBUG_FS is not set CONFIG_USB_GADGET_VBUS_DRAW=2 CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 + +# +# USB Peripheral Controller +# CONFIG_USB_R8A66597=m CONFIG_USB_RENESAS_USBHS_UDC=m CONFIG_USB_MV_UDC=m CONFIG_USB_GADGET_MUSB_HDRC=m CONFIG_USB_M66592=m CONFIG_USB_AMD5536UDC=m -CONFIG_USB_CI13XXX_PCI=m CONFIG_USB_NET2272=m CONFIG_USB_NET2272_DMA=y CONFIG_USB_NET2280=m @@ -4388,6 +4513,7 @@ CONFIG_USB_FUNCTIONFS_GENERIC=y CONFIG_USB_FILE_STORAGE=m # CONFIG_USB_FILE_STORAGE_TEST is not set # CONFIG_USB_MASS_STORAGE is not set +CONFIG_USB_GADGET_TARGET=m CONFIG_USB_G_SERIAL=m CONFIG_USB_MIDI_GADGET=m CONFIG_USB_G_PRINTER=m @@ -4407,7 +4533,6 @@ CONFIG_USB_G_WEBCAM=m CONFIG_USB_OTG_UTILS=y # CONFIG_USB_GPIO_VBUS is not set CONFIG_NOP_USB_XCEIV=m -# CONFIG_AB8500_USB is not set CONFIG_UWB=m CONFIG_UWB_HWA=m CONFIG_UWB_WHCI=m @@ -4462,6 +4587,7 @@ CONFIG_LEDS_CLASS=y # LED drivers # CONFIG_LEDS_LM3530=m +CONFIG_LEDS_LM3533=m CONFIG_LEDS_PCA9532=m # CONFIG_LEDS_PCA9532_GPIO is not set # CONFIG_LEDS_GPIO is not set @@ -4475,14 +4601,18 @@ CONFIG_LEDS_BD2802=m CONFIG_LEDS_INTEL_SS4200=m CONFIG_LEDS_LT3593=m CONFIG_LEDS_DELL_NETBOOKS=m +CONFIG_LEDS_MC13783=m CONFIG_LEDS_TCA6507=m +CONFIG_LEDS_LM3556=m CONFIG_LEDS_OT200=m +CONFIG_LEDS_BLINKM=m CONFIG_LEDS_TRIGGERS=y # # LED Triggers # CONFIG_LEDS_TRIGGER_TIMER=m +CONFIG_LEDS_TRIGGER_ONESHOT=m CONFIG_LEDS_TRIGGER_HEARTBEAT=m CONFIG_LEDS_TRIGGER_BACKLIGHT=m CONFIG_LEDS_TRIGGER_GPIO=m @@ -4491,6 +4621,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=m # # iptables trigger is under Netfilter config (LED target) # +CONFIG_LEDS_TRIGGER_TRANSIENT=m CONFIG_ACCESSIBILITY=y CONFIG_A11Y_BRAILLE_CONSOLE=y # CONFIG_INFINIBAND is not set @@ -4499,6 +4630,7 @@ CONFIG_EDAC=y # # Reporting subsystems # +CONFIG_EDAC_LEGACY_SYSFS=y # CONFIG_EDAC_DEBUG is not set CONFIG_EDAC_DECODE_MCE=m CONFIG_EDAC_MCE_INJ=m @@ -4576,11 +4708,11 @@ CONFIG_RTC_DRV_BQ4802=m CONFIG_RTC_DRV_RP5C01=m CONFIG_RTC_DRV_V3020=m CONFIG_RTC_DRV_PCF50633=m -CONFIG_RTC_DRV_AB8500=m # # on-CPU RTC drivers # +CONFIG_RTC_DRV_MC13XXX=m CONFIG_DMADEVICES=y # CONFIG_DMADEVICES_DEBUG is not set @@ -4614,6 +4746,7 @@ CONFIG_UIO_AEC=m CONFIG_UIO_SERCOS3=m CONFIG_UIO_PCI_GENERIC=m CONFIG_UIO_NETX=m +# CONFIG_VFIO is not set CONFIG_VIRTIO=m CONFIG_VIRTIO_RING=m @@ -4623,6 +4756,7 @@ CONFIG_VIRTIO_RING=m CONFIG_VIRTIO_PCI=m CONFIG_VIRTIO_BALLOON=m CONFIG_VIRTIO_MMIO=m +CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y # # Microsoft Hyper-V guest support @@ -4650,6 +4784,7 @@ CONFIG_XEN_TMEM=y CONFIG_XEN_PCIDEV_BACKEND=m CONFIG_XEN_PRIVCMD=m CONFIG_XEN_ACPI_PROCESSOR=m +# CONFIG_XEN_MCE_LOG is not set CONFIG_STAGING=y CONFIG_ET131X=m CONFIG_SLICOSS=m @@ -4662,14 +4797,16 @@ CONFIG_PRISM2_USB=m CONFIG_ECHO=m CONFIG_COMEDI=m # CONFIG_COMEDI_DEBUG is not set -CONFIG_COMEDI_MISC_DRIVERS=m +CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB=2048 +CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB=20480 +CONFIG_COMEDI_MISC_DRIVERS=y CONFIG_COMEDI_KCOMEDILIB=m CONFIG_COMEDI_BOND=m CONFIG_COMEDI_TEST=m CONFIG_COMEDI_PARPORT=m CONFIG_COMEDI_SERIAL2002=m CONFIG_COMEDI_SKEL=m -CONFIG_COMEDI_PCI_DRIVERS=m +CONFIG_COMEDI_PCI_DRIVERS=y CONFIG_COMEDI_ADDI_APCI_035=m CONFIG_COMEDI_ADDI_APCI_1032=m CONFIG_COMEDI_ADDI_APCI_1500=m @@ -4693,12 +4830,13 @@ CONFIG_COMEDI_ADL_PCI9118=m CONFIG_COMEDI_ADV_PCI1710=m CONFIG_COMEDI_ADV_PCI1723=m CONFIG_COMEDI_ADV_PCI_DIO=m -CONFIG_COMEDI_AMPLC_DIO200=m -CONFIG_COMEDI_AMPLC_PC236=m -CONFIG_COMEDI_AMPLC_PC263=m +CONFIG_COMEDI_AMPLC_DIO200_PCI=m +CONFIG_COMEDI_AMPLC_PC236_PCI=m +CONFIG_COMEDI_AMPLC_PC263_PCI=m CONFIG_COMEDI_AMPLC_PCI224=m CONFIG_COMEDI_AMPLC_PCI230=m CONFIG_COMEDI_CONTEC_PCI_DIO=m +CONFIG_COMEDI_DAS08_PCI=m CONFIG_COMEDI_DT3000=m CONFIG_COMEDI_DYNA_PCI10XX=m CONFIG_COMEDI_UNIOXX5=m @@ -4720,13 +4858,16 @@ CONFIG_COMEDI_NI_6527=m CONFIG_COMEDI_NI_65XX=m CONFIG_COMEDI_NI_660X=m CONFIG_COMEDI_NI_670X=m +CONFIG_COMEDI_NI_LABPC=m CONFIG_COMEDI_NI_PCIDIO=m CONFIG_COMEDI_NI_PCIMIO=m CONFIG_COMEDI_RTD520=m CONFIG_COMEDI_S526=m CONFIG_COMEDI_S626=m CONFIG_COMEDI_SSV_DNP=m -CONFIG_COMEDI_PCMCIA_DRIVERS=m +CONFIG_COMEDI_MITE=m +CONFIG_COMEDI_NI_TIOCMD=m +CONFIG_COMEDI_PCMCIA_DRIVERS=y CONFIG_COMEDI_CB_DAS16_CS=m CONFIG_COMEDI_DAS08_CS=m CONFIG_COMEDI_NI_DAQ_700_CS=m @@ -4734,19 +4875,19 @@ CONFIG_COMEDI_NI_DAQ_DIO24_CS=m CONFIG_COMEDI_NI_LABPC_CS=m CONFIG_COMEDI_NI_MIO_CS=m CONFIG_COMEDI_QUATECH_DAQP_CS=m -CONFIG_COMEDI_USB_DRIVERS=m +CONFIG_COMEDI_USB_DRIVERS=y CONFIG_COMEDI_DT9812=m CONFIG_COMEDI_USBDUX=m CONFIG_COMEDI_USBDUXFAST=m CONFIG_COMEDI_USBDUXSIGMA=m CONFIG_COMEDI_VMK80XX=m -CONFIG_COMEDI_NI_COMMON=m -CONFIG_COMEDI_MITE=m -CONFIG_COMEDI_NI_TIO=m -CONFIG_COMEDI_NI_LABPC=m CONFIG_COMEDI_8255=m -CONFIG_COMEDI_DAS08=m CONFIG_COMEDI_FC=m +CONFIG_COMEDI_AMPLC_DIO200=m +CONFIG_COMEDI_AMPLC_PC236=m +CONFIG_COMEDI_AMPLC_PC263=m +CONFIG_COMEDI_DAS08=m +CONFIG_COMEDI_NI_TIO=m CONFIG_ASUS_OLED=m # CONFIG_PANEL is not set CONFIG_R8187SE=m @@ -4771,12 +4912,9 @@ CONFIG_LINE6_USB=m # CONFIG_LINE6_USB_RAW is not set # CONFIG_LINE6_USB_IMPULSE_RESPONSE is not set CONFIG_USB_SERIAL_QUATECH2=m -CONFIG_USB_SERIAL_QUATECH_USB2=m CONFIG_VT6655=m CONFIG_VT6656=m -# CONFIG_VME_BUS is not set CONFIG_DX_SEP=m -# CONFIG_IIO is not set CONFIG_ZRAM=m # CONFIG_ZRAM_DEBUG is not set CONFIG_ZCACHE=y @@ -4814,7 +4952,6 @@ CONFIG_SPEAKUP_SYNTH_TXPRT=m CONFIG_SPEAKUP_SYNTH_DUMMY=m CONFIG_TOUCHSCREEN_CLEARPAD_TM1217=m CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=m -CONFIG_INTEL_MEI=m CONFIG_STAGING_MEDIA=y CONFIG_DVB_AS102=m CONFIG_DVB_CXD2099=m @@ -4852,6 +4989,17 @@ CONFIG_LIRC_ZILOG=m # CONFIG_ANDROID is not set # CONFIG_PHONE is not set CONFIG_USB_WPAN_HCD=m +CONFIG_IPACK_BUS=m +CONFIG_BOARD_TPCI200=m +CONFIG_SERIAL_IPOCTAL=m +CONFIG_WIMAX_GDM72XX=m +CONFIG_WIMAX_GDM72XX_QOS=y +CONFIG_WIMAX_GDM72XX_K_MODE=y +CONFIG_WIMAX_GDM72XX_WIMAX2=y +CONFIG_WIMAX_GDM72XX_USB=y +# CONFIG_WIMAX_GDM72XX_SDIO is not set +CONFIG_WIMAX_GDM72XX_USB_PM=y +CONFIG_CSR_WIFI=m CONFIG_X86_PLATFORM_DEVICES=y CONFIG_ACER_WMI=m CONFIG_ACERHDF=m @@ -4925,6 +5073,17 @@ CONFIG_IRQ_REMAP=y # CONFIG_VIRT_DRIVERS=y # CONFIG_PM_DEVFREQ is not set +CONFIG_EXTCON=m + +# +# Extcon Device Drivers +# +CONFIG_EXTCON_GPIO=m +CONFIG_EXTCON_ARIZONA=m +CONFIG_MEMORY=y +# CONFIG_IIO is not set +# CONFIG_VME_BUS is not set +# CONFIG_PWM is not set # # Firmware Drivers @@ -4937,7 +5096,8 @@ CONFIG_DELL_RBU=m CONFIG_DCDBAS=m CONFIG_DMIID=y CONFIG_DMI_SYSFS=m -# CONFIG_ISCSI_IBFT_FIND is not set +CONFIG_ISCSI_IBFT_FIND=y +CONFIG_ISCSI_IBFT=m # CONFIG_GOOGLE_FIRMWARE is not set # @@ -4984,7 +5144,7 @@ CONFIG_BTRFS_FS_POSIX_ACL=y # CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set CONFIG_NILFS2_FS=m CONFIG_FS_POSIX_ACL=y -CONFIG_EXPORTFS=m +CONFIG_EXPORTFS=y CONFIG_FILE_LOCKING=y CONFIG_FSNOTIFY=y CONFIG_DNOTIFY=y @@ -5000,7 +5160,7 @@ CONFIG_QFMT_V1=m CONFIG_QFMT_V2=m CONFIG_QUOTACTL=y CONFIG_QUOTACTL_COMPAT=y -CONFIG_AUTOFS4_FS=m +CONFIG_AUTOFS4_FS=y CONFIG_FUSE_FS=m CONFIG_CUSE=m CONFIG_GENERIC_ACL=y @@ -5074,11 +5234,9 @@ CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y # CONFIG_JFFS2_RUBIN is not set CONFIG_UBIFS_FS=m -CONFIG_UBIFS_FS_XATTR=y # CONFIG_UBIFS_FS_ADVANCED_COMPR is not set CONFIG_UBIFS_FS_LZO=y CONFIG_UBIFS_FS_ZLIB=y -# CONFIG_UBIFS_FS_DEBUG is not set CONFIG_LOGFS=m CONFIG_CRAMFS=m CONFIG_SQUASHFS=m @@ -5097,6 +5255,9 @@ CONFIG_OMFS_FS=m # CONFIG_QNX6FS_FS is not set # CONFIG_ROMFS_FS is not set CONFIG_PSTORE=y +# CONFIG_PSTORE_CONSOLE is not set +# CONFIG_PSTORE_FTRACE is not set +CONFIG_PSTORE_RAM=m # CONFIG_SYSV_FS is not set CONFIG_UFS_FS=m # CONFIG_UFS_FS_WRITE is not set @@ -5106,9 +5267,11 @@ CONFIG_EXOFS_FS=m CONFIG_ORE=m CONFIG_NETWORK_FILESYSTEMS=y CONFIG_NFS_FS=m -CONFIG_NFS_V3=y +CONFIG_NFS_V2=m +CONFIG_NFS_V3=m CONFIG_NFS_V3_ACL=y -CONFIG_NFS_V4=y +CONFIG_NFS_V4=m +# CONFIG_NFS_SWAP is not set # CONFIG_NFS_V4_1 is not set CONFIG_NFS_FSCACHE=y # CONFIG_NFS_USE_LEGACY_DNS is not set @@ -5193,6 +5356,17 @@ CONFIG_NLS_ISO8859_14=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m CONFIG_NLS_UTF8=m CONFIG_DLM=m # CONFIG_DLM_DEBUG is not set @@ -5207,7 +5381,6 @@ CONFIG_ENABLE_WARN_DEPRECATED=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_FRAME_WARN=2048 CONFIG_MAGIC_SYSRQ=y -# CONFIG_MAGIC_SYSRQ_FORCE_PRINTK is not set CONFIG_STRIP_ASM_SYMS=y CONFIG_UNUSED_SYMBOLS=y CONFIG_DEBUG_FS=y @@ -5215,6 +5388,10 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_SECTION_MISMATCH is not set # CONFIG_DEBUG_KERNEL is not set # CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +# CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_SLUB_STATS is not set # CONFIG_SPARSE_RCU_POINTER is not set CONFIG_STACKTRACE=y CONFIG_DEBUG_BUGVERBOSE=y @@ -5222,11 +5399,10 @@ CONFIG_DEBUG_MEMORY_INIT=y CONFIG_ARCH_WANT_FRAME_POINTERS=y CONFIG_FRAME_POINTER=y CONFIG_RCU_CPU_STALL_TIMEOUT=60 -# CONFIG_RCU_CPU_STALL_VERBOSE is not set +CONFIG_RCU_CPU_STALL_VERBOSE=y CONFIG_LKDTM=m CONFIG_USER_STACKTRACE_SUPPORT=y CONFIG_NOP_TRACER=y -CONFIG_HAVE_FTRACE_NMI_ENTER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y @@ -5237,7 +5413,6 @@ CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_TRACER_MAX_TRACE=y CONFIG_RING_BUFFER=y -CONFIG_FTRACE_NMI_ENTER=y CONFIG_EVENT_TRACING=y CONFIG_EVENT_POWER_TRACING_DEPRECATED=y CONFIG_CONTEXT_SWITCH_TRACER=y @@ -5258,6 +5433,9 @@ CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_PROFILE_ALL_BRANCHES is not set CONFIG_STACK_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y +CONFIG_KPROBE_EVENT=y +CONFIG_UPROBE_EVENT=y +CONFIG_PROBE_EVENTS=y CONFIG_DYNAMIC_FTRACE=y CONFIG_FUNCTION_PROFILER=y CONFIG_FTRACE_MCOUNT_RECORD=y @@ -5359,6 +5537,8 @@ CONFIG_CRYPTO_WORKQUEUE=y CONFIG_CRYPTO_CRYPTD=m CONFIG_CRYPTO_AUTHENC=m CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_ABLK_HELPER_X86=m +CONFIG_CRYPTO_GLUE_HELPER_X86=m # # Authenticated Encryption with Associated Data @@ -5429,11 +5609,13 @@ CONFIG_CRYPTO_SALSA20_X86_64=m CONFIG_CRYPTO_SEED=m CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_SERPENT_SSE2_X86_64=m +CONFIG_CRYPTO_SERPENT_AVX_X86_64=m CONFIG_CRYPTO_TEA=m CONFIG_CRYPTO_TWOFISH=m CONFIG_CRYPTO_TWOFISH_COMMON=m CONFIG_CRYPTO_TWOFISH_X86_64=m CONFIG_CRYPTO_TWOFISH_X86_64_3WAY=m +CONFIG_CRYPTO_TWOFISH_AVX_X86_64=m # # Compression @@ -5459,12 +5641,14 @@ CONFIG_HAVE_KVM_EVENTFD=y CONFIG_KVM_APIC_ARCHITECTURE=y CONFIG_KVM_MMIO=y CONFIG_KVM_ASYNC_PF=y +CONFIG_HAVE_KVM_MSI=y CONFIG_VIRTUALIZATION=y CONFIG_KVM=m CONFIG_KVM_INTEL=m CONFIG_KVM_AMD=m CONFIG_KVM_MMU_AUDIT=y CONFIG_VHOST_NET=m +CONFIG_TCM_VHOST=m CONFIG_BINARY_PRINTF=y # @@ -5472,6 +5656,8 @@ CONFIG_BINARY_PRINTF=y # CONFIG_RAID6_PQ=m CONFIG_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y CONFIG_GENERIC_FIND_FIRST_BIT=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_IOMAP=y @@ -5509,6 +5695,8 @@ CONFIG_DECOMPRESS_XZ=y CONFIG_DECOMPRESS_LZO=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_REED_SOLOMON=m +CONFIG_REED_SOLOMON_ENC8=y +CONFIG_REED_SOLOMON_DEC8=y CONFIG_REED_SOLOMON_DEC16=y CONFIG_BCH=m CONFIG_BCH_CONST_PARAMS=y @@ -5524,6 +5712,8 @@ CONFIG_CHECK_SIGNATURE=y CONFIG_CPU_RMAP=y CONFIG_DQL=y CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y CONFIG_LRU_CACHE=m CONFIG_AVERAGE=y CONFIG_CORDIC=m +CONFIG_DDR=y diff --git a/kernels/linux-libre-rt/i915-fix-ghost-tv-output.patch b/kernels/linux-libre-rt/i915-fix-ghost-tv-output.patch deleted file mode 100755 index 3b631361a..000000000 --- a/kernels/linux-libre-rt/i915-fix-ghost-tv-output.patch +++ /dev/null @@ -1,26 +0,0 @@ -Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> -Tested-by: Santi <santi@agolina.net> ---- - drivers/gpu/drm/i915/intel_tv.c | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) - -diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c -index dc83b7a..c8f67bf 100644 ---- a/drivers/gpu/drm/i915/intel_tv.c -+++ b/drivers/gpu/drm/i915/intel_tv.c -@@ -1267,6 +1267,15 @@ - DAC_B_0_7_V | - DAC_C_0_7_V); - -+ /* -+ * The TV sense state should be cleared to zero on cantiga platform. Otherwise -+ * the TV is misdetected. This is hardware requirement. -+ */ -+ if (IS_GM45(dev)) -+ tv_dac &= ~(TVDAC_STATE_CHG_EN | TVDAC_A_SENSE_CTL | -+ TVDAC_B_SENSE_CTL | TVDAC_C_SENSE_CTL); -+ -+ - I915_WRITE(TV_CTL, tv_ctl); - I915_WRITE(TV_DAC, tv_dac); - POSTING_READ(TV_DAC); diff --git a/kernels/linux-libre-rt/linux-libre-rt.install b/kernels/linux-libre-rt/linux-libre-rt.install index 54d0c0a89..c7a44aeee 100755 --- a/kernels/linux-libre-rt/linux-libre-rt.install +++ b/kernels/linux-libre-rt/linux-libre-rt.install @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME=-rt -KERNEL_VERSION=3.4.11-1-rt19-LIBRE-RT +KERNEL_VERSION=3.6.6-1-rt17-LIBRE-RT # set a sane PATH to ensure that critical utils like depmod will be found export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' diff --git a/kernels/linux-libre-rt/module-init-wait-3.6.patch b/kernels/linux-libre-rt/module-init-wait-3.6.patch new file mode 100644 index 000000000..1bcfd2491 --- /dev/null +++ b/kernels/linux-libre-rt/module-init-wait-3.6.patch @@ -0,0 +1,77 @@ +From: Rusty Russell <rusty@rustcorp.com.au> +Date: Fri, 28 Sep 2012 05:01:03 +0000 (+0930) +Subject: module: wait when loading a module which is currently initializing. +X-Git-Tag: v3.7-rc1~2^2~32 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=9bb9c3be568346538 + +module: wait when loading a module which is currently initializing. + +The original module-init-tools module loader used a fnctl lock on the +.ko file to avoid attempts to simultaneously load a module. +Unfortunately, you can't get an exclusive fcntl lock on a read-only +fd, making this not work for read-only mounted filesystems. +module-init-tools has a hacky sleep-and-loop for this now. + +It's not that hard to wait in the kernel, and only return -EEXIST once +the first module has finished loading (or continue loading the module +if the first one failed to initialize for some reason). It's also +consistent with what we do for dependent modules which are still loading. + +Suggested-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> +Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> +--- + +diff --git a/kernel/module.c b/kernel/module.c +index 63cf6e7..74bc195 100644 +--- a/kernel/module.c ++++ b/kernel/module.c +@@ -2845,6 +2845,20 @@ static int post_relocation(struct module *mod, const struct load_info *info) + return module_finalize(info->hdr, info->sechdrs, mod); + } + ++/* Is this module of this name done loading? No locks held. */ ++static bool finished_loading(const char *name) ++{ ++ struct module *mod; ++ bool ret; ++ ++ mutex_lock(&module_mutex); ++ mod = find_module(name); ++ ret = !mod || mod->state != MODULE_STATE_COMING; ++ mutex_unlock(&module_mutex); ++ ++ return ret; ++} ++ + /* Allocate and load the module: note that size of section 0 is always + zero, and we rely on this for optional sections. */ + static struct module *load_module(void __user *umod, +@@ -2852,7 +2866,7 @@ static struct module *load_module(void __user *umod, + const char __user *uargs) + { + struct load_info info = { NULL, }; +- struct module *mod; ++ struct module *mod, *old; + long err; + + pr_debug("load_module: umod=%p, len=%lu, uargs=%p\n", +@@ -2918,8 +2932,18 @@ static struct module *load_module(void __user *umod, + * function to insert in a way safe to concurrent readers. + * The mutex protects against concurrent writers. + */ ++again: + mutex_lock(&module_mutex); +- if (find_module(mod->name)) { ++ if ((old = find_module(mod->name)) != NULL) { ++ if (old->state == MODULE_STATE_COMING) { ++ /* Wait in case it fails to load. */ ++ mutex_unlock(&module_mutex); ++ err = wait_event_interruptible(module_wq, ++ finished_loading(mod->name)); ++ if (err) ++ goto free_arch_cleanup; ++ goto again; ++ } + err = -EEXIST; + goto unlock; + } diff --git a/kernels/linux-libre-rt/module-symbol-waiting-3.6.patch b/kernels/linux-libre-rt/module-symbol-waiting-3.6.patch new file mode 100644 index 000000000..b87a38ff5 --- /dev/null +++ b/kernels/linux-libre-rt/module-symbol-waiting-3.6.patch @@ -0,0 +1,66 @@ +From: Rusty Russell <rusty@rustcorp.com.au> +Date: Fri, 28 Sep 2012 05:01:03 +0000 (+0930) +Subject: module: fix symbol waiting when module fails before init +X-Git-Tag: v3.7-rc1~2^2~33 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6f13909f4fe9652f1 + +module: fix symbol waiting when module fails before init + +We use resolve_symbol_wait(), which blocks if the module containing +the symbol is still loading. However: + +1) The module_wq we use is only woken after calling the modules' init + function, but there are other failure paths after the module is + placed in the linked list where we need to do the same thing. + +2) wake_up() only wakes one waiter, and our waitqueue is shared by all + modules, so we need to wake them all. + +3) wake_up_all() doesn't imply a memory barrier: I feel happier calling + it after we've grabbed and dropped the module_mutex, not just after + the state assignment. + +Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> +--- + +diff --git a/kernel/module.c b/kernel/module.c +index 7f2ee45f..63cf6e7 100644 +--- a/kernel/module.c ++++ b/kernel/module.c +@@ -2959,7 +2959,7 @@ static struct module *load_module(void __user *umod, + /* Unlink carefully: kallsyms could be walking list. */ + list_del_rcu(&mod->list); + module_bug_cleanup(mod); +- ++ wake_up_all(&module_wq); + ddebug: + dynamic_debug_remove(info.debug); + unlock: +@@ -3034,7 +3034,7 @@ SYSCALL_DEFINE3(init_module, void __user *, umod, + blocking_notifier_call_chain(&module_notify_list, + MODULE_STATE_GOING, mod); + free_module(mod); +- wake_up(&module_wq); ++ wake_up_all(&module_wq); + return ret; + } + if (ret > 0) { +@@ -3046,9 +3046,8 @@ SYSCALL_DEFINE3(init_module, void __user *, umod, + dump_stack(); + } + +- /* Now it's a first class citizen! Wake up anyone waiting for it. */ ++ /* Now it's a first class citizen! */ + mod->state = MODULE_STATE_LIVE; +- wake_up(&module_wq); + blocking_notifier_call_chain(&module_notify_list, + MODULE_STATE_LIVE, mod); + +@@ -3071,6 +3070,7 @@ SYSCALL_DEFINE3(init_module, void __user *, umod, + mod->init_ro_size = 0; + mod->init_text_size = 0; + mutex_unlock(&module_mutex); ++ wake_up_all(&module_wq); + + return 0; + } diff --git a/libre/aspell-pl-libre/PKGBUILD b/libre/aspell-pl-libre/PKGBUILD deleted file mode 100755 index 6da90e449..000000000 --- a/libre/aspell-pl-libre/PKGBUILD +++ /dev/null @@ -1,33 +0,0 @@ -# Parabola maintainer: Michał Masłowski <mtjm@mtjm.eu> -# $Id: PKGBUILD 43278 2011-03-24 13:25:37Z andrea $ -# Maintainer: Jaroslaw Swierczynski <swiergot@aur.archlinux.org> -# Contributor: Arkadiusz Laczynski <alaczynski@gmail.com> -# Contributor (Parabola): Jorge Lopez <jorginho@adinet.com.uy> - -_pkgname=aspell-pl -pkgname=aspell-pl-libre -pkgver=20111117 -pkgrel=1 -pkgdesc="Polish dictionary for aspell" -arch=('i686' 'x86_64') -url="http://www.sjp.pl/slownik/en/" -license=('GPL' 'LGPL' 'MPL') -depends=('aspell') -replaces=('aspell-pl') -conflicts=('aspell-pl') -provides=('aspell-pl') -source=("ftp://ftp.archlinux.org/other/community/$_pkgname/sjp-aspell6-pl-6.0_$pkgver-0.tar.bz2") -md5sums=('27aa9ca734d7049238399c279c5417fb') - -build() { - cd "$srcdir/aspell6-pl-6.0_$pkgver-0" - - ./configure - make -} - -package() { - cd "$srcdir/aspell6-pl-6.0_$pkgver-0" - - make DESTDIR="$pkgdir" install -} diff --git a/libre/cups-libre/PKGBUILD b/libre/cups-libre/PKGBUILD deleted file mode 100755 index 105bea193..000000000 --- a/libre/cups-libre/PKGBUILD +++ /dev/null @@ -1,168 +0,0 @@ -# $Id: PKGBUILD 160055 2012-05-28 16:48:32Z andyrtr $ -# Maintainer: Andreas Radke <andyrtr@archlinux.org> - -pkgbase="cups" -pkgname=('libcups' 'cups-libre') -pkgver=1.5.3 -pkgrel=3 -arch=('i686' 'x86_64' 'mips64el') -license=('GPL') -url="http://www.cups.org/" -makedepends=('libtiff>=4.0.0' 'libpng>=1.5.7' 'acl' 'openslp' 'pam' 'xdg-utils' 'krb5' 'gnutls>=2.8.3' 'cups-filters' 'bc' - 'xinetd' 'gzip' 'autoconf' 'php' 'libusb' 'dbus-core' 'avahi' 'hicolor-icon-theme') -source=(ftp://ftp.easysw.com/pub/cups/${pkgver}/cups-${pkgver}-source.tar.bz2 - cups-avahi-1-config.patch - cups-avahi-2-backend.patch - cups-avahi-3-timeouts.patch - cups-avahi-4-poll.patch - cups-avahi-5-services.patch - cups-no-export-ssllibs.patch - cups-no-gcrypt.patch - cups-no-gzip-man.patch - cups cups.logrotate cups.pam) -#options=('!emptydirs') -md5sums=('e1ad15257aa6f162414ea3beae0c5df8' - '12c8af5bcd3b8f84240280b3dfaf9e89' - 'cdc1322c8014297ae349e2db78a03c5a' - '1a5112f63958643f2888abc9418dbcac' - 'c37d1bf1bb76acc3fe93362c80d91b7c' - '5d302860559960042f3b47a91b97c5fe' - '9b8467a1e51d360096b70e2c3c081e6c' - '3733c23e77eb503bd94cc368e02830dc' - 'c9159ba1233902ba6ddbbe6885a46b72' - '9657daa21760bb0b5fa3d8b51d5e01a1' - 'f861b18f4446c43918c8643dcbbd7f6d' - '96f82c38f3f540b53f3e5144900acf17') - -build() { - cd ${srcdir}/${pkgbase}-${pkgver} - # http://www.cups.org/str.php?L3066 - # Avahi support in the dnssd backend. patches from upstream/FC RawHide - patch -Np1 -i ${srcdir}/cups-avahi-1-config.patch - patch -Np1 -i ${srcdir}/cups-avahi-2-backend.patch - patch -Np1 -i ${srcdir}/cups-avahi-3-timeouts.patch - patch -Np1 -i ${srcdir}/cups-avahi-4-poll.patch - patch -Np1 -i ${srcdir}/cups-avahi-5-services.patch - - # Do not export SSL libs in cups-config - patch -Np1 -i "${srcdir}/cups-no-export-ssllibs.patch" - - patch -Np1 -i "${srcdir}/cups-no-gcrypt.patch" - # don't zip man pages in make install, let makepkg do that / Fedora - patch -Np1 -i ${srcdir}/cups-no-gzip-man.patch - - # Rebuild configure script for --enable-avahi. - aclocal -I config-scripts - autoconf -I config-scripts - - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ - --libdir=/usr/lib \ - --with-logdir=/var/log/cups \ - --with-docdir=/usr/share/cups/doc \ - --with-cups-user=daemon \ - --with-cups-group=lp \ - --enable-pam=yes \ - --disable-ldap \ - --enable-raw-printing \ - --enable-dbus --with-dbusdir=/etc/dbus-1 \ - --enable-ssl=yes --enable-gnutls \ - --enable-threads \ - --enable-avahi\ - --with-php=/usr/bin/php-cgi \ - --with-pdftops=pdftops \ - --with-optim="$CFLAGS" - make -} - -check() { - cd "$srcdir/$pkgbase-$pkgver" - #httpAddrGetList(workstation64): FAIL - #1 TESTS FAILED! - #make[1]: *** [testhttp] Error 1 - make -k check || /bin/true -} - -package_libcups() { -pkgdesc="The CUPS Printing System - client libraries and headers" -depends=('gnutls>=2.8.3' 'libtiff>=4.0.0' 'libpng>=1.5.7' 'krb5' 'avahi') -backup=(etc/cups/client.conf) - - cd ${srcdir}/${pkgbase}-${pkgver} - make BUILDROOT=${pkgdir} install-headers install-libs - # put this into the libs pkg to make other software find the libs(no pkg-config file included) - mkdir -p ${pkgdir}/usr/bin - install -m755 ${srcdir}/${pkgbase}-${pkgver}/cups-config ${pkgdir}/usr/bin/cups-config - - # install client.conf man page and config file - install -dm755 ${pkgdir}/usr/share/man/man5 - #install -Dm644 ${srcdir}/${pkgbase}-${pkgver}/man/client.conf.5.gz ${pkgdir}/usr/share/man/man5/ - install -Dm644 ${srcdir}/${pkgbase}-${pkgver}/man/client.conf.5 ${pkgdir}/usr/share/man/man5/ - install -dm755 ${pkgdir}/etc/cups - touch ${pkgdir}/etc/cups/client.conf - echo "# see 'man client.conf'" >> ${pkgdir}/etc/cups/client.conf - echo "ServerName /var/run/cups/cups.sock # alternative: ServerName hostname-or-ip-address[:port] of a remote server" >> ${pkgdir}/etc/cups/client.conf - chgrp lp ${pkgdir}/etc/cups/client.conf -} - -package_cups-libre() { -pkgdesc="The CUPS Printing System - daemon package" -provides=("${pkgbase}=${pkgver}") -replaces=("${pkgbase}") -conflicts=("${pkgbase}") -install=cups.install -backup=(etc/cups/cupsd.conf - etc/cups/snmp.conf - etc/cups/printers.conf - etc/cups/classes.conf - etc/cups/subscriptions.conf - etc/dbus-1/system.d/cups.conf - etc/logrotate.d/cups - etc/pam.d/cups - etc/xinetd.d/cups-lpd) -depends=('acl' 'openslp' 'pam' "libcups>=${pkgver}" 'cups-filters' 'bc' 'libusb' 'dbus-core' 'hicolor-icon-theme') -optdepends=('php: for included phpcups.so module' - 'xdg-utils: xdg .desktop file support') - - cd ${srcdir}/${pkgbase}-${pkgver} - make BUILDROOT=${pkgdir} install-data install-exec - - # this one we ship in the libcups pkg - rm -f ${pkgdir}/usr/bin/cups-config - - # kill the sysv stuff - rm -rf ${pkgdir}/etc/rc*.d - rm -rf ${pkgdir}/etc/init.d - install -D -m755 ../cups ${pkgdir}/etc/rc.d/cupsd - install -D -m644 ../cups.logrotate ${pkgdir}/etc/logrotate.d/cups - install -D -m644 ../cups.pam ${pkgdir}/etc/pam.d/cups - - # fix perms on /var/spool and /etc - chmod 755 ${pkgdir}/var/spool - chmod 755 ${pkgdir}/etc - - # install ssl directory where to store the certs, solves some samba issues - install -dm700 -g lp ${pkgdir}/etc/cups/ssl - # remove directory from package, we create it in cups rc.d file - rm -rf ${pkgdir}/var/run - - # install some more configuration files that will get filled by cupsd - touch ${pkgdir}/etc/cups/printers.conf - touch ${pkgdir}/etc/cups/classes.conf - touch ${pkgdir}/etc/cups/subscriptions.conf - chgrp lp ${pkgdir}/etc/cups/{printers.conf,classes.conf,subscriptions.conf} - - # fix .desktop file - sed -i 's|^Exec=htmlview http://localhost:631/|Exec=xdg-open http://localhost:631/|g' ${pkgdir}/usr/share/applications/cups.desktop - - # compress some driver files, adopted from Fedora - find ${pkgdir}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f - - # remove client.conf man page - rm -f ${pkgdir}/usr/share/man/man5/client.conf.5 - - # remove files now part of cups-filters - rm -v ${pkgdir}/usr/lib/cups/backend/{parallel,serial} - rm -v ${pkgdir}/usr/lib/cups/filter/{commandtoescpx,commandtopclx,imagetops,imagetoraster,pdftops,rastertoescpx,rastertopclx,texttops} - rm -v ${pkgdir}/usr/share/cups/banners/{classified,confidential,secret,standard,topsecret,unclassified} - rm -v ${pkgdir}/usr/share/cups/data/testprint -} diff --git a/libre/cups-libre/cups b/libre/cups-libre/cups deleted file mode 100755 index 744c8e663..000000000 --- a/libre/cups-libre/cups +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -daemon_name=cupsd - -. /etc/rc.conf -. /etc/rc.d/functions -#. /etc/conf.d/$daemon_name.conf - -get_pid() { - pidof -o %PPID $daemon_name -} - -case "$1" in - start) - stat_busy "Starting $daemon_name daemon" - - PID=$(get_pid) - if [ -z "$PID" ]; then - [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid - # RUN - $daemon_name - # - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - echo $(get_pid) > /var/run/$daemon_name.pid - add_daemon $daemon_name - stat_done - fi - else - stat_fail - exit 1 - fi - ;; - - stop) - stat_busy "Stopping $daemon_name daemon" - PID=$(get_pid) - # KILL - [ ! -z "$PID" ] && kill $PID &> /dev/null - # - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - rm -f /var/run/$daemon_name.pid &> /dev/null - rm_daemon $daemon_name - stat_done - fi - ;; - - restart) - $0 stop - sleep 3 - $0 start - ;; - - status) - stat_busy "Checking $daemon_name status"; - ck_status $daemon_name - ;; - - *) - echo "usage: $0 {start|stop|restart|status}" -esac - -exit 0 diff --git a/libre/cups-libre/cups-avahi-1-config.patch b/libre/cups-libre/cups-avahi-1-config.patch deleted file mode 100755 index 516e01fa9..000000000 --- a/libre/cups-libre/cups-avahi-1-config.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up cups-1.5.2/config.h.in.avahi-1-config cups-1.5.2/config.h.in ---- cups-1.5.2/config.h.in.avahi-1-config 2011-06-16 21:12:16.000000000 +0100 -+++ cups-1.5.2/config.h.in 2012-03-14 15:04:51.365347165 +0000 -@@ -390,6 +390,13 @@ - - - /* -+ * Do we have Avahi for DNS Service Discovery? -+ */ -+ -+#undef HAVE_AVAHI -+ -+ -+/* - * Do we have <sys/ioctl.h>? - */ - -diff -up cups-1.5.2/config-scripts/cups-dnssd.m4.avahi-1-config cups-1.5.2/config-scripts/cups-dnssd.m4 ---- cups-1.5.2/config-scripts/cups-dnssd.m4.avahi-1-config 2011-05-12 06:21:56.000000000 +0100 -+++ cups-1.5.2/config-scripts/cups-dnssd.m4 2012-03-14 15:04:51.365347165 +0000 -@@ -23,6 +23,21 @@ AC_ARG_WITH(dnssd-includes, [ --with-dn - DNSSDLIBS="" - DNSSD_BACKEND="" - -+AC_ARG_ENABLE(avahi, [ --enable-avahi turn on DNS Service Discovery support, default=no], -+ [if test x$enable_avahi = xyes; then -+ AC_MSG_CHECKING(for Avahi) -+ if $PKGCONFIG --exists avahi-client; then -+ AC_MSG_RESULT(yes) -+ CFLAGS="$CFLAGS `$PKGCONFIG --cflags avahi-client`" -+ DNSSDLIBS="`$PKGCONFIG --libs avahi-client`" -+ DNSSD_BACKEND="dnssd" -+ AC_DEFINE(HAVE_AVAHI) -+ enable_dnssd=no -+ else -+ AC_MSG_RESULT(no) -+ fi -+ fi]) -+ - if test x$enable_dnssd != xno; then - AC_CHECK_HEADER(dns_sd.h, [ - case "$uname" in diff --git a/libre/cups-libre/cups-avahi-2-backend.patch b/libre/cups-libre/cups-avahi-2-backend.patch deleted file mode 100755 index 9fa367729..000000000 --- a/libre/cups-libre/cups-avahi-2-backend.patch +++ /dev/null @@ -1,1118 +0,0 @@ -diff -up cups-1.5.3/backend/dnssd.c.avahi-2-backend cups-1.5.3/backend/dnssd.c ---- cups-1.5.3/backend/dnssd.c.avahi-2-backend 2012-05-15 16:53:18.164774446 +0200 -+++ cups-1.5.3/backend/dnssd.c 2012-05-15 17:09:07.684155704 +0200 -@@ -15,14 +15,21 @@ - * - * Contents: - * -+ * next_txt_record() - Get next TXT record from a cups_txt_records_t. -+ * parse_txt_record_pair() - Read key/value pair in cups_txt_records_t. - * main() - Browse for printers. - * browse_callback() - Browse devices. - * browse_local_callback() - Browse local devices. - * compare_devices() - Compare two devices. - * exec_backend() - Execute the backend that corresponds to the - * resolved service name. -+ * device_type() - Get DNS-SD type enumeration from string. - * get_device() - Create or update a device. - * query_callback() - Process query data. -+ * avahi_client_callback() - Avahi client callback function. -+ * avahi_query_callback() - Avahi query callback function. -+ * avahi_browse_callback() - Avahi browse callback function. -+ * find_device() - Find a device from its name and domain. - * sigterm_handler() - Handle termination signals... - * unquote() - Unquote a name string. - */ -@@ -33,7 +40,18 @@ - - #include "backend-private.h" - #include <cups/array.h> --#include <dns_sd.h> -+#ifdef HAVE_DNSSD -+# include <dns_sd.h> -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+# include <avahi-client/client.h> -+# include <avahi-client/lookup.h> -+# include <avahi-common/simple-watch.h> -+# include <avahi-common/domain.h> -+# include <avahi-common/error.h> -+# include <avahi-common/malloc.h> -+#define kDNSServiceMaxDomainName AVAHI_DOMAIN_NAME_MAX -+#endif /* HAVE_AVAHI */ - - - /* -@@ -53,7 +71,12 @@ typedef enum - - typedef struct - { -+#ifdef HAVE_DNSSD - DNSServiceRef ref; /* Service reference for resolve */ -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ int resolved; /* Did we resolve the device? */ -+#endif /* HAVE_AVAHI */ - char *name, /* Service name */ - *domain, /* Domain name */ - *fullName, /* Full name */ -@@ -65,6 +88,20 @@ typedef struct - sent; /* Did we list the device? */ - } cups_device_t; - -+typedef struct -+{ -+ char key[256]; -+ char value[256]; -+ -+#ifdef HAVE_DNSSD -+ const uint8_t *data; -+ const uint8_t *datanext; -+ const uint8_t *dataend; -+#else /* HAVE_AVAHI */ -+ AvahiStringList *txt; -+#endif /* HAVE_DNSSD */ -+} cups_txt_records_t; -+ - - /* - * Local globals... -@@ -78,6 +115,7 @@ static int job_canceled = 0; - * Local functions... - */ - -+#ifdef HAVE_DNSSD - static void browse_callback(DNSServiceRef sdRef, - DNSServiceFlags flags, - uint32_t interfaceIndex, -@@ -95,13 +133,6 @@ static void browse_local_callback(DNSSe - const char *replyDomain, - void *context) - __attribute__((nonnull(1,5,6,7,8))); --static int compare_devices(cups_device_t *a, cups_device_t *b); --static void exec_backend(char **argv); --static cups_device_t *get_device(cups_array_t *devices, -- const char *serviceName, -- const char *regtype, -- const char *replyDomain) -- __attribute__((nonnull(1,2,3,4))); - static void query_callback(DNSServiceRef sdRef, - DNSServiceFlags flags, - uint32_t interfaceIndex, -@@ -111,10 +142,119 @@ static void query_callback(DNSServiceRe - const void *rdata, uint32_t ttl, - void *context) - __attribute__((nonnull(1,5,9,11))); -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+static void avahi_client_callback (AvahiClient *client, -+ AvahiClientState state, -+ void *context); -+static void avahi_browse_callback (AvahiServiceBrowser *browser, -+ AvahiIfIndex interface, -+ AvahiProtocol protocol, -+ AvahiBrowserEvent event, -+ const char *serviceName, -+ const char *regtype, -+ const char *replyDomain, -+ AvahiLookupResultFlags flags, -+ void *context); -+#endif /* HAVE_AVAHI */ -+static cups_device_t * find_device (cups_array_t *devices, -+ cups_txt_records_t *txt, -+ cups_device_t *dkey); -+static int compare_devices(cups_device_t *a, cups_device_t *b); -+static void exec_backend(char **argv); -+static cups_device_t *get_device(cups_array_t *devices, -+ const char *serviceName, -+ const char *regtype, -+ const char *replyDomain) -+ __attribute__((nonnull(1,2,3,4))); - static void sigterm_handler(int sig); - static void unquote(char *dst, const char *src, size_t dstsize) - __attribute__((nonnull(1,2))); - -+#ifdef HAVE_AVAHI -+static AvahiSimplePoll *simple_poll = NULL; -+static int avahi_got_callback; -+#endif /* HAVE_AVAHI */ -+ -+ -+/* -+ * 'next_txt_record()' - Get next TXT record from a cups_txt_records_t. -+ */ -+ -+static cups_txt_records_t * -+next_txt_record (cups_txt_records_t *txt) -+{ -+#ifdef HAVE_DNSSD -+ txt->data = txt->datanext; -+#else /* HAVE_AVAHI */ -+ txt->txt = avahi_string_list_get_next (txt->txt); -+ if (txt->txt == NULL) -+ return NULL; -+#endif /* HAVE_DNSSD */ -+ -+ return txt; -+} -+ -+ -+/* -+ * 'parse_txt_record_pair()' - Read key/value pair in cups_txt_records_t. -+ */ -+ -+static int -+parse_txt_record_pair (cups_txt_records_t *txt) -+{ -+#ifdef HAVE_DNSSD -+ uint8_t datalen; -+ uint8_t *data = txt->data; -+ char *ptr; -+ -+ /* -+ * Read a key/value pair starting with an 8-bit length. Since the -+ * length is 8 bits and the size of the key/value buffers is 256, we -+ * don't need to check for overflow... -+ */ -+ -+ datalen = *data++; -+ if (!datalen || (data + datalen) > txt->dataend) -+ return NULL; -+ txt->datanext = data + datalen; -+ -+ for (ptr = txt->key; data < txt->datanext && *data != '='; data ++) -+ *ptr++ = *data; -+ *ptr = '\0'; -+ -+ if (data < txt->datanext && *data == '=') -+ { -+ data++; -+ -+ if (data < datanext) -+ memcpy (txt->value, data, txt->datanext - data); -+ value[txt->datanext - data] = '\0'; -+ } -+ else -+ return 1; -+#else /* HAVE_AVAHI */ -+ char *key, *value; -+ size_t len; -+ avahi_string_list_get_pair (txt->txt, &key, &value, &len); -+ if (len > sizeof (txt->value) - 1) -+ len = sizeof (txt->value) - 1; -+ -+ memcpy (txt->value, value, len); -+ txt->value[len] = '\0'; -+ len = strlen (key); -+ if (len > sizeof (txt->key) - 1) -+ len = sizeof (txt->key) - 1; -+ -+ memcpy (txt->key, key, len); -+ txt->key[len] = '\0'; -+ avahi_free (key); -+ avahi_free (value); -+#endif /* HAVE_AVAHI */ -+ -+ return 0; -+} -+ - - /* - * 'main()' - Browse for printers. -@@ -125,6 +265,13 @@ main(int argc, /* I - Number of comm - char *argv[]) /* I - Command-line arguments */ - { - const char *name; /* Backend name */ -+ cups_array_t *devices; /* Device array */ -+ cups_device_t *device; /* Current device */ -+ char uriName[1024]; /* Unquoted fullName for URI */ -+#ifdef HAVE_DNSSD -+ int fd; /* Main file descriptor */ -+ fd_set input; /* Input set for select() */ -+ struct timeval timeout; /* Timeout for select() */ - DNSServiceRef main_ref, /* Main service reference */ - fax_ipp_ref, /* IPP fax service reference */ - ipp_ref, /* IPP service reference */ -@@ -138,12 +285,11 @@ main(int argc, /* I - Number of comm - pdl_datastream_ref, /* AppSocket service reference */ - printer_ref, /* LPD service reference */ - riousbprint_ref; /* Remote IO service reference */ -- int fd; /* Main file descriptor */ -- fd_set input; /* Input set for select() */ -- struct timeval timeout; /* Timeout for select() */ -- cups_array_t *devices; /* Device array */ -- cups_device_t *device; /* Current device */ -- char uriName[1024]; /* Unquoted fullName for URI */ -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ AvahiClient *client; -+ int error; -+#endif /* HAVE_AVAHI */ - #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) - struct sigaction action; /* Actions for POSIX signals */ - #endif /* HAVE_SIGACTION && !HAVE_SIGSET */ -@@ -203,6 +349,49 @@ main(int argc, /* I - Number of comm - * Browse for different kinds of printers... - */ - -+#ifdef HAVE_AVAHI -+ if ((simple_poll = avahi_simple_poll_new ()) == NULL) -+ { -+ perror ("ERROR: Unable to create avahi simple poll object"); -+ return (1); -+ } -+ -+ client = avahi_client_new (avahi_simple_poll_get (simple_poll), -+ 0, avahi_client_callback, NULL, &error); -+ if (!client) -+ { -+ perror ("DEBUG: Unable to create avahi client"); -+ return (0); -+ } -+ -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_fax-ipp._tcp", NULL, 0, -+ avahi_browse_callback, devices); -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_ipp._tcp", NULL, 0, -+ avahi_browse_callback, devices); -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_ipp-tls._tcp", NULL, 0, -+ avahi_browse_callback, devices); -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_pdl-datastream._tcp", -+ NULL, 0, -+ avahi_browse_callback, -+ devices); -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_printer._tcp", NULL, 0, -+ avahi_browse_callback, devices); -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_riousbprint._tcp", NULL, 0, -+ avahi_browse_callback, devices); -+#endif /* HAVE_AVAHI */ -+#ifdef HAVE_DNSSD - if (DNSServiceCreateConnection(&main_ref) != kDNSServiceErr_NoError) - { - perror("ERROR: Unable to create service connection"); -@@ -263,6 +452,7 @@ main(int argc, /* I - Number of comm - riousbprint_ref = main_ref; - DNSServiceBrowse(&riousbprint_ref, kDNSServiceFlagsShareConnection, 0, - "_riousbprint._tcp", NULL, browse_callback, devices); -+#endif /* HAVE_DNSSD */ - - /* - * Loop until we are killed... -@@ -270,6 +460,9 @@ main(int argc, /* I - Number of comm - - while (!job_canceled) - { -+ int announce = 0; -+ -+#ifdef HAVE_DNSSD - FD_ZERO(&input); - FD_SET(fd, &input); - -@@ -289,11 +482,35 @@ main(int argc, /* I - Number of comm - } - else - { -+ announce = 1; -+ } -+#else /* HAVE_AVAHI */ -+ int r; -+ avahi_got_callback = 0; -+ r = avahi_simple_poll_iterate (simple_poll, 1); -+ if (r != 0 && r != EINTR) -+ { -+ /* -+ * We've been told to exit the loop. Perhaps the connection to -+ * avahi failed. -+ */ -+ -+ break; -+ } -+ -+ if (avahi_got_callback) -+ announce = 1; -+#endif /* HAVE_DNSSD */ -+ -+ if (announce) -+ { - /* - * Announce any devices we've found... - */ - -+#ifdef HAVE_DNSSD - DNSServiceErrorType status; /* DNS query status */ -+#endif /* HAVE_DNSSD */ - cups_device_t *best; /* Best matching device */ - char device_uri[1024]; /* Device URI */ - int count; /* Number of queries */ -@@ -307,6 +524,7 @@ main(int argc, /* I - Number of comm - if (device->sent) - sent ++; - -+#ifdef HAVE_DNSSD - if (device->ref) - count ++; - -@@ -338,14 +556,23 @@ main(int argc, /* I - Number of comm - count ++; - } - } -- else if (!device->sent) -+ else -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ if (!device->resolved) -+ continue; -+ else -+#endif /* HAVE_AVAHI */ -+ if (!device->sent) - { -+#ifdef HAVE_DNSSD - /* - * Got the TXT records, now report the device... - */ - - DNSServiceRefDeallocate(device->ref); - device->ref = 0; -+#endif /* HAVE_DNSSD */ - - if (!best) - best = device; -@@ -406,6 +633,7 @@ main(int argc, /* I - Number of comm - } - - -+#ifdef HAVE_DNSSD - /* - * 'browse_callback()' - Browse devices. - */ -@@ -494,6 +722,7 @@ browse_local_callback( - device->fullName); - device->sent = 1; - } -+#endif /* HAVE_DNSSD */ - - - /* -@@ -574,6 +803,41 @@ exec_backend(char **argv) /* I - Comman - - - /* -+ * 'device_type()' - Get DNS-SD type enumeration from string. -+ */ -+ -+static int -+device_type (const char *regtype) -+{ -+#ifdef HAVE_AVAHI -+ if (!strcmp(regtype, "_ipp._tcp")) -+ return (CUPS_DEVICE_IPP); -+ else if (!strcmp(regtype, "_ipps._tcp") || -+ !strcmp(regtype, "_ipp-tls._tcp")) -+ return (CUPS_DEVICE_IPPS); -+ else if (!strcmp(regtype, "_fax-ipp._tcp")) -+ return (CUPS_DEVICE_FAX_IPP); -+ else if (!strcmp(regtype, "_printer._tcp")) -+ return (CUPS_DEVICE_PDL_DATASTREAM); -+#else -+ if (!strcmp(regtype, "_ipp._tcp.")) -+ return (CUPS_DEVICE_IPP); -+ else if (!strcmp(regtype, "_ipps._tcp.") || -+ !strcmp(regtype, "_ipp-tls._tcp.")) -+ return (CUPS_DEVICE_IPPS); -+ else if (!strcmp(regtype, "_fax-ipp._tcp.")) -+ return (CUPS_DEVICE_FAX_IPP); -+ else if (!strcmp(regtype, "_printer._tcp.")) -+ return (CUPS_DEVICE_PRINTER); -+ else if (!strcmp(regtype, "_pdl-datastream._tcp.")) -+ return (CUPS_DEVICE_PDL_DATASTREAM); -+#endif /* HAVE_AVAHI */ -+ -+ return (CUPS_DEVICE_RIOUSBPRINT); -+} -+ -+ -+/* - * 'get_device()' - Create or update a device. - */ - -@@ -594,20 +858,7 @@ get_device(cups_array_t *devices, /* I - - */ - - key.name = (char *)serviceName; -- -- if (!strcmp(regtype, "_ipp._tcp.")) -- key.type = CUPS_DEVICE_IPP; -- else if (!strcmp(regtype, "_ipps._tcp.") || -- !strcmp(regtype, "_ipp-tls._tcp.")) -- key.type = CUPS_DEVICE_IPPS; -- else if (!strcmp(regtype, "_fax-ipp._tcp.")) -- key.type = CUPS_DEVICE_FAX_IPP; -- else if (!strcmp(regtype, "_printer._tcp.")) -- key.type = CUPS_DEVICE_PRINTER; -- else if (!strcmp(regtype, "_pdl-datastream._tcp.")) -- key.type = CUPS_DEVICE_PDL_DATASTREAM; -- else -- key.type = CUPS_DEVICE_RIOUSBPRINT; -+ key.type = device_type (regtype); - - for (device = cupsArrayFind(devices, &key); - device; -@@ -627,8 +878,14 @@ get_device(cups_array_t *devices, /* I - - free(device->domain); - device->domain = strdup(replyDomain); - -+#ifdef HAVE_DNSSD - DNSServiceConstructFullName(fullName, device->name, regtype, - replyDomain); -+#else /* HAVE_AVAHI */ -+ avahi_service_name_join (fullName, kDNSServiceMaxDomainName, -+ serviceName, regtype, replyDomain); -+#endif /* HAVE_DNSSD */ -+ - free(device->fullName); - device->fullName = strdup(fullName); - } -@@ -648,6 +905,9 @@ get_device(cups_array_t *devices, /* I - - device->domain = strdup(replyDomain); - device->type = key.type; - device->priority = 50; -+#ifdef HAVE_AVAHI -+ device->resolved = 0; -+#endif /* HAVE_AVAHI */ - - cupsArrayAdd(devices, device); - -@@ -655,13 +915,20 @@ get_device(cups_array_t *devices, /* I - - * Set the "full name" of this service, which is used for queries... - */ - -+#ifdef HAVE_DNSSD - DNSServiceConstructFullName(fullName, serviceName, regtype, replyDomain); -+#else /* HAVE_AVAHI */ -+ avahi_service_name_join (fullName, kDNSServiceMaxDomainName, -+ serviceName, regtype, replyDomain); -+#endif /* HAVE_DNSSD */ -+ - device->fullName = strdup(fullName); - - return (device); - } - - -+#ifdef HAVE_DNSSD - /* - * 'query_callback()' - Process query data. - */ -@@ -685,7 +952,7 @@ query_callback( - *ptr; /* Pointer into string */ - cups_device_t dkey, /* Search key */ - *device; /* Device */ -- -+ cups_txt_records_t txt; - - fprintf(stderr, "DEBUG2: query_callback(sdRef=%p, flags=%x, " - "interfaceIndex=%d, errorCode=%d, fullName=\"%s\", " -@@ -719,94 +986,233 @@ query_callback( - if ((ptr = strstr(name, "._")) != NULL) - *ptr = '\0'; - -- if (strstr(fullName, "_ipp._tcp.")) -- dkey.type = CUPS_DEVICE_IPP; -- else if (strstr(fullName, "_ipps._tcp.") || -- strstr(fullName, "_ipp-tls._tcp.")) -- dkey.type = CUPS_DEVICE_IPPS; -- else if (strstr(fullName, "_fax-ipp._tcp.")) -- dkey.type = CUPS_DEVICE_FAX_IPP; -- else if (strstr(fullName, "_printer._tcp.")) -- dkey.type = CUPS_DEVICE_PRINTER; -- else if (strstr(fullName, "_pdl-datastream._tcp.")) -- dkey.type = CUPS_DEVICE_PDL_DATASTREAM; -+ dkey.type = device_type (fullName); -+ -+ txt.data = rdata; -+ txt.dataend = rdata + rdlen; -+ device = find_device ((cups_array_t *) context, &txt, &dkey); -+ if (!device) -+ fprintf(stderr, "DEBUG: Ignoring TXT record for \"%s\"...\n", fullName); -+} -+#endif /* HAVE_DNSSD */ -+ -+ -+#ifdef HAVE_AVAHI -+/* -+ * 'avahi_client_callback()' - Avahi client callback function. -+ */ -+ -+static void -+avahi_client_callback(AvahiClient *client, -+ AvahiClientState state, -+ void *context) -+{ -+ /* -+ * If the connection drops, quit. -+ */ -+ -+ if (state == AVAHI_CLIENT_FAILURE) -+ { -+ fprintf (stderr, "ERROR: Avahi connection failed\n"); -+ avahi_simple_poll_quit (simple_poll); -+ } -+} -+ -+ -+/* -+ * 'avahi_query_callback()' - Avahi query callback function. -+ */ -+ -+static void -+avahi_query_callback(AvahiServiceResolver *resolver, -+ AvahiIfIndex interface, -+ AvahiProtocol protocol, -+ AvahiResolverEvent event, -+ const char *name, -+ const char *type, -+ const char *domain, -+ const char *host_name, -+ const AvahiAddress *address, -+ uint16_t port, -+ AvahiStringList *txt, -+ AvahiLookupResultFlags flags, -+ void *context) -+{ -+ AvahiClient *client; -+ cups_device_t key, -+ *device; -+ char uqname[1024], -+ *ptr; -+ cups_txt_records_t txtr; -+ -+ client = avahi_service_resolver_get_client (resolver); -+ if (event != AVAHI_RESOLVER_FOUND) -+ { -+ if (event == AVAHI_RESOLVER_FAILURE) -+ { -+ fprintf (stderr, "ERROR: %s\n", -+ avahi_strerror (avahi_client_errno (client))); -+ } -+ -+ avahi_service_resolver_free (resolver); -+ return; -+ } -+ -+ /* -+ * Set search key for device. -+ */ -+ -+ key.name = uqname; -+ unquote (uqname, name, sizeof (uqname)); -+ if ((ptr = strstr(name, "._")) != NULL) -+ *ptr = '\0'; -+ -+ key.domain = (char *) domain; -+ key.type = device_type (type); -+ -+ /* -+ * Find the device and the the TXT information. -+ */ -+ -+ txtr.txt = txt; -+ device = find_device ((cups_array_t *) context, &txtr, &key); -+ if (device) -+ { -+ /* -+ * Let the main loop know to announce the device. -+ */ -+ -+ device->resolved = 1; -+ avahi_got_callback = 1; -+ } - else -- dkey.type = CUPS_DEVICE_RIOUSBPRINT; -+ fprintf (stderr, "DEBUG: Ignoring TXT record for \"%s\"...\n", name); - -- for (device = cupsArrayFind(devices, &dkey); -+ avahi_service_resolver_free (resolver); -+} -+ -+ -+/* -+ * 'avahi_browse_callback()' - Avahi browse callback function. -+ */ -+ -+static void -+avahi_browse_callback(AvahiServiceBrowser *browser, -+ AvahiIfIndex interface, -+ AvahiProtocol protocol, -+ AvahiBrowserEvent event, -+ const char *name, -+ const char *type, -+ const char *domain, -+ AvahiLookupResultFlags flags, -+ void *context) -+{ -+ AvahiClient *client = avahi_service_browser_get_client (browser); -+ -+ switch (event) -+ { -+ case AVAHI_BROWSER_FAILURE: -+ fprintf (stderr, "ERROR: %s\n", -+ avahi_strerror (avahi_client_errno (client))); -+ avahi_simple_poll_quit (simple_poll); -+ return; -+ -+ case AVAHI_BROWSER_NEW: -+ /* -+ * This object is new on the network. -+ */ -+ -+ if (flags & AVAHI_LOOKUP_RESULT_LOCAL) -+ { -+ /* -+ * This comes from the local machine so ignore it. -+ */ -+ -+ fprintf (stderr, "DEBUG: ignoring local service %s\n", name); -+ } -+ else -+ { -+ /* -+ * Create a device entry for it if it doesn't yet exist. -+ */ -+ -+ get_device ((cups_array_t *)context, name, type, domain); -+ -+ /* -+ * Now look for a TXT entry. -+ */ -+ -+ if (avahi_service_resolver_new (client, interface, protocol, -+ name, type, domain, -+ AVAHI_PROTO_UNSPEC, 0, -+ avahi_query_callback, context) == NULL) -+ { -+ fprintf (stderr, "ERROR: failed to resolve service %s: %s\n", -+ name, avahi_strerror (avahi_client_errno (client))); -+ } -+ } -+ -+ break; -+ -+ case AVAHI_BROWSER_REMOVE: -+ case AVAHI_BROWSER_ALL_FOR_NOW: -+ case AVAHI_BROWSER_CACHE_EXHAUSTED: -+ break; -+ } -+} -+#endif /* HAVE_AVAHI */ -+ -+ -+/* -+ * 'find_device()' - Find a device from its name and domain. -+ */ -+ -+static cups_device_t * -+find_device (cups_array_t *devices, -+ cups_txt_records_t *txt, -+ cups_device_t *dkey) -+{ -+ cups_device_t *device; -+ char *ptr; -+ -+ for (device = cupsArrayFind(devices, dkey); - device; - device = cupsArrayNext(devices)) - { -- if (_cups_strcasecmp(device->name, dkey.name) || -- _cups_strcasecmp(device->domain, dkey.domain)) -+ if (_cups_strcasecmp(device->name, dkey->name) || -+ _cups_strcasecmp(device->domain, dkey->domain)) - { - device = NULL; - break; - } -- else if (device->type == dkey.type) -+ else if (device->type == dkey->type) - { - /* - * Found it, pull out the priority and make and model from the TXT - * record and save it... - */ - -- const uint8_t *data, /* Pointer into data */ -- *datanext, /* Next key/value pair */ -- *dataend; /* End of entire TXT record */ -- uint8_t datalen; /* Length of current key/value pair */ -- char key[256], /* Key string */ -- value[256], /* Value string */ -- make_and_model[512], -+ char make_and_model[512], - /* Manufacturer and model */ - model[256], /* Model */ -- device_id[2048];/* 1284 device ID */ -- -+ device_id[2048]; /* 1284 device ID */ - - device_id[0] = '\0'; - make_and_model[0] = '\0'; - - strcpy(model, "Unknown"); - -- for (data = rdata, dataend = data + rdlen; -- data < dataend; -- data = datanext) -+ for (;;) - { -- /* -- * Read a key/value pair starting with an 8-bit length. Since the -- * length is 8 bits and the size of the key/value buffers is 256, we -- * don't need to check for overflow... -- */ -- -- datalen = *data++; -- -- if (!datalen || (data + datalen) > dataend) -- break; -- -- datanext = data + datalen; -- -- for (ptr = key; data < datanext && *data != '='; data ++) -- *ptr++ = *data; -- *ptr = '\0'; -+ char *key; -+ char *value; - -- if (data < datanext && *data == '=') -- { -- data ++; -- -- if (data < datanext) -- memcpy(value, data, datanext - data); -- value[datanext - data] = '\0'; -+ if (parse_txt_record_pair (txt)) -+ goto next; - -- fprintf(stderr, "DEBUG2: query_callback: \"%s=%s\".\n", -- key, value); -- } -- else -- { -- fprintf(stderr, "DEBUG2: query_callback: \"%s\" with no value.\n", -- key); -- continue; -- } -- -- if (!_cups_strncasecmp(key, "usb_", 4)) -+ key = txt->key; -+ value = txt->value; -+ if (!strncasecmp(key, "usb_", 4)) - { - /* - * Add USB device ID information... -@@ -861,6 +1267,10 @@ query_callback( - if (device->type == CUPS_DEVICE_PRINTER) - device->sent = 1; - } -+ -+ next: -+ if (next_txt_record (txt) == NULL) -+ break; - } - - if (device->device_id) -@@ -917,11 +1327,9 @@ query_callback( - } - } - -- if (!device) -- fprintf(stderr, "DEBUG: Ignoring TXT record for \"%s\"...\n", fullName); -+ return device; - } - -- - /* - * 'sigterm_handler()' - Handle termination signals... - */ -diff -up cups-1.5.3/cups/http-support.c.avahi-2-backend cups-1.5.3/cups/http-support.c ---- cups-1.5.3/cups/http-support.c.avahi-2-backend 2012-02-15 02:06:12.000000000 +0100 -+++ cups-1.5.3/cups/http-support.c 2012-05-15 17:04:51.045944634 +0200 -@@ -43,6 +43,10 @@ - * http_copy_decode() - Copy and decode a URI. - * http_copy_encode() - Copy and encode a URI. - * http_resolve_cb() - Build a device URI for the given service name. -+ * avahi_resolve_uri_client_cb() -+ * - Avahi client callback for resolving URI. -+ * avahi_resolve_uri_resolver_cb() -+ * - Avahi resolver callback for resolving URI. - */ - - /* -@@ -60,6 +64,11 @@ - # include <sys/select.h> - # endif /* WIN32 */ - #endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+# include <avahi-client/client.h> -+# include <avahi-client/lookup.h> -+# include <avahi-common/simple-watch.h> -+#endif /* HAVE_AVAHI */ - - - /* -@@ -127,6 +136,24 @@ static void DNSSD_API http_resolve_cb(DN - void *context); - #endif /* HAVE_DNSSD */ - -+#ifdef HAVE_AVAHI -+static void avahi_resolve_uri_client_cb(AvahiClient *client, -+ AvahiClientState state, -+ void *simple_poll); -+static void avahi_resolve_uri_resolver_cb(AvahiServiceResolver *resolver, -+ AvahiIfIndex interface, -+ AvahiProtocol protocol, -+ AvahiResolverEvent event, -+ const char *name, -+ const char *type, -+ const char *domain, -+ const char *host_name, -+ const AvahiAddress *address, -+ uint16_t port, -+ AvahiStringList *txt, -+ AvahiLookupResultFlags flags, -+ void *context); -+#endif /* HAVE_AVAHI */ - - /* - * 'httpAssembleURI()' - Assemble a uniform resource identifier from its -@@ -1434,6 +1461,9 @@ _httpResolveURI( - - if (strstr(hostname, "._tcp")) - { -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) -+ char *regtype, /* Pointer to type in hostname */ -+ *domain; /* Pointer to domain in hostname */ - #ifdef HAVE_DNSSD - # ifdef WIN32 - # pragma comment(lib, "dnssd.lib") -@@ -1452,6 +1482,17 @@ _httpResolveURI( - fd_set input_set; /* Input set for select() */ - struct timeval stimeout; /* Timeout value for select() */ - #endif /* HAVE_POLL */ -+#else /* HAVE_AVAHI */ -+ AvahiSimplePoll *simple_poll; -+ AvahiClient *client; -+ int error; -+ struct -+ { -+ AvahiSimplePoll *poll; -+ _http_uribuf_t uribuf; -+ } user_data; -+#endif /* HAVE_DNSSD */ -+ - - if (options & _HTTP_RESOLVE_STDERR) - fprintf(stderr, "DEBUG: Resolving \"%s\"...\n", hostname); -@@ -1488,9 +1529,16 @@ _httpResolveURI( - if (domain) - *domain++ = '\0'; - -+#ifdef HAVE_DNSSD - uribuf.buffer = resolved_uri; - uribuf.bufsize = resolved_size; - uribuf.options = options; -+#else -+ user_data.uribuf.buffer = resolved_uri; -+ user_data.uribuf.bufsize = resolved_size; -+ user_data.uribuf.options = options; -+#endif -+ - resolved_uri[0] = '\0'; - - DEBUG_printf(("6_httpResolveURI: Resolving hostname=\"%s\", regtype=\"%s\", " -@@ -1504,6 +1552,7 @@ _httpResolveURI( - - uri = NULL; - -+#ifdef HAVE_DNSSD - if (DNSServiceCreateConnection(&ref) == kDNSServiceErr_NoError) - { - localref = ref; -@@ -1611,6 +1660,36 @@ _httpResolveURI( - - DNSServiceRefDeallocate(ref); - } -+#else /* HAVE_AVAHI */ -+ if ((simple_poll = avahi_simple_poll_new ()) != NULL) -+ { -+ if ((client = avahi_client_new (avahi_simple_poll_get (simple_poll), -+ 0, avahi_resolve_uri_client_cb, -+ &simple_poll, &error)) != NULL) -+ { -+ user_data.poll = simple_poll; -+ if (avahi_service_resolver_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, hostname, -+ regtype, domain, AVAHI_PROTO_UNSPEC, 0, -+ avahi_resolve_uri_resolver_cb, -+ &user_data) != NULL) -+ { -+ avahi_simple_poll_loop (simple_poll); -+ -+ /* -+ * Collect the result. -+ */ -+ -+ if (resolved_uri[0]) -+ uri = resolved_uri; -+ } -+ -+ avahi_client_free (client); -+ } -+ -+ avahi_simple_poll_free (simple_poll); -+ } -+#endif /* HAVE_DNSSD */ - - if (options & _HTTP_RESOLVE_STDERR) - { -@@ -1622,13 +1701,13 @@ _httpResolveURI( - fputs("STATE: -connecting-to-device,offline-report\n", stderr); - } - --#else -+#else /* HAVE_DNSSD || HAVE_AVAHI */ - /* - * No DNS-SD support... - */ - - uri = NULL; --#endif /* HAVE_DNSSD */ -+#endif /* HAVE_DNSSD || HAVE_AVAHI */ - - if ((options & _HTTP_RESOLVE_STDERR) && !uri) - _cupsLangPrintFilter(stderr, "ERROR", _("Unable to find printer.")); -@@ -1916,6 +1995,115 @@ http_resolve_cb( - } - #endif /* HAVE_DNSSD */ - -+#ifdef HAVE_AVAHI -+/* -+ * 'avahi_resolve_uri_client_cb()' - Avahi client callback for resolving URI. -+ */ -+ -+static void -+avahi_resolve_uri_client_cb (AvahiClient *client, -+ AvahiClientState state, -+ void *simple_poll) -+{ -+ DEBUG_printf(("avahi_resolve_uri_client_callback(client=%p, state=%d, " -+ "simple_poll=%p)\n", client, state, simple_poll)); -+ -+ /* -+ * If the connection drops, quit. -+ */ -+ -+ if (state == AVAHI_CLIENT_FAILURE) -+ avahi_simple_poll_quit (simple_poll); -+} -+ -+ -+/* -+ * 'avahi_resolve_uri_resolver_cb()' - Avahi resolver callback for resolving -+ * URI. -+ */ -+ -+static void -+avahi_resolve_uri_resolver_cb (AvahiServiceResolver *resolver, -+ AvahiIfIndex interface, -+ AvahiProtocol protocol, -+ AvahiResolverEvent event, -+ const char *name, -+ const char *type, -+ const char *domain, -+ const char *host_name, -+ const AvahiAddress *address, -+ uint16_t port, -+ AvahiStringList *txt, -+ AvahiLookupResultFlags flags, -+ void *context) -+{ -+ const char *scheme; /* URI scheme */ -+ char rp[256]; /* Remote printer */ -+ AvahiStringList *pair; -+ char *value; -+ size_t valueLen = 0; -+ char addr[AVAHI_ADDRESS_STR_MAX]; -+ struct -+ { -+ AvahiSimplePoll *poll; -+ _http_uribuf_t uribuf; -+ } *poll_uribuf = context; -+ -+ DEBUG_printf(("avahi_resolve_uri_resolver_callback(resolver=%p, " -+ "interface=%d, protocol=%d, event=%d, name=\"%s\", " -+ "type=\"%s\", domain=\"%s\", host_name=\"%s\", address=%p, " -+ "port=%d, txt=%p, flags=%d, context=%p)\n", -+ resolver, interface, protocol, event, name, type, domain, -+ host_name, address, port, txt, flags, context)); -+ -+ if (event != AVAHI_RESOLVER_FOUND) -+ { -+ avahi_service_resolver_free (resolver); -+ avahi_simple_poll_quit (poll_uribuf->poll); -+ return; -+ } -+ -+ /* -+ * Figure out the scheme from the full name... -+ */ -+ -+ if (strstr(type, "_ipp.")) -+ scheme = "ipp"; -+ else if (strstr(type, "_printer.")) -+ scheme = "lpd"; -+ else if (strstr(type, "_pdl-datastream.")) -+ scheme = "socket"; -+ else -+ scheme = "riousbprint"; -+ -+ /* -+ * Extract the "remote printer key from the TXT record... -+ */ -+ -+ if ((pair = avahi_string_list_find (txt, "rp")) != NULL) -+ { -+ avahi_string_list_get_pair (pair, NULL, &value, &valueLen); -+ rp[0] = '/'; -+ memcpy (rp + 1, value, valueLen); -+ rp[valueLen + 1] = '\0'; -+ } -+ else -+ rp[0] = '\0'; -+ -+ /* -+ * Assemble the final device URI... -+ */ -+ -+ avahi_address_snprint (addr, AVAHI_ADDRESS_STR_MAX, address); -+ httpAssembleURI(HTTP_URI_CODING_ALL, poll_uribuf->uribuf.buffer, -+ poll_uribuf->uribuf.bufsize, scheme, NULL, -+ addr, port, rp); -+ DEBUG_printf(("avahi_resolve_uri_resolver_callback: Resolved URI is \"%s\"\n", -+ poll_uribuf->uribuf.buffer)); -+ avahi_simple_poll_quit (poll_uribuf->poll); -+} -+#endif /* HAVE_AVAHI */ -+ - - /* - * End of "$Id: http-support.c 10284 2012-02-15 01:06:12Z mike $". diff --git a/libre/cups-libre/cups-avahi-3-timeouts.patch b/libre/cups-libre/cups-avahi-3-timeouts.patch deleted file mode 100755 index daf852a0f..000000000 --- a/libre/cups-libre/cups-avahi-3-timeouts.patch +++ /dev/null @@ -1,381 +0,0 @@ -diff -up cups-1.5.2/scheduler/cupsd.h.avahi-3-timeouts cups-1.5.2/scheduler/cupsd.h ---- cups-1.5.2/scheduler/cupsd.h.avahi-3-timeouts 2011-05-11 23:17:34.000000000 +0100 -+++ cups-1.5.2/scheduler/cupsd.h 2012-03-14 15:06:36.509476983 +0000 -@@ -140,6 +140,15 @@ extern const char *cups_hstrerror(int); - - typedef void (*cupsd_selfunc_t)(void *data); - -+#ifdef HAVE_AVAHI -+/* -+ * Timeout callback function type... -+ */ -+ -+typedef struct _cupsd_timeout_s cupsd_timeout_t; -+typedef void (*cupsd_timeoutfunc_t)(cupsd_timeout_t *timeout, void *data); -+#endif /* HAVE_AVAHI */ -+ - - /* - * Globals... -@@ -173,6 +182,11 @@ VAR int Launchd VALUE(0); - /* Running from launchd */ - #endif /* HAVE_LAUNCH_H */ - -+#ifdef HAVE_AVAHI -+VAR cups_array_t *Timeouts; /* Timed callbacks for main loop */ -+#endif /* HAVE_AVAHI */ -+ -+ - - /* - * Prototypes... -@@ -242,6 +256,20 @@ extern void cupsdStopSelect(void); - extern void cupsdStartServer(void); - extern void cupsdStopServer(void); - -+#ifdef HAVE_AVAHI -+extern void cupsdInitTimeouts(void); -+extern cupsd_timeout_t *cupsdAddTimeout (const struct timeval *tv, -+ cupsd_timeoutfunc_t cb, -+ void *data); -+extern cupsd_timeout_t *cupsdNextTimeout (long *delay); -+extern void cupsdRunTimeout (cupsd_timeout_t *timeout); -+extern void cupsdUpdateTimeout (cupsd_timeout_t *timeout, -+ const struct timeval *tv); -+extern void cupsdRemoveTimeout (cupsd_timeout_t *timeout); -+#endif /* HAVE_AVAHI */ -+ -+extern int cupsdRemoveFile(const char *filename); -+ - - /* - * End of "$Id: cupsd.h 9766 2011-05-11 22:17:34Z mike $". -diff -up cups-1.5.2/scheduler/main.c.avahi-3-timeouts cups-1.5.2/scheduler/main.c ---- cups-1.5.2/scheduler/main.c.avahi-3-timeouts 2012-03-14 15:04:17.655305548 +0000 -+++ cups-1.5.2/scheduler/main.c 2012-03-14 15:06:36.511476986 +0000 -@@ -146,6 +146,10 @@ main(int argc, /* I - Number of comm - int launchd_idle_exit; - /* Idle exit on select timeout? */ - #endif /* HAVE_LAUNCHD */ -+#ifdef HAVE_AVAHI -+ cupsd_timeout_t *tmo; /* Next scheduled timed callback */ -+ long tmo_delay; /* Time before it must be called */ -+#endif /* HAVE_AVAHI */ - - - #ifdef HAVE_GETEUID -@@ -535,6 +539,14 @@ main(int argc, /* I - Number of comm - - httpInitialize(); - -+#ifdef HAVE_AVAHI -+ /* -+ * Initialize timed callback structures. -+ */ -+ -+ cupsdInitTimeouts(); -+#endif /* HAVE_AVAHI */ -+ - cupsdStartServer(); - - /* -@@ -874,6 +886,16 @@ main(int argc, /* I - Number of comm - } - #endif /* __APPLE__ */ - -+#ifdef HAVE_AVAHI -+ /* -+ * If a timed callback is due, run it. -+ */ -+ -+ tmo = cupsdNextTimeout (&tmo_delay); -+ if (tmo && tmo_delay == 0) -+ cupsdRunTimeout (tmo); -+#endif /* HAVE_AVAHI */ -+ - #ifndef __APPLE__ - /* - * Update the network interfaces once a minute... -@@ -1787,6 +1809,10 @@ select_timeout(int fds) /* I - Number - cupsd_job_t *job; /* Job information */ - cupsd_subscription_t *sub; /* Subscription information */ - const char *why; /* Debugging aid */ -+#ifdef HAVE_AVAHI -+ cupsd_timeout_t *tmo; /* Timed callback */ -+ long tmo_delay; /* Seconds before calling it */ -+#endif /* HAVE_AVAHI */ - - - /* -@@ -1829,6 +1855,19 @@ select_timeout(int fds) /* I - Number - } - #endif /* __APPLE__ */ - -+#ifdef HAVE_AVAHI -+ /* -+ * See if there are any scheduled timed callbacks to run. -+ */ -+ -+ if ((tmo = cupsdNextTimeout(&tmo_delay)) != NULL && -+ (now + tmo_delay) < timeout) -+ { -+ timeout = tmo_delay; -+ why = "run a timed callback"; -+ } -+#endif /* HAVE_AVAHI */ -+ - /* - * Check whether we are accepting new connections... - */ -diff -up cups-1.5.2/scheduler/Makefile.avahi-3-timeouts cups-1.5.2/scheduler/Makefile ---- cups-1.5.2/scheduler/Makefile.avahi-3-timeouts 2012-03-14 15:04:17.685305586 +0000 -+++ cups-1.5.2/scheduler/Makefile 2012-03-14 15:06:36.508476980 +0000 -@@ -39,7 +39,8 @@ CUPSDOBJS = \ - server.o \ - statbuf.o \ - subscriptions.o \ -- sysman.o -+ sysman.o \ -+ timeout.o - LIBOBJS = \ - filter.o \ - mime.o \ -diff -up cups-1.5.2/scheduler/timeout.c.avahi-3-timeouts cups-1.5.2/scheduler/timeout.c ---- cups-1.5.2/scheduler/timeout.c.avahi-3-timeouts 2012-03-14 15:06:36.552477037 +0000 -+++ cups-1.5.2/scheduler/timeout.c 2012-03-14 15:06:36.552477037 +0000 -@@ -0,0 +1,235 @@ -+/* -+ * "$Id$" -+ * -+ * Timeout functions for the Common UNIX Printing System (CUPS). -+ * -+ * Copyright (C) 2010, 2011 Red Hat, Inc. -+ * Authors: -+ * Tim Waugh <twaugh@redhat.com> -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * -+ * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -+ * OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * Contents: -+ * -+ * cupsdInitTimeouts() - Initialise timeout structure. -+ * cupsdAddTimeout() - Add a timed callback. -+ * cupsdNextTimeout() - Find the next enabled timed callback. -+ * cupsdUpdateTimeout() - Adjust the time of a timed callback or disable it. -+ * cupsdRemoveTimeout() - Discard a timed callback. -+ * compare_timeouts() - Compare timed callbacks for array sorting. -+ */ -+ -+#include <config.h> -+ -+#ifdef HAVE_AVAHI /* Applies to entire file... */ -+ -+/* -+ * Include necessary headers... -+ */ -+ -+#include "cupsd.h" -+ -+#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) -+# include <malloc.h> -+#endif /* HAVE_MALLOC_H && HAVE_MALLINFO */ -+ -+#ifdef HAVE_AVAHI -+# include <avahi-common/timeval.h> -+#endif /* HAVE_AVAHI */ -+ -+ -+struct _cupsd_timeout_s -+{ -+ struct timeval when; -+ int enabled; -+ cupsd_timeoutfunc_t callback; -+ void *data; -+}; -+ -+/* -+ * Local functions... -+ */ -+ -+/* -+ * 'compare_timeouts()' - Compare timed callbacks for array sorting. -+ */ -+ -+static int -+compare_addrs (void *p0, void *p1) -+{ -+ if (p0 == p1) -+ return (0); -+ if (p0 < p1) -+ return (-1); -+ return (1); -+} -+ -+static int -+compare_timeouts (cupsd_timeout_t *p0, cupsd_timeout_t *p1) -+{ -+ int addrsdiff = compare_addrs (p0, p1); -+ int tvdiff; -+ -+ if (addrsdiff == 0) -+ return (0); -+ -+ if (!p0->enabled || !p1->enabled) -+ { -+ if (!p0->enabled && !p1->enabled) -+ return (addrsdiff); -+ -+ return (p0->enabled ? -1 : 1); -+ } -+ -+ tvdiff = avahi_timeval_compare (&p0->when, &p1->when); -+ if (tvdiff != 0) -+ return (tvdiff); -+ -+ return (addrsdiff); -+} -+ -+ -+/* -+ * 'cupsdInitTimeouts()' - Initialise timeout structures. -+ */ -+ -+void -+cupsdInitTimeouts(void) -+{ -+ Timeouts = cupsArrayNew ((cups_array_func_t)compare_timeouts, NULL); -+} -+ -+ -+/* -+ * 'cupsdAddTimeout()' - Add a timed callback. -+ */ -+ -+cupsd_timeout_t * /* O - Timeout handle */ -+cupsdAddTimeout(const struct timeval *tv, /* I - Absolute time */ -+ cupsd_timeoutfunc_t cb, /* I - Callback function */ -+ void *data) /* I - User data */ -+{ -+ cupsd_timeout_t *timeout; -+ -+ timeout = malloc (sizeof(cupsd_timeout_t)); -+ if (timeout != NULL) -+ { -+ timeout->enabled = (tv != NULL); -+ if (tv) -+ { -+ timeout->when.tv_sec = tv->tv_sec; -+ timeout->when.tv_usec = tv->tv_usec; -+ } -+ -+ timeout->callback = cb; -+ timeout->data = data; -+ cupsArrayAdd (Timeouts, timeout); -+ } -+ -+ return timeout; -+} -+ -+ -+/* -+ * 'cupsdNextTimeout()' - Find the next enabled timed callback. -+ */ -+ -+cupsd_timeout_t * /* O - Next enabled timeout or NULL */ -+cupsdNextTimeout(long *delay) /* O - Seconds before scheduled */ -+{ -+ cupsd_timeout_t *first = cupsArrayFirst (Timeouts); -+ struct timeval curtime; -+ -+ if (first && !first->enabled) -+ first = NULL; -+ -+ if (first && delay) -+ { -+ gettimeofday (&curtime, NULL); -+ if (avahi_timeval_compare (&curtime, &first->when) > 0) -+ { -+ *delay = 0; -+ } else { -+ *delay = 1 + first->when.tv_sec - curtime.tv_sec; -+ if (first->when.tv_usec < curtime.tv_usec) -+ (*delay)--; -+ } -+ } -+ -+ return (first); -+} -+ -+ -+/* -+ * 'cupsdRunTimeout()' - Run a timed callback. -+ */ -+ -+void -+cupsdRunTimeout(cupsd_timeout_t *timeout) /* I - Timeout */ -+{ -+ if (!timeout) -+ return; -+ timeout->enabled = 0; -+ if (!timeout->callback) -+ return; -+ timeout->callback (timeout, timeout->data); -+} -+ -+/* -+ * 'cupsdUpdateTimeout()' - Adjust the time of a timed callback or disable it. -+ */ -+ -+void -+cupsdUpdateTimeout(cupsd_timeout_t *timeout, /* I - Timeout */ -+ const struct timeval *tv) /* I - Absolute time or NULL */ -+{ -+ cupsArrayRemove (Timeouts, timeout); -+ timeout->enabled = (tv != NULL); -+ if (tv) -+ { -+ timeout->when.tv_sec = tv->tv_sec; -+ timeout->when.tv_usec = tv->tv_usec; -+ } -+ cupsArrayAdd (Timeouts, timeout); -+} -+ -+ -+/* -+ * 'cupsdRemoveTimeout()' - Discard a timed callback. -+ */ -+ -+void -+cupsdRemoveTimeout(cupsd_timeout_t *timeout) /* I - Timeout */ -+{ -+ cupsArrayRemove (Timeouts, timeout); -+ free (timeout); -+} -+ -+ -+#endif /* HAVE_AVAHI ... from top of file */ -+ -+/* -+ * End of "$Id$". -+ */ diff --git a/libre/cups-libre/cups-avahi-4-poll.patch b/libre/cups-libre/cups-avahi-4-poll.patch deleted file mode 100755 index d7fa5fd56..000000000 --- a/libre/cups-libre/cups-avahi-4-poll.patch +++ /dev/null @@ -1,529 +0,0 @@ -diff -up cups-1.5.2/scheduler/avahi.c.avahi-4-poll cups-1.5.2/scheduler/avahi.c ---- cups-1.5.2/scheduler/avahi.c.avahi-4-poll 2012-03-14 15:07:29.477542381 +0000 -+++ cups-1.5.2/scheduler/avahi.c 2012-03-14 15:07:29.477542381 +0000 -@@ -0,0 +1,441 @@ -+/* -+ * "$Id$" -+ * -+ * Avahi poll implementation for the CUPS scheduler. -+ * -+ * Copyright (C) 2010, 2011 Red Hat, Inc. -+ * Authors: -+ * Tim Waugh <twaugh@redhat.com> -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * -+ * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -+ * OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * Contents: -+ * -+ * watch_read_cb - Read callback for file descriptor -+ * watch_write_cb - Write callback for file descriptor -+ * watched_fd_add_select() - Call cupsdAddSelect() as needed -+ * watch_new() - Create a new file descriptor watch -+ * watch_free() - Free a file descriptor watch -+ * watch_update() - Update watched events for a file descriptor -+ * watch_get_events() - Get events that happened for a file descriptor -+ * timeout_cb() - Run a timed Avahi callback -+ * timeout_new() - Set a wakeup time -+ * timeout_update() - Update the expiration time for a timeout -+ * timeout_free() - Free a timeout -+ * compare_watched_fds() - Compare watched file descriptors for array sorting -+ * avahi_cups_poll_new() - Create a new Avahi main loop object for CUPS -+ * avahi_cups_poll_free() - Free an Avahi main loop object for CUPS -+ * avahi_cups_poll_get() - Get the abstract poll API structure -+ */ -+ -+#include <config.h> -+ -+#ifdef HAVE_AVAHI /* Applies to entire file... */ -+ -+/* -+ * Include necessary headers... -+ */ -+ -+#include "cupsd.h" -+ -+#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) -+# include <malloc.h> -+#endif /* HAVE_MALLOC_H && HAVE_MALLINFO */ -+ -+#ifdef HAVE_AVAHI -+# include <avahi-common/timeval.h> -+#endif /* HAVE_AVAHI */ -+ -+ -+typedef struct -+{ -+ AvahiCupsPoll *cups_poll; -+ -+ int fd; -+ AvahiWatchEvent occurred; -+ cups_array_t *watches; -+} cupsd_watched_fd_t; -+ -+struct AvahiWatch -+{ -+ cupsd_watched_fd_t *watched_fd; -+ -+ AvahiWatchEvent events; -+ AvahiWatchCallback callback; -+ void *userdata; -+}; -+ -+struct AvahiTimeout -+{ -+ AvahiCupsPoll *cups_poll; -+ AvahiTimeoutCallback callback; -+ void *userdata; -+ cupsd_timeout_t *cupsd_timeout; -+}; -+ -+/* -+ * Local functions... -+ */ -+ -+static AvahiWatch * watch_new(const AvahiPoll *api, -+ int fd, -+ AvahiWatchEvent events, -+ AvahiWatchCallback callback, -+ void *userdata); -+static void watch_free(AvahiWatch *watch); -+static void watch_update(AvahiWatch *watch, -+ AvahiWatchEvent events); -+static AvahiWatchEvent watch_get_events(AvahiWatch *watch); -+ -+ -+/* -+ * 'watch_read_cb' - Read callback for file descriptor -+ */ -+ -+static void -+watch_read_cb (void *userdata) -+{ -+ AvahiWatch *watch; -+ cupsd_watched_fd_t *watched_fd = userdata; -+ watched_fd->occurred |= AVAHI_WATCH_IN; -+ for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches); -+ watch; -+ watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches)) -+ { -+ if (watch->events & watched_fd->occurred) -+ { -+ (watch->callback) (watch, watched_fd->fd, -+ AVAHI_WATCH_IN, watch->userdata); -+ watched_fd->occurred &= ~AVAHI_WATCH_IN; -+ break; -+ } -+ } -+} -+ -+ -+/* -+ * 'watch_write_cb' - Write callback for file descriptor -+ */ -+ -+static void -+watch_write_cb (void *userdata) -+{ -+ AvahiWatch *watch; -+ cupsd_watched_fd_t *watched_fd = userdata; -+ watched_fd->occurred |= AVAHI_WATCH_OUT; -+ for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches); -+ watch; -+ watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches)) -+ { -+ if (watch->events & watched_fd->occurred) -+ { -+ (watch->callback) (watch, watched_fd->fd, -+ AVAHI_WATCH_OUT, watch->userdata); -+ watched_fd->occurred &= ~AVAHI_WATCH_OUT; -+ break; -+ } -+ } -+} -+ -+ -+/* -+ * 'watched_fd_add_select' - Call cupsdAddSelect() as needed -+ */ -+ -+static int /* O - Watches? */ -+watched_fd_add_select (cupsd_watched_fd_t *watched_fd) -+{ -+ AvahiWatch *watch; -+ cupsd_selfunc_t read_cb = NULL, write_cb = NULL; -+ int any_watches = 0; -+ -+ for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches); -+ watch; -+ watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches)) -+ { -+ any_watches = 1; -+ if (watch->events & (AVAHI_WATCH_IN | -+ AVAHI_WATCH_ERR | -+ AVAHI_WATCH_HUP)) -+ { -+ read_cb = (cupsd_selfunc_t)watch_read_cb; -+ if (write_cb != NULL) -+ break; -+ } -+ -+ if (watch->events & AVAHI_WATCH_OUT) -+ { -+ write_cb = (cupsd_selfunc_t)watch_write_cb; -+ if (read_cb != NULL) -+ break; -+ } -+ } -+ -+ if (read_cb || write_cb) -+ cupsdAddSelect (watched_fd->fd, read_cb, write_cb, watched_fd); -+ else -+ cupsdRemoveSelect (watched_fd->fd); -+ -+ return (any_watches); -+} -+ -+/* -+ * 'watch_new' - Create a new file descriptor watch -+ */ -+ -+static AvahiWatch * -+watch_new (const AvahiPoll *api, -+ int fd, -+ AvahiWatchEvent events, -+ AvahiWatchCallback callback, -+ void *userdata) -+{ -+ cupsd_watched_fd_t key, *watched_fd; -+ AvahiCupsPoll *cups_poll = api->userdata; -+ AvahiWatch *watch = malloc(sizeof(AvahiWatch)); -+ if (watch == NULL) -+ return (NULL); -+ -+ watch->events = events; -+ watch->callback = callback; -+ watch->userdata = userdata; -+ -+ key.fd = fd; -+ watched_fd = cupsArrayFind (cups_poll->watched_fds, &key); -+ if (watched_fd == NULL) -+ { -+ watched_fd = malloc(sizeof(cupsd_watched_fd_t)); -+ if (watched_fd == NULL) -+ { -+ free (watch); -+ return (NULL); -+ } -+ -+ watched_fd->fd = fd; -+ watched_fd->occurred = 0; -+ watched_fd->cups_poll = cups_poll; -+ watched_fd->watches = cupsArrayNew (NULL, NULL); -+ cupsArrayAdd (cups_poll->watched_fds, watched_fd); -+ } -+ -+ watch->watched_fd = watched_fd; -+ cupsArrayAdd(watched_fd->watches, watch); -+ watched_fd_add_select (watched_fd); -+ return (watch); -+} -+ -+ -+/* -+ * 'watch_free' - Free a file descriptor watch -+ */ -+ -+static void -+watch_free (AvahiWatch *watch) -+{ -+ cupsd_watched_fd_t *watched_fd = watch->watched_fd; -+ AvahiCupsPoll *cups_poll = watched_fd->cups_poll; -+ -+ cupsArrayRemove (watched_fd->watches, watch); -+ free (watch); -+ -+ if (!watched_fd_add_select (watched_fd)) -+ { -+ /* No more watches */ -+ cupsArrayRemove (cups_poll->watched_fds, watched_fd); -+ free (watched_fd); -+ } -+} -+ -+ -+/* -+ * 'watch_update' - Update watched events for a file descriptor -+ */ -+ -+static void -+watch_update (AvahiWatch *watch, -+ AvahiWatchEvent events) -+{ -+ watch->events = events; -+ watched_fd_add_select (watch->watched_fd); -+} -+ -+ -+/* -+ * 'watch_get_events' - Get events that happened for a file descriptor -+ */ -+ -+static AvahiWatchEvent -+watch_get_events (AvahiWatch *watch) -+{ -+ return (watch->watched_fd->occurred); -+} -+ -+ -+/* -+ * 'timeout_cb()' - Run a timed Avahi callback -+ */ -+ -+static void -+timeout_cb (cupsd_timeout_t *cupsd_timeout, void *userdata) -+{ -+ AvahiTimeout *timeout = userdata; -+ (timeout->callback) (timeout, timeout->userdata); -+} -+ -+ -+/* -+ * 'timeout_new' - Set a wakeup time -+ */ -+ -+static AvahiTimeout * -+timeout_new (const AvahiPoll *api, -+ const struct timeval *tv, -+ AvahiTimeoutCallback callback, -+ void *userdata) -+{ -+ AvahiTimeout *timeout; -+ AvahiCupsPoll *cups_poll = api->userdata; -+ -+ timeout = malloc(sizeof(AvahiTimeout)); -+ if (timeout == NULL) -+ return (NULL); -+ -+ timeout->cups_poll = cups_poll; -+ timeout->callback = callback; -+ timeout->userdata = userdata; -+ timeout->cupsd_timeout = cupsdAddTimeout (tv, -+ (cupsd_timeoutfunc_t)timeout_cb, -+ timeout); -+ cupsArrayAdd (cups_poll->timeouts, timeout); -+ return (timeout); -+} -+ -+ -+/* -+ * 'timeout_update' - Update the expiration time for a timeout -+ */ -+ -+static void -+timeout_update (AvahiTimeout *timeout, -+ const struct timeval *tv) -+{ -+ cupsdUpdateTimeout (timeout->cupsd_timeout, tv); -+} -+ -+ -+/* -+ * ' timeout_free' - Free a timeout -+ */ -+ -+static void -+timeout_free (AvahiTimeout *timeout) -+{ -+ cupsArrayRemove (timeout->cups_poll->timeouts, timeout); -+ cupsdRemoveTimeout (timeout->cupsd_timeout); -+ free (timeout); -+} -+ -+ -+/* -+ * 'compare_watched_fds' - Compare watched file descriptors for array sorting -+ */ -+static int -+compare_watched_fds(cupsd_watched_fd_t *p0, -+ cupsd_watched_fd_t *p1) -+{ -+ /* -+ * Compare by fd (no two elements have the same fd) -+ */ -+ -+ if (p0->fd == p1->fd) -+ return 0; -+ -+ return (p0->fd < p1->fd ? -1 : 1); -+} -+ -+ -+/* -+ * 'avahi_cups_poll_new' - Create a new Avahi main loop object for CUPS -+ */ -+ -+AvahiCupsPoll * -+avahi_cups_poll_new (void) -+{ -+ AvahiCupsPoll *cups_poll = malloc(sizeof(AvahiCupsPoll)); -+ if (cups_poll == NULL) -+ return (NULL); -+ -+ cups_poll->watched_fds = cupsArrayNew ((cups_array_func_t)compare_watched_fds, -+ NULL); -+ cups_poll->timeouts = cupsArrayNew (NULL, NULL); -+ -+ cups_poll->api.userdata = cups_poll; -+ cups_poll->api.watch_new = watch_new; -+ cups_poll->api.watch_free = watch_free; -+ cups_poll->api.watch_update = watch_update; -+ cups_poll->api.watch_get_events = watch_get_events; -+ -+ cups_poll->api.timeout_new = timeout_new; -+ cups_poll->api.timeout_update = timeout_update; -+ cups_poll->api.timeout_free = timeout_free; -+ -+ return (cups_poll); -+} -+ -+ -+/* -+ * 'avahi_cups_poll_free' - Free an Avahi main loop object for CUPS -+ */ -+void -+avahi_cups_poll_free (AvahiCupsPoll *cups_poll) -+{ -+ cupsd_watched_fd_t *watched_fd; -+ -+ for (watched_fd = (cupsd_watched_fd_t*)cupsArrayFirst(cups_poll->watched_fds); -+ watched_fd; -+ watched_fd = (cupsd_watched_fd_t*)cupsArrayNext(cups_poll->watched_fds)) -+ cupsArrayClear (watched_fd->watches); -+ -+ cupsArrayClear (cups_poll->watched_fds); -+ cupsArrayClear (cups_poll->timeouts); -+} -+ -+ -+/* -+ * 'avahi_cups_poll_get' - Get the abstract poll API structure -+ */ -+ -+const AvahiPoll * -+avahi_cups_poll_get (AvahiCupsPoll *cups_poll) -+{ -+ return (&cups_poll->api); -+} -+ -+ -+#endif /* HAVE_AVAHI ... from top of file */ -+ -+/* -+ * End of "$Id$". -+ */ -diff -up cups-1.5.2/scheduler/avahi.h.avahi-4-poll cups-1.5.2/scheduler/avahi.h ---- cups-1.5.2/scheduler/avahi.h.avahi-4-poll 2012-03-14 15:07:29.477542381 +0000 -+++ cups-1.5.2/scheduler/avahi.h 2012-03-14 15:07:29.477542381 +0000 -@@ -0,0 +1,69 @@ -+/* -+ * "$Id$" -+ * -+ * Avahi poll implementation for the CUPS scheduler. -+ * -+ * Copyright (C) 2010, 2011 Red Hat, Inc. -+ * Authors: -+ * Tim Waugh <twaugh@redhat.com> -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * -+ * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -+ * OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+#include <config.h> -+ -+#ifdef HAVE_AVAHI -+# include <avahi-client/client.h> -+# include <avahi-client/publish.h> -+#endif /* HAVE_AVAHI */ -+ -+#ifdef HAVE_AUTHORIZATION_H -+# include <Security/Authorization.h> -+#endif /* HAVE_AUTHORIZATION_H */ -+ -+ -+#ifdef HAVE_AVAHI -+typedef struct -+{ -+ AvahiPoll api; -+ cups_array_t *watched_fds; -+ cups_array_t *timeouts; -+} AvahiCupsPoll; -+#endif /* HAVE_AVAHI */ -+ -+/* -+ * Prototypes... -+ */ -+ -+#ifdef HAVE_AVAHI -+extern AvahiCupsPoll * avahi_cups_poll_new(void); -+extern void avahi_cups_poll_free(AvahiCupsPoll *cups_poll); -+extern const AvahiPoll *avahi_cups_poll_get(AvahiCupsPoll *cups_poll); -+#endif /* HAVE_AVAHI */ -+ -+ -+/* -+ * End of "$Id$". -+ */ -diff -up cups-1.5.2/scheduler/Makefile.avahi-4-poll cups-1.5.2/scheduler/Makefile ---- cups-1.5.2/scheduler/Makefile.avahi-4-poll 2012-03-14 15:06:36.508476980 +0000 -+++ cups-1.5.2/scheduler/Makefile 2012-03-14 15:07:29.476542380 +0000 -@@ -17,6 +17,7 @@ include ../Makedefs - - CUPSDOBJS = \ - auth.o \ -+ avahi.o \ - banners.o \ - cert.o \ - classes.o \ diff --git a/libre/cups-libre/cups-avahi-5-services.patch b/libre/cups-libre/cups-avahi-5-services.patch deleted file mode 100755 index 820b3c32b..000000000 --- a/libre/cups-libre/cups-avahi-5-services.patch +++ /dev/null @@ -1,1272 +0,0 @@ -diff -up cups-1.5.2/cgi-bin/admin.c.avahi-5-services cups-1.5.2/cgi-bin/admin.c ---- cups-1.5.2/cgi-bin/admin.c.avahi-5-services 2011-08-17 22:01:53.000000000 +0100 -+++ cups-1.5.2/cgi-bin/admin.c 2012-03-14 15:08:25.701611799 +0000 -@@ -1643,7 +1643,7 @@ do_config_server(http_t *http) /* I - H - else - local_protocols[0] = '\0'; - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - if (cgiGetVariable("BROWSE_LOCAL_DNSSD")) - { - if (local_protocols[0]) -@@ -1651,7 +1651,7 @@ do_config_server(http_t *http) /* I - H - else - strcat(local_protocols, "dnssd"); - } --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - #ifdef HAVE_LDAP - if (cgiGetVariable("BROWSE_LOCAL_LDAP")) -@@ -2718,9 +2718,9 @@ do_menu(http_t *http) /* I - HTTP conn - #endif /* HAVE_GSSAPI */ - cgiSetVariable("KERBEROS", ""); - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - cgiSetVariable("HAVE_DNSSD", "1"); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - #ifdef HAVE_LDAP - cgiSetVariable("HAVE_LDAP", "1"); -diff -up cups-1.5.2/scheduler/avahi.h.avahi-5-services cups-1.5.2/scheduler/avahi.h ---- cups-1.5.2/scheduler/avahi.h.avahi-5-services 2012-03-14 15:07:29.477542381 +0000 -+++ cups-1.5.2/scheduler/avahi.h 2012-03-14 15:08:25.701611799 +0000 -@@ -3,7 +3,7 @@ - * - * Avahi poll implementation for the CUPS scheduler. - * -- * Copyright (C) 2010, 2011 Red Hat, Inc. -+ * Copyright (C) 2010, 2011, 2012 Red Hat, Inc. - * Authors: - * Tim Waugh <twaugh@redhat.com> - * -@@ -32,37 +32,40 @@ - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - --#include <config.h> -+#ifndef _CUPS_AVAHI_H_ -+# define _CUPS_AVAHI_H_ - --#ifdef HAVE_AVAHI --# include <avahi-client/client.h> --# include <avahi-client/publish.h> --#endif /* HAVE_AVAHI */ -+/* -+ * Include necessary headers... -+ */ - --#ifdef HAVE_AUTHORIZATION_H --# include <Security/Authorization.h> --#endif /* HAVE_AUTHORIZATION_H */ -+# include <config.h> - -+# ifdef HAVE_AVAHI -+# include <avahi-client/client.h> -+# include <avahi-client/publish.h> -+# endif /* HAVE_AVAHI */ - --#ifdef HAVE_AVAHI -+# ifdef HAVE_AVAHI - typedef struct - { - AvahiPoll api; - cups_array_t *watched_fds; - cups_array_t *timeouts; - } AvahiCupsPoll; --#endif /* HAVE_AVAHI */ -+# endif /* HAVE_AVAHI */ - - /* - * Prototypes... - */ - --#ifdef HAVE_AVAHI -+# ifdef HAVE_AVAHI - extern AvahiCupsPoll * avahi_cups_poll_new(void); - extern void avahi_cups_poll_free(AvahiCupsPoll *cups_poll); - extern const AvahiPoll *avahi_cups_poll_get(AvahiCupsPoll *cups_poll); --#endif /* HAVE_AVAHI */ -+# endif /* HAVE_AVAHI */ - -+#endif /* !_CUPS_AVAHI_H_ */ - - /* - * End of "$Id$". -diff -up cups-1.5.2/scheduler/client.c.avahi-5-services cups-1.5.2/scheduler/client.c ---- cups-1.5.2/scheduler/client.c.avahi-5-services 2012-01-13 23:00:22.000000000 +0000 -+++ cups-1.5.2/scheduler/client.c 2012-03-14 15:08:25.703611797 +0000 -@@ -4989,7 +4989,7 @@ valid_host(cupsd_client_t *con) /* I - - !strncmp(host, "[::1]:", 6)); - } - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - /* - * Check if the hostname is something.local (Bonjour); if so, allow it. - */ -@@ -4998,7 +4998,7 @@ valid_host(cupsd_client_t *con) /* I - - (!_cups_strcasecmp(end, ".local") || !_cups_strncasecmp(end, ".local:", 7) || - !_cups_strcasecmp(end, ".local.") || !_cups_strncasecmp(end, ".local.:", 8))) - return (1); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - /* - * Check if the hostname is an IP address... -diff -up cups-1.5.2/scheduler/conf.c.avahi-5-services cups-1.5.2/scheduler/conf.c ---- cups-1.5.2/scheduler/conf.c.avahi-5-services 2012-03-14 15:04:17.636305526 +0000 -+++ cups-1.5.2/scheduler/conf.c 2012-03-14 15:08:25.706611803 +0000 -@@ -652,7 +652,7 @@ cupsdReadConfiguration(void) - Browsing = CUPS_DEFAULT_BROWSING; - DefaultShared = CUPS_DEFAULT_DEFAULT_SHARED; - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - cupsdSetString(&DNSSDRegType, "_ipp._tcp,_cups"); - #endif /* HAVE_DNSSD */ - -diff -up cups-1.5.2/scheduler/dirsvc.c.avahi-5-services cups-1.5.2/scheduler/dirsvc.c ---- cups-1.5.2/scheduler/dirsvc.c.avahi-5-services 2012-03-14 15:04:17.674305572 +0000 -+++ cups-1.5.2/scheduler/dirsvc.c 2012-03-14 15:08:25.709611806 +0000 -@@ -27,6 +27,7 @@ - * ldap_connect() - Start new LDAP connection - * ldap_reconnect() - Reconnect to LDAP Server - * ldap_disconnect() - Disconnect from LDAP Server -+ * cupsdStartAvahiClient() - Start an Avahi client if needed - * cupsdStartBrowsing() - Start sending and receiving broadcast - * information. - * cupsdStartPolling() - Start polling servers as needed. -@@ -40,11 +41,12 @@ - * dequote() - Remote quotes from a string. - * dnssdAddAlias() - Add a DNS-SD alias name. - * dnssdBuildTxtRecord() - Build a TXT record from printer info. -- * dnssdComparePrinters() - Compare the registered names of two printers. - * dnssdDeregisterPrinter() - Stop sending broadcast information for a - * printer. - * dnssdPackTxtRecord() - Pack an array of key/value pairs into the TXT - * record format. -+ * avahiPackTxtRecord() - Pack an array of key/value pairs into an -+ * AvahiStringList. - * dnssdRegisterCallback() - DNSServiceRegister callback. - * dnssdRegisterPrinter() - Start sending broadcast information for a - * printer or update the broadcast contents. -@@ -83,6 +85,7 @@ - */ - - #include "cupsd.h" -+#include <assert.h> - #include <grp.h> - - #ifdef HAVE_DNSSD -@@ -97,6 +100,17 @@ - # endif /* HAVE_SYSTEMCONFIGURATION */ - # endif /* __APPLE__ */ - #endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+# include <avahi-common/domain.h> -+#endif /* HAVE_AVAHI */ -+ -+ -+#ifdef HAVE_DNSSD -+typedef char *cupsd_txt_record_t; -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+typedef AvahiStringList *cupsd_txt_record_t; -+#endif /* HAVE_AVAHI */ - - - /* -@@ -159,27 +173,38 @@ static void update_polling(void); - static void update_smb(int onoff); - - -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) -+static cupsd_txt_record_t dnssdBuildTxtRecord(int *txt_len, cupsd_printer_t *p, -+ int for_lpd); -+static void dnssdDeregisterPrinter(cupsd_printer_t *p); -+static void dnssdRegisterPrinter(cupsd_printer_t *p); -+static void dnssdStop(void); -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ -+ - #ifdef HAVE_DNSSD - # ifdef HAVE_COREFOUNDATION - static void dnssdAddAlias(const void *key, const void *value, - void *context); - # endif /* HAVE_COREFOUNDATION */ --static char *dnssdBuildTxtRecord(int *txt_len, cupsd_printer_t *p, -- int for_lpd); --static int dnssdComparePrinters(cupsd_printer_t *a, cupsd_printer_t *b); --static void dnssdDeregisterPrinter(cupsd_printer_t *p); --static char *dnssdPackTxtRecord(int *txt_len, char *keyvalue[][2], -- int count); - static void dnssdRegisterCallback(DNSServiceRef sdRef, - DNSServiceFlags flags, - DNSServiceErrorType errorCode, - const char *name, const char *regtype, - const char *domain, void *context); --static void dnssdRegisterPrinter(cupsd_printer_t *p); --static void dnssdStop(void); - static void dnssdUpdate(void); - #endif /* HAVE_DNSSD */ - -+#ifdef HAVE_AVAHI -+static AvahiStringList *avahiPackTxtRecord(char *keyvalue[][2], -+ int count); -+static void avahi_entry_group_cb (AvahiEntryGroup *group, -+ AvahiEntryGroupState state, -+ void *userdata); -+static void avahi_client_cb (AvahiClient *client, -+ AvahiClientState state, -+ void *userdata); -+#endif /* HAVE_AVAHI */ -+ - #ifdef HAVE_LDAP - static const char * const ldap_attrs[] =/* CUPS LDAP attributes */ - { -@@ -283,10 +308,10 @@ cupsdDeregisterPrinter( - ldap_dereg_printer(p); - #endif /* HAVE_LDAP */ - --#ifdef HAVE_DNSSD -- if (removeit && (BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDRef) -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) -+ if (removeit && (BrowseLocalProtocols & BROWSE_DNSSD)) - dnssdDeregisterPrinter(p); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - } - - -@@ -702,10 +727,10 @@ cupsdRegisterPrinter(cupsd_printer_t *p) - slpRegisterPrinter(p); */ - #endif /* HAVE_LIBSLP */ - --#ifdef HAVE_DNSSD -- if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDRef) -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) -+ if ((BrowseLocalProtocols & BROWSE_DNSSD)) - dnssdRegisterPrinter(p); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - } - - -@@ -1419,6 +1444,36 @@ ldap_disconnect(LDAP *ld) /* I - LDAP h - #endif /* HAVE_LDAP */ - - -+#ifdef HAVE_AVAHI -+/* -+ * 'cupsdStartAvahiClient()' - Start an Avahi client if needed -+ */ -+ -+void -+cupsdStartAvahiClient(void) -+{ -+ int error = 0; -+ -+ if (!AvahiCupsClient && !AvahiCupsClientConnecting) -+ { -+ if (!AvahiCupsPollHandle) -+ AvahiCupsPollHandle = avahi_cups_poll_new (); -+ -+ if (AvahiCupsPollHandle) -+ { -+ if (avahi_client_new (avahi_cups_poll_get (AvahiCupsPollHandle), -+ AVAHI_CLIENT_NO_FAIL, -+ avahi_client_cb, NULL, -+ &error) != NULL) -+ AvahiCupsClientConnecting = 1; -+ else -+ cupsdLogMessage (CUPSD_LOG_WARN, "Avahi client failed: %d", error); -+ } -+ } -+} -+#endif /* HAVE_AVAHI */ -+ -+ - /* - * 'cupsdStartBrowsing()' - Start sending and receiving broadcast information. - */ -@@ -1542,13 +1597,16 @@ cupsdStartBrowsing(void) - else - BrowseSocket = -1; - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - if ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_DNSSD) - { -+#ifdef HAVE_DNSSD - DNSServiceErrorType error; /* Error from service creation */ -+#endif /* HAVE_DNSSD */ - cupsd_listener_t *lis; /* Current listening socket */ - - -+#ifdef HAVE_DNSSD - /* - * First create a "master" connection for all registrations... - */ -@@ -1573,6 +1631,7 @@ cupsdStartBrowsing(void) - fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); - - cupsdAddSelect(fd, (cupsd_selfunc_t)dnssdUpdate, NULL, NULL); -+#endif /* HAVE_DNSSD */ - - /* - * Then get the port we use for registrations. If we are not listening -@@ -1598,17 +1657,23 @@ cupsdStartBrowsing(void) - */ - - if (BrowseRemoteProtocols & BROWSE_DNSSD) -- DNSSDPrinters = cupsArrayNew((cups_array_func_t)dnssdComparePrinters, -- NULL); -+ DNSSDPrinters = cupsArrayNew(NULL, NULL); - - /* - * Set the computer name and register the web interface... - */ - - cupsdUpdateDNSSDName(); -+ -+#ifdef HAVE_AVAHI -+ cupsdStartAvahiClient (); -+#endif /* HAVE_AVAHI */ -+ -+#ifdef HAVE_DNSSD - } -- } - #endif /* HAVE_DNSSD */ -+ } -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - #ifdef HAVE_LIBSLP - if ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_SLP) -@@ -1834,10 +1899,10 @@ cupsdStopBrowsing(void) - BrowseSocket = -1; - } - --#ifdef HAVE_DNSSD -- if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDRef) -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) -+ if ((BrowseLocalProtocols & BROWSE_DNSSD)) - dnssdStop(); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - #ifdef HAVE_LIBSLP - if (((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_SLP) && -@@ -1902,7 +1967,7 @@ cupsdStopPolling(void) - } - - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - /* - * 'cupsdUpdateDNSSDName()' - Update the computer name we use for browsing... - */ -@@ -1910,8 +1975,14 @@ cupsdStopPolling(void) - void - cupsdUpdateDNSSDName(void) - { -+#ifdef HAVE_DNSSD - DNSServiceErrorType error; /* Error from service creation */ - char webif[1024]; /* Web interface share name */ -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ int ret; /* Error from service creation */ -+ char webif[AVAHI_LABEL_MAX]; /* Web interface share name */ -+#endif /* HAVE_AVAHI */ - # ifdef HAVE_SYSTEMCONFIGURATION - SCDynamicStoreRef sc; /* Context for dynamic store */ - CFDictionaryRef btmm; /* Back-to-My-Mac domains */ -@@ -2042,6 +2113,7 @@ cupsdUpdateDNSSDName(void) - else - strlcpy(webif, "CUPS Web Interface", sizeof(webif)); - -+#ifdef HAVE_DNSSD - if (WebIFRef) - DNSServiceRefDeallocate(WebIFRef); - -@@ -2054,9 +2126,45 @@ cupsdUpdateDNSSDName(void) - NULL)) != kDNSServiceErr_NoError) - cupsdLogMessage(CUPSD_LOG_ERROR, - "DNS-SD web interface registration failed: %d", error); -+#endif /* HAVE_DNSSD */ -+ -+#ifdef HAVE_AVAHI -+ if (!AvahiCupsClient) -+ /* -+ * Client not yet running. -+ */ -+ return; -+ -+ if (AvahiWebIFGroup) -+ avahi_entry_group_reset (AvahiWebIFGroup); -+ else -+ AvahiWebIFGroup = avahi_entry_group_new (AvahiCupsClient, -+ avahi_entry_group_cb, -+ NULL); -+ -+ if (AvahiWebIFGroup) -+ { -+ ret = avahi_entry_group_add_service (AvahiWebIFGroup, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, /* flags */ -+ webif, /* name */ -+ "_http._tcp", /* type */ -+ NULL, /* domain */ -+ NULL, /* host */ -+ DNSSDPort, /* port */ -+ "path=/", NULL); -+ if (ret == 0) -+ ret = avahi_entry_group_commit (AvahiWebIFGroup); -+ -+ if (ret != 0) -+ cupsdLogMessage (CUPSD_LOG_ERROR, -+ "Avahi web interface registration failed: %d", ret); -+ } -+#endif /* HAVE_AVAHI */ - } - } --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - - #ifdef HAVE_LDAP -@@ -2334,13 +2442,15 @@ dnssdAddAlias(const void *key, /* I - K - "Bad Back to My Mac domain in dynamic store!"); - } - # endif /* HAVE_COREFOUNDATION */ -+#endif /* HAVE_DNSSD */ - - -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - /* - * 'dnssdBuildTxtRecord()' - Build a TXT record from printer info. - */ - --static char * /* O - TXT record */ -+static cupsd_txt_record_t /* O - TXT record */ - dnssdBuildTxtRecord( - int *txt_len, /* O - TXT record length */ - cupsd_printer_t *p, /* I - Printer information */ -@@ -2379,7 +2489,12 @@ dnssdBuildTxtRecord( - keyvalue[i ][0] = "ty"; - keyvalue[i++][1] = p->make_model ? p->make_model : "Unknown"; - -- snprintf(admin_hostname, sizeof(admin_hostname), "%s.local.", DNSSDHostName); -+ snprintf(admin_hostname, sizeof(admin_hostname), -+ "%s.local" -+#ifdef HAVE_DNSSD -+ "." /* terminating dot no good for Avahi */ -+#endif /* HAVE_DNSSD */ -+ , DNSSDHostName); - httpAssembleURIf(HTTP_URI_CODING_ALL, adminurl_str, sizeof(adminurl_str), - "http", NULL, admin_hostname, DNSSDPort, "/%s/%s", - (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", -@@ -2462,19 +2577,12 @@ dnssdBuildTxtRecord( - * Then pack them into a proper txt record... - */ - -+#ifdef HAVE_DNSSD - return (dnssdPackTxtRecord(txt_len, keyvalue, i)); --} -- -- --/* -- * 'dnssdComparePrinters()' - Compare the registered names of two printers. -- */ -- --static int /* O - Result of comparison */ --dnssdComparePrinters(cupsd_printer_t *a,/* I - First printer */ -- cupsd_printer_t *b)/* I - Second printer */ --{ -- return (_cups_strcasecmp(a->reg_name, b->reg_name)); -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ return (avahiPackTxtRecord(keyvalue, i)); -+#endif /* HAVE_AVAHI */ - } - - -@@ -2489,6 +2597,10 @@ dnssdDeregisterPrinter( - { - cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdDeregisterPrinter(%s)", p->name); - -+#ifdef HAVE_DNSSD -+ if (!DNSSDRef) -+ return; -+ - /* - * Closing the socket deregisters the service - */ -@@ -2524,6 +2636,24 @@ dnssdDeregisterPrinter( - free(p->printer_txt); - p->printer_txt = NULL; - } -+#endif /* HAVE_DNSSD */ -+ -+#ifdef HAVE_AVAHI -+ if (p->avahi_group) -+ { -+ avahi_entry_group_reset (p->avahi_group); -+ avahi_entry_group_free (p->avahi_group); -+ p->avahi_group = NULL; -+ -+ if (p->ipp_txt) -+ avahi_string_list_free (p->ipp_txt); -+ -+ if (p->printer_txt) -+ avahi_string_list_free (p->printer_txt); -+ -+ p->ipp_txt = p->printer_txt = NULL; -+ } -+#endif /* HAVE_AVAHI */ - - /* - * Remove the printer from the array of DNS-SD printers, then clear the -@@ -2533,8 +2663,10 @@ dnssdDeregisterPrinter( - cupsArrayRemove(DNSSDPrinters, p); - cupsdClearString(&p->reg_name); - } -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - -+#ifdef HAVE_DNSSD - /* - * 'dnssdPackTxtRecord()' - Pack an array of key/value pairs into the - * TXT record format. -@@ -2644,8 +2776,10 @@ dnssdRegisterCallback( - LastEvent |= CUPSD_EVENT_PRINTER_MODIFIED; - } - } -+#endif /* HAVE_DNSSD */ - - -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - /* - * 'dnssdRegisterPrinter()' - Start sending broadcast information for a printer - * or update the broadcast contents. -@@ -2654,20 +2788,40 @@ dnssdRegisterCallback( - static void - dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */ - { -+#ifdef HAVE_DNSSD - DNSServiceErrorType se; /* dnssd errors */ - char *ipp_txt, /* IPP TXT record buffer */ - *printer_txt, /* LPD TXT record buffer */ -- name[1024], /* Service name */ -- *nameptr; /* Pointer into name */ -+ name[1024]; /* Service name */ - int ipp_len, /* IPP TXT record length */ - printer_len, /* LPD TXT record length */ - printer_port; /* LPD port number */ -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ int ret; /* Error code */ -+ AvahiStringList *ipp_txt, /* IPP TXT record */ -+ *printer_txt; /* LPD TXT record */ -+ char name[AVAHI_LABEL_MAX], /* Service name */ -+ fullsubtype[AVAHI_LABEL_MAX]; /* Full subtype */ -+ char *regtype_copy, /* Writeable copy of reg type */ -+ *subtype, /* Current service sub type */ -+ *nextsubtype; /* Next service sub type */ -+#endif /* HAVE_AVAHI */ -+ char *nameptr; /* Pointer into name */ - const char *regtype; /* Registration type */ - - -+#ifdef HAVE_DNSSD -+ if (!DNSSDRef) -+ return; -+ - cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdRegisterPrinter(%s) %s", p->name, - !p->ipp_ref ? "new" : "update"); -- -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdRegisterPrinter(%s) %s", p->name, -+ !p->avahi_group ? "new" : "update"); -+#endif /* HAVE_AVAHI */ - /* - * If per-printer sharing was just disabled make sure we're not - * registered before returning. -@@ -2686,12 +2840,36 @@ dnssdRegisterPrinter(cupsd_printer_t *p) - if (p->info && strlen(p->info) > 0) - { - if (DNSSDComputerName) -- snprintf(name, sizeof(name), "%s @ %s", p->info, DNSSDComputerName); -+ { -+ /* -+ * Make sure there is room for at least 15 characters of -+ * DNSSDComputerName. -+ */ -+ -+ assert(sizeof(name) >= 15 + 4); -+ nameptr = name + strlcpy(name, p->info, -+ sizeof(name) - 4 - -+ strnlen(DNSSDComputerName, 15)); -+ nameptr += strlcpy(nameptr, " @ ", sizeof(name) - (nameptr - name)); -+ strlcpy(nameptr, DNSSDComputerName, sizeof(name) - (nameptr - name)); -+ } - else - strlcpy(name, p->info, sizeof(name)); - } - else if (DNSSDComputerName) -- snprintf(name, sizeof(name), "%s @ %s", p->name, DNSSDComputerName); -+ { -+ /* -+ * Make sure there is room for at least 15 characters of -+ * DNSSDComputerName. -+ */ -+ -+ assert(sizeof(name) >= 15 + 4); -+ nameptr = name + strlcpy(name, p->info, -+ sizeof(name) - 4 - -+ strnlen(DNSSDComputerName, 15)); -+ nameptr += strlcpy(nameptr, " @ ", sizeof(name) - (nameptr - name)); -+ strlcpy(nameptr, DNSSDComputerName, sizeof(name) - (nameptr - name)); -+ } - else - strlcpy(name, p->name, sizeof(name)); - -@@ -2712,6 +2890,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p) - * Register IPP and (optionally) LPD... - */ - -+#ifdef HAVE_DNSSD - ipp_len = 0; /* anti-compiler-warning-code */ - ipp_txt = dnssdBuildTxtRecord(&ipp_len, p, 0); - -@@ -2884,6 +3063,209 @@ dnssdRegisterPrinter(cupsd_printer_t *p) - - if (printer_txt) - free(printer_txt); -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ if (!AvahiCupsClient) -+ /* -+ * Client not running yet. The client callback will call us again later. -+ */ -+ return; -+ -+ ipp_txt = dnssdBuildTxtRecord(NULL, p, 0); -+ printer_txt = dnssdBuildTxtRecord(NULL, p, 1); -+ regtype = (p->type & CUPS_PRINTER_FAX) ? "_fax-ipp._tcp" : DNSSDRegType; -+ -+ if (p->avahi_group && p->ipp_txt && ipp_txt && -+ !avahi_string_list_equal (p->ipp_txt, ipp_txt)) -+ { -+ /* -+ * Update the existing registration... -+ */ -+ -+ avahi_string_list_free (p->ipp_txt); -+ -+ if (p->printer_txt) -+ avahi_string_list_free (p->printer_txt); -+ -+ /* -+ * Update the service group entry. -+ */ -+ -+ regtype_copy = strdup (regtype); -+ subtype = strchr (regtype_copy, ','); -+ if (subtype) -+ *subtype = '\0'; -+ -+ cupsdLogMessage (CUPSD_LOG_DEBUG, -+ "Updating TXT record for %s (%s)", name, regtype_copy); -+ ret = avahi_entry_group_update_service_txt_strlst (p->avahi_group, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, name, -+ regtype_copy, -+ NULL, ipp_txt); -+ free (regtype_copy); -+ -+ if (ret < 0) -+ goto update_failed; -+ -+ p->ipp_txt = ipp_txt; -+ ipp_txt = NULL; -+ -+ if (BrowseLocalProtocols & BROWSE_LPD) -+ { -+ ret = avahi_entry_group_update_service_txt_strlst (p->avahi_group, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, name, -+ "_printer._tcp", NULL, -+ printer_txt); -+ if (ret < 0) -+ goto update_failed; -+ -+ p->printer_txt = printer_txt; -+ printer_txt = NULL; -+ } -+ -+ ret = avahi_entry_group_commit (p->avahi_group); -+ if (ret < 0) -+ { -+ update_failed: -+ cupsdLogMessage (CUPSD_LOG_ERROR, -+ "Failed to update TXT record for %s: %d", -+ name, ret); -+ avahi_entry_group_reset (p->avahi_group); -+ avahi_entry_group_free (p->avahi_group); -+ p->avahi_group = NULL; -+ ipp_txt = p->ipp_txt; -+ p->ipp_txt = NULL; -+ } -+ } -+ -+ if (!p->avahi_group) -+ { -+ /* -+ * Initial registration. Use the _fax subtype for fax queues... -+ */ -+ -+ p->avahi_group = avahi_entry_group_new (AvahiCupsClient, -+ avahi_entry_group_cb, -+ p); -+ -+ cupsdLogMessage(CUPSD_LOG_DEBUG, -+ "Registering Avahi printer %s with name \"%s\" and " -+ "type \"%s\"", p->name, name, regtype); -+ -+ if (!p->avahi_group) -+ { -+ ret = 0; -+ goto add_failed; -+ } -+ -+ /* -+ * Add each service type (DNSSDRegType may contain several, -+ * separated by commas). -+ */ -+ -+ subtype = regtype_copy = strdup (regtype); -+ while (subtype && *subtype) -+ { -+ nextsubtype = strchr (subtype, ','); -+ if (nextsubtype) -+ *nextsubtype++ = '\0'; -+ -+ if (subtype == regtype_copy) -+ { -+ /* -+ * Main type entry. -+ */ -+ -+ cupsdLogMessage (CUPSD_LOG_DEBUG, -+ "Adding TXT record for %s (%s)", name, regtype_copy); -+ ret = avahi_entry_group_add_service_strlst (p->avahi_group, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, name, regtype_copy, -+ NULL, NULL, -+ DNSSDPort, -+ ipp_txt); -+ } -+ else -+ { -+ /* -+ * Sub-type entry. -+ */ -+ -+ snprintf (fullsubtype, sizeof(fullsubtype), -+ "%s._sub.%s", subtype, regtype_copy); -+ cupsdLogMessage (CUPSD_LOG_DEBUG, -+ "Adding TXT record for %s (%s)", name, fullsubtype); -+ ret = avahi_entry_group_add_service_subtype (p->avahi_group, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, name, -+ regtype_copy, -+ NULL, fullsubtype); -+ } -+ -+ if (ret < 0) -+ { -+ free (regtype_copy); -+ goto add_failed; -+ } -+ -+ subtype = nextsubtype; -+ } -+ -+ free (regtype_copy); -+ p->ipp_txt = ipp_txt; -+ ipp_txt = NULL; -+ -+ if (BrowseLocalProtocols & BROWSE_LPD) -+ { -+ cupsdLogMessage(CUPSD_LOG_DEBUG, -+ "Registering Avahi printer %s with name \"%s\" and " -+ "type \"_printer._tcp\"", p->name, name); -+ -+ ret = avahi_entry_group_add_service_strlst (p->avahi_group, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, name, -+ "_printer._tcp", NULL, NULL, -+ 515, -+ printer_txt); -+ if (ret < 0) -+ goto add_failed; -+ -+ p->printer_txt = printer_txt; -+ printer_txt = NULL; -+ } -+ -+ ret = avahi_entry_group_commit (p->avahi_group); -+ -+ if (ret < 0) -+ { -+ add_failed: -+ cupsdLogMessage (CUPSD_LOG_ERROR, -+ "Failed to add Avahi entry for %s: %d", -+ name, ret); -+ if (p->avahi_group) -+ { -+ avahi_entry_group_reset (p->avahi_group); -+ avahi_entry_group_free (p->avahi_group); -+ p->avahi_group = NULL; -+ } -+ ipp_txt = p->ipp_txt; -+ p->ipp_txt = NULL; -+ } -+ } -+ -+ if (ipp_txt) -+ avahi_string_list_free (ipp_txt); -+ -+ if (printer_txt) -+ avahi_string_list_free (printer_txt); -+#endif /* HAVE_AVAHI */ - } - - -@@ -2896,6 +3278,10 @@ dnssdStop(void) - { - cupsd_printer_t *p; /* Current printer */ - -+#ifdef HAVE_DNSSD -+ if (!DNSSDRef) -+ return; -+#endif /* HAVE_DNSSD */ - - /* - * De-register the individual printers -@@ -2910,12 +3296,23 @@ dnssdStop(void) - * Shutdown the rest of the service refs... - */ - -+#ifdef HAVE_DNSSD - if (WebIFRef) - { - DNSServiceRefDeallocate(WebIFRef); - WebIFRef = NULL; - } -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ if (AvahiWebIFGroup) -+ { -+ avahi_entry_group_reset (AvahiWebIFGroup); -+ avahi_entry_group_free (AvahiWebIFGroup); -+ AvahiWebIFGroup = NULL; -+ } -+#endif /* HAVE_AVAHI */ - -+#ifdef HAVE_DNSSD - if (RemoteRef) - { - DNSServiceRefDeallocate(RemoteRef); -@@ -2926,14 +3323,17 @@ dnssdStop(void) - - DNSServiceRefDeallocate(DNSSDRef); - DNSSDRef = NULL; -+#endif /* HAVE_DNSSD */ - - cupsArrayDelete(DNSSDPrinters); - DNSSDPrinters = NULL; - - DNSSDPort = 0; - } -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - -+#ifdef HAVE_DNSSD - /* - * 'dnssdUpdate()' - Handle DNS-SD queries. - */ -@@ -2955,6 +3355,153 @@ dnssdUpdate(void) - #endif /* HAVE_DNSSD */ - - -+#ifdef HAVE_AVAHI -+/* -+ * 'avahiPackTxtRecord()' - Pack an array of key/value pairs into an -+ * AvahiStringList. -+ */ -+ -+static AvahiStringList * /* O - new string list */ -+avahiPackTxtRecord(char *keyvalue[][2], /* I - Table of key value pairs */ -+ int count) /* I - Number of items in table */ -+{ -+ AvahiStringList *strlst = NULL; -+ char **elements; -+ size_t len; -+ int i = 0; -+ -+ elements = malloc ((1 + count) * sizeof (char *)); -+ if (!elements) -+ goto cleanup; -+ -+ for (i = 0; i < count; i++) -+ { -+ len = (1 + strlen (keyvalue[i][0]) + -+ (keyvalue[i][1] ? 1 + strlen (keyvalue[i][1]) : 1)); -+ elements[i] = malloc (len * sizeof (char)); -+ if (!elements[i]) -+ goto cleanup; -+ -+ snprintf (elements[i], len, "%s=%s", keyvalue[i][0], keyvalue[i][1]); -+ } -+ -+ strlst = avahi_string_list_new_from_array ((const char **) elements, count); -+ -+cleanup: -+ while (--i >= 0) -+ free (elements[i]); -+ -+ free (elements); -+ return (strlst); -+} -+ -+ -+/* -+ * 'avahi_entry_group_cb()' - Avahi entry group callback function. -+ */ -+static void -+avahi_entry_group_cb (AvahiEntryGroup *group, -+ AvahiEntryGroupState state, -+ void *userdata) -+{ -+ char *name; -+ -+ if (userdata) -+ name = ((cupsd_printer_t *) userdata)->reg_name; -+ else -+ name = "CUPS web interface"; -+ -+ switch (state) -+ { -+ case AVAHI_ENTRY_GROUP_UNCOMMITED: -+ case AVAHI_ENTRY_GROUP_REGISTERING: -+ break; -+ -+ case AVAHI_ENTRY_GROUP_ESTABLISHED: -+ cupsdLogMessage (CUPSD_LOG_DEBUG, -+ "Avahi entry group established for %s", name); -+ break; -+ -+ default: -+ cupsdLogMessage (CUPSD_LOG_DEBUG, -+ "Avahi entry group %s has state %d", -+ name, state); -+ break; -+ } -+} -+ -+ -+/* -+ * 'avahi_client_cb()' - Avahi client callback function. -+ */ -+static void -+avahi_client_cb (AvahiClient *client, -+ AvahiClientState state, -+ void *userdata) -+{ -+ cupsd_printer_t *printer; -+ switch (state) -+ { -+ case AVAHI_CLIENT_S_RUNNING: -+ /* -+ * Avahi client started successfully. -+ */ -+ AvahiCupsClient = client; -+ AvahiCupsClientConnecting = 0; -+ cupsdLogMessage (CUPSD_LOG_DEBUG, "Avahi client started"); -+ -+ cupsdUpdateDNSSDName (); -+ -+ for (printer = (cupsd_printer_t *)cupsArrayFirst(Printers); -+ printer; -+ printer = (cupsd_printer_t *)cupsArrayNext(Printers)) -+ if (Browsing && (BrowseLocalProtocols & BROWSE_DNSSD) && -+ (!(printer->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT | -+ CUPS_PRINTER_SCANNER))) && printer->shared) -+ dnssdRegisterPrinter (printer); -+ -+ break; -+ -+ case AVAHI_CLIENT_CONNECTING: -+ /* -+ * No Avahi daemon, client is waiting. -+ */ -+ cupsdLogMessage (CUPSD_LOG_DEBUG, "Avahi client connecting"); -+ break; -+ -+ case AVAHI_CLIENT_S_REGISTERING: -+ /* -+ * Not yet registered. -+ */ -+ cupsdLogMessage (CUPSD_LOG_DEBUG, "Avahi client registering"); -+ break; -+ -+ case AVAHI_CLIENT_FAILURE: -+ /* -+ * Avahi client failed, close it to allow a clean restart. -+ */ -+ cupsdLogMessage (CUPSD_LOG_ERROR, -+ "Avahi client failed, " -+ "closing client to allow a clean restart"); -+ -+ for (printer = (cupsd_printer_t *)cupsArrayFirst(Printers); -+ printer; -+ printer = (cupsd_printer_t *)cupsArrayNext(Printers)) -+ dnssdDeregisterPrinter (printer); -+ -+ avahi_client_free(client); -+ AvahiCupsClientConnecting = 0; -+ AvahiCupsClient = NULL; -+ -+ break; -+ -+ default: -+ cupsdLogMessage (CUPSD_LOG_DEBUG, "Avahi client state: %d", state); -+ } -+} -+#endif /* HAVE_AVAHI */ -+ -+ - /* - * 'get_auth_info_required()' - Get the auth-info-required value to advertise. - */ -diff -up cups-1.5.2/scheduler/dirsvc.h.avahi-5-services cups-1.5.2/scheduler/dirsvc.h ---- cups-1.5.2/scheduler/dirsvc.h.avahi-5-services 2011-03-21 02:12:14.000000000 +0000 -+++ cups-1.5.2/scheduler/dirsvc.h 2012-03-14 15:08:25.711611808 +0000 -@@ -31,6 +31,10 @@ - # endif /* HAVE_LDAP_SSL_H */ - #endif /* HAVE_LDAP */ - -+#ifdef HAVE_AVAHI -+# include <avahi-client/publish.h> -+#endif /* HAVE_AVAHI */ -+ - /* - * Browse protocols... - */ -@@ -131,19 +135,22 @@ VAR int PollPipe VALUE(0); - VAR cupsd_statbuf_t *PollStatusBuffer VALUE(NULL); - /* Status buffer for pollers */ - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - VAR char *DNSSDComputerName VALUE(NULL), - /* Computer/server name */ - *DNSSDHostName VALUE(NULL), - /* Hostname */ - *DNSSDRegType VALUE(NULL); - /* Bonjour registration type */ --VAR cups_array_t *DNSSDAlias VALUE(NULL); -- /* List of dynamic ServerAlias's */ - VAR int DNSSDPort VALUE(0); - /* Port number to register */ - VAR cups_array_t *DNSSDPrinters VALUE(NULL); - /* Printers we have registered */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ -+ -+#ifdef HAVE_DNSSD -+VAR cups_array_t *DNSSDAlias VALUE(NULL); -+ /* List of dynamic ServerAlias's */ - VAR DNSServiceRef DNSSDRef VALUE(NULL), - /* Master DNS-SD service reference */ - WebIFRef VALUE(NULL), -@@ -152,6 +159,17 @@ VAR DNSServiceRef DNSSDRef VALUE(NULL), - /* Remote printer browse reference */ - #endif /* HAVE_DNSSD */ - -+#ifdef HAVE_AVAHI -+VAR AvahiCupsPoll *AvahiCupsPollHandle VALUE(NULL); -+ /* AvahiCupsPoll object */ -+VAR AvahiClient *AvahiCupsClient VALUE(NULL); -+ /* AvahiClient object */ -+VAR int AvahiCupsClientConnecting VALUE(0); -+ /* Is AvahiClient object connecting? */ -+VAR AvahiEntryGroup *AvahiWebIFGroup VALUE(NULL); -+ /* Web interface entry group */ -+#endif /* HAVE_AVAHI */ -+ - #ifdef HAVE_LIBSLP - VAR SLPHandle BrowseSLPHandle VALUE(NULL); - /* SLP API handle */ -@@ -195,13 +213,14 @@ extern void cupsdRegisterPrinter(cupsd_p - extern void cupsdRestartPolling(void); - extern void cupsdSaveRemoteCache(void); - extern void cupsdSendBrowseList(void); -+extern void cupsdStartAvahiClient(void); - extern void cupsdStartBrowsing(void); - extern void cupsdStartPolling(void); - extern void cupsdStopBrowsing(void); - extern void cupsdStopPolling(void); --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - extern void cupsdUpdateDNSSDName(void); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - #ifdef HAVE_LDAP - extern void cupsdUpdateLDAPBrowse(void); - #endif /* HAVE_LDAP */ -diff -up cups-1.5.2/scheduler/ipp.c.avahi-5-services cups-1.5.2/scheduler/ipp.c ---- cups-1.5.2/scheduler/ipp.c.avahi-5-services 2012-03-14 15:04:17.665305560 +0000 -+++ cups-1.5.2/scheduler/ipp.c 2012-03-14 15:08:25.715611813 +0000 -@@ -6099,7 +6099,7 @@ copy_printer_attrs( - ippAddDate(con->response, IPP_TAG_PRINTER, "printer-current-time", - ippTimeToDate(curtime)); - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - if (!ra || cupsArrayFind(ra, "printer-dns-sd-name")) - { - if (printer->reg_name) -@@ -6109,7 +6109,7 @@ copy_printer_attrs( - ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_NOVALUE, - "printer-dns-sd-name", 0); - } --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - if (!ra || cupsArrayFind(ra, "printer-error-policy")) - ippAddString(con->response, IPP_TAG_PRINTER, IPP_TAG_NAME, -diff -up cups-1.5.2/scheduler/main.c.avahi-5-services cups-1.5.2/scheduler/main.c ---- cups-1.5.2/scheduler/main.c.avahi-5-services 2012-03-14 15:06:36.511476986 +0000 -+++ cups-1.5.2/scheduler/main.c 2012-03-14 15:08:25.718611817 +0000 -@@ -120,6 +120,10 @@ main(int argc, /* I - Number of comm - cupsd_listener_t *lis; /* Current listener */ - time_t current_time, /* Current time */ - activity, /* Client activity timer */ -+#ifdef HAVE_AVAHI -+ avahi_client_time, /* Time for next Avahi client -+ check */ -+#endif /* HAVE_AVAHI */ - browse_time, /* Next browse send time */ - senddoc_time, /* Send-Document time */ - expire_time, /* Subscription expire time */ -@@ -672,6 +676,9 @@ main(int argc, /* I - Number of comm - */ - - current_time = time(NULL); -+#ifdef HAVE_AVAHI -+ avahi_client_time = current_time; -+#endif /* HAVE_AVAHI */ - browse_time = current_time; - event_time = current_time; - expire_time = current_time; -@@ -894,6 +901,16 @@ main(int argc, /* I - Number of comm - tmo = cupsdNextTimeout (&tmo_delay); - if (tmo && tmo_delay == 0) - cupsdRunTimeout (tmo); -+ -+ /* -+ * Try to restart the Avahi client every 10 seconds if needed... -+ */ -+ -+ if ((current_time - avahi_client_time) >= 10) -+ { -+ avahi_client_time = current_time; -+ cupsdStartAvahiClient(); -+ } - #endif /* HAVE_AVAHI */ - - #ifndef __APPLE__ -diff -up cups-1.5.2/scheduler/printers.c.avahi-5-services cups-1.5.2/scheduler/printers.c ---- cups-1.5.2/scheduler/printers.c.avahi-5-services 2012-03-14 15:04:17.646305537 +0000 -+++ cups-1.5.2/scheduler/printers.c 2012-03-14 15:08:25.720611819 +0000 -@@ -883,9 +883,9 @@ cupsdDeletePrinter( - cupsdClearString(&p->alert); - cupsdClearString(&p->alert_description); - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - cupsdClearString(&p->pdl); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - cupsArrayDelete(p->filetypes); - -@@ -3787,7 +3787,7 @@ add_printer_formats(cupsd_printer_t *p) - attr->values[i].string.text = _cupsStrAlloc(mimetype); - } - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - { - char pdl[1024]; /* Buffer to build pdl list */ - mime_filter_t *filter; /* MIME filter looping var */ -@@ -3843,7 +3843,7 @@ add_printer_formats(cupsd_printer_t *p) - - cupsdSetString(&p->pdl, pdl); - } --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - } - - -diff -up cups-1.5.2/scheduler/printers.h.avahi-5-services cups-1.5.2/scheduler/printers.h ---- cups-1.5.2/scheduler/printers.h.avahi-5-services 2011-03-18 18:42:46.000000000 +0000 -+++ cups-1.5.2/scheduler/printers.h 2012-03-14 15:08:25.721611820 +0000 -@@ -16,6 +16,9 @@ - #ifdef HAVE_DNSSD - # include <dns_sd.h> - #endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+# include "avahi.h" -+#endif /* HAVE_AVAHI */ - #include <cups/pwg-private.h> - - -@@ -95,16 +98,23 @@ struct cupsd_printer_s - time_t marker_time; /* Last time marker attributes were updated */ - _ppd_cache_t *pc; /* PPD cache and mapping data */ - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - char *reg_name, /* Name used for service registration */ -- *pdl, /* pdl value for TXT record */ -- *ipp_txt, /* IPP TXT record contents */ -+ *pdl; /* pdl value for TXT record */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ -+#ifdef HAVE_DNSSD -+ char *ipp_txt, /* IPP TXT record contents */ - *printer_txt; /* LPD TXT record contents */ - int ipp_len, /* IPP TXT record length */ - printer_len; /* LPD TXT record length */ - DNSServiceRef ipp_ref, /* Reference for _ipp._tcp,_cups */ - printer_ref; /* Reference for _printer._tcp */ - #endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ AvahiStringList *ipp_txt, /* IPP TXT record */ -+ *printer_txt; /* LPD TXT record */ -+ AvahiEntryGroup *avahi_group; /* Avahi entry group */ -+#endif /* HAVE_AVAHI */ - }; - - diff --git a/libre/cups-libre/cups-no-export-ssllibs.patch b/libre/cups-libre/cups-no-export-ssllibs.patch deleted file mode 100755 index 9be3c819b..000000000 --- a/libre/cups-libre/cups-no-export-ssllibs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.5b1/config-scripts/cups-ssl.m4.no-export-ssllibs cups-1.5b1/config-scripts/cups-ssl.m4 ---- cups-1.5b1/config-scripts/cups-ssl.m4.no-export-ssllibs 2011-05-11 02:52:08.000000000 +0200 -+++ cups-1.5b1/config-scripts/cups-ssl.m4 2011-05-23 17:47:27.000000000 +0200 -@@ -164,7 +164,7 @@ AC_SUBST(IPPALIASES) - AC_SUBST(SSLFLAGS) - AC_SUBST(SSLLIBS) - --EXPORT_SSLLIBS="$SSLLIBS" -+EXPORT_SSLLIBS="" - AC_SUBST(EXPORT_SSLLIBS) - - diff --git a/libre/cups-libre/cups-no-gcrypt.patch b/libre/cups-libre/cups-no-gcrypt.patch deleted file mode 100755 index 42f71d0d4..000000000 --- a/libre/cups-libre/cups-no-gcrypt.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -ruN cups-1.4.7.orig//config-scripts/cups-ssl.m4 cups-1.4.7/config-scripts/cups-ssl.m4 ---- cups-1.5.0.orig//config-scripts/cups-ssl.m4 2011-01-11 08:05:58.000000000 +0100 -+++ cups-1.5.0/config-scripts/cups-ssl.m4 2011-08-02 10:44:26.011047900 +0200 -@@ -96,7 +96,6 @@ - dnl Then look for GNU TLS... - if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then - AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config) -- AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config) - if $PKGCONFIG --exists gnutls; then - have_ssl=1 - SSLLIBS=`$PKGCONFIG --libs gnutls` -@@ -110,16 +109,6 @@ - AC_DEFINE(HAVE_SSL) - AC_DEFINE(HAVE_GNUTLS) - fi -- -- if test $have_ssl = 1; then -- if $PKGCONFIG --exists gcrypt; then -- SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`" -- SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`" -- elif test "x$LIBGCRYPTCONFIG" != x; then -- SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`" -- SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`" -- fi -- fi - fi - - dnl Check for the OpenSSL library last... ---- cups-1.5.0.orig//cups/http-private.h 2011-01-22 01:07:22.000000000 +0100 -+++ cups-1.5.0/cups/http-private.h 2011-08-02 10:42:43.341604107 +0200 -@@ -93,7 +93,6 @@ - # elif defined HAVE_GNUTLS - # include <gnutls/gnutls.h> - # include <gnutls/x509.h> --# include <gcrypt.h> - # elif defined(HAVE_CDSASSL) - # include <CoreFoundation/CoreFoundation.h> - # include <Security/Security.h> diff --git a/libre/cups-libre/cups-no-gzip-man.patch b/libre/cups-libre/cups-no-gzip-man.patch deleted file mode 100755 index 6786c4430..000000000 --- a/libre/cups-libre/cups-no-gzip-man.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up cups-1.5b1/config-scripts/cups-manpages.m4.no-gzip-man cups-1.5b1/config-scripts/cups-manpages.m4 ---- cups-1.5b1/config-scripts/cups-manpages.m4.no-gzip-man 2011-05-12 07:21:56.000000000 +0200 -+++ cups-1.5b1/config-scripts/cups-manpages.m4 2011-05-23 17:25:50.000000000 +0200 -@@ -69,10 +69,10 @@ case "$uname" in - ;; - Linux* | GNU* | Darwin*) - # Linux, GNU Hurd, and Mac OS X -- MAN1EXT=1.gz -- MAN5EXT=5.gz -- MAN7EXT=7.gz -- MAN8EXT=8.gz -+ MAN1EXT=1 -+ MAN5EXT=5 -+ MAN7EXT=7 -+ MAN8EXT=8 - MAN8DIR=8 - ;; - *) diff --git a/libre/cups-libre/cups.install b/libre/cups-libre/cups.install deleted file mode 100755 index 47c3d9b82..000000000 --- a/libre/cups-libre/cups.install +++ /dev/null @@ -1,26 +0,0 @@ -post_install() { - if [ -x usr/bin/xdg-icon-resource ]; then - xdg-icon-resource forceupdate --theme hicolor 2> /dev/null - fi - echo ">> If you use an HTTPS connection to CUPS, the first time you access" - echo ">> the interface it may take a very long time before the site comes up." - echo ">> This is because the first request triggers the generation of the CUPS" - echo ">> SSL certificates which can be a very time-consuming job." -} - -post_upgrade() { - if [ -x usr/bin/xdg-icon-resource ]; then - xdg-icon-resource forceupdate --theme hicolor 2> /dev/null - fi - if [ "`vercmp $2 1.4.7-2`" -lt 0 ]; then - # important upgrade notice - echo "daemon script has been renamed to /etc/rc.d/cupsd" - echo "change your entry in /etc/rc.conf" - fi -} - -post_remove() { - if [ -x usr/bin/xdg-icon-resource ]; then - xdg-icon-resource forceupdate --theme hicolor 2> /dev/null - fi -} diff --git a/libre/cups-libre/cups.logrotate b/libre/cups-libre/cups.logrotate deleted file mode 100755 index 9c49bbdaf..000000000 --- a/libre/cups-libre/cups.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -/var/log/cups/*log { - missingok - notifempty - delaycompress - postrotate - /bin/kill -HUP `cat /var/run/cups.pid 2>/dev/null` 2>/dev/null || true - endscript -} diff --git a/libre/cups-libre/cups.pam b/libre/cups-libre/cups.pam deleted file mode 100755 index 53724d1f8..000000000 --- a/libre/cups-libre/cups.pam +++ /dev/null @@ -1,3 +0,0 @@ -auth required pam_unix.so -account required pam_unix.so -session required pam_unix.so diff --git a/libre/cups-libre/rePKGBUILD b/libre/cups-libre/rePKGBUILD deleted file mode 100755 index 5f55000cc..000000000 --- a/libre/cups-libre/rePKGBUILD +++ /dev/null @@ -1,50 +0,0 @@ -# This is an example rePKGBUILD file. Use this as a start to creating your own, -# and remove these comments. For more information, see 'man PKGBUILD'. -# NOTE: Please fill out the license field for your package! If it is unknown, -# then please put 'unknown'. - -# Maintainer: Nicolas Reynolds <fauno@kiwwwi.com.ar> -source PKGBUILD -unset build package md5sums source check -_repo=extra -pkgname='cups-libre' -options=(!strip) -source=(PKGBUILD - http://mirrors.kernel.org/archlinux/${_repo}/os/$CARCH/${pkgbase}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT} - # files for pkg modifications - ) - -build() { - cd "${srcdir}/" - rm -v .{INSTALL,PKGINFO} ${pkgname%-libre}-$pkgver-$pkgrel-$CARCH$PKGEXT || true - # put actions for package modifications below this line -} - -package_cups-libre() { - pkgdesc="The CUPS Printing System - daemon package" - provides=("${pkgbase}=${pkgver}") - replaces=("${pkgbase}") - conflicts=("${pkgbase}") - install=cups.install - backup=(etc/cups/cupsd.conf - etc/cups/mime.convs - etc/cups/mime.types - etc/cups/snmp.conf - etc/cups/printers.conf - etc/cups/classes.conf - etc/cups/client.conf - etc/cups/subscriptions.conf - etc/dbus-1/system.d/cups.conf - etc/logrotate.d/cups - etc/pam.d/cups - etc/xinetd.d/cups-lpd) - depends=('acl' 'openslp' 'pam' "libcups>=${pkgver}" 'poppler>=0.12.3' 'libusb-compat' 'dbus-core' 'hicolor-icon-theme') - optdepends=('php: for included phpcups.so module' - 'ghostscript: for non-PostScript printers to print with CUPS to convert PostScript to raster images' - 'foomatic-db: drivers use Ghostscript to convert PostScript to a printable form directly' - 'foomatic-db-engine: drivers use Ghostscript to convert PostScript to a printable form directly' - 'xdg-utils: xdg .desktop file support') - - find ${srcdir} -maxdepth 1 -type l -delete - cp -a ${srcdir}/* ${pkgdir} -} diff --git a/libre/file-roller-libre/PKGBUILD b/libre/file-roller-libre/PKGBUILD index 3fe40c4a9..297067255 100755 --- a/libre/file-roller-libre/PKGBUILD +++ b/libre/file-roller-libre/PKGBUILD @@ -1,21 +1,19 @@ -# $Id: PKGBUILD 159054 2012-05-15 11:14:08Z heftig $ +# $Id: PKGBUILD 171115 2012-11-16 17:25:15Z ibiru $ # Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> # Contributor: Jan de Groot <jgc@archlinux.org> _pkgname=file-roller pkgname=file-roller-libre -pkgver=3.4.2 -pkgrel=1 +pkgver=3.6.2 +pkgrel=3 pkgdesc="Archive manipulator for GNOME" arch=('i686' 'x86_64') license=('GPL') -depends=('desktop-file-utils' 'gtk3' 'hicolor-icon-theme' 'dconf') -makedepends=('intltool' 'gnome-doc-utils' 'pkg-config' 'nautilus' 'libsm') +depends=('desktop-file-utils' 'gtk3' 'hicolor-icon-theme' 'dconf' 'libarchive' 'file' 'json-glib' 'libnotify') +makedepends=('intltool' 'gnome-doc-utils' 'pkg-config' 'nautilus' 'itstool' 'docbook-xsl') optdepends=('ununrar: interface to unarchiver, the free RAR uncompression program' 'zip: creates PKZIP-compatible .zip files' - 'unzip: unpacks .zip archives' 'p7zip: 7zip compression utility' - 'xz: managing LZMA and XZ compressed files' 'arj: ARJ archiver') groups=('gnome-extra') provides=("$_pkgname=$pkgver") @@ -24,11 +22,17 @@ conflicts=("$_pkgname") options=('!libtool' '!emptydirs') install=file-roller.install url="http://www.gnome.org" -source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.xz) -sha256sums=('7085a351c55171718bbf5b9b614a7b9606efb8cbd2eb44cc6c538545444d0cdd') +source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgname/${pkgver::3}/$_pkgname-$pkgver.tar.xz + extract-to-fix.patch) +sha256sums=('47b026c827fcb0db4df51bf81c1e90f829f287fe2c9b9e65f167a2ef5bfec5f1' + 'fc23e122b2d95df9eafe5bdf2a55beb1339a2b1b077973a1b45f881d9bb8427e') build() { cd $_pkgname-$pkgver + + # https://bugzilla.gnome.org/show_bug.cgi?id=686321 + patch -Np1 -i "$srcdir/extract-to-fix.patch" + ./configure --prefix=/usr --sysconfdir=/etc \ --libexecdir=/usr/lib/file-roller \ --localstatedir=/var --disable-static \ diff --git a/libre/file-roller-libre/extract-to-fix.patch b/libre/file-roller-libre/extract-to-fix.patch new file mode 100644 index 000000000..2ec4c8336 --- /dev/null +++ b/libre/file-roller-libre/extract-to-fix.patch @@ -0,0 +1,13 @@ +diff --git a/src/main.c~ b/src/main.c +index 1eb2e65..539ddfa 100644 +--- a/src/main.c~ ++++ b/src/main.c +@@ -850,7 +850,7 @@ fr_application_command_line (GApplication *application, + + _g_object_unref (default_directory); + _g_object_unref (add_to_archive); +- g_free (extraction_destination); ++ _g_object_unref (extraction_destination); + + return fr_application_command_line_finished (application, EXIT_SUCCESS); + } diff --git a/libre/gnustep-base-libre/PKGBUILD b/libre/gnustep-base-libre/PKGBUILD deleted file mode 100755 index 4b5fa1731..000000000 --- a/libre/gnustep-base-libre/PKGBUILD +++ /dev/null @@ -1,40 +0,0 @@ -# Parabola maintainer: Michał Masłowski <mtjm@mtjm.eu> -# Parabola contributor: André Silva <andre.paulista@adinet.com.uy> -# $Id$ -# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> -# Maintainer: Vesa Kaihlavirta <vegai@iki.fi> -# Contributor: Sebastian Sareyko <public@nooms.de> - -_pkgname=gnustep-base -pkgname=gnustep-base-libre -pkgver=1.24.0 -pkgrel=2 -pkgdesc="The GNUstep base package with exceptions enabled" -arch=('i686' 'x86_64') -url="http://www.gnustep.org/" -license=("GPL" "LGPL") -depends=(libxslt avahi gmp gcc-libs openssl libffi gnustep-make-libre gnutls) -makedepends=(gcc-objc) -conflicts=('gnustep-base-svn' 'gnustep-base') -provides=('gnustep-base') -groups=('gnustep-core') -options=('!emptydirs' '!makeflags') -source=(ftp://ftp.gnustep.org/pub/gnustep/core/$_pkgname-$pkgver.tar.gz) -md5sums=('53cd117e9f64729870e906b66d2314ba') - -build() { - cd "$srcdir/$_pkgname-$pkgver" - source /etc/profile.d/GNUstep.sh - ./configure --prefix=/usr --sysconfdir=/etc/GNUstep \ - --with-ffi-include=/usr/lib/libffi-`pacman -Q libffi | cut -f2 -d\ |cut -f1 -d-`/include/ - # fix file ownership - sed -i 's/tar -xf $(TIMEZONE_ARCHIVE);/tar -xf $(TIMEZONE_ARCHIVE);chown -R root:root * ;/' NSTimeZones/Makefile.postamble - sed -i 's|.*gnutls_transport_set_lowat.*||' Source/GSSocketStream.m - make VERBOSE=1 -} - -package() { - cd "$srcdir/$_pkgname-$pkgver" - make DESTDIR="$pkgdir" install - chown -R root.root "$pkgdir/" -} diff --git a/libre/gnustep-make-libre/PKGBUILD b/libre/gnustep-make-libre/PKGBUILD deleted file mode 100755 index 7abc014c6..000000000 --- a/libre/gnustep-make-libre/PKGBUILD +++ /dev/null @@ -1,32 +0,0 @@ -# Parabola maintainer: Michał Masłowski <mtjm@mtjm.eu> -# Parabola contributor: André Silva <andre.paulista@adinet.com.uy> -# $Id$ -# Maintainer: Vesa Kaihlavirta <vegai@iki.fi> -# Contributor: Sebastian Sareyko <public@nooms.de> - -_pkgname=gnustep-make -pkgname=gnustep-make-libre -pkgver=2.6.2 -pkgrel=1 -pkgdesc="The GNUstep make package with exceptions enabled" -arch=('any') -url="http://www.gnustep.org/" -license=('GPL') -depends=('glibc') -conflicts=('gnustep-make-svn' 'gnustep-make') -provides=('gnustep-make') -groups=('gnustep-core') -source=(ftp://ftp.gnustep.org/pub/gnustep/core/$_pkgname-$pkgver.tar.gz) -md5sums=('b926d142debc9f38d75b11019c31889f') - -build() { - cd $srcdir/$_pkgname-$pkgver - # The option is not needed, but makes clear why we rebuild this. - ./configure --prefix=/usr --sysconfdir=/etc/GNUstep \ - --enable-native-objc-exceptions - make - make DESTDIR=$pkgdir install - install -D -m755 \ - $pkgdir/usr/share/GNUstep/Makefiles/GNUstep.sh \ - $pkgdir/etc/profile.d/GNUstep.sh -} diff --git a/libre/gstreamer0.10-bad-libre/PKGBUILD b/libre/gstreamer0.10-bad-libre/PKGBUILD index b74958e3c..46e608da9 100755 --- a/libre/gstreamer0.10-bad-libre/PKGBUILD +++ b/libre/gstreamer0.10-bad-libre/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 160766 2012-06-05 08:51:20Z jgc $ +# $Id: PKGBUILD 168313 2012-10-08 14:04:19Z heftig $ # Maintainer: Jan de Groot <jgc@archlinux.org> # Maintainer (Parabola): fauno <fauno@kiwwwi.com.ar> # Maintainer (Parabola): André Silva <andre.paulista@adinet.com.uy> @@ -6,10 +6,10 @@ pkgbase=gstreamer0.10-bad-libre pkgname=('gstreamer0.10-bad-libre' 'gstreamer0.10-bad-libre-plugins') pkgver=0.10.23 -pkgrel=2 +pkgrel=3 arch=('i686' 'x86_64') license=('LGPL' 'GPL') -makedepends=('pkgconfig' 'gstreamer0.10-base>=0.10.36' 'xvidcore' 'libdca' 'bzip2' 'libdc1394' 'neon' 'musicbrainz' 'faad2' 'libmms' 'libcdaudio' 'libmpcdec' 'mjpegtools' 'libdvdnav' 'libmodplug' 'jasper' 'liblrdf' 'libofa' 'soundtouch' 'libvdpau' 'schroedinger' 'libass' 'libvpx' 'gsm' 'libgme' 'rtmpdump' 'libsndfile' 'librsvg' 'wildmidi') +makedepends=('pkgconfig' 'gstreamer0.10-base>=0.10.36' 'xvidcore' 'libdca' 'bzip2' 'libdc1394' 'neon' 'musicbrainz' 'faad2' 'libmms' 'libcdaudio' 'libmpcdec' 'mjpegtools' 'libdvdnav' 'libmodplug' 'jasper' 'liblrdf' 'libofa' 'soundtouch' 'libvdpau' 'schroedinger' 'libass' 'libvpx' 'gsm' 'libgme' 'rtmpdump' 'libsndfile' 'librsvg' 'wildmidi' 'opus') url="http://gstreamer.freedesktop.org/" options=(!libtool !emptydirs) source=(${url}/src/gst-plugins-bad/gst-plugins-bad-${pkgver}.tar.xz) @@ -45,7 +45,7 @@ package_gstreamer0.10-bad-libre() { package_gstreamer0.10-bad-libre-plugins() { pkgdesc="GStreamer Multimedia Framework Bad Plugins (gst-plugins-bad)" - depends=("gstreamer0.10-bad-libre=${pkgver}" 'xvidcore' 'libdca' 'bzip2' 'libdc1394' 'neon' 'musicbrainz' 'faad2' 'libmms' 'libcdaudio' 'libmpcdec' 'mjpegtools' 'libdvdnav' 'libmodplug' 'jasper' 'liblrdf' 'libofa' 'libvdpau' 'soundtouch' 'libass' 'schroedinger' 'libvpx' 'gsm' 'rtmpdump' 'libgme' 'libsndfile' 'librsvg' 'wildmidi') + depends=("gstreamer0.10-bad-libre=${pkgver}" 'xvidcore' 'libdca' 'bzip2' 'libdc1394' 'neon' 'musicbrainz' 'faad2' 'libmms' 'libcdaudio' 'libmpcdec' 'mjpegtools' 'libdvdnav' 'libmodplug' 'jasper' 'liblrdf' 'libofa' 'libvdpau' 'soundtouch' 'libass' 'schroedinger' 'libvpx' 'gsm' 'rtmpdump' 'libgme' 'libsndfile' 'librsvg' 'wildmidi' 'opus') groups=('gstreamer0.10-plugins') install=gstreamer0.10-bad-plugins.install provides=("gstreamer0.10-bad-plugins=$pkgver") diff --git a/libre/kile-libre/PKGBUILD b/libre/kile-libre/PKGBUILD index fcc53e9d9..525624001 100755 --- a/libre/kile-libre/PKGBUILD +++ b/libre/kile-libre/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 159260 2012-05-19 19:37:30Z ronald $ +# $Id: PKGBUILD 171256 2012-11-16 22:51:16Z allan $ # Maintainer: Ronald van Haren <ronald.archlinux.org> # Contributor: Damir Perisa <damir.perisa@bluewin.ch> # Maintainer (Parabola): Michał Masłowski <mtjm@mtjm.eu> @@ -7,13 +7,14 @@ _pkgname=kile pkgname=kile-libre pkgver=2.1.3 -pkgrel=1 +pkgrel=2 pkgdesc="A user friendly TeX/LaTeX frontend for KDE" arch=("i686" "x86_64") license=('GPL2') url="http://kile.sourceforge.net/" depends=('kdebase-runtime' 'texlive-core' 'kdebase-katepart') makedepends=('cmake' 'automoc4') +optdepends=('kdebase-konsole: embedded terminal') conflicts=('kile') replaces=('kile') provides=('kile') diff --git a/libre/libretools/PKGBUILD b/libre/libretools/PKGBUILD index 6efc06b90..bd1d8e59f 100644 --- a/libre/libretools/PKGBUILD +++ b/libre/libretools/PKGBUILD @@ -4,15 +4,14 @@ pkgbase=libretools pkgname=(libretools libretools-pr libretools-mips64el) -pkgver=20121107 +pkgver=20121113 pkgdesc="Scripts for Parabola development" -url="http://parabolagnulinux.org" +url="https://projects.parabolagnulinux.org/libretools.git/" license=('GPL3+') pkgrel=1 arch=('any') -depends=(openssh rsync git wget devtools) -install=libretools.install +depends=(openssh rsync git wget devtools tokyocabinet) source=(https://projects.parabolagnulinux.org/$pkgbase.git/snapshot/$pkgbase-$pkgver.tar.bz2) build() { @@ -22,6 +21,7 @@ build() { package_libretools() { backup=(etc/libretools.conf) + install=libretools.install cd "$srcdir/$pkgbase-$pkgver" make install-libretools DESTDIR="$pkgdir" @@ -29,6 +29,7 @@ package_libretools() { } package_libretools-pr() { + pkgdesc="Scripts for Parabola development (pr)" backup=('etc/libretools.d/prtools.conf') cd "$srcdir/$pkgbase-$pkgver" @@ -36,10 +37,11 @@ package_libretools-pr() { } package_libretools-mips64el() { + pkgdesc="Scripts for Parabola development (for mips64el architecture)" backup=('etc/libretools.d/mips64el.conf') cd "$srcdir/$pkgbase-$pkgver" make install-libretools-mips64el DESTDIR="$pkgdir" } -md5sums=('d80cc433cc627b2d7aa1c37f794d2ef9') +md5sums=('966fb9828f55f58e2aa974065e726621') diff --git a/libre/libretools/libretools.install b/libre/libretools/libretools.install index 69a0f2467..70151e988 100644 --- a/libre/libretools/libretools.install +++ b/libre/libretools/libretools.install @@ -7,22 +7,20 @@ Please check http://wiki.parabolagnulinux.org/Package_maintainer_guide and follow instructions there before using libretools. If you plan using fullpkg you should read http://wiki.parabolagnulinux.org/fullpkg -and install libretools-$arch if avaliable +and install libretools-\$arch if avaliable EOF - update-cleansystem } ## arg 1: the new package version ## arg 2: the old package version post_upgrade() { cat <<EOF -Check your /etc/libretools.conf +Check your /etc/libretools.conf, it has changed substantially. -If using fullpkg, you should install libretools-$arch if avaliable +If using fullpkg, you should install libretools-\$arch if avaliable EOF - update-cleansystem } # vim:set ts=2 sw=2 et: diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD index 0487c2e84..65086e3e8 100755 --- a/libre/linux-libre/PKGBUILD +++ b/libre/linux-libre/PKGBUILD @@ -13,7 +13,7 @@ _basekernel=3.6 _sublevel=6 pkgver=${_basekernel}.${_sublevel} pkgrel=1 -_lxopkgver=${_basekernel}.5 # nearly always the same as pkgver +_lxopkgver=${_basekernel}.6 # nearly always the same as pkgver arch=('i686' 'x86_64' 'mips64el') url="http://linux-libre.fsfla.org/" license=('GPL2') @@ -43,7 +43,7 @@ md5sums=('a2312edd0265b5b07bd4b50afae2b380' '9d3c56a4b999c8bfbd4018089a62f662' '670931649c60fcb3ef2e0119ed532bd4' '8a71abc4224f575008f974a099b5cf6f' - '16173f50a1a39e908825fe6fe90ac103') + 'a281ee5d89a016d72840bddb2d742635') if [ "$CARCH" != "mips64el" ]; then # Don't use the Loongson-specific patches on non-mips64el arches. unset source[${#source[@]}-1] diff --git a/libre/metalog/PKGBUILD b/libre/metalog/PKGBUILD deleted file mode 100755 index 41a570b7c..000000000 --- a/libre/metalog/PKGBUILD +++ /dev/null @@ -1,43 +0,0 @@ -# $Id: PKGBUILD 137711 2011-09-10 13:12:33Z pierre $ -# Maintainer: juergen <juergen@archlinux.org> -# Contributor: Tom Newsom <Jeepster@gmx.co.uk> - -pkgname=metalog -pkgver=2.0 -pkgrel=3 -pkgdesc="Metalog is a modern replacement for syslogd and klogd" -url="http://metalog.sourceforge.net" -license=('GPL') -arch=('i686' 'x86_64' 'mips64el') -depends=('pcre') -groups=('base') -provides=('logger') -replaces=('syslog-ng') -conflicts=('syslog-ng') -backup=('etc/metalog.conf' 'etc/conf.d/metalog') -source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-2.tar.xz" - 'metalog' 'metalog.confd') -md5sums=('e948d10d780205eae17645c89aee1361' - 'cdd1d34eedbfbc2d9e659bf0a0f58f56' - '86bccd5a02996921e29eff8a0394d11f') - -build() { - cd $srcdir/$pkgname-2 - ./configure --prefix=/usr --sysconfdir=/etc - make -} - -check() { - cd $srcdir/$pkgname-2 - make check -} - -package() { - cd $srcdir/$pkgname-2 - make DESTDIR=$pkgdir install - install -D -m755 $srcdir/metalog $pkgdir/etc/rc.d/metalog - install -D -m644 $srcdir/metalog.confd $pkgdir/etc/conf.d/metalog - install -D -m644 metalog.conf $pkgdir/etc/metalog.conf - -} - diff --git a/libre/metalog/metalog b/libre/metalog/metalog deleted file mode 100755 index d30f47289..000000000 --- a/libre/metalog/metalog +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -# source application-specific settings -[ -f /etc/conf.d/metalog ] && . /etc/conf.d/metalog - -. /etc/rc.conf -. /etc/rc.d/functions - -PID=`pidof -o %PPID /usr/sbin/metalog` -case "$1" in - start) - stat_busy "Starting Metalog" - [ -z "$PID" ] && /usr/sbin/metalog -B $METALOG_OPTS 2>&1 - if [ $? -gt 0 ]; then - stat_fail - else - echo $PID > /var/run/metalog.pid - add_daemon metalog - stat_done - fi - ;; - stop) - stat_busy "Stopping Metalog" - [ ! -z "$PID" ] && kill $PID &>/dev/null - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon metalog - stat_done - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/libre/metalog/metalog.confd b/libre/metalog/metalog.confd deleted file mode 100755 index 3d76ffab3..000000000 --- a/libre/metalog/metalog.confd +++ /dev/null @@ -1,8 +0,0 @@ -# -# Parameters to be passed to metalog -# - -# NOTE: Since v.0.7, metalog disables buffering by default. -# Add '-a' if you want buffering. - -METALOG_OPTS="" diff --git a/libre/mplayer-libre/.directory b/libre/mplayer-libre/.directory index 724f09760..b3a1c5dc3 100755 --- a/libre/mplayer-libre/.directory +++ b/libre/mplayer-libre/.directory @@ -1,2 +1,3 @@ [Dolphin] -Timestamp=2012,3,7,11,33,38 +Timestamp=2012,11,17,0,31,48 +Version=3 diff --git a/libre/mplayer-libre/PKGBUILD b/libre/mplayer-libre/PKGBUILD index 3e9d0a44d..461cc23e2 100755 --- a/libre/mplayer-libre/PKGBUILD +++ b/libre/mplayer-libre/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 163126 2012-07-07 16:29:25Z ibiru $ +# $Id: PKGBUILD 171086 2012-11-16 15:00:56Z ibiru $ # Maintainer : Ionut Biru <ibiru@archlinux.org> # Contributor: Hugo Doria <hugo@archlinux.org> # Maintainer (Parabola): André Silva <emulatorman@lavabit.com> @@ -6,7 +6,7 @@ _pkgbase=mplayer pkgbase=mplayer-libre pkgname=('mplayer-libre' 'mencoder-libre') -pkgver=35014 +pkgver=35421 pkgrel=1 arch=('i686' 'x86_64') makedepends=('libxxf86dga' 'libxxf86vm' 'libmad' 'libxinerama' 'sdl' 'lame' 'libtheora' 'xvidcore' 'libmng' 'libxss' 'libgl' 'smbclient' @@ -16,7 +16,7 @@ license=('GPL') url="http://www.mplayerhq.hu/" options=(!buildflags !emptydirs) source=(ftp://ftp.archlinux.org/other/$_pkgbase/$_pkgbase-$pkgver.tar.xz mplayer.desktop) -md5sums=('d0785560e5e8eb02e089728ef4412eae' +md5sums=('b8a82ad1e1d6c3ac847074772daba817' 'c0d6ef795cf6de48e3b87ff7c23f0319') build() { @@ -39,7 +39,7 @@ build() { --enable-radio \ --enable-radio-capture \ --language=all \ - --confdir=/etc/mplayer + --confdir=/etc/mplayer [ "$CARCH" = "i686" ] && sed 's|-march=i486|-march=i686|g' -i config.mak make @@ -71,7 +71,7 @@ package_mplayer-libre() { package_mencoder-libre() { pkgdesc="Free command line video decoding, encoding and filtering tool (without unfree faac support)" depends=('enca' 'a52dec' 'libvpx' 'x264' 'libmng' 'libdca' 'bzip2' 'lame' 'alsa-lib' 'fontconfig' 'giflib' 'libpng' 'smbclient' 'xvidcore' 'opencore-amr' - 'libmad' 'libtheora' 'fribidi' 'libjpeg' 'faad2' 'schroedinger' 'mpg123' 'libass' 'libbluray' 'libcdio') + 'libmad' 'libtheora' 'fribidi' 'libjpeg' 'faad2' 'schroedinger' 'mpg123' 'libass' 'libbluray' 'libcdio' 'libvorbis') provides=("mencoder=$pkgver") replaces=('mencoder') conflicts=('mencoder') @@ -80,3 +80,5 @@ package_mencoder-libre() { make DESTDIR="$pkgdir" install-mencoder install-mencoder-man find "$pkgdir/usr/share/man" -name 'mplayer.1' -exec bash -c 'mv "$1" "${1/mplayer/mencoder}"' _ {} \; } +md5sums=('b5d8c24fc106b4ed58acda3b86c468fa' + 'c0d6ef795cf6de48e3b87ff7c23f0319') diff --git a/libre/mplayer-vaapi-libre/PKGBUILD b/libre/mplayer-vaapi-libre/PKGBUILD index 41f84e022..edb193560 100755 --- a/libre/mplayer-vaapi-libre/PKGBUILD +++ b/libre/mplayer-vaapi-libre/PKGBUILD @@ -6,19 +6,19 @@ # Maintainer (Parabola): André Silva <emulatorman@lavabit.com> pkgname=mplayer-vaapi-libre -pkgver=35014 -pkgrel=1 +pkgver=35107 +pkgrel=3 pkgdesc="A movie player, compiled with vaapi (without unfree faac support)" arch=('i686' 'x86_64') url="http://gitorious.org/vaapi/mplayer" license=('GPL') depends=('libxxf86dga' 'libxxf86vm' 'libmad' 'libcdio' 'libxinerama' 'sdl' - 'lame' 'fontconfig' 'libtheora' 'xvidcore' 'libmng' 'libxss' 'mesa' + 'lame' 'fontconfig' 'libtheora' 'xvidcore' 'libmng' 'libxss' 'glu' 'smbclient' 'aalib' 'jack' 'libcaca' 'x264' 'speex' 'faad2' 'lirc-utils' 'ttf-dejavu' 'libxvmc' 'enca' 'opencore-amr' 'libdca' 'a52dec' 'schroedinger' 'mpg123' 'libvpx' 'libpulse' 'fribidi' 'libbluray' 'libva' 'libass' 'desktop-file-utils') -makedepends=('unzip-libre' 'live-media' 'yasm' 'ladspa' 'git') +makedepends=('unzip-libre' 'live-media' 'yasm' 'ladspa' 'git' 'mesa') provides=("mplayer=$pkgver" "mplayer-vaapi=$pkgver") conflicts=('mplayer' 'mplayer-vaapi') replaces=('mplayer-vaapi') @@ -27,7 +27,7 @@ source=(http://pkgbuild.com/~foutrelis/mplayer-vaapi-$pkgver.tar.xz tweak-desktop-file.patch) options=('!buildflags' '!emptydirs') install=mplayer-vaapi.install -sha256sums=('db19a938e7de46aad567b6d7d8866ec6cb3919a29d60236609a83ebf4e1bb5f0' +sha256sums=('a6c645625cc2cd6ca48764db302c926049f831e757857ece351b37b674e05e56' '5a09fb462729a4e573568f9e8c1f57dbe7f69c0b68cfa4f6d70b3e52c450d93b') build() { diff --git a/libre/ogre-libre/PKGBUILD b/libre/ogre-libre/PKGBUILD index 673ee8435..cef33ae90 100644 --- a/libre/ogre-libre/PKGBUILD +++ b/libre/ogre-libre/PKGBUILD @@ -7,9 +7,13 @@ pkgname=( ogre-libre #ogre-docs ) +pkgflag=( + -libre + -docs +) pkgver=1.8.1 -pkgrel=2 -pkgdesc='A scene-oriented, flexible 3D engine written in C++, without nonfree nvidia-cg-toolkit support' +pkgrel=3 +pkgdesc='A scene-oriented, flexible 3D engine written in C++, without nonfree nvidia-cg-toolkit support, nonfree fonts and arts' arch=( i686 x86_64 @@ -17,25 +21,28 @@ arch=( ) url="http://www.${pkgbase}3d.org" license=( - 'custom:MIT' + 'MIT:(software)' + 'cc by-sa:(sinbad character)' ) depends=( boost-libs freeimage freetype2 + glu libxaw libxrandr - zziplib ois - glu + zziplib ) makedepends=( boost cmake doxygen graphviz - ttf-dejavu + intel-tbb mesa + #poco + ttf-dejavu ) install=$pkgbase.install source=( @@ -52,58 +59,106 @@ build() { [[ -d build ]] && rm -rf build mkdir build && cd build - # generate CMake Makefile cmake .. \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -D${pkgbase^^}_INSTALL_PLUGINS_HEADERS=TRUE \ - -D${pkgbase^^}_INSTALL_SAMPLES=TRUE \ - -D${pkgbase^^}_INSTALL_DOCS=TRUE \ - -D${pkgbase^^}_INSTALL_MEDIA=TRUE \ - -D${pkgbase^^}_INSTALL_SAMPLES_SOURCE=TRUE \ - -DCMAKE_BUILD_TYPE=Release # set =Debug for debugging version - - # compile - make + -DCMAKE_BUILD_TYPE=Release\ + -DCMAKE_INSTALL_PREFIX=/usr\ + -DCPACK_PACKAGE_DESCRIPTION_SUMMARY='Libre 3D Graphics Engine'\ + -D${pkgbase^^}_BUILD_COMPONENT_PAGING=TRUE\ + -D${pkgbase^^}_BUILD_COMPONENT_PROPERTY=TRUE\ + -D${pkgbase^^}_BUILD_COMPONENT_RTSHADERSYSTEM=TRUE\ + -D${pkgbase^^}_BUILD_COMPONENT_TERRAIN=TRUE\ + -D${pkgbase^^}_BUILD_PLATFORM_APPLE_IOS=FALSE\ + -D${pkgbase^^}_BUILD_PLUGIN_BSP=TRUE\ + -D${pkgbase^^}_BUILD_PLUGIN_CG=FALSE\ + -D${pkgbase^^}_BUILD_PLUGIN_OCTREE=TRUE\ + -D${pkgbase^^}_BUILD_PLUGIN_PCZ=TRUE\ + -D${pkgbase^^}_BUILD_PLUGIN_PFX=TRUE\ + -D${pkgbase^^}_BUILD_RENDERSYSTEM_D3D9=FALSE\ + -D${pkgbase^^}_BUILD_RENDERSYSTEM_D3D11=FALSE\ + -D${pkgbase^^}_BUILD_RENDERSYSTEM_GL=TRUE\ + -D${pkgbase^^}_BUILD_RENDERSYSTEM_GLES=FALSE\ + -D${pkgbase^^}_BUILD_RENDERSYSTEM_GLES2=FALSE\ + -D${pkgbase^^}_BUILD_SAMPLES=TRUE\ + -D${pkgbase^^}_BUILD_TESTS=FALSE\ + -D${pkgbase^^}_BUILD_TOOLS=TRUE\ + -D${pkgbase^^}_CONFIG_ENABLE_DDS=TRUE\ + -D${pkgbase^^}_CONFIG_ENABLE_FREEIMAGE=TRUE\ + -D${pkgbase^^}_CONFIG_ENABLE_GLES2_CG_SUPPORT=FALSE\ + -D${pkgbase^^}_CONFIG_ENABLE_GLES2_GLSL_OPTIMISER=FALSE\ + -D${pkgbase^^}_CONFIG_ENABLE_PVRTC=TRUE\ + -D${pkgbase^^}_CONFIG_ENABLE_VIEWPORT_ORIENTATIONMODE=TRUE\ + -D${pkgbase^^}_CONFIG_ENABLE_ZIP=TRUE\ + -D${pkgbase^^}_CONFIG_NEW_COMPILERS=TRUE\ + -D${pkgbase^^}_INSTALL_DOCS=TRUE\ + -D${pkgbase^^}_INSTALL_SAMPLES=TRUE\ + -D${pkgbase^^}_INSTALL_SAMPLES_SOURCE=TRUE\ + -D${pkgbase^^}_INSTALL_TOOLS=TRUE\ + -D${pkgbase^^}_LIB_DIRECTORY=lib\ + -D${pkgbase^^}_PROFILING=TRUE\ + -D${pkgbase^^}_USE_BOOST=TRUE + make V=0 # generate docs if [[ $(which dot) && $(which doxygen) ]]; then - make doc + make V=0 doc fi } package_ogre-libre() { optdepends=( - 'cppunit: unit testing' 'intel-tbb: better threading support' - 'poco: portability' + #'poco: portability' "boost: for developing using $pkgbase" - "$pkgbase-docs: documentation" + "$pkgbase${pkgflag[1]}: documentation" ) provides=( $pkgbase=$pkgver ) conflicts=( - $pkgbase + $pkgbase ) replaces=( - $pkgbase + $pkgbase ) cd $srcdir/${pkgbase}_src_v${pkgver//./-}/build - # install the bugger make DESTDIR=$pkgdir install - # fix up samples - install -dm775 -o root -g users $pkgdir/opt/${pkgbase^^}/samples - mv $pkgdir/usr/share/${pkgbase^^}/*.cfg $pkgdir/opt/${pkgbase^^}/samples - mv $pkgdir/usr/bin/SampleBrowser $pkgdir/opt/${pkgbase^^}/samples + # fix samplebrowser name + mv $pkgdir/usr/bin/SampleBrowser $pkgdir/usr/bin/${pkgbase^}SampleBrowser + + ## LIBRE PATCH ## + # drop cg shaders, hlsl shaders, unusable headers, unusable samples, nonfree fonts and nonfree arts + rm -fv $pkgdir/usr/include/${pkgbase^^}/RTShaderSystem/${pkgbase^}Shader{CG,HLSL}Program{Processor,Writer}.h + rm -fv $pkgdir/usr/lib/${pkgbase^^}/Samples/Sample_{BSP,CelShading,Dot3Bump,Fresnel,SSAO}.so + rm -fvr $pkgdir/usr/share/${pkgbase^^}/Samples/{BSP,CelShading,Dot3Bump,Fresnel,SSAO} + rm -fvr $pkgdir/usr/share/${pkgbase^^}/media/materials/textures/nvidia + rm -fv $pkgdir/usr/share/${pkgbase^^}/media/packs/{chiropteraDM.{pk3,txt},cubemapsJS.zip} + rm -fvr $pkgdir/usr/share/${pkgbase^^}/media/fonts + sed -i -e ' + /BSP/d + /CelShading/d + /Dot3Bump/d + /Fresnel/d + /SSAO/d + ' $pkgdir/usr/share/${pkgbase^^}/samples.cfg + sed -i -e ' + /Direct3D9/d + /Direct3D11/d + /CgProgramManager/d + ' $pkgdir/usr/share/${pkgbase^^}/plugins.cfg + sed -i -e ' + /cubemapsJS/d + /fonts/d + /nvidia/d + ' $pkgdir/usr/share/${pkgbase^^}/resources.cfg + find $pkgdir -type f -name *.cg -delete + find $pkgdir -type f -name *.hlsl -delete + rm -fvr $pkgdir/usr/share/${pkgbase^^}/Samples/Browser/Android + rm -fvr $pkgdir/usr/share/${pkgbase^^}/Samples/Browser/include/SampleBrowser_{NaCl,OSX,iOS}.h + rm -fvr $pkgdir/usr/share/${pkgbase^^}/Samples/Browser/src/FileSystemLayerImpl_{{Android,NaCl,OSX,WIN32}.cpp,iOS.mm} - # make sample launcher - echo '#!/bin/bash' > $pkgdir/usr/bin/${pkgbase^}SampleBrowser - echo 'cd /opt/${pkgbase^^}/samples && ./SampleBrowser' >> $pkgdir/usr/bin/${pkgbase^}SampleBrowser - chmod +x $pkgdir/usr/bin/${pkgbase^}SampleBrowser - # install license install -Dm644 ../Docs/License.html $pkgdir/usr/share/licenses/$pkgbase/license.html diff --git a/libre/ogre-libre/ogre.install b/libre/ogre-libre/ogre.install index 5db668d9e..c05ad1ed3 100644 --- a/libre/ogre-libre/ogre.install +++ b/libre/ogre-libre/ogre.install @@ -1,4 +1,3 @@ post_install() { - echo "To view the OGRE samples just run OgreSampleBrowser or launch" - echo "it directly in /opt/OGRE/samples/" + echo "To view the OGRE samples just run OgreSampleBrowser" } diff --git a/libre/parabolaweb-utils/PKGBUILD b/libre/parabolaweb-utils/PKGBUILD index e0b70ba1a..5fdd12bdb 100644 --- a/libre/parabolaweb-utils/PKGBUILD +++ b/libre/parabolaweb-utils/PKGBUILD @@ -8,7 +8,7 @@ pkgname=parabolaweb-utils pkgver=`_get_pkgver` -pkgrel=5 +pkgrel=8 pkgdesc="Utils for the Parabola website" arch=('any') url="https://projects.parabolagnulinux.org/parabolaweb.git/" @@ -17,13 +17,15 @@ depends=( 'python2' # duh 'python2-flup' # for fcgi 'postgresql' # for database - 'git' # used in parabolaweb-update - 'libretools' # used in parabolaweb-update + 'git' # used in parabolaweb-download + 'libretools' # used in parabolaweb-{download,update} (libremessages) `_get_depends`) backup=('etc/conf.d/parabolaweb') export pkgver +makedepends=(makepkg-git) + source=(git://parabolagnulinux.org/parabolaweb.git parabolaweb-download parabolaweb-update @@ -47,9 +49,9 @@ package() { } md5sums=('SKIP' - '01bed679a4fd768e720bfd0f3c7d6694' - 'a73063b14746720b77fdbab851f5c161' + 'f162c2ce49b4cafe0a14bd4767dfea04' + '7c212024c134fdd0d0318b52a5448ddb' 'd5294495f42df29d29519ebd0a8f6093' 'cc15e153f99fba82e7bb032896f655c2' 'a468016a7155b5da46521dcfc6428384' - '9b565ef07e44d395bf7a0e484e3d19d1') + 'ffd37a19b1a72fbac2c58504aa17b355') diff --git a/libre/parabolaweb-utils/parabolaweb-download b/libre/parabolaweb-utils/parabolaweb-download index 823a18811..e124295d4 100644 --- a/libre/parabolaweb-utils/parabolaweb-download +++ b/libre/parabolaweb-utils/parabolaweb-download @@ -4,8 +4,8 @@ . /usr/bin/libremessages dir=$WEBDIR -repo=git://parabolagnulinux.org/parabolaweb.git -ref=master +repo=$GITURL +ref=$GITREF cd_safe() { if ! cd "$1"; then @@ -26,11 +26,11 @@ download_git() { else cd_safe "$dir" # Make sure we are fetching the right repo - # if [[ "$repo" != "$(git config --get remote.origin.url)" ]] ; then - # error "$(gettext "%s is not a clone of %s")" "$dir" "$repo" - # plain "$(gettext "Aborting...")" - # exit 1 - # fi + if [[ "$repo" != "$(git config --get remote.origin.url)" ]] ; then + error "$(gettext "%s is not a clone of %s")" "$dir" "$repo" + plain "$(gettext "Aborting...")" + exit 1 + fi msg2 "$(gettext "Updating %s %s repo...")" "${repo}" "git" if ! git pull origin "$ref"; then # only warn on failure to allow offline builds diff --git a/libre/parabolaweb-utils/parabolaweb-update b/libre/parabolaweb-utils/parabolaweb-update index 45e17c4f2..2da9eea8a 100644 --- a/libre/parabolaweb-utils/parabolaweb-update +++ b/libre/parabolaweb-utils/parabolaweb-update @@ -15,17 +15,18 @@ find_makefiles() { } clean() { - msg "Purging old .pyc files...." cd "$WEBDIR" + msg "Purging old .pyc files..." find . -name '*.pyc' -delete + msg "Purging old GNU Make generated files..." for dir in `find_makefiles`; do make -C "$WEBDIR/$dir" clean done } configure() { - msg "Checking configuration...." cd "$WEBDIR" + msg "Checking configuration..." if [[ ! -f local_settings.py ]]; then msg2 "Configuration file missing, opening editor..." cp local_settings.py.example local_settings.tmp.$$.py @@ -36,7 +37,7 @@ configure() { msg "Failed to configure, exiting" exit 1 fi - msg2 "Creating database...." + msg2 "Creating database..." ./manage.py syncdb else msg2 "Current configuration checks out" @@ -44,11 +45,15 @@ configure() { } update-database() { - msg "Updating database...." cd "$WEBDIR" - msg2 "Running migrations...." + msg "Updating database..." + msg2 "Running migrations..." ./manage.py migrate - msg2 "Loading fixtures...." + if [[ -f devel/management/commands/update_types_permissions.py ]]; then + msg2 "Updating permissions..." + ./manage.py update_types_permissions + fi + msg2 "Loading fixtures..." ./manage.py loaddata */fixtures/*.json } @@ -69,10 +74,11 @@ main() { exit 1 fi + if [[ -d "$WEBDIR" ]]; then + clean + fi parabolaweb-download - clean configure - clean update-database update-filesystem } diff --git a/libre/parabolaweb-utils/parabolaweb.conf b/libre/parabolaweb-utils/parabolaweb.conf index 467e62e2c..5363479b3 100644 --- a/libre/parabolaweb-utils/parabolaweb.conf +++ b/libre/parabolaweb-utils/parabolaweb.conf @@ -2,3 +2,5 @@ HOST=127.0.0.1 PORT=8090 # 80 is nginx WEBDIR=/srv/http/web WEBUSER=nobody +GITURL=git://parabolagnulinux.org/parabolaweb.git +GITREF=master diff --git a/libre/psutils-libre/PKGBUILD b/libre/psutils-libre/PKGBUILD index 25e88f492..3679222b1 100755 --- a/libre/psutils-libre/PKGBUILD +++ b/libre/psutils-libre/PKGBUILD @@ -7,12 +7,12 @@ _pkgname=psutils pkgname=psutils-libre pkgver=1.17 -pkgrel=3 +pkgrel=3.1 arch=('i686' 'x86_64' 'mips64el') pkgdesc="A set of postscript utilities" url="http://www.tardis.ed.ac.uk/~ajcd/psutils/index.html" license=('custom') -depends=('glibc' 'gnu-ghostscript') +depends=('glibc' 'ghostscript') provides=('psutils-lprng' 'psutils') replaces=('psutils-lprng' 'psutils') conflicts=('psutils-lprng' 'psutils') diff --git a/libre/python-pgpdump/PKGBUILD b/libre/python-pgpdump/PKGBUILD new file mode 100644 index 000000000..e65f60dfa --- /dev/null +++ b/libre/python-pgpdump/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net> + +_pkgname=pgpdump +pkgname=(python-pgpdump python2-pgpdump) +pkgver=1.4 +pkgdesc=" a Python library for parsing PGP packets" +url="https://github.com/toofishes/python-pgpdump" +license=('custom:BSD3') + +pkgrel=1 +arch=(any) +makedepends=(python python2) +provides=(python2-pgpdump) +source=(http://pypi.python.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz) +md5sums=(b437c28ff9d6a6257a0062c0bbe2a9ec) + +package_python-pgpdump() { + cd "$srcdir/$_pkgname-$pkgver" + python setup.py install --root="$pkgdir/" --optimize=1 + install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/COPYING" +} + +package_python2-pgpdump() { + cd "$srcdir/$_pkgname-$pkgver" + python2 setup.py install --root="$pkgdir/" --optimize=1 + install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/COPYING" +} diff --git a/libre/spectrwm-libre/PKGBUILD b/libre/spectrwm-libre/PKGBUILD index 4b4bccec3..a5a9b9b50 100644 --- a/libre/spectrwm-libre/PKGBUILD +++ b/libre/spectrwm-libre/PKGBUILD @@ -4,7 +4,7 @@ _pkgname=spectrwm pkgname=spectrwm-libre -pkgver=2.0.1 +pkgver=2.1.0 pkgrel=1 pkgdesc="A minimalistic automatic tiling window manager that tries to stay out of the way (without unfree profont support)" arch=('i686' 'x86_64' 'mips64el') @@ -21,7 +21,7 @@ backup=(etc/spectrwm.conf) source=(http://opensource.conformal.com/snapshots/$_pkgname/$_pkgname-$pkgver.tgz \ LICENSE \ baraction.sh) -md5sums=('ed553574e65bb364e26d359790e204f2' +md5sums=('cd0ca423445bdc5a74528ca23166449b' 'a67cfe51079481e5b0eab1ad371379e3' '950d663692e1da56e0ac864c6c3ed80e') diff --git a/libre/sqlite3-libre/PKGBUILD b/libre/sqlite3-libre/PKGBUILD deleted file mode 100755 index 569538fbf..000000000 --- a/libre/sqlite3-libre/PKGBUILD +++ /dev/null @@ -1,63 +0,0 @@ -# $Id: PKGBUILD 154652 2012-03-30 14:26:35Z andyrtr $ -# Maintainer: Andreas Radke <andyrtr@archlinux.org> -# Contributor: Tom Newsom <Jeepster@gmx.co.uk> - -pkgbase="sqlite3" -pkgname=('sqlite3' 'sqlite3-tcl') -_amalgamationver=3071100 -_amalgamationver2=${_amalgamationver/00/} -#pkgver=${_amalgamationver2//0/.} -pkgver=3.7.11 -pkgrel=1.1 -pkgdesc="A C library that implements an SQL database engine" -arch=('i686' 'x86_64' 'mips64el') -license=('custom') -url="http://www.sqlite.org/" -makedepends=('tcl' 'readline>=6.0.00') -source=( # tarball containing the amalgamation for SQLite 3.7.5 together with a configure script and makefile for building it; includes now also the Tcl Extension Architecture (TEA) - http://www.sqlite.org/sqlite-autoconf-$_amalgamationver.tar.gz - license.txt) -options=('!libtool' '!emptydirs') -md5sums=('0552d71bda98ebdcaea305cd6058221b' - 'c1cdbc5544034d9012e421e75a5e4890') - -build() { - export CFLAGS="$CFLAGS -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE" - - # build sqlite - cd "$srcdir"/sqlite-autoconf-$_amalgamationver - ./configure --prefix=/usr \ - --disable-static - make - - # build the tcl extension - cd "$srcdir"/sqlite-autoconf-$_amalgamationver/tea - ./configure --prefix=/usr \ - --with-system-sqlite - make - -} - -package_sqlite3() { - - pkgdesc="A C library that implements an SQL database engine" - depends=('readline>=6.0.00') - conflicts=('sqlite' 'sqlite3') - replaces=('sqlite' 'sqlite3') - provides=("sqlite3=$pkgver") - - cd ${srcdir}/sqlite-autoconf-$_amalgamationver - make DESTDIR=${pkgdir} install - - # license - install -D -m644 ${srcdir}/license.txt ${pkgdir}/usr/share/licenses/${pkgname}/license.txt -} - -package_sqlite3-tcl() { - - pkgdesc="sqlite3 Tcl Extension Architecture (TEA)" - depends=('sqlite3>=3.7.5') - - cd ${srcdir}/sqlite-autoconf-$_amalgamationver/tea - make DESTDIR=${pkgdir} install -} diff --git a/libre/sqlite3-libre/license.txt b/libre/sqlite3-libre/license.txt deleted file mode 100755 index 118c5d5e6..000000000 --- a/libre/sqlite3-libre/license.txt +++ /dev/null @@ -1,33 +0,0 @@ -SQLite Copyright -SQLite is in the -Public Domain - - -All of the deliverable code in SQLite has been dedicated to the public domain by the authors. All code authors, and representatives of the companies they work for, have signed affidavits dedicating their contributions to the public domain and originals of those signed affidavits are stored in a firesafe at the main offices of Hwaci. Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original SQLite code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. - -The previous paragraph applies to the deliverable code in SQLite - those parts of the SQLite library that you actually bundle and ship with a larger application. Portions of the documentation and some code used as part of the build process might fall under other licenses. The details here are unclear. We do not worry about the licensing of the documentation and build code so much because none of these things are part of the core deliverable SQLite library. - -All of the deliverable code in SQLite has been written from scratch. No code has been taken from other projects or from the open internet. Every line of code can be traced back to its original author, and all of those authors have public domain dedications on file. So the SQLite code base is clean and is uncontaminated with licensed code from other projects. -Obtaining An Explicit License To Use SQLite - -Even though SQLite is in the public domain and does not require a license, some users want to obtain a license anyway. Some reasons for obtaining a license include: -You are using SQLite in a jurisdiction that does not recognize the public domain. -You are using SQLite in a jurisdiction that does not recognize the right of an author to dedicate their work to the public domain. -You want to hold a tangible legal document as evidence that you have the legal right to use and distribute SQLite. -Your legal department tells you that you have to purchase a license. - -If you feel like you really have to purchase a license for SQLite, Hwaci, the company that employs the architect and principal developers of SQLite, will sell you one. -Contributed Code - -In order to keep SQLite completely free and unencumbered by copyright, all new contributors to the SQLite code base are asked to dedicate their contributions to the public domain. If you want to send a patch or enhancement for possible inclusion in the SQLite source tree, please accompany the patch with the following statement: -The author or authors of this code dedicate any and all copyright interest in this code to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this code under copyright law. - -We are not able to accept patches or changes to SQLite that are not accompanied by a statement such as the above. In addition, if you make changes or enhancements as an employee, then a simple statement such as the above is insufficient. You must also send by surface mail a copyright release signed by a company officer. A signed original of the copyright release should be mailed to: -Hwaci -6200 Maple Cove Lane -Charlotte, NC 28269 -USA - -A template copyright release is available in PDF or HTML. You can use this release to make future changes. - -see http://www.sqlite.org/copyright.html
\ No newline at end of file diff --git a/libre/sqlite3/PKGBUILD b/libre/sqlite3/PKGBUILD deleted file mode 100755 index 2a939aa57..000000000 --- a/libre/sqlite3/PKGBUILD +++ /dev/null @@ -1,68 +0,0 @@ -# $Id: PKGBUILD 138719 2011-09-27 17:41:55Z andyrtr $ -# Maintainer: Andreas Radke <andyrtr@archlinux.org> -# Contributor: Tom Newsom <Jeepster@gmx.co.uk> - -# Parabola note: this PKGBUILD is not meant for building, but for -# providing a PKGBUILD that doesn't build the with unclear permissions -# docs - -pkgbase="sqlite3" -pkgname=('sqlite3' 'sqlite3-tcl') -_amalgamationver=3070800 -_amalgamationver2=${_amalgamationver/00/} -pkgver=${_amalgamationver2//0/.} -pkgrel=2 -pkgdesc="A C library that implements an SQL database engine" -arch=('i686' 'x86_64') -license=('custom') -url="http://www.sqlite.org/" -makedepends=('tcl' 'readline>=6.0.00') -source=( # tarball containing the amalgamation for SQLite 3.7.5 together with a configure script and makefile for building it; includes now also the Tcl Extension Architecture (TEA) - http://www.sqlite.org/sqlite-autoconf-$_amalgamationver.tar.gz - license.txt) -options=('!libtool' '!emptydirs') -md5sums=('6bfb46d73caaa1bbbcd2b52184b6c542' - 'c1cdbc5544034d9012e421e75a5e4890') -sha1sums=('34852cfd49ddea440eb26a35ad32deee0176a724' - 'f34f6daa4ab3073d74e774aad21d66878cf26853') - -build() { - export CFLAGS="$CFLAGS -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE" - - # build sqlite - cd "$srcdir"/sqlite-autoconf-$_amalgamationver - ./configure --prefix=/usr \ - --disable-static - make - - # build the tcl extension - cd "$srcdir"/sqlite-autoconf-$_amalgamationver/tea - ./configure --prefix=/usr \ - --with-system-sqlite - make - -} - -package_sqlite3() { - - pkgdesc="A C library that implements an SQL database engine" - depends=('readline>=6.0.00') - conflicts=('sqlite') - replaces=('sqlite') - - cd ${srcdir}/sqlite-autoconf-$_amalgamationver - make DESTDIR=${pkgdir} install - - # license - install -D -m644 ${srcdir}/license.txt ${pkgdir}/usr/share/licenses/${pkgname}/license.txt -} - -package_sqlite3-tcl() { - - pkgdesc="sqlite3 Tcl Extension Architecture (TEA)" - depends=('sqlite3>=3.7.5') - - cd ${srcdir}/sqlite-autoconf-$_amalgamationver/tea - make DESTDIR=${pkgdir} install -} - diff --git a/libre/sqlite3/license.txt b/libre/sqlite3/license.txt deleted file mode 100755 index 118c5d5e6..000000000 --- a/libre/sqlite3/license.txt +++ /dev/null @@ -1,33 +0,0 @@ -SQLite Copyright -SQLite is in the -Public Domain - - -All of the deliverable code in SQLite has been dedicated to the public domain by the authors. All code authors, and representatives of the companies they work for, have signed affidavits dedicating their contributions to the public domain and originals of those signed affidavits are stored in a firesafe at the main offices of Hwaci. Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original SQLite code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. - -The previous paragraph applies to the deliverable code in SQLite - those parts of the SQLite library that you actually bundle and ship with a larger application. Portions of the documentation and some code used as part of the build process might fall under other licenses. The details here are unclear. We do not worry about the licensing of the documentation and build code so much because none of these things are part of the core deliverable SQLite library. - -All of the deliverable code in SQLite has been written from scratch. No code has been taken from other projects or from the open internet. Every line of code can be traced back to its original author, and all of those authors have public domain dedications on file. So the SQLite code base is clean and is uncontaminated with licensed code from other projects. -Obtaining An Explicit License To Use SQLite - -Even though SQLite is in the public domain and does not require a license, some users want to obtain a license anyway. Some reasons for obtaining a license include: -You are using SQLite in a jurisdiction that does not recognize the public domain. -You are using SQLite in a jurisdiction that does not recognize the right of an author to dedicate their work to the public domain. -You want to hold a tangible legal document as evidence that you have the legal right to use and distribute SQLite. -Your legal department tells you that you have to purchase a license. - -If you feel like you really have to purchase a license for SQLite, Hwaci, the company that employs the architect and principal developers of SQLite, will sell you one. -Contributed Code - -In order to keep SQLite completely free and unencumbered by copyright, all new contributors to the SQLite code base are asked to dedicate their contributions to the public domain. If you want to send a patch or enhancement for possible inclusion in the SQLite source tree, please accompany the patch with the following statement: -The author or authors of this code dedicate any and all copyright interest in this code to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this code under copyright law. - -We are not able to accept patches or changes to SQLite that are not accompanied by a statement such as the above. In addition, if you make changes or enhancements as an employee, then a simple statement such as the above is insufficient. You must also send by surface mail a copyright release signed by a company officer. A signed original of the copyright release should be mailed to: -Hwaci -6200 Maple Cove Lane -Charlotte, NC 28269 -USA - -A template copyright release is available in PDF or HTML. You can use this release to make future changes. - -see http://www.sqlite.org/copyright.html
\ No newline at end of file diff --git a/libre/thunderbird-libre/.directory b/libre/thunderbird-libre/.directory deleted file mode 100755 index 6ec9fb1ce..000000000 --- a/libre/thunderbird-libre/.directory +++ /dev/null @@ -1,2 +0,0 @@ -[Dolphin] -Timestamp=2012,4,13,6,21,8 diff --git a/libre/thunderbird-libre/PKGBUILD b/libre/thunderbird-libre/PKGBUILD deleted file mode 100755 index 134f0efd0..000000000 --- a/libre/thunderbird-libre/PKGBUILD +++ /dev/null @@ -1,82 +0,0 @@ -# $Id: PKGBUILD 157994 2012-04-30 20:56:00Z ibiru $ -# Maintainer : Ionut Biru <ibiru@archlinux.org> -# Contributor: Alexander Baldeck <alexander@archlinux.org> -# Contributor: Dale Blount <dale@archlinux.org> -# Contributor: Anders Bostrom <anders.bostrom@home.se> -# Maintainer (Parabola): André Silva <andre.paulista@adinet.com.uy> - -pkgname=thunderbird-libre -pkgver=12.0.1 -pkgrel=1 -pkgdesc="Standalone Mail/News reader" -arch=('i686' 'x86_64') -license=('MPL' 'GPL') -url="http://www.mozilla.org/thunderbird/" -depends=('alsa-lib' 'dbus-glib' 'desktop-file-utils' 'gtk2' 'hicolor-icon-theme' 'hunspell' 'libevent' 'libnotify' 'libvpx' 'libxt' 'mime-types' 'mozilla-common' 'nss' 'sqlite' 'startup-notification') -makedepends=('unzip' 'zip' 'pkg-config' 'python2' 'wireless_tools' 'yasm' 'mesa' 'autoconf2.13') -optdepends=('libcanberra: for sound support') -replaces=('thunderbird') -conflicts=('thunderbird') -provides=("thunderbird=$pkgver") -install=thunderbird.install -source=(ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.bz2 - mozconfig - thunderbird.desktop - thunderbird-install-dir.patch - channel-prefs.js - vendor.js - gcc47.patch - clrf.patch - searchplugins-libre.patch) -md5sums=('64cacde4cb2b1e8736f1c3a0ea6a02db' - '41511a6bcdd04cf56706218e4670e631' - 'af3e5b344d2edf1c7d61bb0a5a96de9a' - 'aea906acf72c43dd82ead2fabcc1c6db' - '476ec205162340fb0679f522c9d31c3b' - '5a53179d14ae9631b7afe5e4d0fc0b25' - '1e3ad86899c61f0993c429d10913edb4' - 'abe8f73faa71ea2a1e4c6f5a33f56c27' - '6a1d132b0275876678cb0b08c527805a') - -build() { - cd comm-release - patch -Np1 -i "$srcdir/thunderbird-install-dir.patch" - patch -Np1 -i "$srcdir/gcc47.patch" - patch -Np1 -i "$srcdir/clrf.patch" - - # Removing non-free search plugins replacing them with duckduckgo and identi.ca - patch -Np1 -i "$srcdir/searchplugins-libre.patch" - - cp "$srcdir/mozconfig" .mozconfig - - export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/thunderbird" - export PYTHON="/usr/bin/python2" - - make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS" -} - -package() { - cd comm-release - make -j1 -f client.mk DESTDIR="$pkgdir" install - - install -m644 "$srcdir"/vendor.js "$pkgdir/usr/lib/thunderbird/defaults/pref/" - - for i in 16x16 22x22 24x24 32x32 48x48 256x256; do - install -Dm644 other-licenses/branding/thunderbird/mailicon${i/x*/}.png \ - "$pkgdir/usr/share/icons/hicolor/$i/apps/thunderbird.png" - done - - install -Dm644 "$srcdir/thunderbird.desktop" \ - "$pkgdir/usr/share/applications/thunderbird.desktop" - - rm -rf "$pkgdir"/usr/lib/thunderbird/{dictionaries,hyphenation} - ln -sf /usr/share/hunspell "$pkgdir/usr/lib/thunderbird/dictionaries" - ln -sf /usr/share/hyphen "$pkgdir/usr/lib/thunderbird/hyphenation" - - # We don't want the development stuff - rm -r "$pkgdir"/usr/{include,lib/thunderbird-devel,share/idl} - -# Recommend free addons - cp --remove-destination "${srcdir}/channel-prefs.js" \ - "${pkgdir}/usr/lib/thunderbird/defaults/pref/channel-prefs.js" -} diff --git a/libre/thunderbird-libre/channel-prefs.js b/libre/thunderbird-libre/channel-prefs.js deleted file mode 100755 index 13b1ba388..000000000 --- a/libre/thunderbird-libre/channel-prefs.js +++ /dev/null @@ -1,9 +0,0 @@ -//@line 2 "/build/src/comm-release/mail/app/profile/channel-prefs.js" -pref("app.update.channel", "default"); - -//Recommend free addons -pref("extensions.getAddons.get.url", "http://www.gnu.org/software/gnuzilla/addons.html"); -pref("extensions.getAddons.search.browseURL", "http://www.gnu.org/software/gnuzilla/addons.html"); -pref("extensions.getAddons.search.url", "http://www.gnu.org/software/gnuzilla/addons.html"); -pref("extensions.getMoreThemesURL", "http://www.gnu.org/software/gnuzilla/addons.html"); -pref("extensions.webservice.discoverURL", "http://www.gnu.org/software/gnuzilla/addons.html"); diff --git a/libre/thunderbird-libre/clrf.patch b/libre/thunderbird-libre/clrf.patch deleted file mode 100755 index 5a77f2b01..000000000 --- a/libre/thunderbird-libre/clrf.patch +++ /dev/null @@ -1,265 +0,0 @@ -diff -Nur comm-release.orig/mailnews/base/search/src/nsMsgSearchAdapter.cpp comm-release/mailnews/base/search/src/nsMsgSearchAdapter.cpp ---- comm-release.orig/mailnews/base/search/src/nsMsgSearchAdapter.cpp 2012-04-25 01:09:10.468804374 +0000 -+++ comm-release/mailnews/base/search/src/nsMsgSearchAdapter.cpp 2012-04-25 01:09:45.928528202 +0000 -@@ -688,7 +688,7 @@ - PL_strcat(encoding, "{"); - lengthStr.AppendInt((PRInt32) strlen(value)); - PL_strcat(encoding, lengthStr.get()); -- PL_strcat(encoding, "}"CRLF); -+ PL_strcat(encoding, "}" CRLF); - PL_strcat(encoding, value); - return NS_OK; - } -diff -Nur comm-release.orig/mailnews/base/src/nsMsgFolderCompactor.cpp comm-release/mailnews/base/src/nsMsgFolderCompactor.cpp ---- comm-release.orig/mailnews/base/src/nsMsgFolderCompactor.cpp 2012-04-25 01:09:10.475470988 +0000 -+++ comm-release/mailnews/base/src/nsMsgFolderCompactor.cpp 2012-04-25 01:09:45.928528202 +0000 -@@ -758,7 +758,7 @@ - } - } - } --#define EXTRA_KEYWORD_HDR " "MSG_LINEBREAK -+#define EXTRA_KEYWORD_HDR " " MSG_LINEBREAK - - // if status offset isn't in the first block, this code won't work. There's no good reason - // for the status offset not to be at the beginning of the message anyway. -@@ -1216,7 +1216,7 @@ - // check if there's an envelope header; if not, write one. - if (strncmp(m_dataBuffer, "From ", 5)) - { -- m_fileStream->Write("From "CRLF, 7, &bytesWritten); -+ m_fileStream->Write("From " CRLF, 7, &bytesWritten); - m_offlineMsgSize += bytesWritten; - } - } -diff -Nur comm-release.orig/mailnews/compose/src/nsSmtpProtocol.cpp comm-release/mailnews/compose/src/nsSmtpProtocol.cpp ---- comm-release.orig/mailnews/compose/src/nsSmtpProtocol.cpp 2012-04-25 01:09:10.542137136 +0000 -+++ comm-release/mailnews/compose/src/nsSmtpProtocol.cpp 2012-04-25 01:09:45.928528202 +0000 -@@ -1722,7 +1722,7 @@ - { - m_sendDone = true; - nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL); -- SendData(url, "QUIT"CRLF); // send a quit command to close the connection with the server. -+ SendData(url, "QUIT" CRLF); // send a quit command to close the connection with the server. - m_nextState = SMTP_RESPONSE; - m_nextStateAfterResponse = SMTP_DONE; - return(0); -@@ -1969,7 +1969,7 @@ - { - nsCOMPtr<nsIURI> url = do_QueryInterface(m_runningURL); - // send a quit command to close the connection with the server. -- if (SendData(url, "QUIT"CRLF) == NS_OK) -+ if (SendData(url, "QUIT" CRLF) == NS_OK) - { - m_nextState = SMTP_RESPONSE; - m_nextStateAfterResponse = SMTP_ERROR_DONE; -@@ -2118,4 +2118,3 @@ - NS_ENSURE_SUCCESS(rv,rv); - return rv; - } -- -diff -Nur comm-release.orig/mailnews/imap/src/nsImapMailFolder.cpp comm-release/mailnews/imap/src/nsImapMailFolder.cpp ---- comm-release.orig/mailnews/imap/src/nsImapMailFolder.cpp 2012-04-25 01:09:10.605469976 +0000 -+++ comm-release/mailnews/imap/src/nsImapMailFolder.cpp 2012-04-25 01:09:45.928528202 +0000 -@@ -8309,7 +8309,7 @@ - bool needMoreData = false; - char * newLine = nsnull; - PRUint32 numBytesInLine = 0; -- const char *envelope = "From "CRLF; -+ const char *envelope = "From " CRLF; - offlineStore->Write(envelope, strlen(envelope), &bytesWritten); - fileSize += bytesWritten; - do -diff -Nur comm-release.orig/mailnews/imap/src/nsImapProtocol.cpp comm-release/mailnews/imap/src/nsImapProtocol.cpp ---- comm-release.orig/mailnews/imap/src/nsImapProtocol.cpp 2012-04-25 01:09:10.605469976 +0000 -+++ comm-release/mailnews/imap/src/nsImapProtocol.cpp 2012-04-25 01:09:45.931861509 +0000 -@@ -1409,7 +1409,7 @@ - { - // PRInt32 oldRecent = GetServerStateParser().NumberOfRecentMessages(); - nsCAutoString commandBuffer(GetServerCommandTag()); -- commandBuffer.Append(" IDLE"CRLF); -+ commandBuffer.Append(" IDLE" CRLF); - - do - { -@@ -3287,7 +3287,7 @@ - commandString.Append(messageIds); - commandString.Append(" ("); - commandString.Append(attribute); -- commandString.Append(")"CRLF); -+ commandString.Append(")" CRLF); - nsresult rv = SendData(commandString.get()); - - if (NS_SUCCEEDED(rv)) -@@ -5283,7 +5283,7 @@ - - IncrementCommandTagNumber(); - nsCAutoString command(GetServerCommandTag()); -- command.Append(" expunge"CRLF); -+ command.Append(" expunge" CRLF); - - nsresult rv = SendData(command.get()); - if (NS_SUCCEEDED(rv)) -@@ -5359,7 +5359,7 @@ - command.Append(gAppName); - command.Append("\" \"version\" \""); - command.Append(gAppVersion); -- command.Append("\")"CRLF); -+ command.Append("\")" CRLF); - - nsresult rv = SendData(command.get()); - if (NS_SUCCEEDED(rv)) -@@ -5816,7 +5816,7 @@ - nsCAutoString correctedPassword; - EscapeUserNamePasswordString(password.get(), &correctedPassword); - command.Append(correctedPassword); -- command.Append("\""CRLF); -+ command.Append("\"" CRLF); - rv = SendData(command.get(), true /* suppress logging */); - NS_ENSURE_SUCCESS(rv, rv); - ParseIMAPandCheckForNewMail(); -@@ -7447,7 +7447,7 @@ - nsCString command(GetServerCommandTag()); - command += " create \""; - command += escapedName; -- command += "\""CRLF; -+ command += "\"" CRLF; - - nsresult rv = SendData(command.get()); - if(NS_SUCCEEDED(rv)) -@@ -7550,7 +7550,7 @@ - nsCString command (GetServerCommandTag()); - command += " lsub \"\" \""; - command += escapedPattern; -- command += "\""CRLF; -+ command += "\"" CRLF; - - PR_Free(boxnameWithOnlineDirectory); - -@@ -7579,7 +7579,7 @@ - command += useXLIST ? - " xlist \"\" \"" : " list \"\" \""; - command += escapedPattern; -- command += "\""CRLF; -+ command += "\"" CRLF; - - PR_Free(boxnameWithOnlineDirectory); - -@@ -7600,7 +7600,7 @@ - nsCString command (GetServerCommandTag()); - command += " subscribe \""; - command += escapedName; -- command += "\""CRLF; -+ command += "\"" CRLF; - - nsresult rv = SendData(command.get()); - if (NS_SUCCEEDED(rv)) -@@ -7618,7 +7618,7 @@ - nsCString command (GetServerCommandTag()); - command += " unsubscribe \""; - command += escapedName; -- command += "\""CRLF; -+ command += "\"" CRLF; - - nsresult rv = SendData(command.get()); - if (NS_SUCCEEDED(rv)) -@@ -7632,7 +7632,7 @@ - if (m_urlInProgress) - return; - nsCAutoString command (GetServerCommandTag()); -- command += " IDLE"CRLF; -+ command += " IDLE" CRLF; - nsresult rv = SendData(command.get()); - if (NS_SUCCEEDED(rv)) - { -@@ -7659,7 +7659,7 @@ - nsCOMPtr <nsIAsyncInputStream> asyncInputStream = do_QueryInterface(m_inputStream); - if (asyncInputStream) - asyncInputStream->AsyncWait(nsnull, 0, 0, nsnull); -- nsresult rv = SendData("DONE"CRLF); -+ nsresult rv = SendData("DONE" CRLF); - // set a short timeout if we don't want to wait for a response - if (m_transport && !waitForResponse) - m_transport->SetTimeout(nsISocketTransport::TIMEOUT_READ_WRITE, 5); -@@ -7728,8 +7728,8 @@ - PRUint32 msgsHandled = 0; - const char *formatString; - formatString = (idsAreUid) -- ? "%s uid store %s %s"CRLF -- : "%s store %s %s"CRLF; -+ ? "%s uid store %s %s" CRLF -+ : "%s store %s %s" CRLF; - - do - { -diff -Nur comm-release.orig/mailnews/imap/src/nsImapServerResponseParser.cpp comm-release/mailnews/imap/src/nsImapServerResponseParser.cpp ---- comm-release.orig/mailnews/imap/src/nsImapServerResponseParser.cpp 2012-04-25 01:09:10.605469976 +0000 -+++ comm-release/mailnews/imap/src/nsImapServerResponseParser.cpp 2012-04-25 01:09:45.931861509 +0000 -@@ -185,7 +185,7 @@ - - NS_ASSERTION(aCurrentCommand && *aCurrentCommand != '\r' && - *aCurrentCommand != '\n' && *aCurrentCommand != ' ', "Invailid command string"); -- bool sendingIdleDone = !strcmp(aCurrentCommand, "DONE"CRLF); -+ bool sendingIdleDone = !strcmp(aCurrentCommand, "DONE" CRLF); - if (sendingIdleDone) - fWaitingForMoreClientInput = false; - -diff -Nur comm-release.orig/mailnews/local/src/nsPop3Protocol.cpp comm-release/mailnews/local/src/nsPop3Protocol.cpp ---- comm-release.orig/mailnews/local/src/nsPop3Protocol.cpp 2012-04-25 01:09:10.492137526 +0000 -+++ comm-release/mailnews/local/src/nsPop3Protocol.cpp 2012-04-25 01:09:45.931861509 +0000 -@@ -2483,7 +2483,7 @@ - return(MK_OUT_OF_MEMORY); - m_pop3ConData->next_state_after_response = POP3_GET_LIST; - m_listpos = 0; -- return SendData(m_url, "LIST"CRLF); -+ return SendData(m_url, "LIST" CRLF); - } - - -diff -Nur comm-release.orig/mailnews/mime/src/mimedrft.cpp comm-release/mailnews/mime/src/mimedrft.cpp ---- comm-release.orig/mailnews/mime/src/mimedrft.cpp 2012-04-25 01:09:10.488804218 +0000 -+++ comm-release/mailnews/mime/src/mimedrft.cpp 2012-04-25 01:09:45.931861509 +0000 -@@ -1473,7 +1473,7 @@ - *newbody = 0; - PL_strcatn(newbody, newbodylen, "<PRE>"); - PL_strcatn(newbody, newbodylen, body); -- PL_strcatn(newbody, newbodylen, "</PRE>"CRLF); -+ PL_strcatn(newbody, newbodylen, "</PRE>" CRLF); - PR_Free(body); - body = newbody; - } -diff -Nur comm-release.orig/mailnews/mime/src/mimemult.cpp comm-release/mailnews/mime/src/mimemult.cpp ---- comm-release.orig/mailnews/mime/src/mimemult.cpp 2012-04-25 01:09:10.488804218 +0000 -+++ comm-release/mailnews/mime/src/mimemult.cpp 2012-04-25 01:12:53.383735715 +0000 -@@ -280,7 +280,7 @@ - MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK)); - MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Disposition: attachment; filename=\"")); - MimeWriteAString(obj, fileName); -- MimeWriteAString(obj, NS_LITERAL_CSTRING("\""MSG_LINEBREAK)); -+ MimeWriteAString(obj, NS_LITERAL_CSTRING("\"" MSG_LINEBREAK)); - MimeWriteAString(obj, NS_LITERAL_CSTRING("X-Mozilla-External-Attachment-URL: ")); - MimeWriteAString(obj, obj->options->state->detachedFilePath); - MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK)); -@@ -293,10 +293,10 @@ - status = MimeWriteAString(obj, header); - if (status < 0) - return status; -- status = MimeWriteAString(obj, NS_LITERAL_CSTRING("\""MSG_LINEBREAK"Content-Transfer-Encoding: 8bit"MSG_LINEBREAK)); -+ status = MimeWriteAString(obj, NS_LITERAL_CSTRING("\"" MSG_LINEBREAK "Content-Transfer-Encoding: 8bit" MSG_LINEBREAK)); - MimeWriteAString(obj, NS_LITERAL_CSTRING("Content-Disposition: inline; filename=\"Deleted: ")); - MimeWriteAString(obj, fileName); -- MimeWriteAString(obj, NS_LITERAL_CSTRING("\""MSG_LINEBREAK"X-Mozilla-Altered: AttachmentDeleted; date=\"")); -+ MimeWriteAString(obj, NS_LITERAL_CSTRING("\"" MSG_LINEBREAK "X-Mozilla-Altered: AttachmentDeleted; date=\"")); - } - nsCString result; - char timeBuffer[128]; -@@ -306,8 +306,8 @@ - "%a %b %d %H:%M:%S %Y", - &now); - MimeWriteAString(obj, nsDependentCString(timeBuffer)); -- MimeWriteAString(obj, NS_LITERAL_CSTRING("\""MSG_LINEBREAK)); -- MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK"You deleted an attachment from this message. The original MIME headers for the attachment were:"MSG_LINEBREAK)); -+ MimeWriteAString(obj, NS_LITERAL_CSTRING("\"" MSG_LINEBREAK)); -+ MimeWriteAString(obj, NS_LITERAL_CSTRING(MSG_LINEBREAK "You deleted an attachment from this message. The original MIME headers for the attachment were:" MSG_LINEBREAK)); - MimeHeaders_write_raw_headers(mult->hdrs, obj->options, false); - } - PRInt32 old_nchildren = container->nchildren; diff --git a/libre/thunderbird-libre/gcc47.patch b/libre/thunderbird-libre/gcc47.patch deleted file mode 100755 index 080502c23..000000000 --- a/libre/thunderbird-libre/gcc47.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -Nur comm-release.orig/mozilla/ipc/chromium/src/base/file_util_linux.cc comm-release/mozilla/ipc/chromium/src/base/file_util_linux.cc ---- comm-release.orig/mozilla/ipc/chromium/src/base/file_util_linux.cc 2012-04-24 23:15:57.347221336 +0000 -+++ comm-release/mozilla/ipc/chromium/src/base/file_util_linux.cc 2012-04-24 23:18:34.116046872 +0000 -@@ -5,6 +5,9 @@ - #include "base/file_util.h" - - #include <fcntl.h> -+#if defined(ANDROID) || defined(OS_POSIX) -+#include <unistd.h> -+#endif - - #include <string> - #include <vector> -diff -Nur comm-release.orig/mozilla/ipc/chromium/src/base/message_pump_libevent.cc comm-release/mozilla/ipc/chromium/src/base/message_pump_libevent.cc ---- comm-release.orig/mozilla/ipc/chromium/src/base/message_pump_libevent.cc 2012-04-24 23:15:57.353887955 +0000 -+++ comm-release/mozilla/ipc/chromium/src/base/message_pump_libevent.cc 2012-04-24 23:18:34.116046872 +0000 -@@ -6,6 +6,9 @@ - - #include <errno.h> - #include <fcntl.h> -+#if defined(ANDROID) || defined(OS_POSIX) -+#include <unistd.h> -+#endif - - #include "eintr_wrapper.h" - #include "base/logging.h" -diff -Nur comm-release.orig/mozilla/ipc/chromium/src/base/time_posix.cc comm-release/mozilla/ipc/chromium/src/base/time_posix.cc ---- comm-release.orig/mozilla/ipc/chromium/src/base/time_posix.cc 2012-04-24 23:15:57.350554645 +0000 -+++ comm-release/mozilla/ipc/chromium/src/base/time_posix.cc 2012-04-24 23:18:34.116046872 +0000 -@@ -13,6 +13,9 @@ - #else - #include <time.h> - #endif -+#if defined(ANDROID) || defined(OS_POSIX) -+#include <unistd.h> -+#endif - - #include <limits> - diff --git a/libre/thunderbird-libre/mozconfig b/libre/thunderbird-libre/mozconfig deleted file mode 100755 index 8950db703..000000000 --- a/libre/thunderbird-libre/mozconfig +++ /dev/null @@ -1,40 +0,0 @@ -mk_add_options MOZ_CO_PROJECT=mail -ac_add_options --enable-application=mail - -ac_add_options --prefix=/usr -ac_add_options --libdir=/usr/lib - -# System libraries -ac_add_options --with-system-nspr -ac_add_options --with-system-nss -ac_add_options --with-system-jpeg -ac_add_options --with-system-zlib -ac_add_options --with-system-bz2 -ac_add_options --with-system-png -ac_add_options --with-system-libevent -ac_add_options --with-system-libvpx -ac_add_options --enable-system-hunspell -ac_add_options --enable-system-sqlite -ac_add_options --enable-system-ffi -#ac_add_options --enable-system-cairo -ac_add_options --enable-system-pixman -ac_add_options --with-pthreads - -# Features -ac_add_options --enable-official-branding -ac_add_options --enable-safe-browsing -ac_add_options --enable-startup-notification -ac_add_options --enable-gio - -ac_add_options --disable-gnomevfs -ac_add_options --disable-crashreporter -ac_add_options --disable-updater -ac_add_options --disable-tests -ac_add_options --disable-mochitest -ac_add_options --disable-installer - -# Optimization -ac_add_options --enable-optimize - -export MOZILLA_OFFICIAL=1 -mk_add_options MOZILLA_OFFICIAL=1 diff --git a/libre/thunderbird-libre/rePKGBUILD b/libre/thunderbird-libre/rePKGBUILD deleted file mode 100755 index 6a0c46222..000000000 --- a/libre/thunderbird-libre/rePKGBUILD +++ /dev/null @@ -1,29 +0,0 @@ -# This is an example rePKGBUILD file. Use this as a start to creating your own, -# and remove these comments. For more information, see 'man PKGBUILD'. -# NOTE: Please fill out the license field for your package! If it is unknown, -# then please put 'unknown'. - -# Maintainer: Nicolas Reynolds <fauno@kiwwwi.com.ar> -source PKGBUILD -unset build package md5sums source -_repo=extra -options=(!strip) -source=(PKGBUILD - http://mirrors.kernel.org/archlinux/${_repo}/os/$CARCH/${pkgname%-libre}-$pkgver-$pkgrel-$CARCH$PKGEXT - # files for pkg modifications - channel-prefs.js) - -build() { - cd "${srcdir}/" - rm -v .{INSTALL,PKGINFO} ${pkgname%-libre}-$pkgver-$pkgrel-$CARCH$PKGEXT - -# Recommend free addons - cp --remove-destination "${srcdir}/channel-prefs.js" \ - "${srcdir}/usr/lib/thunderbird/defaults/pref/channel-prefs.js" -} - -package() { - find ${srcdir} -type l -maxdepth 1 -delete - cd ${srcdir} - cp -a ./* ${pkgdir} -} diff --git a/libre/thunderbird-libre/searchplugins-libre.patch b/libre/thunderbird-libre/searchplugins-libre.patch deleted file mode 100755 index e466a9eb3..000000000 --- a/libre/thunderbird-libre/searchplugins-libre.patch +++ /dev/null @@ -1,144 +0,0 @@ ---- comm-release.orig/mail/locales/en-US/searchplugins/list.txt 2012-03-27 15:56:00.000000000 -0300 -+++ comm-release/mail/locales/en-US/searchplugins/list.txt 2012-04-13 05:43:25.227475353 -0300 -@@ -1,7 +1,5 @@ --amazondotcom --aol-web-search --bing -+duckduckgo-ssl - eBay --twitter -+identica-notice-search -+identica-people-search - wikipedia --yahoo ---- comm-release.orig/mail/locales/en-US/searchplugins/amazondotcom.xml 2012-03-27 15:56:00.000000000 -0300 -+++ /dev/null 2012-04-12 23:52:53.981159155 -0300 -@@ -1,11 +0,0 @@ --<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> --<ShortName>Amazon.com</ShortName> --<Description>Amazon.com Search</Description> --<InputEncoding>ISO-8859-1</InputEncoding> --<Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAHgSURBVHjalFM9TNtQEP4cB7PwM1RITUXIgsRaYEEVEyKZwhiyZAQyd0BhpFOlIjoBqhjSqVQMoVMLLAjEwECCQJkSkBqJYDOAFOMKFSf28d7DTUxiUDnp/Pzeu/vuu7t3ICKF6SLTMv2/lB0fRWKfjwDm4JJisYh0Oo3fpZLYT0SjSCQS8JAFMADNDZ3NZsnf1taiqVTKi4nGASruk5lkkmTmMB6JUKFQqO+DfX1eABWeQoVR6f7HSdM0obqu48Yw8G1tDT82NsRd1TSbU9BbGPCog8PDj+jLzurFoAVgMh4XxoNDQ6SqKi0tL9eBvAB8zZwymYxYY7EYAoEA8vm82BNTg6XUIs0MeGTZoR1mhXSnwNl4pmAbjU7mcjkKhkL1ynMnntZ4OEw3VyrV8utk7s5TdW++0QXz+1i3P7IK36t+PCfVn1OQOoOA0gXr5DPak+cPXbBK+/T3S69AtY3LJ98vZ1or/iLr+pTuvr59/A6s003UdqZFJF/PCKQ3o5CUznoBST2AfbEF/9iqYEDaIfwj73VJPEfgNTe0tWNYR0uwy9uOW0OkrgHI7z5ADo2C7v48nLV3XHKAT+x/1m1sX58xsBxg8rZJrDYD8DHHp4aJj/MK09sXjPOt46PcCzAACXY8/u34wN0AAAAASUVORK5CYII=</Image> --<Url type="text/html" method="GET" template="http://www.amazon.com/exec/obidos/external-search/"> -- <Param name="field-keywords" value="{searchTerms}"/> -- <Param name="mode" value="blended"/> --</Url> --<SearchForm>http://www.amazon.com/</SearchForm> --</SearchPlugin> ---- comm-release.orig/mail/locales/en-US/searchplugins/aol-web-search.xml 2012-03-27 15:56:00.000000000 -0300 -+++ /dev/null 2012-04-12 23:52:53.981159155 -0300 -@@ -1,10 +0,0 @@ --<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"> --<os:ShortName>AOL Web Search</os:ShortName> --<os:Description>The AOL Search engine delivers great web search results, enhanced by Google, plus relevant multimedia results delivered on a single page-so you can search less and discover more.</os:Description> --<os:InputEncoding>UTF-8</os:InputEncoding> --<os:Image width="16" height="16">data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%10%00%00%00%10%08%06%00%00%00%1F%F3%FFa%00%00%00%06bKGD%00%FF%00%FF%00%FF%A0%BD%A7%93%00%00%00%09pHYs%00%00%00H%00%00%00H%00F%C9k%3E%00%00%00%FAIDAT8%CB%9D%D3%B1q%C2%40%10%85%E1%0F%8F%0B%A0%04%97%00%1D%40%05%C6%01%B9%95*1%AA%C0C%05%E0%84%D4%E4%0A%0C%15H%EE%40%1D%98%12%D4%81%1D%E84%C8B%60%C9%2F9%AD%EE%EE%9F%DD%B7%7B%23%B0%DC%7D%A3D%22%8D%F7%06h%D4%00%D4*%02(%EF%03%B8%EB%F87Af%B9%7B%EF%03%B8o%C59%DE%A4%F1%E1%3F%25%EC%91%60%83%87%B0%FF%89m%F8%5Et%F9S%032%3C%E1%0B%E3%D6%99%02s%7C%848%91%C6E%1B0%C1%0B%9E%AFd%9A%E0%D4%80l%B1%96%C6eebE%9C%DC(%F51dRk%15%B2%FD%D5%85%B1a*%CF%80%AA%84%FC%C6%E1%23f%8Dx%8D)%E76n%10aq%C5%C4%03%B2%B0%26%D2%F8To%D6%80Y0q%8AW%97m%1C%23%EA%9A%CE%E6%20%AD%82%91%5D%83T%AA%BAp%A1%AE%B7Pk%2F%8D%A3%BF%9C%ECz%0B9%E6%7D.7K(%C3%3A%F89%FF%00_%82G%C3%D5%0E(%3E%00%00%00%00IEND%AEB%60%82</os:Image> --<SearchForm>http://search.aol.com</SearchForm> --<os:Url type="text/html" method="GET" template="http://search.aol.com/aol/search"> -- <os:Param name="query" value="{searchTerms}"/> --</os:Url> --</SearchPlugin> ---- comm-release.orig/mail/locales/en-US/searchplugins/bing.xml 2012-03-27 15:56:00.000000000 -0300 -+++ /dev/null 2012-04-12 23:52:53.981159155 -0300 -@@ -1,21 +0,0 @@ --<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> -- <ShortName>Bing</ShortName> -- <Description>Bing. Search by Microsoft.</Description> -- <InputEncoding>UTF-8</InputEncoding> -- <Image width="16" height="16" type="image/x-icon">data:image/x-icon;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAABMLAAATCwAAAAAAAAAAAAAVpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8ysf97zf+24//F6f/F6f/F6f+K0/9QvP8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8krP+Z2P/////////w+f/F6f/F6f/i9P/////////T7v9Bt/8Vpv8Vpv8Vpv8Vpv/T7v/////w+f97zf8Vpv8Vpv8Vpv8Vpv9QvP/T7v/////w+f9Bt/8Vpv8Vpv97zf////////9QvP8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8krP/i9P/////i9P8Vpv8Vpv+24//////i9P8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv+K0/////////8Vpv8Vpv/F6f////////8krP8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv+n3v/////w+f8Vpv8Vpv/F6f////////+n3v8krP8Vpv8Vpv8Vpv8Vpv8Vpv9tx/////////+Z2P8Vpv8Vpv/F6f/////////////i9P+K0/9QvP9QvP9tx//F6f////////+n3v8Vpv8Vpv8Vpv/F6f/////T7v+Z2P/i9P////////////////////+24/9QvP8Vpv8Vpv8Vpv8Vpv/F6f/////F6f8Vpv8Vpv8krP9QvP9QvP9Bt/8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv/F6f/////F6f8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv9Bt/9QvP9Bt/8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8Vpv8AAHBsAABhdAAAbiAAAHJ0AABsaQAAdGkAACBDAABlbgAAUEEAAEVYAAAuQwAAOy4AAEU7AABBVAAAQ00AAC5W</Image> -- <Url type="application/x-suggestions+json" template="http://api.bing.com/osjson.aspx"> -- <Param name="query" value="{searchTerms}"/> -- <Param name="form" value="OSDJAS"/> -- </Url> -- <Url type="text/html" method="GET" template="http://www.bing.com/search"> -- <Param name="q" value="{searchTerms}"/> -- <Param name="form" value="MOZESB"/> -- <MozParam name="pc" condition="pref" pref="ms-pc"/> -- </Url> -- <Url type="application/x-moz-keywordsearch" method="GET" template="http://www.bing.com/search"> -- <Param name="q" value="{searchTerms}"/> -- <Param name="form" value="MOZESB"/> -- <MozParam name="pc" condition="pref" pref="ms-pc"/> -- </Url> -- <SearchForm>http://www.bing.com/search</SearchForm> --</SearchPlugin> ---- comm-release.orig/mail/locales/en-US/searchplugins/google.xml 2012-03-27 15:56:00.000000000 -0300 -+++ /dev/null 2012-04-12 23:52:53.981159155 -0300 -@@ -1,14 +0,0 @@ --<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> --<ShortName>Google</ShortName> --<Description>Google Search</Description> --<InputEncoding>UTF-8</InputEncoding> --<Image width="16" height="16">data:image/png;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADs9Pt8xetPtu9FsfFNtu%2BTzvb2%2B%2Fne4dFJeBw0egA%2FfAJAfAA8ewBBegAAAAD%2B%2FPtft98Mp%2BwWsfAVsvEbs%2FQeqvF8xO7%2F%2F%2F63yqkxdgM7gwE%2FggM%2BfQA%2BegBDeQDe7PIbotgQufcMufEPtfIPsvAbs%2FQvq%2Bfz%2Bf%2F%2B%2B%2FZKhR05hgBBhQI8hgBAgAI9ewD0%2B%2Fg3pswAtO8Cxf4Kw%2FsJvvYAqupKsNv%2B%2Fv7%2F%2FP5VkSU0iQA7jQA9hgBDgQU%2BfQH%2F%2Ff%2FQ6fM4sM4KsN8AteMCruIqqdbZ7PH8%2Fv%2Fg6Nc%2Fhg05kAA8jAM9iQI%2BhQA%2BgQDQu6b97uv%2F%2F%2F7V8Pqw3eiWz97q8%2Ff%2F%2F%2F%2F7%2FPptpkkqjQE4kwA7kAA5iwI8iAA8hQCOSSKdXjiyflbAkG7u2s%2F%2B%2F%2F39%2F%2F7r8utrqEYtjQE8lgA7kwA7kwA9jwA9igA9hACiWSekVRyeSgiYSBHx6N%2F%2B%2Fv7k7OFRmiYtlAA5lwI7lwI4lAA7kgI9jwE9iwI4iQCoVhWcTxCmb0K%2BooT8%2Fv%2F7%2F%2F%2FJ2r8fdwI1mwA3mQA3mgA8lAE8lAE4jwA9iwE%2BhwGfXifWvqz%2B%2Ff%2F58u%2Fev6Dt4tr%2B%2F%2F2ZuIUsggA7mgM6mAM3lgA5lgA6kQE%2FkwBChwHt4dv%2F%2F%2F728ei1bCi7VAC5XQ7kz7n%2F%2F%2F6bsZkgcB03lQA9lgM7kwA2iQktZToPK4r9%2F%2F%2F9%2F%2F%2FSqYK5UwDKZAS9WALIkFn%2B%2F%2F3%2F%2BP8oKccGGcIRJrERILYFEMwAAuEAAdX%2F%2Ff7%2F%2FP%2B%2BfDvGXQLIZgLEWgLOjlf7%2F%2F%2F%2F%2F%2F9QU90EAPQAAf8DAP0AAfMAAOUDAtr%2F%2F%2F%2F7%2B%2Fu2bCTIYwDPZgDBWQDSr4P%2F%2Fv%2F%2F%2FP5GRuABAPkAA%2FwBAfkDAPAAAesAAN%2F%2F%2B%2Fz%2F%2F%2F64g1C5VwDMYwK8Yg7y5tz8%2Fv%2FV1PYKDOcAAP0DAf4AAf0AAfYEAOwAAuAAAAD%2F%2FPvi28ymXyChTATRrIb8%2F%2F3v8fk6P8MAAdUCAvoAAP0CAP0AAfYAAO4AAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAA</Image> --<Url type="application/x-suggestions+json" method="GET" template="http://suggestqueries.google.com/complete/search?output=firefox&hl={moz:locale}&q={searchTerms}"/> --<Url type="text/html" method="GET" template="http://www.google.com/search"> -- <Param name="q" value="{searchTerms}"/> -- <Param name="ie" value="utf-8"/> -- <Param name="oe" value="utf-8"/> -- <Param name="aq" value="t"/> --</Url> --<SearchForm>http://www.google.com</SearchForm> --</SearchPlugin> ---- comm-release.orig/mail/locales/en-US/searchplugins/twitter.xml 2012-03-27 15:56:00.000000000 -0300 -+++ /dev/null 2012-04-12 23:52:53.981159155 -0300 -@@ -1,10 +0,0 @@ --<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> --<ShortName>Twitter Search</ShortName> --<Description>Realtime Twitter Search</Description> --<InputEncoding>UTF-8</InputEncoding> --<Image width="16" height="16">data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%20%00%00%00%20%08%06%00%00%00szz%F4%00%00%00%19tEXtSoftware%00Adobe%20ImageReadyq%C9e%3C%00%00%06%60IDATx%DA%ACWMLSY%14%BE%F7%F5%97%B6%96%96%16P%84q%02H%A0%01%85%08%26%C4%18%C9D%60%D8L2%0Bfm2%89%86%85%3B%E2l%5D%BA%9Ad%E2%CEY%B8%18c2a%8C%B3%10%893%02e%98d%F0%07%22c%D0%22%88%C4%01K)%D0%3F%FA%FF%DE%BB%F3%DD%F7Z%82%B5%16%A8%DE%E4%B6%AF%AF%EF%DD%F3%DDs%BEs%BEs)c%8C%F0A)%25%D9q%F9%F2eC%7F%7F%7F%1D.%BF%12%04%A1%F30F%22%91%10%A3%D1%E8%92%C1%60ponn%FE%3D99%E9%BDz%F5%AAL%3Ea(%B6%F9G%16%04%1F%83%83%83%E6%B1%B1%B1oVVV%86%E2%F1%F8%7F%C9d2%22%8Ab%2C%95J%C5p%1D%8A%C5b%9E%85%85%85%1F%EF%DF%BF%DF%06%90%9A%CF%0A%00%3B%D2%3Fy%F2%A4okkk%0C%06%A3%B8%CF%D22c1%91%B1%B8%C4%98%84kY%96%19%3C%B1%B6%B8%B8%F83F%13w%DE%E7%02%40%1F%3E%7CX%BB%BA%BAz%0B%C6%23%DCx%24%CD%D8%F30c%7F%FAe%E6%DE%90%D9%1B%40JIL%19%E1px%05%5E%F8a%60%60%C0%FE)%00%B4%D9%1F%D8%BDA%92%A4%13v%BB%FD%8CN%A7%B3D%25B%A6%02%8C%3C%0E2%12H1%A2%C1%3EkJ(%E9rP%D2x%88%92%92%92%92J%97%CB%F5%F5%F2%F2%F2%08%5E%0FcJ%C5%80%D8%01p%EC%D81%23%10%B94%1A%8DM%82C%BC%09BfB%8C%F8%93%8Cp~%8A%A0%DB%9B%18%23V%1D!%D5%00R%AA%D3j%9DNg%3D%80%B8n%DF%BE%ED%EB%EC%ECL%EE%5E8%18%0C%12%84J%9A%9B%9BK%5C%BAt)%BD'%00%B0%5D%83Lp%02%84%86%03%88%88%8C%84E%D5%B8%40%D4H%F3%FB~%98%89c%AF%1C%08%3CU%D6%D6%D6%F6%9D%CDfs%99%CD%E64%F8%B1%C3%07%AC%25%E9%F5%FA%8D%8E%8E%0E%CF%F8%F8%F8%FC%C4%C4%C4z%BE%AC%D1%E6%FC%D6dl%91%EC%93%BB%19%C6%C1H%84%E1%3F%CE%1BJ%60%C0%D4%D4%D4%D4%AB%D5j%BBr%C9%98%E1V%1A%E9%EB%F5%F9%7C%7F%9C%3Bw%EE%D7%8B%17%2F%CE%DE%B8q%23%5D%08%40%C1A3%93%7B%22%8DI9w%B5z%93H%88%E9%83g%E16-%1E%B6X%2C%0E%84%F5%08%C0V%9D%3F%7F%FE%A7%40%200%3D44%24%15%0D%20%81W%E7%B7%19%F1%26%0B%E7%9F%11%00%1CzJ%9Cz%22%80'%E5eee%3D%B5%B5%B5%1B%ED%ED%ED%EF%00%60%A5(%00%0A%B9%E0%C0%F1%0D%BEuV%F09%9E5%87%0D%94%9C%B6S%D2b%A5%C4d29%EB%EA%EA%BE%9E%99%99%19%ED%EA%EA%DAp%BB%DD%09%85%7B%C5%A4NB%DE%7Bn%23.%8BQF%FEA*%AF'9%5CJP%C6%2B0%DBz%7B%7BKv%C8_%0C%00%BA%8F)P%D5G%3E%A4%F1%26%08%23%AA%0E%D3%19%8D%C6%A3%C8%16%FD'%018%C8%1023%ABu(v4%9DNgq%1E%9C%03d%CF%E8%ABCfd%A7zV%80%8C%3C%23R%B2%9C%0E%85B%3E%BF%DF%9F%CE.s%60%00%DC%B5%A5Z%F5%BB0%09)%A92%12%D2%5E%8AL0%A8%85%01)%E8%F7z%BDsSSS%F1%A2%B2%80C%B6%A3%02v%97%0B%CA%A2TY7%0FG%A8%0A%E0%10%CA%9AE%ABz%C2%EF%DF%D8z%F4%E8%91%7Bzz%FA%19f%B2%E84%D4!%A0G%60%BC%D2H%F7%24%10%F7%12%E2-n%05%83%5BH%BF%C9%7B%F7%EE%0D%0D%0F%0F%2F%EF%16.m1%F1%CF%EA%C3%5Ea%E0%C6%D1%BC%2CC%07%1E%8C%8E%8E%FE~%E7%CE%9D%C7%3C%8BsI%BA%BB~%B3%BDH%26g%CA%F0~%DA%10%A6%F4%2Fr%10%A5x%B1%B2%B2r%1E%B7%22%B9%CB%EFx%00%82%22%A3%F5%8AB%C5d%BEC%BD%A0%C6.w%F0%02%F36F%88%13%5C0%EF%E1%3F%D4%7F%7DCCC3%A4%FEBww%B7%EE%E4%C9%93%B7%20%CD%DE%BC%1E%98%9D%9D%15%A1%E1k%40%2CrI%2CE%DE%98%81%20%D7%1B1D%EF)%9A%14tJ%8A4%87E.%DD%1FN~%9F%CB%B6N%AF7B%90N%94%97%97%7F%7F%FC%F8%F1o%A1%88%A5y%3D%80%064%05%97-!n%DB(%97%0E%0E%80%A7%91%2F%99%89%7Bf%F2%EB%95%04%23%0F%FC%10%1B4%2C%5Cth%1EO%F1M%1C%C6%FB'%AC%02%BE)%85%16%D4566%F6%9F%3Auj%1A%7F%3D%CD%12q%C7%03%D7%AF_O%A1%C1XX__%7F%89j%952a%85F%0BUr%5Ef%EF%97a%3Ex%B3%C2%3B%A4%97P%C6%17%91%0F%E7%BF%F0%D0%C4%86%3A%03)%A5%E1%D1Z%ADV%DEqu%5C%B9r%C5%94%8F%84%CC%E3%F1%AC%A3%85%FA%0BMD%88%A7%5B%BD%99%12%17%FA%3F%83%A0%F6%00%B9ZPP%2F%F0%40%1C%A2%B4%00A%E2z%C0%B5%00%C6%E1%08SCEE%85!o%16%A0e%8A%A0L%8E%A2-%9F%85%17%D2%A5%20%DAi%BB%A0%82%D0%A8%20%D8%01D%89%A7i%12%EEK%CA%AA%17%11b8B%B0%80g%DA%8Fi%81%84%5C%F5%A0%D9%FC%0D%C4%F9%02MDC5%E2%D8%E5%14%00%40%26sp%2B%EF%96%E5%7Dx%80e%AA%A4MG%89%15%7C%D2(%ED%1C%91%E1%DD%08%0E7%F2G%0B%D1%C8%C8H%B8%BE%BE~%18%00%8E%B6%B6%B6%5Ep8%1C55Po%B3F%20%D5FF%3C%88%EF%BB%04%CF%06%F6%5EX%F2%15%2B%1BD%A8%0DZ%C0%C9%C8%01%80%E8%DBkkk%8B(%C9%89%82b%04B%AEB%B7%7F%C1%A5%01%20x%D7%5B%E3%D0k4%ED6%AA%10%937%18%5C%E3%A3%A2%1A%16%9A%07%80%5E%A3vD_*%E0%15%E3%C9%D7%AF_%3F%C7%89%EA%196%19%CF%ED%5E%F3%F2%08%A7%9EZ%F4o%83x%F11NB!%14*)%7B%5CKH%EA%91%AD%D0%E4%CF%F1%C1%8D%BFz%F5%EA%D9%B5k%D7%06%AA%AA%AA%9C%D9%08r%BB4%DF%E9x7%88%BE%BE%3E%E7%D9%B3g%CF477%F7%B5%B4%B4t%22%24UHWd6%E5%E7%08%0Af%D3%DC%0D%F0%B5%F8%19%92%D7a%C4%3B%B6%B4%B4%F4%12%C7%BE%BB7o%DE%BC%3B%3F%3F%FF6%5B%03%F6%03%40%19%D5%D5%D5%25%3D%3D%3DG%90%C7%AD%A8%E9%EDh.%1BA%D4%0A%FC6%E1%5BGs%5E%86%5D%02%EDO%E3%3C%10x%81%81*%EB%86%18M%E1%DC%B9%86%BF%C5%DD%DE%FF_%80%01%00%94%13%9D%26%E9%81%03P%00%00%00%00IEND%AEB%60%82</Image> --<Url type="text/html" method="get" -- template="http://search.twitter.com/search?q={searchTerms}"/> --<SearchForm>http://search.twitter.com/</SearchForm> --</SearchPlugin> -- ---- comm-release.orig/mail/locales/en-US/searchplugins/yahoo.xml 2012-03-27 15:56:00.000000000 -0300 -+++ /dev/null 2012-04-12 23:52:53.981159155 -0300 -@@ -1,13 +0,0 @@ --<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> --<ShortName>Yahoo</ShortName> --<Description>Yahoo Search</Description> --<InputEncoding>UTF-8</InputEncoding> --<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbgJqAIoCdgCaAnoAnhKCAKYijgCuLpIAskKeALpSpgC+Yq4AzHy8ANqezgDmvt4A7tLqAPz5+wD///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKlRFIoABWAKERERE6ADcKMzzu2hOgAAhERK8REWCWBERE36ERMHMEREvo6iEgY6hEn6Pu0mAzqkz/xjMzoDNwpERERDoAMzAKlERIoAAzMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAA//8AAP//AADAOQAAgBkAAAAPAAAACQAAAAkAAAAIAAAACAAAAAgAAIAYAADAOAAA//8AAP//AAD//wAA</Image> --<Url type="application/x-suggestions+json" method="GET" -- template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchTerms}" /> --<Url type="text/html" method="GET" template="http://search.yahoo.com/search"> -- <Param name="p" value="{searchTerms}"/> -- <Param name="ei" value="UTF-8"/> --</Url> --<SearchForm>http://search.yahoo.com/</SearchForm> --</SearchPlugin> ---- /dev/null 2012-04-12 23:52:53.981159155 -0300 -+++ comm-release/mail/locales/en-US/searchplugins/duckduckgo-ssl.xml 2012-04-09 14:43:56.000000000 -0300 -@@ -0,0 +1,11 @@ -+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"> -+<os:ShortName>DuckDuckGo RU SSL</os:ShortName> -+<os:Description>DDG Search + Google's suggestions (Russian)</os:Description> -+<os:InputEncoding>UTF-8</os:InputEncoding> -+<os:Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAANcNAADXDQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJmlk8pf6+v3s/v7+++zr/fcnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnIOwBJyDscCcg7PZttJ7/7Pfs//////++xO7/S5GA/ycg7P8nIOz2JyDscCcg7AEAAAAAAAAAAAAAAAAnIOwBJyDstScg7P8nIOz/Y8p5/2fHZf9Yv0z/YcF2/1rBUv8nIOz/JyDs/ycg7P8nIOy1JyDsAQAAAAAAAAAAJyDscCcg7P8nIOz/JyDs/4jQoP/p9+n//////05X3v9LkYD/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAJyDsJicg7PYnIOz/JyDs/zUu7f/+/v////////////89N+7/JyDs/yUo7f8nIOz/JyDs/ycg7P8nIOz2JyDsJicg7IAnIOz/JyDs/ycg7P9hXPH////////////t/P//GIr2/wfD+/8Gyfz/DKv5/yM57/8nIOz/JyDs/ycg7H8nIOyzJyDs/ycg7P8nIOz/jov1////////////Otz9/w3G/P8cWfH/JSvt/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDs5icg7P8nIOz/JyDs/7u5+f///////////27l/v8E0v3/BNL9/wTQ/f8Oofn/IT7v/ycg7P8nIOz/JyDs5icg7OYnIOz/JyDs/ycg7P/p6P3/uWsC////////////5fr//6Po/f8Thfb/DKv5/w6f+f8nIOz/JyDs/ycg7OYnIOyzJyDs/ycg7P8nIOz/9/b+/////////////////7lrAv/V1Pv/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOyzJyDsgCcg7P8nIOz/JyDs/8/N+///////////////////////iIX1/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDsfycg7CYnIOz2JyDs/ycg7P9FP+7/q6n4/+7u/f/n5v3/fXn0/yoj7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7CYAAAAAJyDscCcg7P8nIOz/wsD6/+no/f/Y1/z/eHTz/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7HAAAAAAAAAAACcg7AEnIOy1JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs/ycg7LUnIOwBAAAAAAAAAAAAAAAAJyDsAScg7HAnIOz2JyDs/ycg7P8nIOz/JyDs/ycg7P8nIOz/JyDs9icg7HAnIOwBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJyDsJicg7IAnIOyzJyDs5icg7OYnIOyzJyDsgCcg7CYAAAAAAAAAAAAAAAAAAAAA+B8AAPAPAADAAwAAwAMAAIABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAACAAQAAwAMAAMADAADwDwAA+B8AAA==</os:Image> -+<SearchForm>https://duckduckgo.com/</SearchForm> -+<os:Url type="text/html" method="GET" template="https://duckduckgo.com/?q={searchTerms}&kl=ru-ru"> -+</os:Url><os:Url type="application/x-suggestions+json" method="GET" template="http://ddgg.nfriedly.com/complete/search?output=firefox&hl=ru&q={searchTerms}"> -+</os:Url><os:Url type="application/opensearchdescription+xml" method="GET" template="http://mycroft.mozdev.org/updateos.php/id0/duckduckgo_ssl.xml" rel="self"> -+</os:Url> -+</SearchPlugin> ---- /dev/null 2012-04-12 23:52:53.981159155 -0300 -+++ comm-release/mail/locales/en-US/searchplugins/identica-notice-search.xml 2012-04-13 05:15:55.000000000 -0300 -@@ -0,0 +1,7 @@ -+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"> -+<os:ShortName>Identi.ca Notice Search</os:ShortName> -+<os:InputEncoding>UTF-8</os:InputEncoding> -+<os:Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAABGD6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQAAAAAAAAEBAQEBAQEBAQEAAAAAAAABAQEBAQEBAQEBAAAAAAAAAQEBAQEBAQEBAQAAAAAAAAEBAQEBAQEBAQEAAAAAAAABAQEBAQEBAQEBAAAAAAAAAQEBAQEBAQEBAQAAAAAAAAEBAQEBAQEBAQEAAAAAAAABAQEBAQEBAQEBAAAAAAAAAQEBAQEBAQEBAQAAAAAAAAEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA//8AAOAHAADgBwAA4AcAAOAHAADgBwAA4AcAAOAHAADgBwAA4AcAAOAHAADgBwAA//8AAP//AAA=</os:Image> -+<os:Url type="text/html" method="GET" template="http://identi.ca/search/notice?q={searchTerms}"> -+</os:Url> -+</SearchPlugin> ---- /dev/null 2012-04-12 23:52:53.981159155 -0300 -+++ comm-release/mail/locales/en-US/searchplugins/identica-people-search.xml 2012-04-13 05:15:53.000000000 -0300 -@@ -0,0 +1,7 @@ -+<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/"> -+<os:ShortName>Identi.ca People Search</os:ShortName> -+<os:InputEncoding>UTF-8</os:InputEncoding> -+<os:Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAABGD6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQAAAAAAAAEBAQEBAQEBAQEAAAAAAAABAQEBAQEBAQEBAAAAAAAAAQEBAQEBAQEBAQAAAAAAAAEBAQEBAQEBAQEAAAAAAAABAQEBAQEBAQEBAAAAAAAAAQEBAQEBAQEBAQAAAAAAAAEBAQEBAQEBAQEAAAAAAAABAQEBAQEBAQEBAAAAAAAAAQEBAQEBAQEBAQAAAAAAAAEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//AAD//wAA//8AAOAHAADgBwAA4AcAAOAHAADgBwAA4AcAAOAHAADgBwAA4AcAAOAHAADgBwAA//8AAP//AAA=</os:Image> -+<os:Url type="text/html" method="GET" template="http://identi.ca/search/people?q={searchTerms}"> -+</os:Url> -+</SearchPlugin> diff --git a/libre/thunderbird-libre/thunderbird-install-dir.patch b/libre/thunderbird-libre/thunderbird-install-dir.patch deleted file mode 100755 index 74e692bf2..000000000 --- a/libre/thunderbird-libre/thunderbird-install-dir.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -Nur comm-beta.orig/config/autoconf.mk.in comm-beta/config/autoconf.mk.in ---- comm-beta.orig/config/autoconf.mk.in 2011-11-06 14:39:51.064983780 +0000 -+++ comm-beta/config/autoconf.mk.in 2011-11-06 14:42:57.216735333 +0000 -@@ -65,8 +65,8 @@ - mandir = @mandir@ - idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) - --installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) -+installdir = $(libdir)/$(MOZ_APP_NAME) -+sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel - - MOZDEPTH = $(DEPTH)/mozilla - DIST = $(MOZDEPTH)/dist -diff -Nur comm-beta.orig/mozilla/config/autoconf.mk.in comm-beta/mozilla/config/autoconf.mk.in ---- comm-beta.orig/mozilla/config/autoconf.mk.in 2011-11-06 14:39:41.771562967 +0000 -+++ comm-beta/mozilla/config/autoconf.mk.in 2011-11-06 14:44:18.404165515 +0000 -@@ -68,8 +68,8 @@ - mandir = @mandir@ - idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) - --installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) -+installdir = $(libdir)/$(MOZ_APP_NAME) -+sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel - - DIST = $(DEPTH)/dist - LIBXUL_SDK = @LIBXUL_SDK@ -diff -Nur comm-beta.orig/mozilla/js/src/config/autoconf.mk.in comm-beta/mozilla/js/src/config/autoconf.mk.in ---- comm-beta.orig/mozilla/js/src/config/autoconf.mk.in 2011-11-06 14:39:48.014955070 +0000 -+++ comm-beta/mozilla/js/src/config/autoconf.mk.in 2011-11-06 14:44:32.977635875 +0000 -@@ -61,8 +61,8 @@ - datadir = @datadir@ - mandir = @mandir@ - --installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) --sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) -+installdir = $(libdir)/$(MOZ_APP_NAME) -+sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel - - TOP_DIST = @TOP_DIST@ - ifneq (,$(filter /%,$(TOP_DIST))) diff --git a/libre/thunderbird-libre/thunderbird.desktop b/libre/thunderbird-libre/thunderbird.desktop deleted file mode 100755 index a626e52ba..000000000 --- a/libre/thunderbird-libre/thunderbird.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=Thunderbird -Comment=Mail & News Reader -GenericName=Mail Client & News Reader -Exec=thunderbird %u -TryExec=thunderbird -Icon=thunderbird -Terminal=false -Type=Application -Categories=Network;Email; -MimeType=message/rfc822;x-scheme-handler/mailto; -StartupNotify=true diff --git a/libre/thunderbird-libre/thunderbird.install b/libre/thunderbird-libre/thunderbird.install deleted file mode 100755 index 4d4a283db..000000000 --- a/libre/thunderbird-libre/thunderbird.install +++ /dev/null @@ -1,12 +0,0 @@ -post_install() { - update-desktop-database -q - gtk-update-icon-cache -q -t -f usr/share/icons/hicolor -} - -post_upgrade() { - post_install -} - -post_remove() { - post_install -} diff --git a/libre/thunderbird-libre/vendor.js b/libre/thunderbird-libre/vendor.js deleted file mode 100755 index 170b505a8..000000000 --- a/libre/thunderbird-libre/vendor.js +++ /dev/null @@ -1,9 +0,0 @@ -// Use LANG environment variable to choose locale -pref("intl.locale.matchOS", true); - -// Disable default mailer checking. -pref("mail.shell.checkDefaultMail", false); - -// Don't disable our bundled extensions in the application directory -pref("extensions.autoDisableScopes", 11); -pref("extensions.shownSelectionUI", true); diff --git a/libre/unrar-libre/PKGBUILD b/libre/unrar-libre/PKGBUILD deleted file mode 100755 index e08e90220..000000000 --- a/libre/unrar-libre/PKGBUILD +++ /dev/null @@ -1,29 +0,0 @@ -# Maintainer: Joshua Ismael Haase Hernández <hahj87@gmail.com> -_pkgbase=unrar -pkgname=unrar-libre -pkgver=0.0.1 -pkgrel=1 -pkgdesc="A free software library to decompress .rar files." -arch=('i686' 'x86_64') -url="http://gna.org/projects/unrar/" -license=('GPL') -provides=(unrar) -conflicts=(unrar) -replaces=(unrar) -source=(http://download.gna.org/unrar/$_pkgbase-$pkgver.tar.gz) -md5sums=('ac284a6739e3b8c794e7f9e8c20ed8f8') #generate with 'makepkg -g' - -build() { - cd "$srcdir/$_pkgbase-$pkgver" - - ./configure --prefix=/usr - make -} - -package() { - cd "$srcdir/$_pkgbase-$pkgver" - - make DESTDIR="$pkgdir/" install -} - -# vim:set ts=2 sw=2 et: diff --git a/pcr/anyremote/PKGBUILD b/pcr/anyremote/PKGBUILD new file mode 100644 index 000000000..96e030245 --- /dev/null +++ b/pcr/anyremote/PKGBUILD @@ -0,0 +1,24 @@ +# Contributor: Andrea Fagiani <andfagiani_at_gmail_dot_com> +# Contributor: hb <hb.at.spamers.dot.net> +# Contributor: Lisa Denia <eiffel56@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=anyremote +pkgver=6.0 +pkgrel=1 +pkgdesc="Remote control (console-oriented) through bluetooth or IR connection" +arch=('i686' 'x86_64') +url="http://anyremote.sourceforge.net" +license=('GPL') +depends=('bluez' 'dbus-glib' 'libxtst') +optdepends=("irda-utils: IRDA support") +install=anyremote.install +source=(http://downloads.sourceforge.net/sourceforge/anyremote/$pkgname-$pkgver.tar.gz) + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr + make + make DESTDIR=$pkgdir install +} +md5sums=('f39da5df07f3e1a0c59bc3f95347dbe7') diff --git a/pcr/anyremote/anyremote.install b/pcr/anyremote/anyremote.install new file mode 100644 index 000000000..012444ce0 --- /dev/null +++ b/pcr/anyremote/anyremote.install @@ -0,0 +1,6 @@ +post_install () { + echo " + >>>Download the java client for your phone at + >>>http://anyremote.sourceforge.net/dload.html + " +} diff --git a/pcr/aurvote/PKGBUILD b/pcr/aurvote/PKGBUILD new file mode 100644 index 000000000..4dcf8d3d2 --- /dev/null +++ b/pcr/aurvote/PKGBUILD @@ -0,0 +1,18 @@ +# Maintainer: tuxce <tuxce.net@gmail.com> +# Maintainer: Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=aurvote +pkgver=1.4 +pkgrel=1 +pkgdesc="Tool to vote for favorite AUR packages" +url="http://git.archlinux.fr/aurvote.git/" +license="GPL" +arch=('any') +depends=('curl') +source=($pkgname) + +build() { + install -D -m 755 "$srcdir/$pkgname" "$pkgdir/usr/bin/$pkgname" +} + +md5sums=('57f2f0822b833f6c858526eb7c8bb85f') diff --git a/pcr/aurvote/aurvote b/pcr/aurvote/aurvote new file mode 100755 index 000000000..1b9c8f1bf --- /dev/null +++ b/pcr/aurvote/aurvote @@ -0,0 +1,193 @@ +#!/bin/bash +# +# aurvote : Tool to vote for favorite AUR packages +# +# Copyright (c) 2007-2010 Julien MISCHKOWITZ <wain@archlinux.fr> +# Copyright (c) 2011 tuxce <tuxce.net@gmail.com> +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +NAME='aurvote' +VERSION=1.4 + +TMPDIR=${TMPDIR:-/tmp} +AV_TMP="$TMPDIR/aurvote-$USER" + +CONFIGFILE=${XDG_HOME_CONFIG:-~/.config}/aurvote + +AUR_URL="https://aur.archlinux.org" +AUR_URL_LOGIN="$AUR_URL/login/" +AUR_URL_PKG_INFO="$AUR_URL/rpc.php" +AUR_URL_PKG_PAGE="$AUR_URL/packages/" +AUR_DOMAIN="aur.archlinux.org" +AUR_COOKIE="AURSID" +AUR_COOKIE_VALUE="" +AUR_SETLANG="?setlang=en" + + +version() { + echo "$NAME $VERSION" +} + +usage() { + echo "$NAME $VERSION" + echo + echo "usage: $0 <option> <pkgname1> <pkgname2> ..." + echo + echo " --version, -V shows version" + echo " --help, -h shows this help" + echo " --check, -c check for voted packages" + echo " --vote, -v vote for packages" + echo " --unvote, -u unvote packages" + echo + echo " --configure create $CONFIGFILE" + echo +} + +error() { + echo -e "Error: $*" + exit 1 +} + +is_cookie_valid() { + [[ -r $COOKIE_FILE ]] || return 1 + local expire + expire=$(sed -ne '/^\(#HttpOnly_\|[^#]\)/ { s/#HttpOnly_//;p }' "$COOKIE_FILE" | + awk "{ if (\$1==\"$AUR_DOMAIN\" && \$6==\"$AUR_COOKIE\") print \$5\" \"\$7; }") + AUR_COOKIE_VALUE=${expire##* } + expire=${expire%% *} + [[ $expire ]] && { ((expire==0)) || ((expire>$(date +%s))); } +} + +aur_login() { + local args=() + if ((PERSIST)); then + is_cookie_valid && return 0 + args=(-d "remember_me=on") + fi + if [[ ! $user || ! $pass ]]; then + error "$CONFIGFILE must have user name and password. Run:\n$NAME --configure" + fi + curl $CURL_OPT -L -fs -c "$COOKIE_FILE" "${args[@]}" -d "user=$user" \ + --data-urlencode "passwd=$pass" "$AUR_URL_LOGIN" \ + -o "$AV_TMP/login" || error "Unable to access $AUR_URL_LOGIN" + err=$(sed -ne 's/.*ul class="errorlist"><li>\([^<]*\)<.*/\1/p' "$AV_TMP/login") + [[ $err ]] && error "$err" +} + +aur_check_vote() { + local pkg + for pkg in "${pkgnames[@]}"; do + curl $CURL_OPT -fs -b "$COOKIE_FILE" \ + "${AUR_URL_PKG_PAGE}${pkg}${AUR_SETLANG}" \ + -o "$AV_TMP/$pkg.$PID" || + error "Unable to get $pkg page" + if sed '/<div id="news">/q' "$AV_TMP/$pkg.$PID" | grep -q /unvote/; then + echo "already voted" + elif sed '/<div id="news">/q' "$AV_TMP/$pkg.$PID" | grep -q /vote/; then + echo "not voted" + else + echo "voted status not found" + fi + done +} + + +aur_vote() { + local pkg + (($1)) && vote="/vote/" || vote="/unvote/" + for pkg in "${pkgnames[@]}"; do + curl $CURL_OPT -fs -b "$COOKIE_FILE" \ + "${AUR_URL_PKG_PAGE}${pkg}${vote}" -o /dev/null + if (($?)); then + echo "Error: Can't (un)vote for $pkg" + else + echo "$pkg : vote changed" + fi + done +} + +create_config_file() { + local ans + if [[ -f "$CONFIGFILE" ]]; then + read -p "$CONFIGFILE exists. Replace ? [y/N] " ans + [[ $ans != 'Y' && $ans != 'y' ]] && return 0 + fi + echo -n > "$CONFIGFILE" + if [[ ! -r "$CONFIGFILE" ]]; then + error "Unable to create $CONFIGFILE" + fi + echo "Creation of $CONFIGFILE" + read -p "AUR User : " ans + printf "user=%q\n" "$ans" >> "$CONFIGFILE" + read -p "AUR Password : " ans + printf "pass=%q\n" "$ans" >> "$CONFIGFILE" + read -p "Persistent login ? [Y/n] " ans + [[ $ans = 'n' || $ans = 'N' ]] && return 0 + read -p "Path to the cookie file : [/var/tmp/aurvote-$USER.cookie] ? " ans + printf "COOKIE_FILE=%q\n" "${ans:-/var/tmp/aurvote-$USER.cookie}" >> "$CONFIGFILE" + echo + echo "Creation complete." +} + +### MAIN PROGRAM ### +umask 077 +[[ -d "$AV_TMP" ]] || mkdir -p "$AV_TMP" +[[ -d "$AV_TMP" && -w "$AV_TMP" ]] || error "Cannot access to $AV_TMP" +PID=$$ +ACTION="vote" +pkgnames=() +CURL_OPT="" +PERSIST=0 + +[[ -r "$CONFIGFILE" ]] && source "$CONFIGFILE" + +[[ $COOKIE_FILE ]] && PERSIST=1 + +while [[ $1 ]]; do + case $1 in + --help|-h) usage; exit 0;; + --version|-V) version; exit 0;; + --check|-c) ACTION="check";; + --configure) ACTION="configure";; + --vote|-v) ACTION="vote";; + --unvote|-u) ACTION="unvote";; + --id) ;; # deprecated + --insecure) CURL_OPT+=" --insecure";; + -k) PERSIST=1; shift; COOKIE_FILE="$1";; + --*|-*) usage; exit 1;; + *) pkgnames+=("$1");; + esac + shift +done + +if [[ $ACTION = "configure" ]]; then + create_config_file + exit 0 +fi + +COOKIE_FILE=${COOKIE_FILE:-"$AV_TMP/cookies"} +pkgnames=("${pkgnames[@]%/*}") # compatibility with yaourt <= 1.2.1 +[[ ! $pkgnames ]] && usage && exit 1 + +aur_login + +case "$ACTION" in + check) aur_check_vote;; + vote) aur_vote 1;; + unvote) aur_vote 0;; +esac + +# vim: set ts=4 sw=4 et: diff --git a/pcr/auto-complete/PKGBUILD b/pcr/auto-complete/PKGBUILD new file mode 100755 index 000000000..afa9d8691 --- /dev/null +++ b/pcr/auto-complete/PKGBUILD @@ -0,0 +1,30 @@ +# Contributor: abf <zouxiaoming@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=auto-complete +pkgver=1.3.1 +pkgrel=1 +pkgdesc="A plugin for emacs that allows to auto-complete.Auto Complete Mode is the most intelligent auto-completion extension for GNU Emacs." +arch=('any') +url="http://cx4a.org/software/auto-complete/" +license=('GPL3') +install=$pkgname.install +depends=() +optdepends=('emacs') +source=(http://cx4a.org/pub/auto-complete/$pkgname-$pkgver.tar.bz2) +md5sums=('0ffdc1223d40b8ebc57495e33708ceea') + +build() { + cd "$srcdir/$pkgname-$pkgver" + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + mkdir -p $pkgdir/usr/share/$pkgname + mkdir -p $pkgdir/usr/share/emacs/site-lisp/ + make DIR="$pkgdir/usr/share/$pkgname" install + ln -s /usr/share/$pkgname $pkgdir/usr/share/emacs/site-lisp/$pkgname +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/auto-complete/auto-complete.install b/pcr/auto-complete/auto-complete.install new file mode 100755 index 000000000..9687f5e43 --- /dev/null +++ b/pcr/auto-complete/auto-complete.install @@ -0,0 +1,21 @@ +post_install() +{ +echo " " +echo "===================================================================" +echo " " +echo "Add the following code to your .emacs:" + +echo "(add-to-list 'load-path \"/usr/share/emacs/site-lisp/auto-complete\")" +echo "(require 'auto-complete-config)" +echo "(add-to-list 'ac-dictionary-directories \"/usr/share/emacs/site-lisp/auto-complete/ac-dict\")" +echo "(ac-config-default)" +echo " " +echo "===================================================================" +echo " " + +} + +post_upgrade() +{ + post_install +} diff --git a/pcr/bambus/PKGBUILD b/pcr/bambus/PKGBUILD new file mode 100755 index 000000000..d76ba2dc2 --- /dev/null +++ b/pcr/bambus/PKGBUILD @@ -0,0 +1,26 @@ +# Bambus +# Contributor: ying <Jinoto Systems> +# Contributor: ying <Jinoto Systems> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=bambus +pkgver=2.4 +pkgrel=1 +pkgdesc="A small and simple GTK Gui to change Wallpapers using feh, Esetroot, hsetroot, habak or any other command tool." +url="http://malisch-ts.de" +arch=('i686' 'x86_64') +license=('GPL3') +depends=('gtkmm' 'eterm') # 'eterm' can be changed in any command tool to draw the wallpaper. +optdepends=('eterm' 'habak' 'feh' 'hsetroot' 'others') +source=("https://downloads.sourceforge.net/project/simplebambus/bambus-${pkgver}-source.tar.gz?r=&ts=1289210369&use_mirror=master") +md5sums=('c8001d9f837f04f4f8712729c2aa1849') + +build() { + make all +} +package() { + install -Dm755 bambus $pkgdir/usr/bin/bambus || return +} + + +md5sums=('c8001d9f837f04f4f8712729c2aa1849') diff --git a/pcr/bashmount/PKGBUILD b/pcr/bashmount/PKGBUILD new file mode 100644 index 000000000..e468ab79f --- /dev/null +++ b/pcr/bashmount/PKGBUILD @@ -0,0 +1,37 @@ +# Contributer: Jamie Nguyen <jamie@tomoyolinux.co.uk> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=bashmount +pkgver=1.6.2 +pkgrel=1 +pkgdesc="A menu-driven bash script for the management of removable media with udisks" +arch=('any') +url='http://www.sourceforge.net/projects/bashmount/' +license=('GPL2') +depends=('udisks') +install=${pkgname}.install +backup=('etc/bashmount.conf') +source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz") + +build() +{ + cd "${srcdir}/bashmount-${pkgver}" + + # install script + install -D -m755 bashmount "${pkgdir}/usr/bin/bashmount" + + # install config file + install -D -m644 bashmount.conf "${pkgdir}/etc/bashmount.conf" + + # install man page + gzip -c -9 bashmount.1 > bashmount.1.gz + install -D -m644 bashmount.1.gz "${pkgdir}/usr/share/man/man1/bashmount.1.gz" + + # install documentation + install -d -m755 "${pkgdir}/usr/share/doc/bashmount" + install -m644 AUTHORS "${pkgdir}/usr/share/doc/bashmount/AUTHORS" + install -m644 COPYING "${pkgdir}/usr/share/doc/bashmount/COPYING" + install -m644 NEWS "${pkgdir}/usr/share/doc/bashmount/NEWS" +} + +sha256sums=('10e5c8f9065e2410c5018d74a3f8cf7f30668fafa30d9ed82ff04cd64a0f7309') diff --git a/pcr/bashmount/bashmount.install b/pcr/bashmount/bashmount.install new file mode 100644 index 000000000..6e646d94b --- /dev/null +++ b/pcr/bashmount/bashmount.install @@ -0,0 +1,9 @@ +post_install () { + echo + echo " * dbus and consolekit/policykit need to be running. If you are not" + echo " using a graphical login manager, put this in ~/.xinitrc:" + echo + echo " source /etc/X11/xinit/xinitrc.d/30-dbus" + echo " exec ck-launch-session [insert window manager here]" + echo +} diff --git a/pcr/bup/PKGBUILD b/pcr/bup/PKGBUILD new file mode 100644 index 000000000..d45d60961 --- /dev/null +++ b/pcr/bup/PKGBUILD @@ -0,0 +1,35 @@ +# Contributor: Bram Schoenmakers <me@bramschoenmakers.nl> +# Contributor: henning mueller <henning@orgizm.net> +# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +# If you'd like to have documentation, please set the variable below to 1. +# This implies installing pandoc, which in turn depends on many Haskell packages. +# Which you can build if you wish. +_havedocs=0 + +pkgname=bup +pkgver=0.25rc1 +_pkgver=0.25-rc1 +pkgrel=2 +pkgdesc="Backup tool using git pack files." +arch=('i686' 'x86_64') +url="http://github.com/apenwarr/bup" +license=('GPL') +depends=('python2-fuse' 'par2cmdline' 'python' 'git') +[ $_havedocs = 1 ] && makedepends=('haskell-pandoc') +source=("https://github.com/apenwarr/${pkgname}/archive/${pkgname}-${_pkgver}.tar.gz") + +build() { + cd "${srcdir}/${pkgname}-${pkgname}-${_pkgver}" + + find . -name \*.py | xargs sed -i 's:env python:env python2:' + sed -i 's:PYTHON=python:PYTHON=python2:' Makefile + + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgname}-${_pkgver}" + make DESTDIR=$pkgdir install +} + diff --git a/pcr/cegui-0.5/CEGUIString.h b/pcr/cegui-0.5/CEGUIString.h new file mode 100644 index 000000000..13a61ba15 --- /dev/null +++ b/pcr/cegui-0.5/CEGUIString.h @@ -0,0 +1,5603 @@ +/*********************************************************************** + filename: CEGUIString.h + created: 26/2/2004 + author: Paul D Turner + + purpose: Defines string class used within the GUI system. +*************************************************************************/ +/*************************************************************************** + * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + ***************************************************************************/ +#ifndef _CEGUIString_h_ +#define _CEGUIString_h_ + +#include "CEGUIBase.h" +#include <string> +#include <string.h> +#include <stdexcept> + +// Start of CEGUI namespace section +namespace CEGUI +{ +#define STR_QUICKBUFF_SIZE 32 + /************************************************************************* + Basic Types + *************************************************************************/ + typedef uint8 utf8; + //typedef uint16 utf16; // removed typedef to prevent usage, as utf16 is not supported (yet) + typedef uint32 utf32; + +/*! +\brief + String class used within the GUI system. + + For the most part, this class can replace std::string in basic usage. However, currently String does not use the + current locale, and also comparisons do not take into account the Unicode data tables, so are not 'correct' + as such. +*/ +class CEGUIEXPORT String +{ +public: + /************************************************************************* + Integral Types + *************************************************************************/ + typedef utf32 value_type; //!< Basic 'code point' type used for String (utf32) + typedef size_t size_type; //!< Unsigned type used for size values and indices + typedef std::ptrdiff_t difference_type; //!< Signed type used for differences + typedef utf32& reference; //!< Type used for utf32 code point references + typedef const utf32& const_reference; //!< Type used for constant utf32 code point references + typedef utf32* pointer; //!< Type used for utf32 code point pointers + typedef const utf32* const_pointer; //!< Type used for constant utf32 code point pointers + + static const size_type npos; //!< Value used to represent 'not found' conditions and 'all code points' etc. + +private: + /************************************************************************* + Implementation data + *************************************************************************/ + size_type d_cplength; //!< holds length of string in code points (not including null termination) + size_type d_reserve; //!< code point reserve size (currently allocated buffer size in code points). + + mutable utf8* d_encodedbuff; //!< holds string data encoded as utf8 (generated only by calls to c_str() and data()) + mutable size_type d_encodeddatlen; //!< holds length of encoded data (in case it's smaller than buffer). + mutable size_type d_encodedbufflen; //!< length of above buffer (since buffer can be bigger then the data it holds to save re-allocations). + + utf32 d_quickbuff[STR_QUICKBUFF_SIZE]; //!< This is a integrated 'quick' buffer to save allocations for smallish strings + utf32* d_buffer; //!< Pointer the the main buffer memory. This is only valid when quick-buffer is not being used + +public: + /************************************************************************* + Iterator Classes + *************************************************************************/ + /*! + \brief + Constant forward iterator class for String objects + */ +#if defined(_MSC_VER) && (_MSC_VER <= 1200) + class const_iterator : public std::iterator<std::random_access_iterator_tag, utf32> +#else + class const_iterator : public std::iterator<std::random_access_iterator_tag, utf32, std::ptrdiff_t, const utf32*, const utf32&> +#endif + { + + public: + ////////////////////////////////////////////////////////////////////////// + // data + ////////////////////////////////////////////////////////////////////////// + const utf32* d_ptr; + + + ////////////////////////////////////////////////////////////////////////// + // Methods + ////////////////////////////////////////////////////////////////////////// + const_iterator(void) + { + d_ptr = 0; + } + const_iterator(const_pointer ptr) + { + d_ptr = ptr; + } + + const_reference operator*() const + { + return *d_ptr; + } + +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# pragma warning (push) +# pragma warning (disable : 4284) +#endif + const_pointer operator->() const + { + return &**this; + } + +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# pragma warning (pop) +#endif + + const_iterator& operator++() + { + ++d_ptr; + return *this; + } + + const_iterator operator++(int) + { + const_iterator temp = *this; + ++*this; + return temp; + } + + const_iterator& operator--() + { + --d_ptr; + return *this; + } + + const_iterator operator--(int) + { + const_iterator temp = *this; + --*this; + return temp; + } + + const_iterator& operator+=(difference_type offset) + { + d_ptr += offset; + return *this; + } + + const_iterator operator+(difference_type offset) const + { + const_iterator temp = *this; + return temp += offset; + } + + const_iterator& operator-=(difference_type offset) + { + return *this += -offset; + } + + const_iterator operator-(difference_type offset) const + { + const_iterator temp = *this; + return temp -= offset; + } + + difference_type operator-(const const_iterator& iter) const + { + return d_ptr - iter.d_ptr; + } + + const_reference operator[](difference_type offset) const + { + return *(*this + offset); + } + + bool operator==(const const_iterator& iter) const + { + return d_ptr == iter.d_ptr; + } + + bool operator!=(const const_iterator& iter) const + { + return !(*this == iter); + } + + bool operator<(const const_iterator& iter) const + { + return d_ptr < iter.d_ptr; + } + + bool operator>(const const_iterator& iter) const + { + return (!(iter < *this)); + } + + bool operator<=(const const_iterator& iter) const + { + return (!(iter < *this)); + } + + bool operator>=(const const_iterator& iter) const + { + return (!(*this < iter)); + } + + friend const_iterator operator+(difference_type offset, const const_iterator& iter) + { + return iter + offset; + } + + }; + + /*! + \brief + Forward iterator class for String objects + */ + class iterator : public const_iterator + { + public: + iterator(void) {} + iterator(pointer ptr) : const_iterator(ptr) {} + + + reference operator*() const + { + return ((reference)**(const_iterator *)this); + } + +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# pragma warning (push) +# pragma warning (disable : 4284) +#endif + + pointer operator->() const + { + return &**this; + } + +#if defined(_MSC_VER) && (_MSC_VER <= 1200) +# pragma warning (pop) +#endif + + iterator& operator++() + { + ++this->d_ptr; + return *this; + } + + iterator operator++(int) + { + iterator temp = *this; + ++*this; + return temp; + } + + iterator& operator--() + { + --this->d_ptr; + return *this; + } + + iterator operator--(int) + { + iterator temp = *this; + --*this; + return temp; + } + + iterator& operator+=(difference_type offset) + { + this->d_ptr += offset; + return *this; + } + + iterator operator+(difference_type offset) const + { + iterator temp = *this; + return temp + offset; + } + + iterator& operator-=(difference_type offset) + { + return *this += -offset; + } + + iterator operator-(difference_type offset) const + { + iterator temp = *this; + return temp -= offset; + } + + difference_type operator-(const const_iterator& iter) const + { + return ((const_iterator)*this - iter); + } + + reference operator[](difference_type offset) const + { + return *(*this + offset); + } + + friend iterator operator+(difference_type offset, const iterator& iter) + { + return iter + offset; + } + + }; + + /*! + \brief + Constant reverse iterator class for String objects + */ +#if defined(_MSC_VER) && ((_MSC_VER <= 1200) || ((_MSC_VER <= 1300) && defined(_STLPORT_VERSION))) + typedef std::reverse_iterator<const_iterator, const_pointer, const_reference, difference_type> const_reverse_iterator; +#else + typedef std::reverse_iterator<const_iterator> const_reverse_iterator; +#endif + + /*! + \brief + Reverse iterator class for String objects + */ +#if defined(_MSC_VER) && ((_MSC_VER <= 1200) || ((_MSC_VER <= 1300) && defined(_STLPORT_VERSION))) + typedef std::reverse_iterator<iterator, pointer, reference, difference_type> reverse_iterator; +#else + typedef std::reverse_iterator<iterator> reverse_iterator; +#endif + +public: + /*! + \brief + Functor that can be used as comparator in a std::map with String keys. + It's faster than using the default, but the map will no longer be sorted alphabetically. + */ + struct FastLessCompare + { + bool operator() (const String& a, const String& b) const + { + const size_t la = a.length(); + const size_t lb = b.length(); + if (la == lb) + return (memcmp(a.ptr(), b.ptr(), la*sizeof(utf32)) < 0); + return (la < lb); + } + }; + +public: + ////////////////////////////////////////////////////////////////////////// + // Default Construction and Destructor + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Constructs an empty string + */ + String(void) + { + init(); + } + + /*! + \brief + Destructor for String objects + */ + ~String(void); + + ////////////////////////////////////////////////////////////////////////// + // Construction via CEGUI::String + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Copy constructor - Creates a new string with the same value as \a str + + \param str + String object used to initialise the newly created string + + \return + Nothing + */ + String(const String& str) + { + init(); + assign(str); + } + + + /*! + \brief + Constructs a new string initialised with code points from another String object. + + \param str + String object used to initialise the newly created string + + \param str_idx + Starting code-point of \a str to be used when initialising the new String + + \param str_num + Maximum number of code points from \a str that are to be assigned to the new String + + \return + Nothing + */ + String(const String& str, size_type str_idx, size_type str_num = npos) + { + init(); + assign(str, str_idx, str_num); + } + + ////////////////////////////////////////////////////////////////////////// + // Construction via std::string + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Constructs a new string and initialises it using the std::string std_str + + \param std_str + The std::string object that is to be used to initialise the new String object. + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \return + Nothing + + \exception std::length_error Thrown if resulting String object would be too big. + */ + String(const std::string& std_str) + { + init(); + assign(std_str); + } + + /*! + \brief + Constructs a new string initialised with characters from the given std::string object. + + \param std_str + std::string object used to initialise the newly created string + + \param str_idx + Starting character of \a std_str to be used when initialising the new String + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \param str_num + Maximum number of characters from \a std_str that are to be assigned to the new String + + \return + Nothing + + \exception std::length_error Thrown if resulting String object would be too big. + */ + String(const std::string& std_str, size_type str_idx, size_type str_num = npos) + { + init(); + assign(std_str, str_idx, str_num); + } + + + ////////////////////////////////////////////////////////////////////////// + // Construction via UTF-8 stream (for straight ASCII use, only codes 0x00 - 0x7f are valid) + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Constructs a new String object and initialise it using the provided utf8 encoded string buffer. + + \param utf8_str + Pointer to a buffer containing a null-terminated Unicode string encoded as utf8 data. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \return + Nothing + + \exception std::length_error Thrown if resulting String object would be too big. + */ + String(const utf8* utf8_str) + { + init(); + assign(utf8_str); + } + + /*! + \brief + Constructs a new String object and initialise it using the provided utf8 encoded string buffer. + + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param utf8_str + Pointer to a buffer containing Unicode string data encoded as utf8. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param chars_len + Length of the provided utf8 string in code units (not code-points). + + \return + Nothing + + \exception std::length_error Thrown if resulting String object would be too big. + */ + String(const utf8* utf8_str, size_type chars_len) + { + init(); + assign(utf8_str, chars_len); + } + + ////////////////////////////////////////////////////////////////////////// + // Construction via code-point (using a UTF-32 code unit) + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Constructs a new String that is initialised with the specified code point + + \param num + The number of times \a code_point is to be put into new String object + + \param code_point + The Unicode code point to be used when initialising the String object + + \return + Nothing + + \exception std::length_error Thrown if resulting String object would be too big. + */ + String(size_type num, utf32 code_point) + { + init(); + assign(num, code_point); + } + + ////////////////////////////////////////////////////////////////////////// + // Construction via iterator + ////////////////////////////////////////////////////////////////////////// + // Create string with characters in the range [beg, end) + /*! + \brief + Construct a new string object and initialise it with code-points from the range [beg, end). + + \param beg + Iterator describing the start of the data to be used when initialising the String object + + \param end + Iterator describing the (exclusive) end of the data to be used when initialising the String object + + \return + Nothing + */ + String(const_iterator iter_beg, const_iterator iter_end) + { + init(); + append(iter_beg, iter_end); + } + + + ////////////////////////////////////////////////////////////////////////// + // Construction via c-string + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Constructs a new String object and initialise it using the provided c-string. + + \param c_str + Pointer to a c-string. + + \return + Nothing + + \exception std::length_error Thrown if resulting String object would be too big. + */ + String(const char* cstr) + { + init(); + assign(cstr); + } + + /*! + \brief + Constructs a new String object and initialise it using characters from the provided char array. + + \param chars + char array. + + \param chars_len + Number of chars from the array to be used. + + \return + Nothing + + \exception std::length_error Thrown if resulting String object would be too big. + */ + String(const char* chars, size_type chars_len) + { + init(); + assign(chars, chars_len); + } + + + ////////////////////////////////////////////////////////////////////////// + // Size operations + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Returns the size of the String in code points + + \return + Number of code points currently in the String + */ + size_type size(void) const + { + return d_cplength; + } + + /*! + \brief + Returns the size of the String in code points + + \return + Number of code points currently in the String + */ + size_type length(void) const + { + return d_cplength; + } + + /*! + \brief + Returns true if the String is empty + + \return + true if the String is empty, else false. + */ + bool empty(void) const + { + return (d_cplength == 0); + } + + /*! + \brief + Returns the maximum size of a String. + + Any operation that would result in a String that is larger than this value will throw the std::length_error exception. + + \return + The maximum number of code points that a string can contain + */ + static size_type max_size(void) + { + return (((size_type)-1) / sizeof(utf32)); + } + + ////////////////////////////////////////////////////////////////////////// + // Capacity Operations + ////////////////////////////////////////////////////////////////////////// + // return the number of code points the string could hold without re-allocation + // (due to internal encoding this will always report the figure for worst-case encoding, and could even be < size()!) + /*! + \brief + Return the number of code points that the String could hold before a re-allocation would be required. + + \return + Size of the current reserve buffer. This is the maximum number of code points the String could hold before a buffer + re-allocation would be required + */ + size_type capacity(void) const + { + return d_reserve - 1; + } + + // reserve internal memory for at-least 'num' code-points (characters). if num is 0, request is shrink-to-fit. + /*! + \brief + Specifies the amount of reserve capacity to allocate. + + \param num + The number of code points to allocate space for. If \a num is larger that the current reserve, then a re-allocation will occur. If + \a num is smaller than the current reserve (but not 0) the buffer may be shrunk to the larger of the specified number, or the current + String size (operation is currently not implemented). If \a num is 0, then the buffer is re-allocated to fit the current String size. + + \return + Nothing + + \exception std::length_error Thrown if resulting String object would be too big. + */ + void reserve(size_type num = 0) + { + if (num == 0) + trim(); + else + grow(num); + } + + ////////////////////////////////////////////////////////////////////////// + // Comparisons + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Compares this String with the String 'str'. + + \note + This does currently not properly consider Unicode and / or the system locale. + + \param str + The String object that is to compared with this String. + + \return + - 0 if the String objects are equal + - <0 if this String is lexicographically smaller than \a str + - >0 if this String is lexicographically greater than \a str + */ + int compare(const String& str) const + { + return compare(0, d_cplength, str); + } + + /*! + \brief + Compares code points from this String with code points from the String 'str'. + + \note + This does currently not properly consider Unicode and / or the system locale. + + \param idx + Index of the first code point from this String to consider. + + \param len + Maximum number of code points from this String to consider. + + \param str + The String object that is to compared with this String. + + \param str_idx + Index of the first code point from String \a str to consider. + + \param str_len + Maximum number of code points from String \a str to consider + + \return + - 0 if the specified sub-strings are equal + - <0 if specified sub-strings are lexicographically smaller than \a str + - >0 if specified sub-strings are lexicographically greater than \a str + + \exception std::out_of_range Thrown if either \a idx or \a str_idx are invalid. + */ + int compare(size_type idx, size_type len, const String& str, size_type str_idx = 0, size_type str_len = npos) const + { + if ((d_cplength < idx) || (str.d_cplength < str_idx)) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if ((len == npos) || (idx + len > d_cplength)) + len = d_cplength - idx; + + if ((str_len == npos) || (str_idx + str_len > str.d_cplength)) + str_len = str.d_cplength - str_idx; + + int val = (len == 0) ? 0 : utf32_comp_utf32(&ptr()[idx], &str.ptr()[str_idx], (len < str_len) ? len : str_len); + + return (val != 0) ? ((val < 0) ? -1 : 1) : (len < str_len) ? -1 : (len == str_len) ? 0 : 1; + } + + + /*! + \brief + Compares this String with the std::string 'std_str'. + + \note + This does currently not properly consider Unicode and / or the system locale. + + \param std_str + The std::string object that is to compared with this String. + + \note + Characters from \a std_str are considered to represent Unicode code points in the range 0x00..0xFF. No translation of + the encountered data is performed. + + \return + - 0 if the string objects are equal + - <0 if this string is lexicographically smaller than \a std_str + - >0 if this string is lexicographically greater than \a std_str + */ + int compare(const std::string& std_str) const + { + return compare(0, d_cplength, std_str); + } + + + /*! + \brief + Compares code points from this String with code points from the std::string 'std_str'. + + \note + This does currently not properly consider Unicode and / or the system locale. + + \param idx + Index of the first code point from this String to consider. + + \param len + Maximum number of code points from this String to consider. + + \param std_str + The std::string object that is to compared with this String. + + \note + Characters from \a std_str are considered to represent Unicode code points in the range 0x00..0xFF. No translation of + the encountered data is performed. + + \param str_idx + Index of the first character from std::string \a std_str to consider. + + \param str_len + Maximum number of characters from std::string \a std_str to consider + + \return + - 0 if the specified sub-strings are equal + - <0 if specified sub-strings are lexicographically smaller than \a std_str + - >0 if specified sub-strings are lexicographically greater than \a std_str + + \exception std::out_of_range Thrown if either \a idx or \a str_idx are invalid. + */ + int compare(size_type idx, size_type len, const std::string& std_str, size_type str_idx = 0, size_type str_len = npos) const + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (std_str.size() < str_idx) + throw std::out_of_range("Index is out of range for std::string"); + + if ((len == npos) || (idx + len > d_cplength)) + len = d_cplength - idx; + + if ((str_len == npos) || (str_idx + str_len > std_str.size())) + str_len = (size_type)std_str.size() - str_idx; + + int val = (len == 0) ? 0 : utf32_comp_char(&ptr()[idx], &std_str.c_str()[str_idx], (len < str_len) ? len : str_len); + + return (val != 0) ? ((val < 0) ? -1 : 1) : (len < str_len) ? -1 : (len == str_len) ? 0 : 1; + } + + + /*! + \brief + Compares this String with the null-terminated utf8 encoded 'utf8_str'. + + \note + This does currently not properly consider Unicode and / or the system locale. + + \param utf8_str + The buffer containing valid Unicode data encoded as utf8 that is to compared with this String. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \return + - 0 if the strings are equal + - <0 if this string is lexicographically smaller than \a utf8_str + - >0 if this string is lexicographically greater than \a utf8_str + */ + int compare(const utf8* utf8_str) const + { + return compare(0, d_cplength, utf8_str, encoded_size(utf8_str)); + } + + + /*! + \brief + Compares code points from this String with the null-terminated utf8 encoded 'utf8_str'. + + \note + This does currently not properly consider Unicode and / or the system locale. + + \param idx + Index of the first code point from this String to consider. + + \param len + Maximum number of code points from this String to consider. + + \param utf8_str + The buffer containing valid Unicode data encoded as utf8 that is to compared with this String. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \return + - 0 if the specified sub-strings are equal + - <0 if specified sub-strings are lexicographically smaller than \a utf8_str + - >0 if specified sub-strings are lexicographically greater than \a utf8_str + + \exception std::out_of_range Thrown if \a idx is invalid. + */ + int compare(size_type idx, size_type len, const utf8* utf8_str) const + { + return compare(idx, len, utf8_str, encoded_size(utf8_str)); + } + + /*! + \brief + Compares code points from this String with the utf8 encoded data in buffer 'utf8_str'. + + \note + This does currently not properly consider Unicode and / or the system locale. + + \param idx + Index of the first code point from this String to consider. + + \param len + Maximum number of code points from this String to consider. + + \param utf8_str + The buffer containing valid Unicode data encoded as utf8 that is to compared with this String. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param str_cplen + The number of encoded code points in the buffer \a utf8_str (this is not the same as the number of code units). + + \return + - 0 if the specified sub-strings are equal + - <0 if specified sub-strings are lexicographically smaller than \a utf8_str + - >0 if specified sub-strings are lexicographically greater than \a utf8_str + + \exception std::out_of_range Thrown if \a idx is invalid. + \exception std::length_error Thrown if \a str_cplen is set to npos. + */ + int compare(size_type idx, size_type len, const utf8* utf8_str, size_type str_cplen) const + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (str_cplen == npos) + throw std::length_error("Length for utf8 encoded string can not be 'npos'"); + + if ((len == npos) || (idx + len > d_cplength)) + len = d_cplength - idx; + + int val = (len == 0) ? 0 : utf32_comp_utf8(&ptr()[idx], utf8_str, (len < str_cplen) ? len : str_cplen); + + return (val != 0) ? ((val < 0) ? -1 : 1) : (len < str_cplen) ? -1 : (len == str_cplen) ? 0 : 1; + } + + + /*! + \brief + Compares this String with the given c-string. + + \note + This does currently not properly consider Unicode and / or the system locale. + + \param c_str + The c-string that is to compared with this String. + + \return + - 0 if the strings are equal + - <0 if this string is lexicographically smaller than \a c_str + - >0 if this string is lexicographically greater than \a c_str + */ + int compare(const char* cstr) const + { + return compare(0, d_cplength, cstr, strlen(cstr)); + } + + + /*! + \brief + Compares code points from this String with the given c-string. + + \note + This does currently not properly consider Unicode and / or the system locale. + + \param idx + Index of the first code point from this String to consider. + + \param len + Maximum number of code points from this String to consider. + + \param c_str + The c-string that is to compared with this String. + + \return + - 0 if the specified sub-strings are equal + - <0 if specified sub-strings are lexicographically smaller than \a c_str + - >0 if specified sub-strings are lexicographically greater than \a c_str + + \exception std::out_of_range Thrown if \a idx is invalid. + */ + int compare(size_type idx, size_type len, const char* cstr) const + { + return compare(idx, len, cstr, strlen(cstr)); + } + + + /*! + \brief + Compares code points from this String with chars in the given char array. + + \note + This does currently not properly consider Unicode and / or the system locale. + + \param idx + Index of the first code point from this String to consider. + + \param len + Maximum number of code points from this String to consider. + + \param chars + The array containing the chars that are to compared with this String. + + \param chars_len + The number of chars in the array. + + \return + - 0 if the specified sub-strings are equal + - <0 if specified sub-strings are lexicographically smaller than \a chars + - >0 if specified sub-strings are lexicographically greater than \a chars + + \exception std::out_of_range Thrown if \a idx is invalid. + \exception std::length_error Thrown if \a chars_len is set to npos. + */ + int compare(size_type idx, size_type len, const char* chars, size_type chars_len) const + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (chars_len == npos) + throw std::length_error("Length for char array can not be 'npos'"); + + if ((len == npos) || (idx + len > d_cplength)) + len = d_cplength - idx; + + int val = (len == 0) ? 0 : utf32_comp_char(&ptr()[idx], chars, (len < chars_len) ? len : chars_len); + + return (val != 0) ? ((val < 0) ? -1 : 1) : (len < chars_len) ? -1 : (len == chars_len) ? 0 : 1; + } + + + ////////////////////////////////////////////////////////////////////////// + // Character access + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Returns the code point at the given index. + + \param idx + Zero based index of the code point to be returned. + + \note + - For constant strings length()/size() provide a valid index and will access the default utf32 value. + - For non-constant strings length()/size() is an invalid index, and acceesing (especially writing) this index could cause string corruption. + + \return + The utf32 code point at the given index within the String. + */ + reference operator[](size_type idx) + { + return (ptr()[idx]); + } + + /*! + \brief + Returns the code point at the given index. + + \param idx + Zero based index of the code point to be returned. + + \note + - For constant strings length()/size() provide a valid index and will access the default utf32 value. + - For non-constant strings length()/size() is an invalid index, and acceesing (especially writing) this index could cause string corruption. + + \return + The utf32 code point at the given index within the String. + */ + value_type operator[](size_type idx) const + { + return ptr()[idx]; + } + + /*! + \brief + Returns the code point at the given index. + + \param idx + Zero based index of the code point to be returned. + + \return + The utf32 code point at the given index within the String. + + \exception std::out_of_range Thrown if \a idx is >= length(). + */ + reference at(size_type idx) + { + if (d_cplength <= idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + return ptr()[idx]; + } + + /*! + \brief + Returns the code point at the given index. + + \param idx + Zero based index of the code point to be returned. + + \return + The utf32 code point at the given index within the String. + + \exception std::out_of_range Thrown if \a idx is >= length(). + */ + const_reference at(size_type idx) const + { + if (d_cplength <= idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + return ptr()[idx]; + } + + + ////////////////////////////////////////////////////////////////////////// + // C-Strings and arrays + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Returns contents of the String as a null terminated string of utf8 encoded data. + + \return + Pointer to a char buffer containing the contents of the String encoded as null-terminated utf8 data. + + \note + The buffer returned from this function is owned by the String object. + + \note + Any function that modifies the String data will invalidate the buffer returned by this call. + */ + const char* c_str(void) const + { + return (const char*)build_utf8_buff(); + } + + /*! + \brief + Returns contents of the String as utf8 encoded data. + + \return + Pointer to a buffer containing the contents of the String encoded utf8 data. + + \note + The buffer returned from this function is owned by the String object. + + \note + Any function that modifies the String data will invalidate the buffer returned by this call. + */ + const utf8* data(void) const + { + return build_utf8_buff(); + } + + /*! + \brief + Returns a pointer to the buffer in use. + */ + utf32* ptr(void) + { + return (d_reserve > STR_QUICKBUFF_SIZE) ? d_buffer : d_quickbuff; + } + + /*! + \brief + Returns a pointer to the buffer in use. (const version) + */ + const utf32* ptr(void) const + { + return (d_reserve > STR_QUICKBUFF_SIZE) ? d_buffer : d_quickbuff; + } + + // copy, at most, 'len' code-points of the string, begining with code-point 'idx', into the array 'buf' as valid utf8 encoded data + // return number of utf8 code units placed into the buffer + /*! + \brief + Copies an area of the String into the provided buffer as encoded utf8 data. + + \param buf + Pointer to a buffer that is to receive the encoded data (this must be big enough to hold the encoded data) + + \param len + Maximum number of code points from the String that should be encoded into the buffer + + \param idx + Index of the first code point to be encoded into the buffer + + \return + The number of utf8 encoded code units transferred to the buffer. + + \note A code unit does not equal a code point. A utf32 code point, when encoded as utf8, can occupy between 1 and 4 code units. + + \exception std::out_of_range Thrown if \a idx was invalid for this String. + */ + size_type copy(utf8* buf, size_type len = npos, size_type idx = 0) const + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (len == npos) + len = d_cplength; + + return encode(&ptr()[idx], buf, npos, len); + } + + ////////////////////////////////////////////////////////////////////////// + // UTF8 Encoding length information + ////////////////////////////////////////////////////////////////////////// + // return the number of bytes required to hold 'num' code-points, starting at code-point 'idx', of the the string when encoded as utf8 data. + /*! + \brief + Return the number of utf8 code units required to hold an area of the String when encoded as utf8 data + + \param num + Maximum number of code points to consider when calculating utf8 encoded size. + + \param idx + Index of the first code point to consider when calculating the utf8 encoded size + + \return + The number of utf8 code units (bytes) required to hold the specified sub-string when encoded as utf8 data. + + \exception std::out_of_range Thrown if \a idx was invalid for this String. + */ + size_type utf8_stream_len(size_type num = npos, size_type idx = 0) const + { + using namespace std; + + if (d_cplength < idx) + throw out_of_range("Index was out of range for CEGUI::String object"); + + size_type maxlen = d_cplength - idx; + + return encoded_size(&ptr()[idx], ceguimin(num, maxlen)); + } + + ////////////////////////////////////////////////////////////////////////// + // Assignment Functions + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Assign the value of String \a str to this String + + \param str + String object containing the string value to be assigned. + + \return + This String after the assignment has happened + */ + String& operator=(const String& str) + { + return assign(str); + } + + /*! + \brief + Assign a sub-string of String \a str to this String + + \param str + String object containing the string data to be assigned. + + \param str_idx + Index of the first code point in \a str that is to be assigned + + \param str_num + Maximum number of code points from \a str that are be be assigned + + \return + This String after the assignment has happened + + \exception std::out_of_range Thrown if str_idx is invalid for \a str + */ + String& assign(const String& str, size_type str_idx = 0, size_type str_num = npos) + { + if (str.d_cplength < str_idx) + throw std::out_of_range("Index was out of range for CEGUI::String object"); + + if (str_num == npos) + str_num = str.d_cplength - str_idx; + + grow(str_num); + setlen(str_num); + memcpy(ptr(), &str.ptr()[str_idx], str_num * sizeof(utf32)); + + return *this; + } + + /*! + \brief + Assign the value of std::string \a std_str to this String + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \param std_str + std::string object containing the string value to be assigned. + + \return + This String after the assignment has happened + + \exception std::length_error Thrown if the resulting String would have been too large. + */ + String& operator=(const std::string& std_str) + { + return assign(std_str); + } + + /*! + \brief + Assign a sub-string of std::string \a std_str to this String + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \param std_str + std::string object containing the string value to be assigned. + + \param str_idx + Index of the first character of \a std_str to be assigned + + \param str_num + Maximum number of characters from \a std_str to be assigned + + \return + This String after the assignment has happened + + \exception std::out_of_range Thrown if \a str_idx is invalid for \a std_str + \exception std::length_error Thrown if the resulting String would have been too large. + */ + String& assign(const std::string& std_str, size_type str_idx = 0, size_type str_num = npos) + { + if (std_str.size() < str_idx) + throw std::out_of_range("Index was out of range for std::string object"); + + if (str_num == npos) + str_num = (size_type)std_str.size() - str_idx; + + grow(str_num); + setlen(str_num); + + while(str_num--) + { + ((*this)[str_num]) = static_cast<utf32>(static_cast<unsigned char>(std_str[str_num + str_idx])); + } + + return *this; + } + + /*! + \brief + Assign to this String the string value represented by the given null-terminated utf8 encoded data + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param utf8_str + Buffer containing valid null-terminated utf8 encoded data + + \return + This String after the assignment has happened + + \exception std::length_error Thrown if the resulting String would have been too large. + */ + String& operator=(const utf8* utf8_str) + { + return assign(utf8_str, utf_length(utf8_str)); + } + + /*! + \brief + Assign to this String the string value represented by the given null-terminated utf8 encoded data + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param utf8_str + Buffer containing valid null-terminated utf8 encoded data + + \return + This String after the assignment has happened + + \exception std::length_error Thrown if the resulting String would have been too large. + */ + String& assign(const utf8* utf8_str) + { + return assign(utf8_str, utf_length(utf8_str)); + } + + /*! + \brief + Assign to this String the string value represented by the given utf8 encoded data + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param utf8_str + Buffer containing valid utf8 encoded data + + \param str_num + Number of code units (not code points) in the buffer pointed to by \a utf8_str + + \return + This String after the assignment has happened + + \exception std::length_error Thrown if the resulting String would have been too large, or if str_num is 'npos'. + */ + String& assign(const utf8* utf8_str, size_type str_num) + { + if (str_num == npos) + throw std::length_error("Length for utf8 encoded string can not be 'npos'"); + + size_type enc_sze = encoded_size(utf8_str, str_num); + + grow(enc_sze); + encode(utf8_str, ptr(), d_reserve, str_num); + setlen(enc_sze); + return *this; + } + + /*! + \brief + Assigns the specified utf32 code point to this String. Result is always a String 1 code point in length. + + \param code_point + Valid utf32 Unicode code point to be assigned to the string + + \return + This String after assignment + */ + String& operator=(utf32 code_point) + { + return assign(1, code_point); + } + + /*! + \brief + Assigns the specified code point repeatedly to the String + + \param num + The number of times to assign the code point + + \param code_point + Valid utf32 Unicode code point to be assigned to the string + + \return + This String after assignment. + + \exception std::length_error Thrown if \a num was 'npos' + */ + String& assign(size_type num, utf32 code_point) + { + if (num == npos) + throw std::length_error("Code point count can not be 'npos'"); + + grow(num); + setlen(num); + utf32* p = ptr(); + + while(num--) + *p++ = code_point; + + return *this; + } + + + /*! + \brief + Assign to this String the given C-string. + + \param c_str + Pointer to a valid C style string. + + \return + This String after the assignment has happened + + \exception std::length_error Thrown if the resulting String would have been too large. + */ + String& operator=(const char* cstr) + { + return assign(cstr, strlen(cstr)); + } + + + /*! + \brief + Assign to this String the given C-string. + + \param c_str + Pointer to a valid C style string. + + \return + This String after the assignment has happened + + \exception std::length_error Thrown if the resulting String would have been too large. + */ + String& assign(const char* cstr) + { + return assign(cstr, strlen(cstr)); + } + + + /*! + \brief + Assign to this String a number of chars from a char array. + + \param chars + char array. + + \param chars_len + Number of chars to be assigned. + + \return + This String after the assignment has happened + + \exception std::length_error Thrown if the resulting String would have been too large. + */ + String& assign(const char* chars, size_type chars_len) + { + grow(chars_len); + utf32* pt = ptr(); + + for (size_type i = 0; i < chars_len; ++i) + { + *pt++ = static_cast<utf32>(static_cast<unsigned char>(*chars++)); + } + + setlen(chars_len); + return *this; + } + + + /*! + \brief + Swaps the value of this String with the given String \a str + + \param str + String object whos value is to be swapped with this String. + + \return + Nothing + */ + void swap(String& str) + { + size_type temp_len = d_cplength; + d_cplength = str.d_cplength; + str.d_cplength = temp_len; + + size_type temp_res = d_reserve; + d_reserve = str.d_reserve; + str.d_reserve = temp_res; + + utf32* temp_buf = d_buffer; + d_buffer = str.d_buffer; + str.d_buffer = temp_buf; + + // see if we need to swap 'quick buffer' data + if (temp_res <= STR_QUICKBUFF_SIZE) + { + utf32 temp_qbf[STR_QUICKBUFF_SIZE]; + + memcpy(temp_qbf, d_quickbuff, STR_QUICKBUFF_SIZE * sizeof(utf32)); + memcpy(d_quickbuff, str.d_quickbuff, STR_QUICKBUFF_SIZE * sizeof(utf32)); + memcpy(str.d_quickbuff, temp_qbf, STR_QUICKBUFF_SIZE * sizeof(utf32)); + } + + } + + ////////////////////////////////////////////////////////////////////////// + // Appending Functions + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Appends the String \a str + + \param str + String object that is to be appended + + \return + This String after the append operation + + \exception std::length_error Thrown if resulting String would be too large. + */ + String& operator+=(const String& str) + { + return append(str); + } + + /*! + \brief + Appends a sub-string of the String \a str + + \param str + String object containing data to be appended + + \param str_idx + Index of the first code point to be appended + + \param str_num + Maximum number of code points to be appended + + \return + This String after the append operation + + \exception std::out_of_range Thrown if \a str_idx is invalid for \a str. + \exception std::length_error Thrown if resulting String would be too large. + */ + String& append(const String& str, size_type str_idx = 0, size_type str_num = npos) + { + if (str.d_cplength < str_idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (str_num == npos) + str_num = str.d_cplength - str_idx; + + grow(d_cplength + str_num); + memcpy(&ptr()[d_cplength], &str.ptr()[str_idx], str_num * sizeof(utf32)); + setlen(d_cplength + str_num); + return *this; + } + + + /*! + \brief + Appends the std::string \a std_str + + \param std_str + std::string object that is to be appended + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \return + This String after the append operation + + \exception std::length_error Thrown if resulting String would be too large. + */ + String& operator+=(const std::string& std_str) + { + return append(std_str); + } + + /*! + \brief + Appends a sub-string of the std::string \a std_str + + \param std_str + std::string object containing data to be appended + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \param str_idx + Index of the first character to be appended + + \param str_num + Maximum number of characters to be appended + + \return + This String after the append operation + + \exception std::out_of_range Thrown if \a str_idx is invalid for \a std_str. + \exception std::length_error Thrown if resulting String would be too large. + */ + String& append(const std::string& std_str, size_type str_idx = 0, size_type str_num = npos) + { + if (std_str.size() < str_idx) + throw std::out_of_range("Index is out of range for std::string"); + + if (str_num == npos) + str_num = (size_type)std_str.size() - str_idx; + + size_type newsze = d_cplength + str_num; + + grow(newsze); + utf32* pt = &ptr()[newsze-1]; + + while(str_num--) + *pt-- = static_cast<utf32>(static_cast<unsigned char>(std_str[str_num])); + + setlen(newsze); + return *this; + } + + + /*! + \brief + Appends to the String the null-terminated utf8 encoded data in the buffer utf8_str. + + \param utf8_str + buffer holding the null-terminated utf8 encoded data that is to be appended + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \return + This String after the append operation + + \exception std::length_error Thrown if resulting String would be too large. + */ + String& operator+=(const utf8* utf8_str) + { + return append(utf8_str, utf_length(utf8_str)); + } + + /*! + \brief + Appends to the String the null-terminated utf8 encoded data in the buffer utf8_str. + + \param utf8_str + Buffer holding the null-terminated utf8 encoded data that is to be appended + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \return + This String after the append operation + + \exception std::length_error Thrown if resulting String would be too large. + */ + String& append(const utf8* utf8_str) + { + return append(utf8_str, utf_length(utf8_str)); + } + + + /*! + \brief + Appends to the String the utf8 encoded data in the buffer utf8_str. + + \param utf8_str + Buffer holding the utf8 encoded data that is to be appended + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param len + Number of code units (not code points) in the buffer to be appended + + \return + This String after the append operation + + \exception std::length_error Thrown if resulting String would be too large, or if \a len was 'npos' + */ + String& append(const utf8* utf8_str, size_type len) + { + if (len == npos) + throw std::length_error("Length for utf8 encoded string can not be 'npos'"); + + size_type encsz = encoded_size(utf8_str, len); + size_type newsz = d_cplength + encsz; + + grow(newsz); + encode(utf8_str, &ptr()[d_cplength], encsz, len); + setlen(newsz); + + return *this; + } + + + /*! + \brief + Appends a single code point to the string + + \param code_point + utf32 Unicode code point that is to be appended + + \return + This String after the append operation + + \exception std::length_error Thrown if resulting String would be too long. + */ + String& operator+=(utf32 code_point) + { + return append(1, code_point); + } + + /*! + \brief + Appends a single code point multiple times to the string + + \param num + Number of copies of the code point to be appended + + \param code_point + utf32 Unicode code point that is to be appended + + \return + This String after the append operation + + \exception std::length_error Thrown if resulting String would be too long, or if \a num was 'npos'. + */ + String& append(size_type num, utf32 code_point) + { + if (num == npos) + throw std::length_error("Code point count can not be 'npos'"); + + size_type newsz = d_cplength + num; + grow(newsz); + + utf32* p = &ptr()[d_cplength]; + + while(num--) + *p++ = code_point; + + setlen(newsz); + + return *this; + } + + /*! + \brief + Appends a single code point to the string + + \param code_point + utf32 Unicode code point that is to be appended + + \return + Nothing + + \exception std::length_error Thrown if resulting String would be too long. + */ + void push_back(utf32 code_point) + { + append(1, code_point); + } + + /*! + \brief + Appends the code points in the reange [beg, end) + + \param beg + Iterator describing the start of the range to be appended + + \param end + Iterator describing the (exclusive) end of the range to be appended. + + \return + This String after the append operation + + \exception std::length_error Thrown if the resulting string would be too large. + */ + String& append(const_iterator iter_beg, const_iterator iter_end) + { + return replace(end(), end(), iter_beg, iter_end); + } + + + /*! + \brief + Appends to the String the given c-string. + + \param c_str + c-string that is to be appended. + + \return + This String after the append operation + + \exception std::length_error Thrown if resulting String would be too large. + */ + String& operator+=(const char* cstr) + { + return append(cstr, strlen(cstr)); + } + + + /*! + \brief + Appends to the String the given c-string. + + \param c_str + c-string that is to be appended. + + \return + This String after the append operation + + \exception std::length_error Thrown if resulting String would be too large. + */ + String& append(const char* cstr) + { + return append(cstr, strlen(cstr)); + } + + + /*! + \brief + Appends to the String chars from the given char array. + + \param chars + char array holding the chars that are to be appended + + \param chars_len + Number of chars to be appended + + \return + This String after the append operation + + \exception std::length_error Thrown if resulting String would be too large, or if \a chars_len was 'npos' + */ + String& append(const char* chars, size_type chars_len) + { + if (chars_len == npos) + throw std::length_error("Length for char array can not be 'npos'"); + + size_type newsz = d_cplength + chars_len; + + grow(newsz); + + utf32* pt = &ptr()[newsz-1]; + + while(chars_len--) + *pt-- = static_cast<utf32>(static_cast<unsigned char>(chars[chars_len])); + + setlen(newsz); + + return *this; + } + + + ////////////////////////////////////////////////////////////////////////// + // Insertion Functions + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Inserts the given String object at the specified position. + + \param idx + Index where the string is to be inserted. + + \param str + String object that is to be inserted. + + \return + This String after the insert. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + \exception std::length_error Thrown if resulting String would be too large. + */ + String& insert(size_type idx, const String& str) + { + return insert(idx, str, 0, npos); + } + + /*! + \brief + Inserts a sub-string of the given String object at the specified position. + + \param idx + Index where the string is to be inserted. + + \param str + String object containing data to be inserted. + + \param str_idx + Index of the first code point from \a str to be inserted. + + \param str_num + Maximum number of code points from \a str to be inserted. + + \return + This String after the insert. + + \exception std::out_of_range Thrown if \a idx or \a str_idx are out of range. + \exception std::length_error Thrown if resulting String would be too large. + */ + String& insert(size_type idx, const String& str, size_type str_idx, size_type str_num) + { + if ((d_cplength < idx) || (str.d_cplength < str_idx)) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (str_num == npos) + str_num = str.d_cplength - str_idx; + + size_type newsz = d_cplength + str_num; + grow(newsz); + memmove(&ptr()[idx + str_num], &ptr()[idx], (d_cplength - idx) * sizeof(utf32)); + memcpy(&ptr()[idx], &str.ptr()[str_idx], str_num * sizeof(utf32)); + setlen(newsz); + + return *this; + } + + /*! + \brief + Inserts the given std::string object at the specified position. + + \param idx + Index where the std::string is to be inserted. + + \param std_str + std::string object that is to be inserted. + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \return + This String after the insert. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + \exception std::length_error Thrown if resulting String would be too large. + */ + String& insert(size_type idx, const std::string& std_str) + { + return insert(idx, std_str, 0, npos); + } + + /*! + \brief + Inserts a sub-string of the given std::string object at the specified position. + + \param idx + Index where the string is to be inserted. + + \param std_str + std::string object containing data to be inserted. + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \param str_idx + Index of the first character from \a std_str to be inserted. + + \param str_num + Maximum number of characters from \a str to be inserted. + + \return + This String after the insert. + + \exception std::out_of_range Thrown if \a idx or \a str_idx are out of range. + \exception std::length_error Thrown if resulting String would be too large. + */ + String& insert(size_type idx, const std::string& std_str, size_type str_idx, size_type str_num) + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (std_str.size() < str_idx) + throw std::out_of_range("Index is out of range for std::string"); + + if (str_num == npos) + str_num = (size_type)std_str.size() - str_idx; + + size_type newsz = d_cplength + str_num; + grow(newsz); + + memmove(&ptr()[idx + str_num], &ptr()[idx], (d_cplength - idx) * sizeof(utf32)); + + utf32* pt = &ptr()[idx + str_num - 1]; + + while(str_num--) + *pt-- = static_cast<utf32>(static_cast<unsigned char>(std_str[str_idx + str_num])); + + setlen(newsz); + + return *this; + } + + /*! + \brief + Inserts the given null-terminated utf8 encoded data at the specified position. + + \param idx + Index where the data is to be inserted. + + \param utf8_str + Buffer containing the null-terminated utf8 encoded data that is to be inserted. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \return + This String after the insert. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + \exception std::length_error Thrown if resulting String would be too large. + */ + String& insert(size_type idx, const utf8* utf8_str) + { + return insert(idx, utf8_str, utf_length(utf8_str)); + } + + /*! + \brief + Inserts the given utf8 encoded data at the specified position. + + \param idx + Index where the data is to be inserted. + + \param utf8_str + Buffer containing the utf8 encoded data that is to be inserted. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param len + Length of the data to be inserted in uf8 code units (not code points) + + \return + This String after the insert. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + \exception std::length_error Thrown if resulting String would be too large, or if \a len is 'npos' + */ + String& insert(size_type idx, const utf8* utf8_str, size_type len) + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (len == npos) + throw std::length_error("Length of utf8 encoded string can not be 'npos'"); + + size_type encsz = encoded_size(utf8_str, len); + size_type newsz = d_cplength + encsz; + + grow(newsz); + memmove(&ptr()[idx + encsz], &ptr()[idx], (d_cplength - idx) * sizeof(utf32)); + encode(utf8_str, &ptr()[idx], encsz, len); + setlen(newsz); + + return *this; + } + + /*! + \brief + Inserts a code point multiple times into the String + + \param idx + Index where the code point(s) are to be inserted + + \param num + The number of times to insert the code point + + \param code_point + The utf32 code point that is to be inserted + + \return + This String after the insertion. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + \exception std::length_error Thrown if resulting String would be too large, or if \a num is 'npos' + */ + String& insert(size_type idx, size_type num, utf32 code_point) + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (num == npos) + throw std::length_error("Code point count can not be 'npos'"); + + size_type newsz = d_cplength + num; + grow(newsz); + + memmove(&ptr()[idx + num], &ptr()[idx], (d_cplength - idx) * sizeof(utf32)); + + utf32* pt = &ptr()[idx + num - 1]; + + while(num--) + *pt-- = code_point; + + setlen(newsz); + + return *this; + } + + /*! + \brief + Inserts a code point multiple times into the String + + \param pos + Iterator describing the position where the code point(s) are to be inserted + + \param num + The number of times to insert the code point + + \param code_point + The utf32 code point that is to be inserted + + \return + This String after the insertion. + + \exception std::length_error Thrown if resulting String would be too large, or if \a num is 'npos' + */ + void insert(iterator pos, size_type num, utf32 code_point) + { + insert(safe_iter_dif(pos, begin()), num, code_point); + } + + /*! + \brief + Inserts a single code point into the String + + \param pos + Iterator describing the position where the code point is to be inserted + + \param code_point + The utf32 code point that is to be inserted + + \return + This String after the insertion. + + \exception std::length_error Thrown if resulting String would be too large. + */ + iterator insert(iterator pos, utf32 code_point) + { + insert(pos, 1, code_point); + return pos; + } + + /*! + \brief + Inserts code points specified by the range [beg, end). + + \param pos + Iterator describing the position where the data is to be inserted + + \param beg + Iterator describing the begining of the range to be inserted + + \param end + Iterator describing the (exclusive) end of the range to be inserted. + + \return + Nothing. + + \exception std::length_error Thrown if resulting String would be too large. + */ + void insert(iterator iter_pos, const_iterator iter_beg, const_iterator iter_end) + { + replace(iter_pos, iter_pos, iter_beg, iter_end); + } + + + /*! + \brief + Inserts the given c-string at the specified position. + + \param idx + Index where the c-string is to be inserted. + + \param c_str + c-string that is to be inserted. + + \return + This String after the insert. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + \exception std::length_error Thrown if resulting String would be too large. + */ + String& insert(size_type idx, const char* cstr) + { + return insert(idx, cstr, strlen(cstr)); + } + + + /*! + \brief + Inserts chars from the given char array at the specified position. + + \param idx + Index where the data is to be inserted. + + \param chars + char array containing the chars that are to be inserted. + + \param chars_len + Length of the char array to be inserted. + + \return + This String after the insert. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + \exception std::length_error Thrown if resulting String would be too large, or if \a chars_len is 'npos' + */ + String& insert(size_type idx, const char* chars, size_type chars_len) + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (chars_len == npos) + throw std::length_error("Length of char array can not be 'npos'"); + + size_type newsz = d_cplength + chars_len; + + grow(newsz); + memmove(&ptr()[idx + chars_len], &ptr()[idx], (d_cplength - idx) * sizeof(utf32)); + + utf32* pt = &ptr()[idx + chars_len - 1]; + + while(chars_len--) + *pt-- = static_cast<utf32>(static_cast<unsigned char>(chars[chars_len])); + + setlen(newsz); + + return *this; + } + + + ////////////////////////////////////////////////////////////////////////// + // Erasing characters + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Removes all data from the String + + \return + Nothing + */ + void clear(void) + { + setlen(0); + trim(); + } + + /*! + \brief + Removes all data from the String + + \return + The empty String (*this) + */ + String& erase(void) + { + clear(); + return *this; + } + + /*! + \brief + Erase a single code point from the string + + \param idx + The index of the code point to be removed. + + \return + This String after the erase operation + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + String& erase(size_type idx) + { + return erase(idx, 1); + } + + /*! + \brief + Erase a range of code points + + \param idx + Index of the first code point to be removed. + + \param len + Maximum number of code points to be removed. + + \return + This String after the erase operation. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + String& erase(size_type idx, size_type len = npos) + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range foe CEGUI::String"); + + if (len == npos) + len = d_cplength - idx; + + size_type newsz = d_cplength - len; + + memmove(&ptr()[idx], &ptr()[idx + len], (d_cplength - idx - len) * sizeof(utf32)); + setlen(newsz); + return *this; + } + + /*! + \brief + Erase the code point described by the given iterator + + \param pos + Iterator describing the code point to be erased + + \return + This String after the erase operation. + */ + String& erase(iterator pos) + { + return erase(safe_iter_dif(pos, begin()), 1); + } + + /*! + \brief + Erase a range of code points described by the iterators [beg, end). + + \param beg + Iterator describing the postion of the beginning of the range to erase + + \param end + Iterator describing the postion of the (exclusive) end of the range to erase + + \return + This String after the erase operation. + */ + String& erase(iterator iter_beg, iterator iter_end) + { + return erase(safe_iter_dif(iter_beg, begin()), safe_iter_dif(iter_end, iter_beg)); + } + + ////////////////////////////////////////////////////////////////////////// + // Resizing + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Resizes the String either by inserting default utf32 code points to make it larger, or by truncating to make it smaller + + \param num + The length, in code points, that the String is to be made. + + \return + Nothing. + + \exception std::length_error Thrown if the String would be too large. + */ + void resize(size_type num) + { + resize(num, utf32()); + } + + /*! + \brief + Resizes the String either by inserting the given utf32 code point to make it larger, or by truncating to make it smaller + + \param num + The length, in code points, that the String is to be made. + + \param code_point + The utf32 code point that should be used when majing the String larger + + \return + Nothing. + + \exception std::length_error Thrown if the String would be too large. + */ + void resize(size_type num, utf32 code_point) + { + if (num < d_cplength) + { + setlen(num); + } + else + { + append(num - d_cplength, code_point); + } + + } + + ////////////////////////////////////////////////////////////////////////// + // Replacing Characters + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Replace code points in the String with the specified String object + + \param idx + Index of the first code point to be replaced + + \param len + Maximum number of code points to be replaced (if this is 0, operation is an insert at position \a idx) + + \param str + The String object that is to replace the specified code points + + \return + This String after the replace operation + + \exception std::out_of_range Thrown if \a idx is invalid for this String + \exception std::length_error Thrown if the resulting String would be too large. + */ + String& replace(size_type idx, size_type len, const String& str) + { + return replace(idx, len, str, 0, npos); + } + + /*! + \brief + Replace the code points in the range [beg, end) with the specified String object + + \note + If \a beg == \a end, the operation is a insert at iterator position \a beg + + \param beg + Iterator describing the start of the range to be replaced + + \param end + Iterator describing the (exclusive) end of the range to be replaced. + + \param str + The String object that is to replace the specified range of code points + + \return + This String after the replace operation + + \exception std::length_error Thrown if the resulting String would be too large. + */ + String& replace(iterator iter_beg, iterator iter_end, const String& str) + { + return replace(safe_iter_dif(iter_beg, begin()), safe_iter_dif(iter_end, iter_beg), str, 0, npos); + } + + /*! + \brief + Replace code points in the String with a specified sub-string of a given String object. + + \param idx + Index of the first code point to be replaced + + \param len + Maximum number of code points to be replaced. If this is 0, the operation is an insert at position \a idx. + + \param str + String object containing the data that will replace the specified range of code points + + \param str_idx + Index of the first code point of \a str that is to replace the specified code point range + + \param str_num + Maximum number of code points of \a str that are to replace the specified code point range + + \return + This String after the replace operation + + \exception std::out_of_range Thrown if either \a idx, or \a str_idx are invalid + \exception std::length_error Thrown if the resulting String would have been too large. + */ + String& replace(size_type idx, size_type len, const String& str, size_type str_idx, size_type str_num) + { + if ((d_cplength < idx) || (str.d_cplength < str_idx)) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (((str_idx + str_num) > str.d_cplength) || (str_num == npos)) + str_num = str.d_cplength - str_idx; + + if (((len + idx) > d_cplength) || (len == npos)) + len = d_cplength - idx; + + size_type newsz = d_cplength + str_num - len; + + grow(newsz); + + if ((idx + len) < d_cplength) + memmove(&ptr()[idx + str_num], &ptr()[len + idx], (d_cplength - idx - len) * sizeof(utf32)); + + memcpy(&ptr()[idx], &str.ptr()[str_idx], str_num * sizeof(utf32)); + setlen(newsz); + + return *this; + } + + + /*! + \brief + Replace code points in the String with the specified std::string object + + \param idx + Index of the first code point to be replaced + + \param len + Maximum number of code points to be replaced (if this is 0, operation is an insert at position \a idx) + + \param std_str + The std::string object that is to replace the specified code points + + \note + Characters from \a std_str are considered to represent Unicode code points in the range 0x00..0xFF. No translation of + the encountered data is performed. + + \return + This String after the replace operation + + \exception std::out_of_range Thrown if \a idx is invalid for this String + \exception std::length_error Thrown if the resulting String would be too large. + */ + String& replace(size_type idx, size_type len, const std::string& std_str) + { + return replace(idx, len, std_str, 0, npos); + } + + /*! + \brief + Replace the code points in the range [beg, end) with the specified std::string object + + \note + If \a beg == \a end, the operation is a insert at iterator position \a beg + + \param beg + Iterator describing the start of the range to be replaced + + \param end + Iterator describing the (exclusive) end of the range to be replaced. + + \param std_str + The std::string object that is to replace the specified range of code points + + \note + Characters from \a std_str are considered to represent Unicode code points in the range 0x00..0xFF. No translation of + the encountered data is performed. + + \return + This String after the replace operation + + \exception std::length_error Thrown if the resulting String would be too large. + */ + String& replace(iterator iter_beg, iterator iter_end, const std::string& std_str) + { + return replace(safe_iter_dif(iter_beg, begin()), safe_iter_dif(iter_end, iter_beg), std_str, 0, npos); + } + + /*! + \brief + Replace code points in the String with a specified sub-string of a given std::string object. + + \param idx + Index of the first code point to be replaced + + \param len + Maximum number of code points to be replaced. If this is 0, the operation is an insert at position \a idx. + + \param std_str + std::string object containing the data that will replace the specified range of code points + + \note + Characters from \a std_str are considered to represent Unicode code points in the range 0x00..0xFF. No translation of + the encountered data is performed. + + \param str_idx + Index of the first code point of \a std_str that is to replace the specified code point range + + \param str_num + Maximum number of code points of \a std_str that are to replace the specified code point range + + \return + This String after the replace operation + + \exception std::out_of_range Thrown if either \a idx, or \a str_idx are invalid + \exception std::length_error Thrown if the resulting String would have been too large. + */ + String& replace(size_type idx, size_type len, const std::string& std_str, size_type str_idx, size_type str_num) + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (std_str.size() < str_idx) + throw std::out_of_range("Index is out of range for std::string"); + + if (((str_idx + str_num) > std_str.size()) || (str_num == npos)) + str_num = (size_type)std_str.size() - str_idx; + + if (((len + idx) > d_cplength) || (len == npos)) + len = d_cplength - idx; + + size_type newsz = d_cplength + str_num - len; + + grow(newsz); + + if ((idx + len) < d_cplength) + memmove(&ptr()[idx + str_num], &ptr()[len + idx], (d_cplength - idx - len) * sizeof(utf32)); + + utf32* pt = &ptr()[idx + str_num - 1]; + + while (str_num--) + *pt-- = static_cast<utf32>(static_cast<unsigned char>(std_str[str_idx + str_num])); + + setlen(newsz); + + return *this; + } + + + /*! + \brief + Replace code points in the String with the specified null-terminated utf8 encoded data. + + \param idx + Index of the first code point to be replaced + + \param len + Maximum number of code points to be replaced (if this is 0, operation is an insert at position \a idx) + + \param utf8_str + Buffer containing the null-terminated utf8 encoded data that is to replace the specified code points + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \return + This String after the replace operation + + \exception std::out_of_range Thrown if \a idx is invalid for this String + \exception std::length_error Thrown if the resulting String would be too large. + */ + String& replace(size_type idx, size_type len, const utf8* utf8_str) + { + return replace(idx, len, utf8_str, utf_length(utf8_str)); + } + + /*! + \brief + Replace the code points in the range [beg, end) with the specified null-terminated utf8 encoded data. + + \note + If \a beg == \a end, the operation is a insert at iterator position \a beg + + \param beg + Iterator describing the start of the range to be replaced + + \param end + Iterator describing the (exclusive) end of the range to be replaced. + + \param utf8_str + Buffer containing the null-terminated utf8 encoded data that is to replace the specified range of code points + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \return + This String after the replace operation + + \exception std::length_error Thrown if the resulting String would be too large. + */ + String& replace(iterator iter_beg, iterator iter_end, const utf8* utf8_str) + { + return replace(iter_beg, iter_end, utf8_str, utf_length(utf8_str)); + } + + /*! + \brief + Replace code points in the String with the specified utf8 encoded data. + + \param idx + Index of the first code point to be replaced + + \param len + Maximum number of code points to be replaced (if this is 0, operation is an insert at position \a idx) + + \param utf8_str + Buffer containing the null-terminated utf8 encoded data that is to replace the specified code points + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param str_len + Length of the utf8 encoded data in utf8 code units (not code points). + + \return + This String after the replace operation + + \exception std::out_of_range Thrown if \a idx is invalid for this String + \exception std::length_error Thrown if the resulting String would be too large, or if \a str_len was 'npos'. + */ + String& replace(size_type idx, size_type len, const utf8* utf8_str, size_type str_len) + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (str_len == npos) + throw std::length_error("Length for utf8 encoded string can not be 'npos'"); + + if (((len + idx) > d_cplength) || (len == npos)) + len = d_cplength - idx; + + size_type encsz = encoded_size(utf8_str, str_len); + size_type newsz = d_cplength + encsz - len; + + grow(newsz); + + if ((idx + len) < d_cplength) + memmove(&ptr()[idx + encsz], &ptr()[len + idx], (d_cplength - idx - len) * sizeof(utf32)); + + encode(utf8_str, &ptr()[idx], encsz, str_len); + + setlen(newsz); + return *this; + } + + /*! + \brief + Replace the code points in the range [beg, end) with the specified null-terminated utf8 encoded data. + + \note + If \a beg == \a end, the operation is a insert at iterator position \a beg + + \param beg + Iterator describing the start of the range to be replaced + + \param end + Iterator describing the (exclusive) end of the range to be replaced. + + \param utf8_str + Buffer containing the null-terminated utf8 encoded data that is to replace the specified range of code points + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param str_len + Length of the utf8 encoded data in utf8 code units (not code points). + + \return + This String after the replace operation + + \exception std::length_error Thrown if the resulting String would be too large, or if \a str_len was 'npos'. + */ + String& replace(iterator iter_beg, iterator iter_end, const utf8* utf8_str, size_type str_len) + { + return replace(safe_iter_dif(iter_beg, begin()), safe_iter_dif(iter_end, iter_beg), utf8_str, str_len); + } + + /*! + \brief + Replaces a specified range of code points with occurrences of a given code point + + \param idx + Index of the first code point to be replaced + + \param len + Maximum number of code points to replace. If this is 0 the operation is an insert + + \param num + Number of occurrences of \a code_point that are to replace the specified range of code points + + \param code_point + Code point that is to be used when replacing the specified range of code points + + \return + This String after the replace operation. + + \exception std::out_of_range Thrown if \a idx is invalid for this String + \exception std::length_error Thrown if resulting String would have been too long, or if \a num was 'npos'. + */ + String& replace(size_type idx, size_type len, size_type num, utf32 code_point) + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (num == npos) + throw std::length_error("Code point count can not be 'npos'"); + + if (((len + idx) > d_cplength) || (len == npos)) + len = d_cplength - idx; + + size_type newsz = d_cplength + num - len; + + grow(newsz); + + if ((idx + len) < d_cplength) + memmove(&ptr()[idx + num], &ptr()[len + idx], (d_cplength - idx - len) * sizeof(utf32)); + + utf32* pt = &ptr()[idx + num - 1]; + + while (num--) + *pt-- = code_point; + + setlen(newsz); + + return *this; + } + + /*! + \brief + Replace the code points in the range [beg, end) with occurrences of a given code point + + \note + If \a beg == \a end, the operation is an insert at iterator position \a beg + + \param beg + Iterator describing the start of the range to be replaced + + \param end + Iterator describing the (exclusive) end of the range to be replaced. + + \param num + Number of occurrences of \a code_point that are to replace the specified range of code points + + \param code_point + Code point that is to be used when replacing the specified range of code points + + \return + This String after the replace operation + + \exception std::length_error Thrown if resulting String would have been too long, or if \a num was 'npos'. + */ + String& replace(iterator iter_beg, iterator iter_end, size_type num, utf32 code_point) + { + return replace(safe_iter_dif(iter_beg, begin()), safe_iter_dif(iter_end, iter_beg), num, code_point); + } + + + /*! + \brief + Replace the code points in the range [beg, end) with code points from the range [newBeg, newEnd). + + \note + If \a beg == \a end, the operation is an insert at iterator position \a beg + + \param beg + Iterator describing the start of the range to be replaced + + \param end + Iterator describing the (exclusive) end of the range to be replaced. + + \param newBeg + Iterator describing the beginning of the range to insert. + + \param newEnd + Iterator describing the (exclusive) end of the range to insert. + + \return + This String after the insert operation. + + \exception std::length_error Thrown if the resulting string would be too long. + */ + String& replace(iterator iter_beg, iterator iter_end, const_iterator iter_newBeg, const_iterator iter_newEnd) + { + if (iter_beg == iter_end) + { + erase(safe_iter_dif(iter_beg, begin()), safe_iter_dif(iter_end, iter_beg)); + } + else + { + size_type str_len = safe_iter_dif(iter_newEnd, iter_newBeg); + size_type idx = safe_iter_dif(iter_beg, begin()); + size_type len = safe_iter_dif(iter_end, iter_beg); + + if ((len + idx) > d_cplength) + len = d_cplength - idx; + + size_type newsz = d_cplength + str_len - len; + + grow(newsz); + + if ((idx + len) < d_cplength) + memmove(&ptr()[idx + str_len], &ptr()[len + idx], (d_cplength - idx - len) * sizeof(utf32)); + + memcpy(&ptr()[idx], iter_newBeg.d_ptr, str_len * sizeof(utf32)); + setlen(newsz); + } + + return *this; + } + + + /*! + \brief + Replace code points in the String with the specified c-string. + + \param idx + Index of the first code point to be replaced + + \param len + Maximum number of code points to be replaced (if this is 0, operation is an insert at position \a idx) + + \param c_str + c-string that is to replace the specified code points + + \return + This String after the replace operation + + \exception std::out_of_range Thrown if \a idx is invalid for this String + \exception std::length_error Thrown if the resulting String would be too large. + */ + String& replace(size_type idx, size_type len, const char* cstr) + { + return replace(idx, len, cstr, strlen(cstr)); + } + + + /*! + \brief + Replace the code points in the range [beg, end) with the specified c-string. + + \note + If \a beg == \a end, the operation is a insert at iterator position \a beg + + \param beg + Iterator describing the start of the range to be replaced + + \param end + Iterator describing the (exclusive) end of the range to be replaced. + + \param c_str + c-string that is to replace the specified range of code points + + \return + This String after the replace operation + + \exception std::length_error Thrown if the resulting String would be too large. + */ + String& replace(iterator iter_beg, iterator iter_end, const char* cstr) + { + return replace(iter_beg, iter_end, cstr, strlen(cstr)); + } + + + /*! + \brief + Replace code points in the String with chars from the given char array. + + \param idx + Index of the first code point to be replaced + + \param len + Maximum number of code points to be replaced (if this is 0, operation is an insert at position \a idx) + + \param chars + char array containing the cars that are to replace the specified code points + + \param chars_len + Number of chars in the char array. + + \return + This String after the replace operation + + \exception std::out_of_range Thrown if \a idx is invalid for this String + \exception std::length_error Thrown if the resulting String would be too large, or if \a chars_len was 'npos'. + */ + String& replace(size_type idx, size_type len, const char* chars, size_type chars_len) + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for CEGUI::String"); + + if (chars_len == npos) + throw std::length_error("Length for the char array can not be 'npos'"); + + if (((len + idx) > d_cplength) || (len == npos)) + len = d_cplength - idx; + + size_type newsz = d_cplength + chars_len - len; + + grow(newsz); + + if ((idx + len) < d_cplength) + memmove(&ptr()[idx + chars_len], &ptr()[len + idx], (d_cplength - idx - len) * sizeof(utf32)); + + utf32* pt = &ptr()[idx + chars_len - 1]; + + while (chars_len--) + *pt-- = static_cast<utf32>(static_cast<unsigned char>(chars[chars_len])); + + setlen(newsz); + return *this; + } + + + /*! + \brief + Replace the code points in the range [beg, end) with chars from the given char array. + + \note + If \a beg == \a end, the operation is a insert at iterator position \a beg + + \param beg + Iterator describing the start of the range to be replaced + + \param end + Iterator describing the (exclusive) end of the range to be replaced. + + \param chars + char array containing the chars that are to replace the specified range of code points + + \param chars_len + Number of chars in the char array. + + \return + This String after the replace operation + + \exception std::length_error Thrown if the resulting String would be too large, or if \a chars_len was 'npos'. + */ + String& replace(iterator iter_beg, iterator iter_end, const char* chars, size_type chars_len) + { + return replace(safe_iter_dif(iter_beg, begin()), safe_iter_dif(iter_end, iter_beg), chars, chars_len); + } + + + ////////////////////////////////////////////////////////////////////////// + // Find a code point + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Search forwards for a given code point + + \param code_point + The utf32 code point to search for + + \param idx + Index of the code point where the search is to start. + + \return + - Index of the first occurrence of \a code_point travelling forwards from \a idx. + - npos if the code point could not be found + */ + size_type find(utf32 code_point, size_type idx = 0) const + { + if (idx < d_cplength) + { + const utf32* pt = &ptr()[idx]; + + while (idx < d_cplength) + { + if (*pt++ == code_point) + return idx; + + ++idx; + } + + } + + return npos; + } + + /*! + \brief + Search backwards for a given code point + + \param code_point + The utf32 code point to search for + + \param idx + Index of the code point where the search is to start. + + \return + - Index of the first occurrence of \a code_point travelling backwards from \a idx. + - npos if the code point could not be found + */ + size_type rfind(utf32 code_point, size_type idx = npos) const + { + if (idx >= d_cplength) + idx = d_cplength - 1; + + if (d_cplength > 0) + { + const utf32* pt = &ptr()[idx]; + + do + { + if (*pt-- == code_point) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + ////////////////////////////////////////////////////////////////////////// + // Find a substring + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Search forwards for a sub-string + + \param str + String object describing the sub-string to search for + + \param idx + Index of the code point where the search is to start + + \return + - Index of the first occurrence of sub-string \a str travelling forwards from \a idx. + - npos if the sub-string could not be found + */ + size_type find(const String& str, size_type idx = 0) const + { + if ((str.d_cplength == 0) && (idx < d_cplength)) + return idx; + + if (idx < d_cplength) + { + // loop while search string could fit in to search area + while (d_cplength - idx >= str.d_cplength) + { + if (0 == compare(idx, str.d_cplength, str)) + return idx; + + ++idx; + } + + } + + return npos; + } + + /*! + \brief + Search backwards for a sub-string + + \param str + String object describing the sub-string to search for + + \param idx + Index of the code point where the search is to start + + \return + - Index of the first occurrence of sub-string \a str travelling backwards from \a idx. + - npos if the sub-string could not be found + */ + size_type rfind(const String& str, size_type idx = npos) const + { + if (str.d_cplength == 0) + return (idx < d_cplength) ? idx : d_cplength; + + if (str.d_cplength <= d_cplength) + { + if (idx > (d_cplength - str.d_cplength)) + idx = d_cplength - str.d_cplength; + + do + { + if (0 == compare(idx, str.d_cplength, str)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + /*! + \brief + Search forwards for a sub-string + + \param std_str + std::string object describing the sub-string to search for + + \note + Characters from \a std_str are considered to represent Unicode code points in the range 0x00..0xFF. No translation of + the encountered data is performed. + + \param idx + Index of the code point where the search is to start + + \return + - Index of the first occurrence of sub-string \a std_str travelling forwards from \a idx. + - npos if the sub-string could not be found + */ + size_type find(const std::string& std_str, size_type idx = 0) const + { + std::string::size_type sze = std_str.size(); + + if ((sze == 0) && (idx < d_cplength)) + return idx; + + if (idx < d_cplength) + { + // loop while search string could fit in to search area + while (d_cplength - idx >= sze) + { + if (0 == compare(idx, (size_type)sze, std_str)) + return idx; + + ++idx; + } + + } + + return npos; + } + + /*! + \brief + Search backwards for a sub-string + + \param std_str + std::string object describing the sub-string to search for + + \note + Characters from \a std_str are considered to represent Unicode code points in the range 0x00..0xFF. No translation of + the encountered data is performed. + + \param idx + Index of the code point where the search is to start + + \return + - Index of the first occurrence of sub-string \a std_str travelling backwards from \a idx. + - npos if the sub-string could not be found + */ + size_type rfind(const std::string& std_str, size_type idx = npos) const + { + std::string::size_type sze = std_str.size(); + + if (sze == 0) + return (idx < d_cplength) ? idx : d_cplength; + + if (sze <= d_cplength) + { + if (idx > (d_cplength - sze)) + idx = d_cplength - sze; + + do + { + if (0 == compare(idx, (size_type)sze, std_str)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + /*! + \brief + Search forwards for a sub-string + + \param utf8_str + Buffer containing null-terminated utf8 encoded data describing the sub-string to search for + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the code point where the search is to start + + \return + - Index of the first occurrence of sub-string \a utf8_str travelling forwards from \a idx. + - npos if the sub-string could not be found + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type find(const utf8* utf8_str, size_type idx = 0) const + { + return find(utf8_str, idx, utf_length(utf8_str)); + } + + /*! + \brief + Search backwards for a sub-string + + \param utf8_str + Buffer containing null-terminated utf8 encoded data describing the sub-string to search for + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the code point where the search is to start + + \return + - Index of the first occurrence of sub-string \a utf8_str travelling backwards from \a idx. + - npos if the sub-string could not be found + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type rfind(const utf8* utf8_str, size_type idx = npos) const + { + return rfind(utf8_str, idx, utf_length(utf8_str)); + } + + /*! + \brief + Search forwards for a sub-string + + \param utf8_str + Buffer containing utf8 encoded data describing the sub-string to search for + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the code point where the search is to start + + \param str_len + Length of the utf8 encoded sub-string in utf8 code units (not code points) + + \return + - Index of the first occurrence of sub-string \a utf8_str travelling forwards from \a idx. + - npos if the sub-string could not be found + + \exception std::length_error Thrown if \a str_len is 'npos' + */ + size_type find(const utf8* utf8_str, size_type idx, size_type str_len) const + { + if (str_len == npos) + throw std::length_error("Length for utf8 encoded string can not be 'npos'"); + + size_type sze = encoded_size(utf8_str, str_len); + + if ((sze == 0) && (idx < d_cplength)) + return idx; + + if (idx < d_cplength) + { + // loop while search string could fit in to search area + while (d_cplength - idx >= sze) + { + if (0 == compare(idx, sze, utf8_str, sze)) + return idx; + + ++idx; + } + + } + + return npos; + } + + /*! + \brief + Search backwards for a sub-string + + \param utf8_str + Buffer containing utf8 encoded data describing the sub-string to search for + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the code point where the search is to start + + \param str_len + Length of the utf8 encoded sub-string in utf8 code units (not code points) + + \return + - Index of the first occurrence of sub-string \a utf8_str travelling backwards from \a idx. + - npos if the sub-string could not be found + + \exception std::length_error Thrown if \a str_len is 'npos' + */ + size_type rfind(const utf8* utf8_str, size_type idx, size_type str_len) const + { + if (str_len == npos) + throw std::length_error("Length for utf8 encoded string can not be 'npos'"); + + size_type sze = encoded_size(utf8_str, str_len); + + if (sze == 0) + return (idx < d_cplength) ? idx : d_cplength; + + if (sze <= d_cplength) + { + if (idx > (d_cplength - sze)) + idx = d_cplength - sze; + + do + { + if (0 == compare(idx, sze, utf8_str, sze)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + + /*! + \brief + Search forwards for a sub-string + + \param c_str + c-string describing the sub-string to search for + + \param idx + Index of the code point where the search is to start + + \return + - Index of the first occurrence of sub-string \a c_str travelling forwards from \a idx. + - npos if the sub-string could not be found + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type find(const char* cstr, size_type idx = 0) const + { + return find(cstr, idx, strlen(cstr)); + } + + + /*! + \brief + Search backwards for a sub-string + + \param c_str + c-string describing the sub-string to search for + + \param idx + Index of the code point where the search is to start + + \return + - Index of the first occurrence of sub-string \a c_str travelling backwards from \a idx. + - npos if the sub-string could not be found + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type rfind(const char* cstr, size_type idx = npos) const + { + return rfind(cstr, idx, strlen(cstr)); + } + + + /*! + \brief + Search forwards for a sub-string + + \param chars + char array describing the sub-string to search for + + \param idx + Index of the code point where the search is to start + + \param chars_len + Number of chars in the char array. + + \return + - Index of the first occurrence of sub-string \a chars travelling forwards from \a idx. + - npos if the sub-string could not be found + + \exception std::length_error Thrown if \a chars_len is 'npos' + */ + size_type find(const char* chars, size_type idx, size_type chars_len) const + { + if (chars_len == npos) + throw std::length_error("Length for char array can not be 'npos'"); + + if ((chars_len == 0) && (idx < d_cplength)) + return idx; + + if (idx < d_cplength) + { + // loop while search string could fit in to search area + while (d_cplength - idx >= chars_len) + { + if (0 == compare(idx, chars_len, chars, chars_len)) + return idx; + + ++idx; + } + + } + + return npos; + } + + + /*! + \brief + Search backwards for a sub-string + + \param chars + char array describing the sub-string to search for + + \param idx + Index of the code point where the search is to start + + \param chars_len + Number of chars in the char array. + + \return + - Index of the first occurrence of sub-string \a chars travelling backwards from \a idx. + - npos if the sub-string could not be found + + \exception std::length_error Thrown if \a chars_len is 'npos' + */ + size_type rfind(const char* chars, size_type idx, size_type chars_len) const + { + if (chars_len == npos) + throw std::length_error("Length for char array can not be 'npos'"); + + if (chars_len == 0) + return (idx < d_cplength) ? idx : d_cplength; + + if (chars_len <= d_cplength) + { + if (idx > (d_cplength - chars_len)) + idx = d_cplength - chars_len; + + do + { + if (0 == compare(idx, chars_len, chars, chars_len)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + + ////////////////////////////////////////////////////////////////////////// + // Find first of different code-points + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Find the first occurrence of one of a set of code points. + + \param str + String object describing the set of code points. + + \param idx + Index of the start point for the search + + \return + - Index of the first occurrence of any one of the code points in \a str starting from from \a idx. + - npos if none of the code points in \a str were found. + */ + size_type find_first_of(const String& str, size_type idx = 0) const + { + if (idx < d_cplength) + { + const utf32* pt = &ptr()[idx]; + + do + { + if (npos != str.find(*pt++)) + return idx; + + } while (++idx != d_cplength); + + } + + return npos; + } + + /*! + \brief + Find the first code point that is not one of a set of code points. + + \param str + String object describing the set of code points. + + \param idx + Index of the start point for the search + + \return + - Index of the first code point that does not match any one of the code points in \a str starting from from \a idx. + - npos if all code points matched one of the code points in \a str. + */ + size_type find_first_not_of(const String& str, size_type idx = 0) const + { + if (idx < d_cplength) + { + const utf32* pt = &ptr()[idx]; + + do + { + if (npos == str.find(*pt++)) + return idx; + + } while (++idx != d_cplength); + + } + + return npos; + } + + + /*! + \brief + Find the first occurrence of one of a set of code points. + + \param std_str + std::string object describing the set of code points. + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \param idx + Index of the start point for the search + + \return + - Index of the first occurrence of any one of the code points in \a std_str starting from from \a idx. + - npos if none of the code points in \a std_str were found. + */ + size_type find_first_of(const std::string& std_str, size_type idx = 0) const + { + if (idx < d_cplength) + { + const utf32* pt = &ptr()[idx]; + + do + { + if (npos != find_codepoint(std_str, *pt++)) + return idx; + + } while (++idx != d_cplength); + + } + + return npos; + } + + /*! + \brief + Find the first code point that is not one of a set of code points. + + \param std_str + std::string object describing the set of code points. + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \param idx + Index of the start point for the search + + \return + - Index of the first code point that does not match any one of the code points in \a std_str starting from from \a idx. + - npos if all code points matched one of the code points in \a std_str. + */ + size_type find_first_not_of(const std::string& std_str, size_type idx = 0) const + { + if (idx < d_cplength) + { + const utf32* pt = &ptr()[idx]; + + do + { + if (npos == find_codepoint(std_str, *pt++)) + return idx; + + } while (++idx != d_cplength); + + } + + return npos; + } + + + /*! + \brief + Find the first occurrence of one of a set of code points. + + \param utf8_str + Buffer containing null-terminated utf8 encoded data describing the set of code points. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the start point for the search + + \return + - Index of the first occurrence of any one of the code points in \a utf8_str starting from from \a idx. + - npos if none of the code points in \a utf8_str were found. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type find_first_of(const utf8* utf8_str, size_type idx = 0) const + { + return find_first_of(utf8_str, idx, utf_length(utf8_str)); + } + + /*! + \brief + Find the first code point that is not one of a set of code points. + + \param utf8_str + Buffer containing null-terminated utf8 encoded data describing the set of code points. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the start point for the search + + \return + - Index of the first code point that does not match any one of the code points in \a utf8_str starting from from \a idx. + - npos if all code points matched one of the code points in \a utf8_str. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type find_first_not_of(const utf8* utf8_str, size_type idx = 0) const + { + return find_first_not_of(utf8_str, idx, utf_length(utf8_str)); + } + + /*! + \brief + Find the first occurrence of one of a set of code points. + + \param utf8_str + Buffer containing utf8 encoded data describing the set of code points. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the start point for the search + + \param str_len + Length of the utf8 encoded data in utf8 code units (not code points). + + \return + - Index of the first occurrence of any one of the code points in \a utf8_str starting from from \a idx. + - npos if none of the code points in \a utf8_str were found. + + \exception std::length_error Thrown if \a str_len was 'npos'. + */ + size_type find_first_of(const utf8* utf8_str, size_type idx, size_type str_len) const + { + if (str_len == npos) + throw std::length_error("Length for utf8 encoded string can not be 'npos'"); + + if (idx < d_cplength) + { + size_type encsze = encoded_size(utf8_str, str_len); + + const utf32* pt = &ptr()[idx]; + + do + { + if (npos != find_codepoint(utf8_str, encsze, *pt++)) + return idx; + + } while (++idx != d_cplength); + + } + + return npos; + } + + /*! + \brief + Find the first code point that is not one of a set of code points. + + \param utf8_str + Buffer containing utf8 encoded data describing the set of code points. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the start point for the search + + \param str_len + Length of the utf8 encoded data in utf8 code units (not code points). + + \return + - Index of the first code point that does not match any one of the code points in \a utf8_str starting from from \a idx. + - npos if all code points matched one of the code points in \a utf8_str. + + \exception std::length_error Thrown if \a str_len was 'npos'. + */ + size_type find_first_not_of(const utf8* utf8_str, size_type idx, size_type str_len) const + { + if (str_len == npos) + throw std::length_error("Length for utf8 encoded string can not be 'npos'"); + + if (idx < d_cplength) + { + size_type encsze = encoded_size(utf8_str, str_len); + + const utf32* pt = &ptr()[idx]; + + do + { + if (npos == find_codepoint(utf8_str, encsze, *pt++)) + return idx; + + } while (++idx != d_cplength); + + } + + return npos; + } + + + /*! + \brief + Search forwards for a given code point + + \param code_point + The utf32 code point to search for + + \param idx + Index of the code point where the search is to start. + + \return + - Index of the first occurrence of \a code_point starting from from \a idx. + - npos if the code point could not be found + */ + size_type find_first_of(utf32 code_point, size_type idx = 0) const + { + return find(code_point, idx); + } + + /*! + \brief + Search forwards for the first code point that does not match a given code point + + \param code_point + The utf32 code point to search for + + \param idx + Index of the code point where the search is to start. + + \return + - Index of the first code point that does not match \a code_point starting from from \a idx. + - npos if all code points matched \a code_point + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type find_first_not_of(utf32 code_point, size_type idx = 0) const + { + if (idx < d_cplength) + { + do + { + if ((*this)[idx] != code_point) + return idx; + + } while(idx++ < d_cplength); + + } + + return npos; + } + + + /*! + \brief + Find the first occurrence of one of a set of chars. + + \param c_str + c-string describing the set of chars. + + \param idx + Index of the start point for the search + + \return + - Index of the first occurrence of any one of the chars in \a c_str starting from from \a idx. + - npos if none of the chars in \a c_str were found. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type find_first_of(const char* cstr, size_type idx = 0) const + { + return find_first_of(cstr, idx, strlen(cstr)); + } + + + /*! + \brief + Find the first code point that is not one of a set of chars. + + \param c_str + c-string describing the set of chars. + + \param idx + Index of the start point for the search + + \return + - Index of the first code point that does not match any one of the chars in \a c_str starting from from \a idx. + - npos if all code points matched any of the chars in \a c_str. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type find_first_not_of(const char* cstr, size_type idx = 0) const + { + return find_first_not_of(cstr, idx, strlen(cstr)); + } + + + /*! + \brief + Find the first occurrence of one of a set of chars. + + \param chars + char array containing the set of chars. + + \param idx + Index of the start point for the search + + \param chars_len + Number of chars in the char array. + + \return + - Index of the first occurrence of any one of the chars in \a chars starting from from \a idx. + - npos if none of the chars in \a chars were found. + + \exception std::length_error Thrown if \a chars_len was 'npos'. + */ + size_type find_first_of(const char* chars, size_type idx, size_type chars_len) const + { + if (chars_len == npos) + throw std::length_error("Length for char array can not be 'npos'"); + + if (idx < d_cplength) + { + const utf32* pt = &ptr()[idx]; + + do + { + if (npos != find_codepoint(chars, chars_len, *pt++)) + return idx; + + } while (++idx != d_cplength); + + } + + return npos; + } + + + /*! + \brief + Find the first code point that is not one of a set of chars. + + \param chars + char array containing the set of chars. + + \param idx + Index of the start point for the search + + \param chars_len + Number of chars in the car array. + + \return + - Index of the first code point that does not match any one of the chars in \a chars starting from from \a idx. + - npos if all code points matched any of the chars in \a chars. + + \exception std::length_error Thrown if \a chars_len was 'npos'. + */ + size_type find_first_not_of(const char* chars, size_type idx, size_type chars_len) const + { + if (chars_len == npos) + throw std::length_error("Length for char array can not be 'npos'"); + + if (idx < d_cplength) + { + const utf32* pt = &ptr()[idx]; + + do + { + if (npos == find_codepoint(chars, chars_len, *pt++)) + return idx; + + } while (++idx != d_cplength); + + } + + return npos; + } + + + ////////////////////////////////////////////////////////////////////////// + // Find last of different code-points + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Find the last occurrence of one of a set of code points. + + \param str + String object describing the set of code points. + + \param idx + Index of the start point for the search + + \return + - Index of the last occurrence of any one of the code points in \a str starting from \a idx. + - npos if none of the code points in \a str were found. + */ + size_type find_last_of(const String& str, size_type idx = npos) const + { + if (d_cplength > 0) + { + if (idx >= d_cplength) + idx = d_cplength - 1; + + const utf32* pt = &ptr()[idx]; + + do + { + if (npos != str.find(*pt--)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + /*! + \brief + Find the last code point that is not one of a set of code points. + + \param str + String object describing the set of code points. + + \param idx + Index of the start point for the search + + \return + - Index of the last code point that does not match any one of the code points in \a str starting from \a idx. + - npos if all code points matched one of the code points in \a str. + */ + size_type find_last_not_of(const String& str, size_type idx = npos) const + { + if (d_cplength > 0) + { + if (idx >= d_cplength) + idx = d_cplength - 1; + + const utf32* pt = &ptr()[idx]; + + do + { + if (npos == str.find(*pt--)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + + /*! + \brief + Find the last occurrence of one of a set of code points. + + \param std_str + std::string object describing the set of code points. + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \param idx + Index of the start point for the search + + \return + - Index of the last occurrence of any one of the code points in \a std_str starting from \a idx. + - npos if none of the code points in \a std_str were found. + */ + size_type find_last_of(const std::string& std_str, size_type idx = npos) const + { + if (d_cplength > 0) + { + if (idx >= d_cplength) + idx = d_cplength - 1; + + const utf32* pt = &ptr()[idx]; + + do + { + if (npos != find_codepoint(std_str, *pt--)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + /*! + \brief + Find the last code point that is not one of a set of code points. + + \param std_str + std::string object describing the set of code points. + + \note + The characters of \a std_str are taken to be unencoded data which represent Unicode code points 0x00..0xFF. No translation of + the provided data will occur. + + \param idx + Index of the start point for the search + + \return + - Index of the last code point that does not match any one of the code points in \a std_str starting from \a idx. + - npos if all code points matched one of the code points in \a std_str. + */ + size_type find_last_not_of(const std::string& std_str, size_type idx = npos) const + { + if (d_cplength > 0) + { + if (idx >= d_cplength) + idx = d_cplength - 1; + + const utf32* pt = &ptr()[idx]; + + do + { + if (npos == find_codepoint(std_str, *pt--)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + + /*! + \brief + Find the last occurrence of one of a set of code points. + + \param utf8_str + Buffer containing null-terminated utf8 encoded data describing the set of code points. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the start point for the search + + \return + - Index of the last occurrence of any one of the code points in \a utf8_str starting from \a idx. + - npos if none of the code points in \a utf8_str were found. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type find_last_of(const utf8* utf8_str, size_type idx = npos) const + { + return find_last_of(utf8_str, idx, utf_length(utf8_str)); + } + + /*! + \brief + Find the last code point that is not one of a set of code points. + + \param utf8_str + Buffer containing null-terminated utf8 encoded data describing the set of code points. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the start point for the search + + \return + - Index of the last code point that does not match any one of the code points in \a utf8_str starting from \a idx. + - npos if all code points matched one of the code points in \a utf8_str. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type find_last_not_of(const utf8* utf8_str, size_type idx = npos) const + { + return find_last_not_of(utf8_str, idx, utf_length(utf8_str)); + } + + /*! + \brief + Find the last occurrence of one of a set of code points. + + \param utf8_str + Buffer containing utf8 encoded data describing the set of code points. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the start point for the search + + \param str_len + Length of the utf8 encoded data in utf8 code units (not code points). + + \return + - Index of the last occurrence of any one of the code points in \a utf8_str starting from from \a idx. + - npos if none of the code points in \a utf8_str were found. + + \exception std::length_error Thrown if \a str_len was 'npos'. + */ + size_type find_last_of(const utf8* utf8_str, size_type idx, size_type str_len) const + { + if (str_len == npos) + throw std::length_error("Length for utf8 encoded string can not be 'npos'"); + + if (d_cplength > 0) + { + if (idx >= d_cplength) + idx = d_cplength - 1; + + size_type encsze = encoded_size(utf8_str, str_len); + + const utf32* pt = &ptr()[idx]; + + do + { + if (npos != find_codepoint(utf8_str, encsze, *pt--)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + /*! + \brief + Find the last code point that is not one of a set of code points. + + \param utf8_str + Buffer containing utf8 encoded data describing the set of code points. + + \note + A basic string literal (cast to utf8*) can be passed to this function, provided that the string is + comprised only of code points 0x00..0x7f. The use of extended ASCII characters (with values >0x7f) + would result in incorrect behaviour as the String will attempt to 'decode' the data, with unpredictable + results. + + \param idx + Index of the start point for the search + + \param str_len + Length of the utf8 encoded data in utf8 code units (not code points). + + \return + - Index of the last code point that does not match any one of the code points in \a utf8_str starting from from \a idx. + - npos if all code points matched one of the code points in \a utf8_str. + + \exception std::length_error Thrown if \a str_len was 'npos'. + */ + size_type find_last_not_of(const utf8* utf8_str, size_type idx, size_type str_len) const + { + if (str_len == npos) + throw std::length_error("Length for utf8 encoded string can not be 'npos'"); + + if (d_cplength > 0) + { + if (idx >= d_cplength) + idx = d_cplength - 1; + + size_type encsze = encoded_size(utf8_str, str_len); + + const utf32* pt = &ptr()[idx]; + + do + { + if (npos == find_codepoint(utf8_str, encsze, *pt--)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + + /*! + \brief + Search for last occurrence of a given code point + + \param code_point + The utf32 code point to search for + + \param idx + Index of the code point where the search is to start. + + \return + - Index of the last occurrence of \a code_point starting from \a idx. + - npos if the code point could not be found + */ + size_type find_last_of(utf32 code_point, size_type idx = npos) const + { + return rfind(code_point, idx); + } + + /*! + \brief + Search for the last code point that does not match a given code point + + \param code_point + The utf32 code point to search for + + \param idx + Index of the code point where the search is to start. + + \return + - Index of the last code point that does not match \a code_point starting from from \a idx. + - npos if all code points matched \a code_point + */ + size_type find_last_not_of(utf32 code_point, size_type idx = npos) const + { + if (d_cplength > 0) + { + if (idx >= d_cplength) + idx = d_cplength - 1; + + do + { + if ((*this)[idx] != code_point) + return idx; + + } while(idx-- != 0); + + } + + return npos; + } + + + /*! + \brief + Find the last occurrence of one of a set of chars. + + \param c_str + c-string describing the set of chars. + + \param idx + Index of the start point for the search + + \return + - Index of the last occurrence of any one of the chars in \a c_str starting from \a idx. + - npos if none of the chars in \a c_str were found. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type find_last_of(const char* cstr, size_type idx = npos) const + { + return find_last_of(cstr, idx, strlen(cstr)); + } + + + /*! + \brief + Find the last code point that is not one of a set of chars. + + \param c_str + c-string describing the set of chars. + + \param idx + Index of the start point for the search + + \return + - Index of the last code point that does not match any one of the chars in \a c_str starting from \a idx. + - npos if all code points matched any of the chars in \a c_str. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + size_type find_last_not_of(const char* cstr, size_type idx = npos) const + { + return find_last_not_of(cstr, idx, strlen(cstr)); + } + + + /*! + \brief + Find the last occurrence of one of a set of chars. + + \param chars + char array containing the set of chars. + + \param idx + Index of the start point for the search + + \param chars_len + Number of chars in the char array. + + \return + - Index of the last occurrence of any one of the chars in \a chars, starting from from \a idx. + - npos if none of the chars in \a chars were found. + + \exception std::length_error Thrown if \a chars_len was 'npos'. + */ + size_type find_last_of(const char* chars, size_type idx, size_type chars_len) const + { + if (chars_len == npos) + throw std::length_error("Length for char array can not be 'npos'"); + + if (d_cplength > 0) + { + if (idx >= d_cplength) + idx = d_cplength - 1; + + const utf32* pt = &ptr()[idx]; + + do + { + if (npos != find_codepoint(chars, chars_len, *pt--)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + + /*! + \brief + Find the last code point that is not one of a set of chars. + + \param chars + char array containing the set of chars. + + \param idx + Index of the start point for the search + + \param chars_len + Number of chars in the char array. + + \return + - Index of the last code point that does not match any one of the chars in \a chars, starting from from \a idx. + - npos if all code points matched any of the chars in \a chars. + + \exception std::length_error Thrown if \a chars_len was 'npos'. + */ + size_type find_last_not_of(const char* chars, size_type idx, size_type chars_len) const + { + if (chars_len == npos) + throw std::length_error("Length for char array can not be 'npos'"); + + if (d_cplength > 0) + { + if (idx >= d_cplength) + idx = d_cplength - 1; + + const utf32* pt = &ptr()[idx]; + + do + { + if (npos == find_codepoint(chars, chars_len, *pt--)) + return idx; + + } while (idx-- != 0); + + } + + return npos; + } + + + ////////////////////////////////////////////////////////////////////////// + // Substring + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Returns a substring of this String. + + \param idx + Index of the first code point to use for the sub-string. + + \param len + Maximum number of code points to use for the sub-string + + \return + A String object containing the specified sub-string. + + \exception std::out_of_range Thrown if \a idx is invalid for this String. + */ + String substr(size_type idx = 0, size_type len = npos) const + { + if (d_cplength < idx) + throw std::out_of_range("Index is out of range for this CEGUI::String"); + + return String(*this, idx, len); + } + + ////////////////////////////////////////////////////////////////////////// + // Iterator creation + ////////////////////////////////////////////////////////////////////////// + /*! + \brief + Return a forwards iterator that describes the beginning of the String + + \return + iterator object that describes the beginning of the String. + */ + iterator begin(void) + { + return iterator(ptr()); + } + + /*! + \brief + Return a constant forwards iterator that describes the beginning of the String + + \return + const_iterator object that describes the beginning of the String. + */ + const_iterator begin(void) const + { + return const_iterator(ptr()); + } + + /*! + \brief + Return a forwards iterator that describes the end of the String + + \return + iterator object that describes the end of the String. + */ + iterator end(void) + { + return iterator(&ptr()[d_cplength]); + } + + /*! + \brief + Return a constant forwards iterator that describes the end of the String + + \return + const_iterator object that describes the end of the String. + */ + const_iterator end(void) const + { + return const_iterator(&ptr()[d_cplength]); + } + + /*! + \brief + Return a reverse iterator that describes the beginning of the String + + \return + reverse_iterator object that describes the beginning of the String (so is actually at the end) + */ + reverse_iterator rbegin(void) + { + return reverse_iterator(end()); + } + + /*! + \brief + Return a constant reverse iterator that describes the beginning of the String + + \return + const_reverse_iterator object that describes the beginning of the String (so is actually at the end) + */ + const_reverse_iterator rbegin(void) const + { + return const_reverse_iterator(end()); + } + + /*! + \brief + Return a reverse iterator that describes the end of the String + + \return + reverse_iterator object that describes the end of the String (so is actually at the beginning) + */ + reverse_iterator rend(void) + { + return reverse_iterator(begin()); + } + + /*! + \brief + Return a constant reverse iterator that describes the end of the String + + \return + const_reverse_iterator object that describes the end of the String (so is actually at the beginning) + */ + const_reverse_iterator rend(void) const + { + return const_reverse_iterator(begin()); + } + +private: + /************************************************************************* + Implementation Functions + *************************************************************************/ + // string management + + // change size of allocated buffer so it is at least 'new_size'. + // May or may not cause re-allocation and copy of buffer if size is larger + // will never re-allocate to make size smaller. (see trim()) + bool grow(size_type new_size); + + // perform re-allocation to remove wasted space. + void trim(void); + + // set the length of the string, and terminate it, according to the given value (will not re-allocate, use grow() first). + void setlen(size_type len) + { + d_cplength = len; + ptr()[len] = (utf32)(0); + } + + // initialise string object + void init(void) + { + d_reserve = STR_QUICKBUFF_SIZE; + d_encodedbuff = 0; + d_encodedbufflen = 0; + d_encodeddatlen = 0; + setlen(0); + } + + // return true if the given pointer is inside the string data + bool inside(utf32* inptr) + { + if (inptr < ptr() || ptr() + d_cplength <= inptr) + return false; + else + return true; + } + + // compute distance between two iterators, returning a 'safe' value + size_type safe_iter_dif(const const_iterator& iter1, const const_iterator& iter2) const + { + return (iter1.d_ptr == 0) ? 0 : (iter1 - iter2); + } + + // encoding functions + // for all: + // src_len is in code units, or 0 for null terminated string. + // dest_len is in code units. + // returns number of code units put into dest buffer. + size_type encode(const utf32* src, utf8* dest, size_type dest_len, size_type src_len = 0) const + { + // count length for null terminated source... + if (src_len == 0) + { + src_len = utf_length(src); + } + + size_type destCapacity = dest_len; + + // while there is data in the source buffer, + for (uint idx = 0; idx < src_len; ++idx) + { + utf32 cp = src[idx]; + + // check there is enough destination buffer to receive this encoded unit (exit loop & return if not) + if (destCapacity < encoded_size(cp)) + { + break; + } + + if (cp < 0x80) + { + *dest++ = (utf8)cp; + --destCapacity; + } + else if (cp < 0x0800) + { + *dest++ = (utf8)((cp >> 6) | 0xC0); + *dest++ = (utf8)((cp & 0x3F) | 0x80); + destCapacity -= 2; + } + else if (cp < 0x10000) + { + *dest++ = (utf8)((cp >> 12) | 0xE0); + *dest++ = (utf8)(((cp >> 6) & 0x3F) | 0x80); + *dest++ = (utf8)((cp & 0x3F) | 0x80); + destCapacity -= 3; + } + else + { + *dest++ = (utf8)((cp >> 18) | 0xF0); + *dest++ = (utf8)(((cp >> 12) & 0x3F) | 0x80); + *dest++ = (utf8)(((cp >> 6) & 0x3F) | 0x80); + *dest++ = (utf8)((cp & 0x3F) | 0x80); + destCapacity -= 4; + } + + } + + return dest_len - destCapacity; + } + + size_type encode(const utf8* src, utf32* dest, size_type dest_len, size_type src_len = 0) const + { + // count length for null terminated source... + if (src_len == 0) + { + src_len = utf_length(src); + } + + size_type destCapacity = dest_len; + + // while there is data in the source buffer, and space in the dest buffer + for (uint idx = 0; ((idx < src_len) && (destCapacity > 0));) + { + utf32 cp; + utf8 cu = src[idx++]; + + if (cu < 0x80) + { + cp = (utf32)(cu); + } + else if (cu < 0xE0) + { + cp = ((cu & 0x1F) << 6); + cp |= (src[idx++] & 0x3F); + } + else if (cu < 0xF0) + { + cp = ((cu & 0x0F) << 12); + cp |= ((src[idx++] & 0x3F) << 6); + cp |= (src[idx++] & 0x3F); + } + else + { + cp = ((cu & 0x07) << 18); + cp |= ((src[idx++] & 0x3F) << 12); + cp |= ((src[idx++] & 0x3F) << 6); + cp |= (src[idx++] & 0x3F); + } + + *dest++ = cp; + --destCapacity; + } + + return dest_len - destCapacity; + } + + // return the number of utf8 code units required to encode the given utf32 code point + size_type encoded_size(utf32 code_point) const + { + if (code_point < 0x80) + return 1; + else if (code_point < 0x0800) + return 2; + else if (code_point < 0x10000) + return 3; + else + return 4; + } + + // return number of code units required to re-encode given null-terminated utf32 data as utf8. return does not include terminating null. + size_type encoded_size(const utf32* buf) const + { + return encoded_size(buf, utf_length(buf)); + } + + // return number of code units required to re-encode given utf32 data as utf8. len is number of code units in 'buf'. + size_type encoded_size(const utf32* buf, size_type len) const + { + size_type count = 0; + + while (len--) + { + count += encoded_size(*buf++); + } + + return count; + } + + // return number of utf32 code units required to re-encode given utf8 data as utf32. return does not include terminating null. + size_type encoded_size(const utf8* buf) const + { + return encoded_size(buf, utf_length(buf)); + } + + // return number of utf32 code units required to re-encode given utf8 data as utf32. len is number of code units in 'buf'. + size_type encoded_size(const utf8* buf, size_type len) const + { + utf8 tcp; + size_type count = 0; + + while (len--) + { + tcp = *buf++; + ++count; + + if (tcp < 0x80) + { + } + else if (tcp < 0xE0) + { + --len; + ++buf; + } + else if (tcp < 0xF0) + { + len -= 2; + buf += 2; + } + else + { + len -= 2; + buf += 3; + } + + } + + return count; + } + + // return number of code units in a null terminated string + size_type utf_length(const utf8* utf8_str) const + { + size_type cnt = 0; + while (*utf8_str++) + cnt++; + + return cnt; + } + + // return number of code units in a null terminated string + size_type utf_length(const utf32* utf32_str) const + { + size_type cnt = 0; + while (*utf32_str++) + cnt++; + + return cnt; + } + + // build an internal buffer with the string encoded as utf8 (remains valid until string is modified). + utf8* build_utf8_buff(void) const; + + // compare two utf32 buffers + int utf32_comp_utf32(const utf32* buf1, const utf32* buf2, size_type cp_count) const + { + if (!cp_count) + return 0; + + while ((--cp_count) && (*buf1 == *buf2)) + buf1++, buf2++; + + return *buf1 - *buf2; + } + + // compare utf32 buffer with char buffer (chars are taken to be code-points in the range 0x00-0xFF) + int utf32_comp_char(const utf32* buf1, const char* buf2, size_type cp_count) const + { + if (!cp_count) + return 0; + + while ((--cp_count) && (*buf1 == static_cast<utf32>(static_cast<unsigned char>(*buf2)))) + buf1++, buf2++; + + return *buf1 - static_cast<utf32>(static_cast<unsigned char>(*buf2)); + } + + // compare utf32 buffer with encoded utf8 data + int utf32_comp_utf8(const utf32* buf1, const utf8* buf2, size_type cp_count) const + { + if (!cp_count) + return 0; + + utf32 cp; + utf8 cu; + + do + { + cu = *buf2++; + + if (cu < 0x80) + { + cp = (utf32)(cu); + } + else if (cu < 0xE0) + { + cp = ((cu & 0x1F) << 6); + cp |= (*buf2++ & 0x3F); + } + else if (cu < 0xF0) + { + cp = ((cu & 0x0F) << 12); + cp |= ((*buf2++ & 0x3F) << 6); + cp |= (*buf2++ & 0x3F); + } + else + { + cp = ((cu & 0x07) << 18); + cp |= ((*buf2++ & 0x3F) << 12); + cp |= ((*buf2++ & 0x3F) << 6); + cp |= (*buf2++ & 0x3F); + } + + } while ((*buf1++ == cp) && (--cp_count)); + + return (*--buf1) - cp; + } + + // return index of first occurrence of 'code_point' in std::string 'str', or npos if none + size_type find_codepoint(const std::string& str, utf32 code_point) const + { + size_type idx = 0, sze = (size_type)str.size(); + + while (idx != sze) + { + if (code_point == static_cast<utf32>(static_cast<unsigned char>(str[idx]))) + return idx; + + ++idx; + } + + return npos; + } + + // return index of first occurrence of 'code_point' in utf8 encoded string 'str', or npos if none. len is in code points. + size_type find_codepoint(const utf8* str, size_type len, utf32 code_point) const + { + size_type idx = 0; + + utf32 cp; + utf8 cu; + + while (idx != len) { + cu = *str++; + + if (cu < 0x80) + { + cp = (utf32)(cu); + } + else if (cu < 0xE0) + { + cp = ((cu & 0x1F) << 6); + cp |= (*str++ & 0x3F); + } + else if (cu < 0xF0) + { + cp = ((cu & 0x0F) << 12); + cp |= ((*str++ & 0x3F) << 6); + cp |= (*str++ & 0x3F); + } + else + { + cp = ((cu & 0x07) << 18); + cp |= ((*str++ & 0x3F) << 12); + cp |= ((*str++ & 0x3F) << 6); + cp |= (*str++ & 0x3F); + } + + if (code_point == cp) + return idx; + + ++idx; + } + + return npos; + } + + + // return index of first occurrence of 'code_point' in char array 'chars', or npos if none + size_type find_codepoint(const char* chars, size_type chars_len, utf32 code_point) const + { + for (size_type idx = 0; idx != chars_len; ++idx) + { + if (code_point == static_cast<utf32>(static_cast<unsigned char>(chars[idx]))) + return idx; + } + + return npos; + } + +}; + + +////////////////////////////////////////////////////////////////////////// +// Comparison operators +////////////////////////////////////////////////////////////////////////// +/*! +\brief + Return true if String \a str1 is equal to String \a str2 +*/ +bool CEGUIEXPORT operator==(const String& str1, const String& str2); + +/*! +\brief + Return true if String \a str is equal to std::string \a std_str +*/ +bool CEGUIEXPORT operator==(const String& str, const std::string& std_str); + +/*! +\brief + Return true if String \a str is equal to std::string \a std_str +*/ +bool CEGUIEXPORT operator==(const std::string& std_str, const String& str); + +/*! +\brief + Return true if String \a str is equal to null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator==(const String& str, const utf8* utf8_str); + +/*! +\brief + Return true if String \a str is equal to null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator==(const utf8* utf8_str, const String& str); + +/*! +\brief + Return true if String \a str1 is not equal to String \a str2 +*/ +bool CEGUIEXPORT operator!=(const String& str1, const String& str2); + +/*! +\brief + Return true if String \a str is not equal to std::string \a std_str +*/ +bool CEGUIEXPORT operator!=(const String& str, const std::string& std_str); + +/*! +\brief + Return true if String \a str is not equal to std::string \a std_str +*/ +bool CEGUIEXPORT operator!=(const std::string& std_str, const String& str); + +/*! +\brief + Return true if String \a str is not equal to null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator!=(const String& str, const utf8* utf8_str); + +/*! +\brief + Return true if String \a str is not equal to null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator!=(const utf8* utf8_str, const String& str); + +/*! +\brief + Return true if String \a str1 is lexicographically less than String \a str2 +*/ +bool CEGUIEXPORT operator<(const String& str1, const String& str2); + +/*! +\brief + Return true if String \a str is lexicographically less than std::string \a std_str +*/ +bool CEGUIEXPORT operator<(const String& str, const std::string& std_str); + +/*! +\brief + Return true if String \a str is lexicographically less than std::string \a std_str +*/ +bool CEGUIEXPORT operator<(const std::string& std_str, const String& str); + +/*! +\brief + Return true if String \a str is lexicographically less than null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator<(const String& str, const utf8* utf8_str); + +/*! +\brief + Return true if String \a str is lexicographically less than null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator<(const utf8* utf8_str, const String& str); + +/*! +\brief + Return true if String \a str1 is lexicographically greater than String \a str2 +*/ +bool CEGUIEXPORT operator>(const String& str1, const String& str2); + +/*! +\brief + Return true if String \a str is lexicographically greater than std::string \a std_str +*/ +bool CEGUIEXPORT operator>(const String& str, const std::string& std_str); + +/*! +\brief + Return true if String \a str is lexicographically greater than std::string \a std_str +*/ +bool CEGUIEXPORT operator>(const std::string& std_str, const String& str); + +/*! +\brief + Return true if String \a str is lexicographically greater than null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator>(const String& str, const utf8* utf8_str); + +/*! +\brief + Return true if String \a str is lexicographically greater than null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator>(const utf8* utf8_str, const String& str); + +/*! +\brief + Return true if String \a str1 is lexicographically less than or equal to String \a str2 +*/ +bool CEGUIEXPORT operator<=(const String& str1, const String& str2); + +/*! +\brief + Return true if String \a str is lexicographically less than or equal to std::string \a std_str +*/ +bool CEGUIEXPORT operator<=(const String& str, const std::string& std_str); + +/*! +\brief + Return true if String \a str is lexicographically less than or equal to std::string \a std_str +*/ +bool CEGUIEXPORT operator<=(const std::string& std_str, const String& str); + +/*! +\brief + Return true if String \a str is lexicographically less than or equal to null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator<=(const String& str, const utf8* utf8_str); + +/*! +\brief + Return true if String \a str is lexicographically less than or equal to null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator<=(const utf8* utf8_str, const String& str); + +/*! +\brief + Return true if String \a str1 is lexicographically greater than or equal to String \a str2 +*/ +bool CEGUIEXPORT operator>=(const String& str1, const String& str2); + +/*! +\brief + Return true if String \a str is lexicographically greater than or equal to std::string \a std_str +*/ +bool CEGUIEXPORT operator>=(const String& str, const std::string& std_str); + +/*! +\brief + Return true if String \a str is lexicographically greater than or equal to std::string \a std_str +*/ +bool CEGUIEXPORT operator>=(const std::string& std_str, const String& str); + +/*! +\brief + Return true if String \a str is lexicographically greater than or equal to null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator>=(const String& str, const utf8* utf8_str); + +/*! +\brief + Return true if String \a str is lexicographically greater than or equal to null-terminated utf8 data \a utf8_str +*/ +bool CEGUIEXPORT operator>=(const utf8* utf8_str, const String& str); + +/*! +\brief + Return true if String \a str is equal to c-string \a c_str +*/ +bool CEGUIEXPORT operator==(const String& str, const char* c_str); + +/*! +\brief + Return true if c-string \a c_str is equal to String \a str +*/ +bool CEGUIEXPORT operator==(const char* c_str, const String& str); + +/*! +\brief + Return true if String \a str is not equal to c-string \a c_str +*/ +bool CEGUIEXPORT operator!=(const String& str, const char* c_str); + +/*! +\brief + Return true if c-string \a c_str is not equal to String \a str +*/ +bool CEGUIEXPORT operator!=(const char* c_str, const String& str); + +/*! +\brief + Return true if String \a str is lexicographically less than c-string \a c_str +*/ +bool CEGUIEXPORT operator<(const String& str, const char* c_str); + +/*! +\brief + Return true if c-string \a c_str is lexicographically less than String \a str +*/ +bool CEGUIEXPORT operator<(const char* c_str, const String& str); + +/*! +\brief +Return true if String \a str is lexicographically greater than c-string \a c_str +*/ +bool CEGUIEXPORT operator>(const String& str, const char* c_str); + +/*! +\brief +Return true if c-string \a c_str is lexicographically greater than String \a str +*/ +bool CEGUIEXPORT operator>(const char* c_str, const String& str); + +/*! +\brief + Return true if String \a str is lexicographically less than or equal to c-string \a c_str +*/ +bool CEGUIEXPORT operator<=(const String& str, const char* c_str); + +/*! +\brief + Return true if c-string \a c_str is lexicographically less than or equal to String \a str +*/ +bool CEGUIEXPORT operator<=(const char* c_str, const String& str); + +/*! +\brief + Return true if String \a str is lexicographically greater than or equal to c-string \a c_str +*/ +bool CEGUIEXPORT operator>=(const String& str, const char* c_str); + +/*! +\brief + Return true if c-string \a c_str is lexicographically greater than or equal to String \a str +*/ +bool CEGUIEXPORT operator>=(const char* c_str, const String& str); + +////////////////////////////////////////////////////////////////////////// +// Concatenation operator functions +////////////////////////////////////////////////////////////////////////// +/*! +\brief + Return String object that is the concatenation of the given inputs + +\param str1 + String object describing first part of the new string + +\param str2 + String object describing the second part of the new string + +\return + A String object that is the concatenation of \a str1 and \a str2 + +\exception std::length_error Thrown if the resulting String would be too large. +*/ +String CEGUIEXPORT operator+(const String& str1, const String& str2); + +/*! +\brief + Return String object that is the concatenation of the given inputs + +\param str + String object describing first part of the new string + +\param std_str + std::string object describing the second part of the new string + +\return + A String object that is the concatenation of \a str and \a std_str + +\exception std::length_error Thrown if the resulting String would be too large. +*/ +String CEGUIEXPORT operator+(const String& str, const std::string& std_str); + +/*! +\brief + Return String object that is the concatenation of the given inputs + +\param std_str + std::string object describing the first part of the new string + +\param str + String object describing the second part of the new string + +\return + A String object that is the concatenation of \a std_str and \a str + +\exception std::length_error Thrown if the resulting String would be too large. +*/ +String CEGUIEXPORT operator+(const std::string& std_str, const String& str); + +/*! +\brief + Return String object that is the concatenation of the given inputs + +\param str + String object describing first part of the new string + +\param utf8_str + Buffer containing null-terminated utf8 encoded data describing the second part of the new string + +\return + A String object that is the concatenation of \a str and \a utf8_str + +\exception std::length_error Thrown if the resulting String would be too large. +*/ +String CEGUIEXPORT operator+(const String& str, const utf8* utf8_str); + +/*! +\brief + Return String object that is the concatenation of the given inputs + +\param utf8_str + Buffer containing null-terminated utf8 encoded data describing the first part of the new string + +\param str + String object describing the second part of the new string + +\return + A String object that is the concatenation of \a str and \a utf8_str + +\exception std::length_error Thrown if the resulting String would be too large. +*/ +String CEGUIEXPORT operator+(const utf8* utf8_str, const String& str); + +/*! +\brief + Return String object that is the concatenation of the given inputs + +\param str + String object describing the first part of the new string + +\param code_point + utf32 code point describing the second part of the new string + +\return + A String object that is the concatenation of \a str and \a code_point + +\exception std::length_error Thrown if the resulting String would be too large. +*/ +String CEGUIEXPORT operator+(const String& str, utf32 code_point); + +/*! +\brief + Return String object that is the concatenation of the given inputs + +\param code_point + utf32 code point describing the first part of the new string + +\param str + String object describing the second part of the new string + +\return + A String object that is the concatenation of \a code_point and \a str + +\exception std::length_error Thrown if the resulting String would be too large. +*/ +String CEGUIEXPORT operator+(utf32 code_point, const String& str); + +/*! +\brief + Return String object that is the concatenation of the given inputs + +\param str + String object describing first part of the new string + +\param c_str + c-string describing the second part of the new string + +\return + A String object that is the concatenation of \a str and \a c_str + +\exception std::length_error Thrown if the resulting String would be too large. +*/ +String CEGUIEXPORT operator+(const String& str, const char* c_str); + +/*! +\brief + Return String object that is the concatenation of the given inputs + +\param c_str + c-string describing the first part of the new string + +\param str + String object describing the second part of the new string + +\return + A String object that is the concatenation of \a c_str and \a str + +\exception std::length_error Thrown if the resulting String would be too large. +*/ +String CEGUIEXPORT operator+(const char* c_str, const String& str); + + +////////////////////////////////////////////////////////////////////////// +// Output (stream) functions +////////////////////////////////////////////////////////////////////////// +CEGUIEXPORT std::ostream& operator<<(std::ostream& s, const String& str); + + +////////////////////////////////////////////////////////////////////////// +// Modifying operations +////////////////////////////////////////////////////////////////////////// +/*! +\brief + Swap the contents for two String objects + +\param str1 + String object who's contents are to be swapped with \a str2 + +\param str2 + String object who's contents are to be swapped with \a str1 + +\return + Nothing +*/ +void CEGUIEXPORT swap(String& str1, String& str2); + + +} // End of CEGUI namespace section + + +#endif // end of guard _CEGUIString_h_ diff --git a/pcr/cegui-0.5/PKGBUILD b/pcr/cegui-0.5/PKGBUILD new file mode 100644 index 000000000..60c3427cc --- /dev/null +++ b/pcr/cegui-0.5/PKGBUILD @@ -0,0 +1,41 @@ +# Contributor: Jakub Luzny <limoto94@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=cegui-0.5 +pkgver=0.5.0b +pkgrel=1 +pkgdesc="A free library providing windowing and widgets for graphics APIs/engines" +arch=('i686' 'x86_64') +url="http://crayzedsgui.sourceforge.net" +#options=('!libtool') +license=("MIT") +depends=('pcre' 'glew' 'freetype2' 'libxml2' 'devil' 'freeglut' 'silly') +conflicts=('cegui') +source=(http://downloads.sourceforge.net/crayzedsgui/CEGUI-$pkgver.tar.gz + CEGUIString.h) +md5sums=('b42322a33c6a06eede76b15f75694a17' + 'b0859a1316bb25ca4860a5d0052e9a04') + + +build() { + cd $srcdir/CEGUI-0.5.0 + + cp $srcdir/CEGUIString.h include/ + sed -i 's/ILvoid/void/' ImageCodecModules/DevILImageCodec/CEGUIDevILImageCodec.cpp + + ./configure --prefix=/usr --enable-release --enable-shared --disable-expat --disable-tga --disable-samples --disable-xerces-c + + make +} + +package() { + cd $srcdir/CEGUI-0.5.0 + + make DESTDIR=${pkgdir} install + + install -Dm644 COPYING ${pkgdir}/usr/share/licenses/$pkgname/LICENSE +} + +#category: lib +md5sums=('b42322a33c6a06eede76b15f75694a17' + 'b0859a1316bb25ca4860a5d0052e9a04') diff --git a/pcr/cegui-0.6/PKGBUILD b/pcr/cegui-0.6/PKGBUILD new file mode 100644 index 000000000..fb28c2134 --- /dev/null +++ b/pcr/cegui-0.6/PKGBUILD @@ -0,0 +1,55 @@ +# Contributor: Lucio zara <pennega@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=cegui-0.6 +pkgver=0.6.2 +_pkgver=0.6.2b +pkgrel=13 + +pkgdesc="A free library providing windowing and widgets for graphics APIs/engines." +arch=('i686' 'x86_64') +url="http://www.cegui.org.uk/" +license=('MIT') +depends=('devil' 'freetype2' 'libxml2' 'lua' 'pcre' 'silly' 'glew' 'tinyxml' 'directfb' 'freeglut') +makedepends=() +options=('!libtool') +conflicts=('cegui') +source=("http://downloads.sourceforge.net/crayzedsgui/CEGUI-${_pkgver}.tar.gz") +md5sums=('4fbd95e5a2ac1c7acf2a8f5df3ac6b93') + + +build() { + cd ${srcdir}/CEGUI-${pkgver} + #PATCH + #sed -i '1i#include <cstddef>' include/CEGUIString.h + sed -i '/#include <stdexcept>/a\#include <cstddef>' include/CEGUIString.h + sed -i '/#include "CEGUIDynamicModule.h"/a\#include <algorithm>' RendererModules/directfbRenderer/directfb-renderer.cpp + sed -i 's:TiXmlNode\:\::TiXmlNode\:\:TINYXML_:g' XMLParserModules/TinyXMLParser/CEGUITinyXMLParser.cpp + sed -i 's:ILvoid:void:g' ImageCodecModules/DevILImageCodec/CEGUIDevILImageCodec.cpp + + PYTHON=python2 \ + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --disable-xerces-c \ + --disable-samples \ + --enable-devil \ + --enable-silly \ + --enable-lua-module \ + --enable-python-module \ + --with-default-image-codec=SILLYImageCodec + + make || return 1 +} + +package() { + cd ${srcdir}/CEGUI-${pkgver} + install -d ${pkgdir}/usr/share/licenses/${pkgname} || return 1 + + make DESTDIR=${pkgdir} install || return 1 + + install -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/ || return 1 +} +md5sums=('4fbd95e5a2ac1c7acf2a8f5df3ac6b93') +md5sums=('4fbd95e5a2ac1c7acf2a8f5df3ac6b93') diff --git a/pcr/cgdb/PKGBUILD b/pcr/cgdb/PKGBUILD new file mode 100644 index 000000000..e623d5a96 --- /dev/null +++ b/pcr/cgdb/PKGBUILD @@ -0,0 +1,21 @@ +# Contributor: Javier ‘Phrodo_00’ Aravena <Phrodo.00@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=cgdb +pkgver=0.6.6 +pkgrel=1 +pkgdesc="Curses-based interface to the GNU Debugger" +arch=('i686' 'x86_64') +url="http://cgdb.sourceforge.net/" +license=('GPL') +depends=('readline>=5.1' 'ncurses' 'gdb') +source=("http://downloads.sourceforge.net/cgdb/$pkgname-$pkgver.tar.gz") +md5sums=('394b542b495755ab8392b7e88dace744') + +build() { + cd $startdir/src/$pkgname-$pkgver + ./configure --prefix=/usr + make || return 1 + make DESTDIR=$startdir/pkg install +} +md5sums=('394b542b495755ab8392b7e88dace744') diff --git a/pcr/cl-ppcre/LICENSE b/pcr/cl-ppcre/LICENSE new file mode 100644 index 000000000..8f122e6eb --- /dev/null +++ b/pcr/cl-ppcre/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2002-2007, Dr. Edmund Weitz. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pcr/cl-ppcre/PKGBUILD b/pcr/cl-ppcre/PKGBUILD new file mode 100644 index 000000000..b136c4ac9 --- /dev/null +++ b/pcr/cl-ppcre/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: mrshpot <mrshpot at gmail dot com> +# Contributor: veox <cy at wre dot ath dot cx> +# Contributor: joyfulgirl <joyfulgirl (at) archlinux.us> +# Contributor: Jonathan Friedman <jonf@gojon.com> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + +pkgname=cl-ppcre +pkgver=2.0.3 +pkgrel=2 +pkgdesc="Perl-compatible, portable regexp library for Common Lisp" +arch=('i686' 'x86_64') +url="http://www.weitz.de/cl-ppcre/" +license=('BSD') + +depends=('common-lisp' 'cl-asdf') + +install=cl-ppcre.install +source=('http://weitz.de/files/cl-ppcre.tar.gz' 'LICENSE') +md5sums=('bd5648fd3c8b6f89eea43f5b82b99aa1' + 'c6aa01dce26b45aa916329701a448d11') + +build() { + install -d ${pkgdir}/usr/share/common-lisp/source/${pkgname} + install -d ${pkgdir}/usr/share/common-lisp/systems + install -d ${pkgdir}/usr/share/licenses/${pkgname} + + cd ${srcdir}/${pkgname}-${pkgver} + + install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${pkgname} \ + ${srcdir}/${pkgname}-${pkgver}/*.lisp + install -m 644 -t ${pkgdir}/usr/share/common-lisp/source/${pkgname} \ + ${srcdir}/${pkgname}-${pkgver}/*.asd + install -m 644 ${srcdir}/LICENSE \ + ${pkgdir}/usr/share/licenses/${pkgname} + + cd ${pkgdir}/usr/share/common-lisp/systems + ln -s ../source/${pkgname}/${pkgname}.asd . + ln -s ../source/${pkgname}/${pkgname}-unicode.asd . +} + +# vim:set ts=2 sw=4 et nospell: diff --git a/pcr/cl-ppcre/cl-ppcre.install b/pcr/cl-ppcre/cl-ppcre.install new file mode 100644 index 000000000..9ad84d1e1 --- /dev/null +++ b/pcr/cl-ppcre/cl-ppcre.install @@ -0,0 +1,73 @@ +_pkgname=cl-ppcre +_compile_log=n +_lisp=() + +if pacman -Qq clisp &>/dev/null || + pacman -Qq clisp-gtk2 &>/dev/null || + pacman -Qq clisp-new-clx &>/dev/null; then + _lisp=(${_lisp[@]} 'clisp') +fi +if pacman -Qq sbcl &>/dev/null; then + _lisp=(${_lisp[@]} 'sbcl') +fi +if pacman -Qq cmucl &> /dev/null; then + _lisp=(${_lisp[@]} 'cmucl') +fi + +_compile_sbcl() { + sbcl --noinform --no-sysinit --no-userinit \ + --eval "(require :asdf)" \ + --eval "(pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)" \ + --eval "(asdf:operate 'asdf:compile-op '${_pkgname})" \ + --eval "(quit)" &> ${_compile_log_file} || return 1 +} +_compile_clisp() { + clisp --silent -norc -x \ + "(load #p\"/usr/share/common-lisp/source/asdf/asdf.lisp\") + (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal) + (asdf:operate 'asdf:compile-op '${_pkgname}) + (quit)" &> ${_compile_log_file} || return 1 +} +_compile_cmucl() { + cmucl -quiet -nositeinit -noinit -eval \ + "(load #p\"/usr/share/common-lisp/source/asdf/asdf.lisp\") + (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal) + (asdf:operate 'asdf:compile-op '${_pkgname}) + (quit)" &> ${_compile_log_file} || return 1 +} + +post_install() { + for _lispiter in ${_lisp[@]}; do + echo "---> Compiling lisp files using ${_lispiter} <---" + if [ $_compile_log = 'y' ]; then + _compile_log_file=/tmp/${_pkgname}_${_lispiter}.log + else + _compile_log_file=/dev/null + fi + _compile_${_lispiter} + echo "---> Done compiling lisp files (using ${_lispiter}) <---" + done + + cat << EOM + + To load this library, load asdf and then run the following lines + (or their equivalent for your lisp of choice): + + (push #p"/usr/share/common-lisp/systems/" asdf:*central-registry*) + (asdf:operate 'asdf:load-op '${_pkgname}) +EOM +} + +post_upgrade() { + post_install +} + +pre_remove() { + rm -f /usr/share/common-lisp/source/${_pkgname}/{*.fas,*.fasl,*.lib,*.x86f} +} + +pre_upgrade() { + pre_remove +} + +# End of file diff --git a/pcr/clx-git/PKGBUILD b/pcr/clx-git/PKGBUILD new file mode 100644 index 000000000..6e2a3369b --- /dev/null +++ b/pcr/clx-git/PKGBUILD @@ -0,0 +1,71 @@ +#Contributor: Akshay Srinivasan <akshaysrinivasan at gmail.com> +pkgname=clx-git +_clname=clx +pkgver=20120421 +pkgrel=1 +pkgdesc="Xlib for common lisp systems" +arch=('i686' 'x86_64') +url="http://www.cliki.net/CLX" +license=('custom') +depends=('x-server' 'sbcl') +makedepends=('texinfo') +install=clx.install +source=(README.licensing) +md5sums=('74858379015567928f1eee186d9db1a4') + +conflicts=('clx') +provides=('clx') + +makedepends=('git') + +_gitroot="git://github.com/sharplispers/clx.git" +_gitname="clx" + + +build() { + + cat << EOM + + WARNING! + + You are building a package using a snapshot from a repository. The + resulting package may be unusable or pose a security risk, since + the install script does not check source file hashes. Do not continue + if this is undesirable. + +EOM + + install -d ${pkgdir}/usr/share/common-lisp/systems + install -d ${pkgdir}/usr/share/common-lisp/source/${_clname}/{debug,demo,test} + install -d ${pkgdir}/usr/share/licenses/${_clname} + install -d ${pkgdir}/usr/share/info + + ### Git checkout + cd "$srcdir" + msg "Connecting to GIT server...." + + if [ -d $_gitname ] ; then + cd $_gitname && git pull origin + msg "The local files are updated." + else + git clone $_gitroot $_gitname + fi + + cd ${pkgdir}/usr/share/common-lisp/source/${_clname} + + install -m 644 -t . ${srcdir}/${_gitname}/*.lisp + install -m 644 -t debug ${srcdir}/${_gitname}/debug/*.lisp + install -m 644 -t demo ${srcdir}/${_gitname}/demo/*.lisp + install -m 644 -t test ${srcdir}/${_gitname}/test/*.lisp + + install -m 644 -t . ${srcdir}/${_gitname}/${_clname}.asd + cd ${pkgdir}/usr/share/common-lisp/systems + ln -s ../source/${_clname}/${_clname}.asd . + + cd ${srcdir}/${_gitname}/manual + makeinfo ${_clname}.texinfo + install -m 644 ${_clname}.info ${pkgdir}/usr/share/info + + install -m 644 ${srcdir}/README.licensing ${pkgdir}/usr/share/licenses/${_clname} + +} diff --git a/pcr/clx-git/README.licensing b/pcr/clx-git/README.licensing new file mode 100644 index 000000000..669083222 --- /dev/null +++ b/pcr/clx-git/README.licensing @@ -0,0 +1,4 @@ +This packages uses several licenses. + +To see a given source file's license, please check its header. The +lisp files are installed in /usr/share/common-lisp/source/clx. diff --git a/pcr/clx-git/clx.install b/pcr/clx-git/clx.install new file mode 100644 index 000000000..7344518a4 --- /dev/null +++ b/pcr/clx-git/clx.install @@ -0,0 +1,76 @@ +# arg 1: the new package version + +_pkgname=clx +_compile_log=n +_lisp=() + +if pacman -Qq clisp-new-clx &>/dev/null || + pacman -Qq clisp-gtk2 &>/dev/null || + pacman -Qq clisp-new-clx &>/dev/null; then + _lisp=(${_lisp[@]} 'clisp') +fi +if pacman -Qq sbcl &>/dev/null; then + _lisp=(${_lisp[@]} 'sbcl') +fi +if pacman -Qq cmucl &> /dev/null; then + _lisp=(${_lisp[@]} 'cmucl') +fi + +_compile_sbcl() { + sbcl --noinform --no-sysinit --no-userinit \ + --eval "(require :asdf)" \ + --eval "(pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)" \ + --eval "(asdf:operate 'asdf:compile-op '${_pkgname})" \ + --eval "(quit)" &> ${_compile_log_file} || return 1 +} +_compile_clisp() { + clisp --silent -norc -x \ + "(load #p\"/usr/share/common-lisp/source/asdf/asdf\") + (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal) + (asdf:operate 'asdf:compile-op '${_pkgname}) + (quit)" &> ${_compile_log_file} || return 1 +} +_compile_cmucl() { + cmucl -quiet -nositeinit -noinit -eval \ + "(load #p\"/usr/share/common-lisp/source/asdf/asdf\") + (pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal) + (asdf:operate 'asdf:compile-op '${_pkgname}) + (quit)" &> ${_compile_log_file} || return 1 +} + +post_install() { + for _lispiter in ${_lisp[@]}; do + echo "---> Compiling lisp files using ${_lispiter} <---" + if [ $_compile_log = 'y' ]; then + _compile_log_file=/tmp/${_pkgname}_${_lispiter}.log + else + _compile_log_file=/dev/null + fi + _compile_${_lispiter} + echo "---> Done compiling lisp files (using ${_lispiter}) <---" + done + + cat << EOM + + To load this library, load asdf and then run the following lines + (or their equivalent for your lisp of choice): + + (push #p"/usr/share/common-lisp/systems/" asdf:*central-registry*) + (asdf:operate 'asdf:load-op '${_pkgname}) +EOM +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + rm -f /usr/share/common-lisp/source/$_pkgname/{*.fas,*.fasl,*.lib,*.x86f} +} + +op=$1 +shift + +$op $* + +# End of file
\ No newline at end of file diff --git a/pcr/command-not-found/PKGBUILD b/pcr/command-not-found/PKGBUILD new file mode 100644 index 000000000..d43b73c0e --- /dev/null +++ b/pcr/command-not-found/PKGBUILD @@ -0,0 +1,47 @@ +# Contributor: Matthias Maennich <arch@maennich.net> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=command-not-found +pkgver=0.4.4 +pkgrel=1 +pkgdesc="In case a command could not be found this utility searches for packages containing this or a similar command (bash,zsh)." +arch=('i686' 'x86_64') +url="http://github.com/metti/command-not-found" +license=('GPL') +depends=('boost-libs' 'tdb' 'libarchive' 'wget') +makedepends=('boost' 'tdb' 'cmake' 'git') +source=('install') +md5sums=('2ea3c216fb0b7f8449f0225ece33210c') +install='install' + +_gitrepo="https://github.com/metti/$pkgname.git" + +build() { + cd $srcdir + msg "Connecting to the GIT server ..." + + if [[ -d $srcdir/$pkgname ]] ; then + cd $pkgname + git fetch origin + else + git clone $_gitrepo + cd $pkgname + fi + + git checkout v$pkgver + + msg "GIT checkout done" + + mkdir -p $srcdir/build + cd $srcdir/build + + cmake -D CMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="" $srcdir/$pkgname/src + make + +} + +package(){ + cd $srcdir/build + + make DESTDIR=$pkgdir install +} diff --git a/pcr/command-not-found/install b/pcr/command-not-found/install new file mode 100644 index 000000000..26f49fa50 --- /dev/null +++ b/pcr/command-not-found/install @@ -0,0 +1,14 @@ +post_install() { + cnf-sync +} + +post_upgrade() { + cnf-sync +} + +pre_remove() { + rm -rf /var/lib/cnf/*.db + rm -rf /var/lib/cnf/*.tdb +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/conky-control/PKGBUILD b/pcr/conky-control/PKGBUILD new file mode 100644 index 000000000..c607ae86b --- /dev/null +++ b/pcr/conky-control/PKGBUILD @@ -0,0 +1,35 @@ +# Contributer: giacomogiorgianni@gmail.com +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=conky-control +pkgver=1.0.0 +pkgrel=2 +pkgdesc="control panel for conky" +arch=('any') +url="http://bbs.archbang.org/viewtopic.php?id=3017" +license=('GPL') +categories=() +depends=('conky-lua') +makedepends=() +options=(!emptydirs) +source=("Conky_voyager.tar.gz::http://ompldr.org/vZWoxMA" "conky_voyager.tar.gz::http://ompldr.org/vZWoxYg" "conky-control.install") +md5sums=('6930f45eb5dd402953d306ebe8ff14da' + 'e63ba795800ec20df912e620b423688e' + '0217a6bee07fb918b0c2050548103d43') +install=$pkgname.install + +build() { + mkdir -p $pkgdir/usr/bin + mkdir -p $pkgdir/usr/share/applications + mkdir -p $pkgdir/etc/skel/.config + cp $startdir/conky-controlRC.desktop $pkgdir/etc/skel/.config/ + cp $startdir/conky-control.desktop $pkgdir/usr/share/applications/ + + install -m 0775 -do $LOGNAME $pkgdir/etc/skel/.scripts + tar xzf Conky_voyager.tar.gz -C $pkgdir/etc/skel/.scripts + tar xzf conky_voyager.tar.gz -C $pkgdir/etc/skel// + ln -s $pkgdir/etc/skel/.scripts/Conky/conky $pkgdir/usr/bin/conky-control + } +md5sums=('6930f45eb5dd402953d306ebe8ff14da' + 'e63ba795800ec20df912e620b423688e' + '0217a6bee07fb918b0c2050548103d43') diff --git a/pcr/conky-control/conky-control.install b/pcr/conky-control/conky-control.install new file mode 100644 index 000000000..399672b0a --- /dev/null +++ b/pcr/conky-control/conky-control.install @@ -0,0 +1,17 @@ +post_install() { + for i in `ls /home | grep -v lost+found` + do + cp -fR /etc/skel/.conky /home/$i + cp -fR /etc/skel/.scripts /home/$i + cp -fR /etc/skel/.config /home/$i + echo "# Overwrite this file if you want to have a permanent setting" > /home/$i/.conkyrc + chown $i:users -R /home/$i/{.conky,.scripts} + chown $i:users "/home/$i/.config/autostart/Conky Control RC.desktop" + chown $i:users "/home/$i/.conkyrc" + done + echo " >> Start 'conky-control' to configure conky" +} + +post_upgrade() { + post_install +} diff --git a/pcr/conky-lua/PKGBUILD b/pcr/conky-lua/PKGBUILD new file mode 100644 index 000000000..6d36e9c29 --- /dev/null +++ b/pcr/conky-lua/PKGBUILD @@ -0,0 +1,54 @@ +# Contributor: Renato Garcia <fgarcia.renato@gmail.com> +# Contributor: Giovanni Scafora <giovanni@archlinux.org> +# Contributor: James Rayner <james@archlinux.org> +# Contributor: Partha Chowdhury <kira.laucas@gmail.com> +# Contributor: Gaetan Bisson <bisson@archlinux.org> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=conky-lua +_pkgname=conky +pkgver=1.9.0 +pkgrel=1 +pkgdesc='Lightweight system monitor for X' +url='http://conky.sourceforge.net/' +license=('BSD' 'GPL') +arch=('i686' 'x86_64') +options=('!emptydirs') +makedepends=('docbook2x' 'toluapp' 'perl-xml-libxml') +depends=('alsa-lib' 'libxml2' 'curl' 'wireless_tools' 'libxft' 'glib2' 'libxdamage' 'imlib2' 'lua' 'cairo') +provides=('conky=1.9.0') +conflicts=('conky') +backup=('etc/conky/conky.conf' 'etc/conky/conky_no_x11.conf') +source=("http://downloads.sourceforge.net/project/${_pkgname}/${_pkgname}/${pkgver}/${_pkgname}-${pkgver}.tar.gz") +sha1sums=('a8d26d002370c9b877ae77ad3a3bbd2566b38e5d') + +replaces=('torsmo') + +build() { + cd "${srcdir}/${_pkgname}-${pkgver}" + + CPPFLAGS="${CXXFLAGS}" LIBS="${LDFLAGS}" ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --enable-ibm \ + --enable-curl \ + --enable-rss \ + --enable-weather-xoap \ + --enable-imlib2 \ + --enable-wlan \ + --enable-lua \ + --enable-lua-cairo \ + --enable-lua-imlib2 + + + make +} + +package() { + cd "${srcdir}/${_pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" + install -Dm644 extras/vim/syntax/conkyrc.vim "${pkgdir}"/usr/share/vim/vimfiles/syntax/conkyrc.vim + install -Dm644 extras/vim/ftdetect/conkyrc.vim "${pkgdir}"/usr/share/vim/vimfiles/ftdetect/conkyrc.vim +} +sha1sums=('a8d26d002370c9b877ae77ad3a3bbd2566b38e5d') diff --git a/pcr/cw/PKGBUILD b/pcr/cw/PKGBUILD new file mode 100644 index 000000000..fb26acb4a --- /dev/null +++ b/pcr/cw/PKGBUILD @@ -0,0 +1,46 @@ +# Contributor: William DÃaz <wdiaz[at]archlinux[dot]us> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=cw +pkgver=1.0.16 +pkgrel=1 +pkgdesc="A non-intrusive ANSI color wrapper for common unix-based commands on GNU/linux." +url="http://sourceforge.net/projects/cwrapper/" +license=('GPL2') +arch=('i686' 'x86_64') +depends=() +makedepends=('patch') +install=cw.install +source=("http://cwrapper.sourceforge.net/${pkgname}-${pkgver}.tar.bz2" + "${pkgname}.patch") +md5sums=('142a1e9a25abbb01c3b90091d0bf68fd' + '5c54fab22fdb0601e6e4fb3fa87c435d') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + install -d ${pkgdir}/usr/bin \ + ${pkgdir}/usr/share/man/man1 \ + ${pkgdir}/usr/share/doc/cw + + msg "Patching Files" + patch -Np1 -i ${srcdir}/${pkgname}.patch || return 1 + + ./configure --prefix=/usr || return 1 +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + make DESTDIR=${pkgdir} install || return 1 + + # Deleting the problematic files + rm -R ${pkgdir}/usr/lib/${pkgname}/{file,gcc,g++,stat,du} + + cp CHANGES CONTRIB INSTALL README PLATFORM \ + ${pkgdir}/usr/share/doc/cw + + ln -sf /usr/bin/cw ${pkgdir}/usr/bin/cwe +} +md5sums=('142a1e9a25abbb01c3b90091d0bf68fd' + '5c54fab22fdb0601e6e4fb3fa87c435d') diff --git a/pcr/cw/cw.install b/pcr/cw/cw.install new file mode 100644 index 000000000..bf0219bb7 --- /dev/null +++ b/pcr/cw/cw.install @@ -0,0 +1,26 @@ +post_install () { + echo -e "\033[32;1m==>\033[0m \033[1mUpdating definition files...\033[0m" + /usr/bin/cwu /usr/lib/cw /usr/bin/cw > /dev/null + + echo -e "" + echo -e "Complete, definitions are stored in: /usr/lib/cw" + echo -e "\033[1mFor bash:\033[0m place 'export PATH=\"/usr/lib/cw:\$PATH\"'" + echo -e "at the end of ~/.bash_profile(or /etc/profile globally)" + echo -e "" + echo -e "\033[1mFor tcsh:\033[0m place 'setenv PATH \"/usr/lib/cw:\$PATH\"'" + echo -e "at the end of ~/.login(or /etc/csh.login globally)" + echo -e "" + echo -e "\033[1mFor zsh:\033[0m place:" + echo -e "'export PATH=\"/usr/lib/cw:\$PATH\"'" + echo -e "at the end of ~/.zshrc(or /etc/zprofile globally)" + echo -e "" + echo -e "Or to automate the two lines above use the "colorcfg" command." + echo -e "(and add optional anti-coloring precautions)" + echo -e "Once the desired shell(s) are setup, use the "color" command," + echo -e "or the environmental variable NOCOLOR=1 to turn" + echo -e "color wrapping on and off." +} + +post_upgrade() { + post_install +} diff --git a/pcr/cw/cw.patch b/pcr/cw/cw.patch new file mode 100644 index 000000000..2158a0d30 --- /dev/null +++ b/pcr/cw/cw.patch @@ -0,0 +1,78 @@ +--- cw-1.0.16/Makefile.in 2007-09-25 11:10:20.000000000 -0600 ++++ cw-1.0.16/Makefile.in 2009-12-23 00:22:47.932698402 -0600 +@@ -8,7 +8,7 @@ CC=@CC@ + ECHO=echo + LN=ln + RM=rm +-MKDIR=mkdir ++MKDIR=mkdir -p + INSTALL=@INSTALL@ + + all: +@@ -56,32 +56,18 @@ installlocal: cleanlocal local + + install: cleanpub cw cwu + @$(ECHO) "* Installing color wrapper..." +- @for FILE in bin/*;do $(INSTALL) -o 0 -g 0 -m 755 $$FILE $(BINDIR);done +- @$(LN) -sf $(BINDIR)/cw $(BINDIR)/cwe ++ @for FILE in bin/*;do $(INSTALL) -m 755 $$FILE $(DESTDIR)$(BINDIR);done ++ @$(LN) -sf $(DESTDIR)$(BINDIR)/cw $(DESTDIR)$(BINDIR)/cwe + @$(ECHO) "* Installing color wrapper generic definition files..." +- @$(MKDIR) -m 755 $(LIBDIR)/cw/ +- @for FILE in def/*;do $(INSTALL) -o 0 -g 0 -m 755 $$FILE $(LIBDIR)/cw/;done ++ @$(MKDIR) -m 755 $(DESTDIR)$(LIBDIR)/cw/ ++ @for FILE in def/*;do $(INSTALL) -m 755 $$FILE $(DESTDIR)$(LIBDIR)/cw/;done + @$(ECHO) "* Installing color wrapper generic header/footer files..." +- @$(MKDIR) -m 755 $(LIBDIR)/cw/etc +- @for FILE in etc/*;do $(INSTALL) -o 0 -g 0 -m 644 $$FILE $(LIBDIR)/cw/etc;done ++ @$(MKDIR) -m 755 $(DESTDIR)$(LIBDIR)/cw/etc ++ @for FILE in etc/*;do $(INSTALL) -m 644 $$FILE $(DESTDIR)$(LIBDIR)/cw/etc;done + @$(ECHO) "* Installing manual pages..." +- @for FILE in man/*;do $(INSTALL) -o 0 -g 0 -m 644 $$FILE $(MANDIR)/man1/;done ++ @for FILE in man/*;do $(INSTALL) -m 644 $$FILE $(DESTDIR)$(MANDIR)/man1/;done + @$(ECHO) "* Updating definition files..." +- @$(BINDIR)/cwu $(LIBDIR)/cw $(BINDIR)/cw +- @$(ECHO) "-----------------------------------------------------------" +- @$(ECHO) "* Complete, definitions are stored in: $(LIBDIR)/cw" +- @$(ECHO) "* For bash: place 'export PATH=\"$(LIBDIR)/cw:\$$PATH\"'"\ +- "at the end of ~/.bash_profile(or /etc/profile globally)" +- @$(ECHO) "* For tcsh: place 'setenv PATH \"$(LIBDIR)/cw:\$$PATH\"'"\ +- "at the end of ~/.login(or /etc/csh.login globally)" +- @$(ECHO) "* Or to automate the two lines above use the"\ +- "\"colorcfg\" command. (and add optional anti-coloring precautions)" +- @$(ECHO) "* Once the desired shell(s) are setup, use the"\ +- "\"color\" command, or the environmental variable NOCOLOR=1 to turn"\ +- "color wrapping on and off." +- @$(ECHO) "" +- @$(ECHO) "* PLEASE view the ./README file for more information if"\ +- "you haven't already." ++ @$(DESTDIR)$(BINDIR)/cwu $(DESTDIR)$(LIBDIR)/cw $(DESTDIR)$(BINDIR)/cw + + clean: + @$(ECHO) "* Cleaning compiling content..." +@@ -94,9 +80,9 @@ cleanlocal: + + cleanpub: + @$(ECHO) "* Cleaning cw and cwu binaries, and definitions..." +- @$(RM) -rf $(BINDIR)/cw $(BINDIR)/cwu $(BINDIR)/cwe\ +- $(BINDIR)/cw.exe $(BINDIR)/cwu.exe $(BINDIR)/color $(BINDIR)/colorcfg\ +- $(LIBDIR)/cw $(MANDIR)/man1/cw.1.gz $(MANDIR)/man1/cwu.1.gz\ +- $(MANDIR)/man1/cwe.1.gz ++ @$(RM) -rf $(DESTDIR)$(BINDIR)/cw $(DESTDIR)$(BINDIR)/cwu $(DESTDIR)$(BINDIR)/cwe\ ++ $(DESTDIR)$(BINDIR)/cw.exe $(DESTDIR)$(BINDIR)/cwu.exe $(DESTDIR)$(BINDIR)/color $(DESTDIR)$(BINDIR)/colorcfg\ ++ $(DESTDIR)$(LIBDIR)/cw $(DESTDIR)$(MANDIR)/man1/cw.1.gz $(DESTDIR)$(MANDIR)/man1/cwu.1.gz\ ++ $(DESTDIR)$(MANDIR)/man1/cwe.1.gz + + cleanall: clean cleanlocal cleanpub + +--- cw-1.0.16/bin/colorcfg 2007-09-25 11:10:20.000000000 -0600 ++++ cw-1.0.16/bin/colorcfg 2009-12-23 00:29:05.105994275 -0600 +@@ -12,7 +12,7 @@ if test -x "${HOME}/.cw/bin/colorcfg";th + else + SED="`which sed 2>/dev/null`" + if test -z "$SED";then +- CWLIB="/usr/local/lib/cw" ++ CWLIB="/usr/lib/cw" + echo "(NOTE: using static cw library path, this could be invalid)" + else + CWLIB="`echo \"$0/lib/cw\"|sed \"s/\/bin\/colorcfg//g\"`" diff --git a/pcr/django-cms/PKGBUILD b/pcr/django-cms/PKGBUILD new file mode 100644 index 000000000..9a641b7fb --- /dev/null +++ b/pcr/django-cms/PKGBUILD @@ -0,0 +1,26 @@ +# Contributor: Baptiste Jonglez <baptiste--aur at jonglez dot org> +# Contributor: Fabio Volpe <volpefabio@gmail.com> +# Contributor: Apkawa <apkawa@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +pkgname=django-cms +pkgver=2.2 +pkgrel=1 +pkgdesc="CMS framework based on Django" +arch=('any') +url="http://www.django-cms.org/" +license=('BSD') +depends=('python2' 'django' 'python-south' 'python-imaging' 'django-mptt' 'python2-html5lib' 'django-classy-tags' 'django-sekizai') +source=(http://pypi.python.org/packages/source/d/$pkgname/$pkgname-$pkgver.tar.gz) + +build() { + cd "$srcdir/$pkgname-$pkgver" + python2 setup.py build +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + python2 setup.py install --root="$pkgdir/" --install-data=/usr/share/$pkgname --optimize=1 + #install -D -m644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE +} + diff --git a/pcr/django-extensions/PKGBUILD b/pcr/django-extensions/PKGBUILD new file mode 100644 index 000000000..535091cfc --- /dev/null +++ b/pcr/django-extensions/PKGBUILD @@ -0,0 +1,39 @@ +# Contributor: Alper Kanat <alperkanat@raptiye.org> +# Contributor: Schnouki <thomas.jost@gmail.com> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + +pkgname=django-extensions +pkgver=0.6 +pkgrel=1 +pkgdesc="Django Custom Management Command Extensions" +arch=('any') +url="http://github.com/django-extensions/django-extensions" +license=('BSD') +depends=('django' 'python2') +makedepends=('setuptools' 'git') +optdepends=('graphviz: to graph Django models' + 'python-werkzeug: to use the Werbzeug debugger in the embedded web server') +source=() + +_giturl=http://github.com/$pkgname/$pkgname.git + +build() { + cd $srcdir + + if [[ ! -d $srcdir/$pkgname ]]; then + # downloading the whole repository + git clone $_giturl + else + # updating the local repository + cd $srcdir/$pkgname + git pull + fi + + cd $srcdir/$pkgname + + # checking out to the tag (version) + git checkout -b $pkgver $pkgver + + python2 ./setup.py install --root=$pkgdir --prefix=/usr || return 1 +} + diff --git a/pcr/django-social-auth/PKGBUILD b/pcr/django-social-auth/PKGBUILD new file mode 100644 index 000000000..379a066a2 --- /dev/null +++ b/pcr/django-social-auth/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: Benjamin A. Shelton <zancarius at gmail _ com> +# Source: https://github.com/zancarius/archlinux-pkgbuilds +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=django-social-auth +pkgver=0.7.9 +pkgrel=1 +pkgdesc="Social authentication made simple." +arch=(any) +url="http://pypi.python.org/pypi/django-social-auth" +license=(BSD) +depends=(python2 python2-openid python2-oauth2) +makedepends=(python2-distribute) +conflicts=(django-socialauth-git) +source=("http://pypi.python.org/packages/source/d/${pkgname}/${pkgname}-${pkgver}.tar.gz") + +build () { + + cd "${srcdir}/${pkgname}-${pkgver}" + python2 setup.py install --root="${pkgdir}/" --optimize=1 + +} diff --git a/pcr/django-tagging/PKGBUILD b/pcr/django-tagging/PKGBUILD new file mode 100644 index 000000000..83f808280 --- /dev/null +++ b/pcr/django-tagging/PKGBUILD @@ -0,0 +1,20 @@ +# Contributor: Ryan Coyner <rcoyner@gmail.com> +# Contributor: James Pearson <james.m.pearson+arch@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +pkgname=django-tagging +pkgver=0.3.1 +pkgrel=2 +pkgdesc="A generic tagging application for Django projects" +arch=('i686' 'x86_64') +url="http://code.google.com/p/django-tagging/" +license=('MIT') +depends=('python2') +source=(http://django-tagging.googlecode.com/files/django-tagging-$pkgver.tar.gz) + +build() { + cd $srcdir/django-tagging-$pkgver + python2 setup.py build || return 1 + python2 setup.py install --root=$pkgdir || return 1 + install -D -m644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE +} diff --git a/pcr/doxymacs/PKGBUILD b/pcr/doxymacs/PKGBUILD new file mode 100644 index 000000000..09a46a0ae --- /dev/null +++ b/pcr/doxymacs/PKGBUILD @@ -0,0 +1,26 @@ +# Contributor: Limao Luo <luolimao+AUR@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=doxymacs +pkgver=1.8.0 +pkgrel=2 +pkgdesc="Use Doxygen from within {X}Emacs" +arch=(i686 x86_64) +url=http://$pkgname.sourceforge.net +license=(GPL) +depends=('libxml2>=2.6.13') +install=$pkgname.install +source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz) +sha256sums=('a23fd833bc3c21ee5387c62597610941e987f9d4372916f996bf6249cc495afa') +sha512sums=('7461a8a415aadf331f856e4f122712cbedc2907eff9e452f24e6ee83b96903d9944d2cfdbcfeab8a66144a0be508eae723c29f82a081df9723560b10c444f8ac') + +build() { + cd "$srcdir"/$pkgname-$pkgver/ + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir"/$pkgname-$pkgver/ + make DESTDIR="$pkgdir" install +} diff --git a/pcr/doxymacs/doxymacs.install b/pcr/doxymacs/doxymacs.install new file mode 100644 index 000000000..9d8366f45 --- /dev/null +++ b/pcr/doxymacs/doxymacs.install @@ -0,0 +1,19 @@ +post_install() { + cat <<__EOF__ +====> Put (require 'doxymacs) in your .emacs +====> Invoke doxymacs-mode with M-x doxymacs-mode. +====> To have doxymacs-mode invoked automatically when in C/C++ mode, put +(add-hook 'c-mode-common-hook 'doxymacs-mode) +====> in your .emacs. +====> If you want Doxygen keywords fontified use M-x doxymacs-font-lock. +====> To do it automatically in C and C++ modes, add the following to your .emacs: +(defun my-doxymacs-font-lock-hook () + (if (or (eq major-mode 'c-mode) (eq major-mode 'c++-mode)) + (doxymacs-font-lock))) +(add-hook 'font-lock-mode-hook 'my-doxymacs-font-lock-hook) +__EOF__ +} + +post_upgrade() { + post_install +} diff --git a/pcr/dsh/PKGBUILD b/pcr/dsh/PKGBUILD new file mode 100644 index 000000000..605598100 --- /dev/null +++ b/pcr/dsh/PKGBUILD @@ -0,0 +1,19 @@ +# Contributor: SkiltZ <skiltz@free.fr> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=dsh +pkgver=0.25.9 +pkgrel=2 +pkgdesc="Distributed shell. Runs command through rsh or ssh on a cluster of machines." +arch=(i686 x86_64) +depends=('libdshconfig') +url="http://www.netfort.gr.jp/~dancer/software/dsh.html.en" +license=('GPL') +source=(http://www.netfort.gr.jp/~dancer/software/downloads/dsh-$pkgver.tar.gz) + +build() { + cd $startdir/src/$pkgname-$pkgver + ./configure --prefix=/usr --sysconfdir='/etc' + make || return 1 + make prefix=$startdir/pkg/usr sysconfdir=$startdir/pkg/etc install + } diff --git a/pcr/dswm/PKGBUILD b/pcr/dswm/PKGBUILD new file mode 100644 index 000000000..122e62b9a --- /dev/null +++ b/pcr/dswm/PKGBUILD @@ -0,0 +1,41 @@ +pkgname=dswm +pkgver=0.0.5r2 +pkgrel=5 +pkgdesc="Deep Space Window Manager - tiling window manager, oriented for good usability and good emacs integration (StumpWM-based)." +url="http://sourceforge.net/projects/dswm/" +arch=('x86_64' 'i686') +license=('GPLv2') +depends=('sbcl' 'clx-git' 'cl-ppcre') +optdepends=('emacs') +makedepends=('autoconf') +conflicts=() +replaces=() +backup=() +install='dswm.install' +options=(!strip) +source=("http://sourceforge.net/projects/${pkgname}/files/${pkgver}/${pkgname}-${pkgver}.tar.gz") +md5sums=('90f95f7ecfbf964f8ed5aa629959bc1f') + +build() { + mkdir -p "${pkgdir}"/usr/share/xsessions/ # patch for specific original makefile + cd $startdir/src/$pkgname-$pkgver + sed -i 's/\@prefix\@//g' dswm.lisp.in + autoconf + ./configure --prefix=/usr \ + --with-ppcre=/usr/share/common-lisp/source/cl-ppcre + +# this is necesary since the AUR packages do not modify the asdf's registry by default + _sbcl_bopt="sbcl_BUILDOPTS=--eval \"(require :asdf)\" \ +--eval \"(pushnew #p\\\"/usr/share/common-lisp/systems/\\\" asdf:*central-registry* :test #'equal)\" \ +--eval \"(asdf:operate 'asdf:load-op 'clx)\" \ +--load ./make-image.lisp" + _sbcl_iopt="sbcl_INFOOPTS=--eval \"(require 'asdf)\" \ +--eval \"(pushnew #p\\\"/usr/share/common-lisp/systems/\\\" asdf:*central-registry* :test #'equal)\" \ +--eval \"(asdf:operate 'asdf:load-op 'clx)\" \ +--eval \"(require 'dswm)\" \ +--load ./manual.lisp \ +--eval \"(progn (dswm::generate-manual) (sb-ext:quit))\"" + + make "$_sbcl_bopt" "$_sbcl_iopt" + make destdir="${pkgdir}" install +} diff --git a/pcr/dswm/dswm.install b/pcr/dswm/dswm.install new file mode 100644 index 000000000..0077d0018 --- /dev/null +++ b/pcr/dswm/dswm.install @@ -0,0 +1,21 @@ +infodir=usr/share/info +filelist=(dswm.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + diff --git a/pcr/emacs-bzr/PKGBUILD b/pcr/emacs-bzr/PKGBUILD new file mode 100644 index 000000000..7383e3490 --- /dev/null +++ b/pcr/emacs-bzr/PKGBUILD @@ -0,0 +1,93 @@ +# Contributor: Neil Santos <nsantos16+aur@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +# Compile against Gtk+ 2.x, instead of the default 3.x +_opt_use_gtk2="n" +# Emacs is leaking like a sieve on my box with the default values; +# this should be the number of bytes Emacs should allocate for pure +# storage (see Elisp manual). Default as of writing this is 1.62 megs +# (not the final value; there are still calculations done on it). +_opt_puresize="2000000" + +pkgname=emacs-bzr +pkgver=110380 +pkgrel=1 +pkgdesc='The extensible, customizable, self-documenting real-time display editor from its official Bzr repository' +arch=('i686' 'x86_64') +url='http://www.gnu.org/software/emacs/' +license=('GPL3') +if [[ $_opt_use_gtk2 = "y" ]]; then + depends=('dbus-core' 'desktop-file-utils' 'libpng' 'libtiff' 'librsvg' 'giflib' 'gtk2' 'libxpm' 'libjpeg>=7' 'hicolor-icon-theme') +else + depends=('dbus-core' 'desktop-file-utils' 'libpng' 'libtiff' 'librsvg' 'giflib' 'gtk3' 'libxpm' 'libjpeg>=7' 'hicolor-icon-theme') +fi + +makedepends=('bzr' 'pkgconfig' 'texinfo') +provides=("emacs=$pkgver") +conflicts=('emacs' 'emacs-nox' 'emacs-otf' 'emacs-cvs' 'emacs-git') +install=$pkgname.install + +_bzrtrunk='http://bzr.savannah.gnu.org/r/emacs/trunk' +_bzrmod='emacs' + +build() { + cd $srcdir + msg "Connecting to Savannah..." + + if [[ -d $_bzrmod/.bzr ]]; then + (cd $_bzrmod && bzr update -v && cd ..) + msg "Local checkout updated or server timeout" + else + bzr co --lightweight -v $_bzrtrunk $_bzrmod + msg "Checkout done or server timeout" + fi + + cp -urT $_bzrmod/ ${_bzrmod}-build + cd ${_bzrmod}-build + msg "Adjusting BASE_PURESIZE to avoid possible leaks" + sed -i -e "s/\(define BASE_PURESIZE\s*(*\)[0-9]*/\1${_opt_puresize}/" src/puresize.h + + msg "Bootstrapping Emacs Lisp files..." + make bootstrap + + mandir=/usr/share/man + msg "Starting make..." + if [[ $_opt_use_gtk2 = "y" ]]; then + ./autogen.sh && ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib \ + --mandir=${mandir} \ + --without-sound \ + --with-xft \ + --with-x-toolkit=gtk2 + else + ./autogen.sh && ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib \ + --mandir=${mandir} \ + --without-sound \ + --with-xft \ + --with-x-toolkit=gtk3 + fi + make + make DESTDIR=${pkgdir} install + + msg "Cleaning up..." + mv $pkgdir/usr/bin/{ctags,ctags.emacs} + mv $pkgdir/usr/bin/{etags,etags.emacs} + mv $pkgdir${mandir}/man1/{etags.1,etags.emacs.1}.gz + mv $pkgdir${mandir}/man1/{ctags.1,ctags.emacs.1}.gz + + # This is mostly superfluous, and conflicts with texinfo + rm $pkgdir/usr/share/info/info.info.gz + rm $pkgdir/usr/share/info/dir + + find $pkgdir/usr/share/emacs -type d -exec chmod 755 {} \; + find $pkgdir/usr/share/emacs -exec chown root.root {} \; + chmod 775 $pkgdir/var/games + chmod 775 $pkgdir/var/games/emacs + chmod 664 $pkgdir/var/games/emacs/* + chown -R root:50 $pkgdir/var/games +} diff --git a/pcr/emacs-bzr/emacs-bzr.install b/pcr/emacs-bzr/emacs-bzr.install new file mode 100644 index 000000000..35d11bd56 --- /dev/null +++ b/pcr/emacs-bzr/emacs-bzr.install @@ -0,0 +1,32 @@ +ICON_PATH=/usr/share/icons/hicolor +INFO_DIR=/usr/share/info + +INFO_FILES=(ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse +ede ediff edt efaq eieio eintr elisp emacs emacs-mime epa erc ert eshell +eudc flymake forms gnus idlwave mairix-el message mh-e newsticker +nxml-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses +sieve smtpmail speedbar tramp url vip viper widget woman) + +post_install() { + gtk-update-icon-cache -q -t -f ${ICON_PATH} + update-desktop-database -q + + [[ -x /usr/bin/install-info ]] || return 0 + for f in ${INFO_FILES[@]}; do + install-info ${INFO_DIR}/$f.info.gz ${INFO_DIR}/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + gtk-update-icon-cache -q -t -f ${ICON_PATH} + update-desktop-database -q + + [[ -x /usr/bin/install-info ]] || return 0 + for f in ${INFO_FILES[@]}; do + install-info --delete ${INFO_DIR}/$f.info.gz ${INFO_DIR}/dir 2> /dev/null + done +} diff --git a/pcr/emacs-color-theme/PKGBUILD b/pcr/emacs-color-theme/PKGBUILD new file mode 100644 index 000000000..53ad1bf24 --- /dev/null +++ b/pcr/emacs-color-theme/PKGBUILD @@ -0,0 +1,48 @@ +# $Id: PKGBUILD 59903 2011-12-02 11:18:13Z andrea $ +# Contributor: Stefan Husmann <stefan-husmann@t-online.de> +# Contributor: Cesar Romero <cesar.romero@gmail.com> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + +pkgname=emacs-color-theme +pkgver=6.6.0 +pkgrel=8 +arch=('any') +pkgdesc="Emacs color themes" +url="https://gna.org/projects/color-theme" +license=('GPL2') +depends=('emacs' 'xorg-fonts-100dpi') +makedepends=('emacs') +provides=('color-theme') +replaces=('color-theme') +install=$pkgname.install +source=(http://download.savannah.gnu.org/releases/color-theme/color-theme-$pkgver.tar.gz + 'gnus-bug.diff' + 'fix-build.patch') +md5sums=('a4de73c236a6af11ab378bfe18dabcca' + '8b7ee1c4c6f80606f22c3de448ec92e8' + '25b92ea246716689502ebe050322a60a') + +build() { + cd $srcdir/color-theme-$pkgver + + patch -p1 -i $srcdir/gnus-bug.diff + patch -p0 -i $srcdir/fix-build.patch + + make +} + +package() { + cd $srcdir/color-theme-$pkgver + install -Dm644 color-theme.el \ + $pkgdir/usr/share/emacs/site-lisp/color-theme.el + install -Dm644 themes/color-theme-library.el \ + $pkgdir/usr/share/emacs/site-lisp/themes/color-theme-library.el + install -Dm644 themes/color-theme-example.el \ + $pkgdir/usr/share/emacs/site-lisp/themes/color-theme-example.el + install -Dm644 color-theme.elc \ + $pkgdir/usr/share/emacs/site-lisp/color-theme.elc + install -Dm644 themes/color-theme-library.elc \ + $pkgdir/usr/share/emacs/site-lisp/themes/color-theme-library.elc + install -Dm644 themes/color-theme-example.elc \ + $pkgdir/usr/share/emacs/site-lisp/themes/color-theme-example.elc +} diff --git a/pcr/emacs-color-theme/emacs-color-theme.install b/pcr/emacs-color-theme/emacs-color-theme.install new file mode 100644 index 000000000..b1de09f76 --- /dev/null +++ b/pcr/emacs-color-theme/emacs-color-theme.install @@ -0,0 +1,9 @@ +# arg 1: the new package version +post_install() { +echo "# To start using color-theme add this to your .emacs:" +echo "# (require 'color-theme)" +} + +post_upgrade() { + post_install +}
\ No newline at end of file diff --git a/pcr/emacs-color-theme/fix-build.patch b/pcr/emacs-color-theme/fix-build.patch new file mode 100644 index 000000000..cadb1ae05 --- /dev/null +++ b/pcr/emacs-color-theme/fix-build.patch @@ -0,0 +1,19 @@ +--- Makefile.orig 2009-05-15 18:22:49.000000000 +0200 ++++ Makefile 2009-05-16 08:59:36.000000000 +0200 +@@ -15,6 +15,7 @@ + TARGET = $(patsubst %.el,%.elc,$(SPECIAL) $(SOURCE)) + MANUAL = color-theme + MISC = AUTHORS COPYING ChangeLog Makefile.defs Makefile $(AUTOLOADFILE).in ++LOADPATH = "$(shell pwd)" "$(shell pwd)/themes" + #AUTHORS CREDITS HISTORY NEWS README Makefile ChangeLog \ + #ChangeLog.2005 ChangeLog.2004 ChangeLog.2003 ChangeLog.2002 \ + #ChangeLog.2001 servers.pl color-theme-auto.in color-theme.texi +@@ -47,7 +48,7 @@ + + %.elc: %.el + @$(EMACS) $(OPTIONCOMPILE) \ +- --eval '(setq load-path (cons "." load-path))' \ ++ --eval '(setq load-path (append load-path (list $(LOADPATH))))' \ + -f batch-byte-compile $< + + %.info: %.texi diff --git a/pcr/emacs-color-theme/gnus-bug.diff b/pcr/emacs-color-theme/gnus-bug.diff new file mode 100644 index 000000000..9d227df56 --- /dev/null +++ b/pcr/emacs-color-theme/gnus-bug.diff @@ -0,0 +1,28 @@ +diff -Naur color-theme-6.6.0.orig/color-theme.el color-theme-6.6.0.new/color-theme.el +--- color-theme-6.6.0.orig/color-theme.el 2011-11-18 01:17:29.000000000 +0100 ++++ color-theme-6.6.0.new/color-theme.el 2011-11-18 01:24:07.000000000 +0100 +@@ -73,9 +73,10 @@ + "Non-nil if running XEmacs.") + + ;; Add this since it appears to miss in emacs-2x +-(or (fboundp 'replace-in-string) +- (defun replace-in-string (target old new) +- (replace-regexp-in-string old new target))) ++(if (fboundp 'replace-in-string) ++ (defalias 'color-theme-replace-in-string 'replace-in-string) ++ (defsubst color-theme-replace-in-string (target old new &optional literal) ++ (replace-regexp-in-string old new target nil literal))) + + ;; face-attr-construct has a problem in Emacs 20.7 and older when + ;; dealing with inverse-video faces. Here is a short test to check +@@ -1626,8 +1627,8 @@ + (add-to-list 'color-themes + (list ',n + (upcase-initials +- (replace-in-string +- (replace-in-string ++ (color-theme-replace-in-string ++ (color-theme-replace-in-string + (symbol-name ',n) "^color-theme-" "") "-" " ")) + ,author)) + (defun ,n () diff --git a/pcr/emacs-elib/PKGBUILD b/pcr/emacs-elib/PKGBUILD new file mode 100644 index 000000000..22946859e --- /dev/null +++ b/pcr/emacs-elib/PKGBUILD @@ -0,0 +1,51 @@ +# PKGBUILD for Emacs Lisp Library (elib) +# Contributor: J. Bromley <jbromley@gmail.com> +# $Id: PKGBUILD,v e6d455730f95 2009/12/03 05:38:28 jbromley $ +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=emacs-elib +_pkgname=elib +pkgver=1.0 +pkgrel=3 +pkgdesc="The Emacs Lisp library" +arch=('i686' 'x86_64') +url="http://jdee.sourceforge.net/" +license="GPL" +depends=('emacs') +makedepends=('texinfo' 'gzip') +conflicts=() +replaces=() +backup=() +install="$pkgname.install" +source=(http://downloads.sourceforge.net/project/jdee/jdee/Dependencies/elib.tar.gz) +md5sums=('4feb380f2e3b12eb5500dfe6714e349d') + +build() { +mv $startdir/src/pub/comp/os/unix/gnu/elib/$_pkgname-$pkgver.tar.gz $startdir/src +cd $startdir/src/ +tar -xzf $_pkgname-$pkgver.tar.gz +cd $startdir/src/$_pkgname-$pkgver + +# Fix up paths and old --infodir flag. +sed -i 's!/usr/local!/usr!' Makefile +sed -i 's!/info!/share/info!' Makefile +sed -i 's!--infodir!--info-dir!g' Makefile + +# Patch to get rid of deprecated code. +patch -p1 < $startdir/elib-deprecation.patch + +# Create directories for installation +mkdir -p $startdir/pkg/usr/share/info +mkdir -p $startdir/pkg/usr/share/emacs/site-lisp +make || return 1 + +# Install the compile package and gzip info file. +make prefix=$startdir/pkg/usr install +find $startdir/pkg -name dir -exec rm '{}' \; +mv $startdir/pkg/usr/share/info/elib.info $startdir/pkg/usr/share/info/elib +gzip $startdir/pkg/usr/share/info/elib +} + +# Local Variables: +# mode: shell-script +# End: diff --git a/pcr/emacs-elib/elib-deprecation.patch b/pcr/emacs-elib/elib-deprecation.patch new file mode 100644 index 000000000..ce8aedb6f --- /dev/null +++ b/pcr/emacs-elib/elib-deprecation.patch @@ -0,0 +1,461 @@ +diff -ub elib-1.0.orig/avltree.el elib-1.0/avltree.el +--- elib-1.0.orig/avltree.el 1995-12-10 16:50:53.000000000 -0800 ++++ elib-1.0/avltree.el 2008-06-22 15:31:48.000000000 -0700 +@@ -69,19 +69,19 @@ + (defmacro elib-avl-node-create (left right data balance) + + ;; Create and return an avl-tree node. +- (` (vector (, left) (, right) (, data) (, balance)))) ++ `(vector ,left ,right ,data ,balance)) + + + (defmacro elib-avl-node-balance (node) + + ;; Return the balance field of a node. +- (` (aref (, node) 3))) ++ `(aref ,node 3)) + + + (defmacro elib-avl-node-set-balance (node newbal) + + ;; Set the balance field of a node. +- (` (aset (, node) 3 (, newbal)))) ++ `(aset ,node 3 ,newbal)) + + + +@@ -96,20 +96,20 @@ + (defmacro elib-avl-root (tree) + + ;; Return the root node for an avl-tree. INTERNAL USE ONLY. +- (` (elib-node-left (car (cdr (, tree)))))) ++ `(elib-node-left (car (cdr ,tree)))) + + + (defmacro elib-avl-dummyroot (tree) + + ;; Return the dummy node of an avl-tree. INTERNAL USE ONLY. + +- (` (car (cdr (, tree))))) ++ `(car (cdr ,tree))) + + + (defmacro elib-avl-cmpfun (tree) + + ;; Return the compare function of AVL tree TREE. INTERNAL USE ONLY. +- (` (cdr (cdr (, tree))))) ++ `(cdr (cdr ,tree))) + + + ;; ---------------------------------------------------------------- +@@ -412,20 +412,20 @@ + ;; INTERNAL USE ONLY. + + (let ((node root) +- (stack (elib-stack-create)) ++ (stack (stack-create)) + (go-left t)) +- (elib-stack-push stack nil) ++ (stack-push stack nil) + (while node + (if (and go-left + (elib-node-left node)) + (progn ; Do the left subtree first. +- (elib-stack-push stack node) ++ (stack-push stack node) + (setq node (elib-node-left node))) + (funcall map-function node) ; Apply the function... + (if (elib-node-right node) ; and do the right subtree. + (setq node (elib-node-right node) + go-left t) +- (setq node (elib-stack-pop stack) ++ (setq node (stack-pop stack) + go-left nil)))))) + + +diff -ub elib-1.0.orig/bintree.el elib-1.0/bintree.el +--- elib-1.0.orig/bintree.el 1995-12-10 16:50:53.000000000 -0800 ++++ elib-1.0/bintree.el 2008-06-22 15:28:45.000000000 -0700 +@@ -64,19 +64,19 @@ + (defmacro elib-bintree-root (tree) + + ;; Return the root node for a binary tree. INTERNAL USE ONLY. +- (` (elib-node-left (car (cdr (, tree)))))) ++ `(elib-node-left (car (cdr ,tree)))) + + + (defmacro elib-bintree-dummyroot (tree) + + ;; Return the dummy node of a binary tree. INTERNAL USE ONLY. +- (` (car (cdr (, tree))))) ++ `(car (cdr ,tree))) + + + (defmacro elib-bintree-cmpfun (tree) + + ;; Return the compare function of binary tree TREE. INTERNAL USE ONLY." +- (` (cdr (cdr (, tree))))) ++ `(cdr (cdr ,tree))) + + + +@@ -90,20 +90,20 @@ + ;; INTERNAL USE ONLY." + + (let ((node root) +- (stack (elib-stack-create)) ++ (stack (stack-create)) + (go-left t)) +- (elib-stack-push stack nil) ++ (stack-push stack nil) + (while node + (if (and go-left + (elib-node-left node)) + (progn ; Do the left subtree first. +- (elib-stack-push stack node) ++ (stack-push stack node) + (setq node (elib-node-left node))) + (funcall map-function node) ; Apply the function... + (if (elib-node-right node) ; and do the right subtree. + (setq node (elib-node-right node) + go-left t) +- (setq node (elib-stack-pop stack) ++ (setq node (stack-pop stack) + go-left nil)))))) + + +diff -ub elib-1.0.orig/cookie.el elib-1.0/cookie.el +--- elib-1.0.orig/cookie.el 1995-12-10 16:50:54.000000000 -0800 ++++ elib-1.0/cookie.el 2008-06-22 15:38:55.000000000 -0700 +@@ -139,13 +139,13 @@ + + (let ((old-buffer (make-symbol "old-buffer")) + (hnd (make-symbol "collection"))) +- (` (let* (((, old-buffer) (current-buffer)) +- ((, hnd) (, collection)) +- (dll (elib-collection->dll (, hnd)))) +- (set-buffer (elib-collection->buffer (, hnd))) ++ `(let* ((,old-buffer (current-buffer)) ++ (,hnd ,collection) ++ (dll (elib-collection->dll ,hnd))) ++ (set-buffer (elib-collection->buffer ,hnd)) + (unwind-protect +- (progn (,@ forms)) +- (set-buffer (, old-buffer))))))) ++ (progn ,@forms) ++ (set-buffer ,old-buffer))))) + + + (put 'elib-set-buffer-bind-dll-let* 'lisp-indent-hook 2) +@@ -160,14 +160,14 @@ + + (let ((old-buffer (make-symbol "old-buffer")) + (hnd (make-symbol "collection"))) +- (` (let* (((, old-buffer) (current-buffer)) +- ((, hnd) (, collection)) +- (dll (elib-collection->dll (, hnd))) +- (,@ varlist)) +- (set-buffer (elib-collection->buffer (, hnd))) ++ `(let* ((,old-buffer (current-buffer)) ++ (,hnd ,collection) ++ (dll (elib-collection->dll ,hnd)) ++ ,@varlist) ++ (set-buffer (elib-collection->buffer ,hnd)) + (unwind-protect +- (progn (,@ forms)) +- (set-buffer (, old-buffer))))))) ++ (progn ,@forms) ++ (set-buffer ,old-buffer))))) + + + (defmacro elib-filter-hf (collection tin) +@@ -179,12 +179,12 @@ + + (let ((tempvar (make-symbol "tin")) + (tmpcoll (make-symbol "tmpcollection"))) +- (` (let (((, tempvar) (, tin)) +- ((, tmpcoll) (, collection))) +- (if (or (eq (, tempvar) (elib-collection->header (, tmpcoll))) +- (eq (, tempvar) (elib-collection->footer (, tmpcoll)))) ++ `(let ((,tempvar ,tin) ++ (,tmpcoll ,collection)) ++ (if (or (eq ,tempvar (elib-collection->header ,tmpcoll)) ++ (eq ,tempvar (elib-collection->footer ,tmpcoll))) + nil +- (, tempvar)))))) ++ ,tempvar)))) + + + +diff -ub elib-1.0.orig/dll-debug.el elib-1.0/dll-debug.el +--- elib-1.0.orig/dll-debug.el 1995-12-10 16:50:54.000000000 -0800 ++++ elib-1.0/dll-debug.el 2008-06-22 15:25:14.000000000 -0700 +@@ -74,9 +74,9 @@ + (defmacro dll-insert-after (node element) + (let ((node-v (make-symbol "node")) + (element-v (make-symbol "element"))) +- (` (let (((, node-v) (, node)) +- ((, element-v) (, element))) +- (setcdr (, node-v) (cons (, element-v) (cdr (, node-v)))))))) ++ `(let ((,node-v ,node) ++ (,element-v ,element)) ++ (setcdr ,node-v (cons ,element-v (cdr ,node-v)))))) + + ;;; =================================================================== + ;;; The public functions which operate on doubly linked lists. +@@ -86,7 +86,7 @@ + "Get the element of a NODE in a doubly linked list DLL. + Args: DLL NODE." + +- (` (car (, node)))) ++ `(car ,node)) + + + (defun dll-create () +diff -ub elib-1.0.orig/dll.el elib-1.0/dll.el +--- elib-1.0.orig/dll.el 1995-12-10 16:50:54.000000000 -0800 ++++ elib-1.0/dll.el 2008-06-22 15:22:58.000000000 -0700 +@@ -89,7 +89,7 @@ + "Get the element of a NODE in a doubly linked list DLL. + Args: DLL NODE." + +- (` (elib-node-data (, node)))) ++ `(elib-node-data ,node)) + + + (defun dll-create () +diff -ub elib-1.0.orig/elib-node.el elib-1.0/elib-node.el +--- elib-1.0.orig/elib-node.el 1995-12-10 16:50:53.000000000 -0800 ++++ elib-1.0/elib-node.el 2008-06-22 15:21:46.000000000 -0700 +@@ -49,42 +49,42 @@ + (defmacro elib-node-create (left right data) + + ;; Create a tree node from LEFT, RIGHT and DATA. +- (` (vector (, left) (, right) (, data)))) ++ `(vector ,left ,right ,data)) + + + (defmacro elib-node-left (node) + + ;; Return the left pointer of NODE. +- (` (aref (, node) 0))) ++ `(aref ,node 0)) + + + (defmacro elib-node-right (node) + + ;; Return the right pointer of NODE. +- (` (aref (, node) 1))) ++ `(aref ,node 1)) + + + (defmacro elib-node-data (node) + + ;; Return the data of NODE. +- (` (aref (, node) 2))) ++ `(aref ,node 2)) + + + (defmacro elib-node-set-left (node newleft) + + ;; Set the left pointer of NODE to NEWLEFT. +- (` (aset (, node) 0 (, newleft)))) ++ `(aset ,node 0 ,newleft)) + + + (defmacro elib-node-set-right (node newright) + + ;; Set the right pointer of NODE to NEWRIGHT. +- (` (aset (, node) 1 (, newright)))) ++ `(aset ,node 1 ,newright)) + + + (defmacro elib-node-set-data (node newdata) + ;; Set the data of NODE to NEWDATA. +- (` (aset (, node) 2 (, newdata)))) ++ `(aset ,node 2 ,newdata)) + + + +@@ -94,7 +94,7 @@ + ;; + ;; NODE is the node, and BRANCH is the branch. + ;; 0 for left pointer, 1 for right pointer and 2 for the data." +- (` (aref (, node) (, branch)))) ++ `(aref ,node ,branch)) + + + (defmacro elib-node-set-branch (node branch newval) +@@ -104,6 +104,6 @@ + ;; NODE is the node, and BRANCH is the branch. + ;; 0 for left pointer, 1 for the right pointer and 2 for the data. + ;; NEWVAL is new value of the branch." +- (` (aset (, node) (, branch) (, newval)))) ++ `(aset ,node ,branch ,newval)) + + ;;; elib-node.el ends here. +Only in elib-1.0: elib.info +diff -ub elib-1.0.orig/queue-m.el elib-1.0/queue-m.el +--- elib-1.0.orig/queue-m.el 1995-12-10 16:50:53.000000000 -0800 ++++ elib-1.0/queue-m.el 2008-06-22 15:13:41.000000000 -0700 +@@ -54,12 +54,12 @@ + + (defmacro queue-create () + "Create an empty fifo queue." +- (` (cons 'QUEUE (cons nil nil)))) ++ `(cons 'QUEUE (cons nil nil))) + + + (defmacro queue-p (queue) + "Return t if QUEUE is a queue, otherwise return nil." +- (` (eq (car-safe (, queue)) 'QUEUE))) ++ `(eq (car-safe ,queue) 'QUEUE)) + + + (defun queue-enqueue (queue element) +@@ -91,13 +91,13 @@ + + (defmacro queue-empty (queue) + "Return t if QUEUE is empty, otherwise return nil." +- (` (null (car (cdr (, queue)))))) ++ `(null (car (cdr ,queue)))) + + + (defmacro queue-first (queue) + "Return the first element of QUEUE or nil if it is empty. + The element is not removed." +- (` (car-safe (car (cdr (, queue)))))) ++ `(car-safe (car (cdr ,queue)))) + + + (defmacro queue-nth (queue n) +@@ -106,18 +106,18 @@ + If the length of the queue is less than N, return nil. + + The oldest element (the first one) has number 0." +- (` (nth (, n) (car (cdr (, queue)))))) ++ `(nth ,n (car (cdr ,queue)))) + + + (defmacro queue-last (queue) + "Return the last element of QUEUE or nil if it is empty." +- (` (car-safe (cdr (cdr (, queue)))))) ++ `(car-safe (cdr (cdr ,queue)))) + + + (defmacro queue-all (queue) + "Return a list of all elements of QUEUE or nil if it is empty. + The oldest element in the queue is the first in the list." +- (` (car (cdr (, queue))))) ++ `(car (cdr ,queue))) + + + (defun queue-copy (queue) +@@ -131,11 +131,11 @@ + + (defmacro queue-length (queue) + "Return the number of elements in QUEUE." +- (` (length (car (cdr (, queue)))))) ++ `(length (car (cdr ,queue)))) + + + (defmacro queue-clear (queue) + "Remove all elements from QUEUE." +- (` (setcdr (, queue) (cons nil nil)))) ++ `(setcdr ,queue (cons nil nil))) + + ;;; queue-m.el ends here +diff -ub elib-1.0.orig/read.el elib-1.0/read.el +--- elib-1.0.orig/read.el 1995-12-10 16:50:54.000000000 -0800 ++++ elib-1.0/read.el 2008-06-22 15:40:38.000000000 -0700 +@@ -61,7 +61,7 @@ + numdefault) + (setq number numdefault)) + ((string-match "\\`[0-9]+\\'" numstr) +- (setq number (string-to-int numstr))) ++ (setq number (string-to-number numstr))) + (t (beep)))) + number)) + +diff -ub elib-1.0.orig/stack-m.el elib-1.0/stack-m.el +--- elib-1.0.orig/stack-m.el 1995-12-10 16:50:52.000000000 -0800 ++++ elib-1.0/stack-m.el 2008-06-22 15:10:48.000000000 -0700 +@@ -51,36 +51,36 @@ + + (defmacro stack-create () + "Create an empty lifo stack." +- (` (cons 'STACK nil))) ++ `(cons 'STACK nil)) + + + (defmacro stack-p (stack) + "Return t if STACK is a stack, otherwise return nil." +- (` (eq (car-safe (, stack)) 'STACK))) ++ `(eq (car-safe ,stack) 'STACK)) + + + (defmacro stack-push (stack element) + "Push an element onto the stack. + Args: STACK ELEMENT" +- (` (setcdr (, stack) (cons (, element) (cdr (, stack)))))) ++ `(setcdr ,stack (cons ,element (cdr ,stack)))) + + + (defmacro stack-pop (stack) + "Remove the topmost element from STACK and return it. + If the stack is empty, return nil." +- (` (prog1 +- (car-safe (cdr (, stack))) +- (setcdr (, stack) (cdr-safe (cdr (, stack))))))) ++ `(prog1 ++ (car-safe (cdr ,stack)) ++ (setcdr ,stack (cdr-safe (cdr ,stack))))) + + + (defmacro stack-empty (stack) + "Return t if STACK is empty, otherwise return nil." +- (` (null (cdr (, stack))))) ++ `(null (cdr ,stack))) + + + (defmacro stack-top (stack) + "Return the topmost element of STACK or nil if it is empty." +- (` (car-safe (cdr (, stack))))) ++ `(car-safe (cdr ,stack))) + + + (defmacro stack-nth (stack n) +@@ -89,28 +89,28 @@ + If the length of the stack is less than N, return nil. + + The top stack element has number 0." +- (` (nth (, n) (cdr (, stack))))) ++ `(nth ,n (cdr ,stack))) + + + (defmacro stack-all (stack) + "Return a list of all entries in STACK. + The element last pushed is first in the list." +- (` (cdr (, stack)))) ++ `(cdr ,stack)) + + + (defmacro stack-copy (stack) + "Return a copy of STACK. + All entries in STACK are also copied." +- (` (cons 'STACK (copy-sequence (cdr (, stack)))))) ++ `(cons 'STACK (copy-sequence (cdr ,stack)))) + + + (defmacro stack-length (stack) + "Return the number of elements on STACK." +- (` (length (cdr (, stack))))) ++ `(length (cdr ,stack))) + + + (defmacro stack-clear (stack) + "Remove all elements from STACK." +- (` (setcdr (, stack) nil))) ++ `(setcdr ,stack nil)) + + ;;; stack-m.el ends here diff --git a/pcr/emacs-elib/emacs-elib.install b/pcr/emacs-elib/emacs-elib.install new file mode 100644 index 000000000..53a01f9f6 --- /dev/null +++ b/pcr/emacs-elib/emacs-elib.install @@ -0,0 +1,34 @@ +# emacs-elib.install +# Install info file and show configuration info. +# $Id: emacs-elib.install,v e6d455730f95 2008/06/23 05:55:28 jbromley $ +post_install () { +if sh -c 'install-info --version' > /dev/nul 2>&1; then + if [ -f /usr/share/info/elib.gz ]; then + cd /usr/share/info + install-info --info-dir=/usr/share/info --section=Emacs --name=Elib \ + --description=' The Emacs Lisp Library' elib.gz + fi +fi + +echo "" +echo "==> To use elib, add the following Lisp to your ~/.emacs file:" +echo "==> " +echo "==> (setq load-path (append (list \"/usr/share/emacs/site-lisp/elib\")" +echo "==> load-path))" +echo "==> " +echo "==> You do not need this if you have a subdirs.el in your Emacs site-lisp" +echo "==> directory." +echo "" +} + +post_upgrade () { + post_install $1 +} + +op=$1 +shift +$op $* + +# Local Variables: +# mode: shell-script +# End: diff --git a/pcr/emacs-jabber/PKGBUILD b/pcr/emacs-jabber/PKGBUILD new file mode 100644 index 000000000..0b2170261 --- /dev/null +++ b/pcr/emacs-jabber/PKGBUILD @@ -0,0 +1,26 @@ +# Contributor: Stefan Husmann <stefan-husmann@t-online.de> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=emacs-jabber +pkgver=0.8.91 +pkgrel=2 +pkgdesc="Jabber.el: a minimal jabber client for emacs" +url=http://emacs-jabber.sourceforge.net +arch=('any') +license=('GPL') +depends=('emacs' 'gnutls' 'gconf') +install=jabber.el.install +source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.lzma) +md5sums=('739506fbc498386989590cd7733dd47a') + +build() { + cd $srcdir/$pkgname-$pkgver + ./configure --prefix=/usr --sysconfdir=/etc \ + --libexecdir=/usr/lib/emacs-jabber \ + --with-gconf-schema-file-dir=/usr/share/gconf/schemas + make +} +package() { + cd $srcdir/$pkgname-$pkgver + make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=$pkgdir install +} diff --git a/pcr/emacs-jabber/jabber.el.install b/pcr/emacs-jabber/jabber.el.install new file mode 100644 index 000000000..556888995 --- /dev/null +++ b/pcr/emacs-jabber/jabber.el.install @@ -0,0 +1,27 @@ +infodir=/usr/share/info +filelist=(jabber.info.gz) +pkgname=emacs-jabber + +pre_upgrade() { + /usr/sbin/gconfpkg --uninstall $pkgname +} + +post_install() { + /usr/sbin/gconfpkg --install $pkgname + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done + echo "Please add the following line to your .emacs." + echo "(require 'jabber)" +} + +post_upgrade() { + post_install +} + +pre_remove() { + /usr/sbin/gconfpkg --uninstall $pkgname + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} diff --git a/pcr/emacs-js2-mode/PKGBUILD b/pcr/emacs-js2-mode/PKGBUILD new file mode 100644 index 000000000..7a73d3f40 --- /dev/null +++ b/pcr/emacs-js2-mode/PKGBUILD @@ -0,0 +1,20 @@ +# Contributor: Hauke Wesselmann <hauke@h-dawg.de> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=emacs-js2-mode +pkgver=20090723b +pkgrel=1 +pkgdesc="An improved JavaScript mode for GNU Emacs" +arch=('i686' 'x86_64') +url="http://code.google.com/p/js2-mode/" +license=('GPL2') +depends=('emacs') +source=(http://js2-mode.googlecode.com/files/js2-$pkgver.el) +md5sums=('9109dca8b624edb8358fb9938a03d785') + +build() { + cd $startdir/src/ + emacs -batch -q -f batch-byte-compile js2-$pkgver.el + install -Dm644 $srcdir/js2-$pkgver.el $pkgdir/usr/share/emacs/site-lisp/js2.el + install -Dm644 $srcdir/js2-$pkgver.elc $pkgdir/usr/share/emacs/site-lisp/js2.elc +} diff --git a/pcr/emacs-magit-git/PKGBUILD b/pcr/emacs-magit-git/PKGBUILD new file mode 100644 index 000000000..734b13072 --- /dev/null +++ b/pcr/emacs-magit-git/PKGBUILD @@ -0,0 +1,45 @@ +# Contributor: Stefan Husmann <stefan.husmann@t-online.de> +# Contributor: Peter Simons <simons@cryp.to> +# Contributor: Just Lest <just.lest@gmail.com> +# Contributor: Daniel White <daniel@whitehouse.id.au> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=emacs-magit-git +pkgver=20121104 +pkgrel=1 +pkgdesc="It's Magit! A Emacs mode for Git." +arch=("any") +url="http://github.com/magit/magit" +license=('GPL3') +depends=('emacs' 'git') +makedepends=('automake' 'autoconf') +provides=('emacs-magit') +conflicts=('emacs-magit') +install="${pkgname}.install" + +_gitname="master" +_gitroot="git://github.com/magit/magit.git" + +build() +{ + cd "${srcdir}" + if [ -d magit ] ; then + cd magit + git pull origin + else + git clone --depth=1 "${_gitroot}" + fi + [ -d "${srcdir}/build" ] && rm -rf "${srcdir}/build" + cp -r "${srcdir}/magit" "${srcdir}/build" + cd "${srcdir}/build" + make +} + +package() +{ + cd "${srcdir}/build" + mkdir -p "${pkgdir}/usr/bin" # work around a bug in the makefile + make PREFIX="/usr" DESTDIR="${pkgdir}" install install_contrib + rm "${pkgdir}/etc/emacs/site-start.d/50magit.el" "${pkgdir}/usr/share/info/dir" + rmdir "${pkgdir}/etc/emacs/site-start.d" "${pkgdir}/etc/emacs" "${pkgdir}/etc" +} diff --git a/pcr/emacs-magit-git/emacs-magit-git.install b/pcr/emacs-magit-git/emacs-magit-git.install new file mode 100644 index 000000000..a9904739e --- /dev/null +++ b/pcr/emacs-magit-git/emacs-magit-git.install @@ -0,0 +1,30 @@ +infodir=/usr/share/info +filelist=(magit.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file $infodir/dir 2> /dev/null + done + + cat << EOF +==> In order to use magit, add the following lines to your ~/.emacs file: + +(autoload 'magit-status "magit" nil t) +EOF +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file $infodir/dir 2> /dev/null + done +} + +op=$1 +shift +$op $* diff --git a/pcr/emacs-org-mode-ravel-git/PKGBUILD b/pcr/emacs-org-mode-ravel-git/PKGBUILD new file mode 100644 index 000000000..66baa08b5 --- /dev/null +++ b/pcr/emacs-org-mode-ravel-git/PKGBUILD @@ -0,0 +1,52 @@ +# contributor: zhuqin <zhuqin83@gmail.com> +# Maintainer: Stefan Husmann <stefan-husmann@t-online.de> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + +pkgname=emacs-org-mode-ravel-git +pkgver=20120812 +pkgrel=1 +pkgdesc="R backends for Orgmode by Chas Berry" +arch=('any') +url="https://github.com/chasberry/orgmode-accessories" +depends=(emacs emacs-org-mode) +makedepends=('git') +license=('GPL') +source=() + + + +_gitroot="https://github.com/chasberry/orgmode-accessories.git" +_gitname="master" + +build() { + cd $srcdir + msg "Connecting to the GIT server...." + + if [[ -d $srcdir/$_gitname ]] ; then + cd $_gitname + git pull origin + msg "The local files are updated." + else + git clone $_gitroot $_gitname + fi + + msg "GIT checkout done" + msg "Starting make..." + + [[ -d $srcdir/$_gitname-build ]] && rm -rf $srcdir/$_gitname-build + git clone $srcdir/$_gitname $srcdir/$_gitname-build + + cd $srcdir/$_gitname-build + + emacs --batch --visit scratch --eval "(progn (require 'org) (require 'org-export) (require 'org-e-latex) (require 'org-e-html) (org-babel-load-file \"ravel.org\"))" +} + +package() { + cd $srcdir/$_gitname-build + + install -Dm 644 e-ravel.el $pkgdir/usr/share/emacs/site-lisp/e-ravel.el + + mkdir -p $pkgdir/usr/share/doc/e-ravel/ + cp *.org $pkgdir/usr/share/doc/e-ravel/ +} +md5sums=() diff --git a/pcr/emacs-org-mode/PKGBUILD b/pcr/emacs-org-mode/PKGBUILD new file mode 100644 index 000000000..4b36a3e3b --- /dev/null +++ b/pcr/emacs-org-mode/PKGBUILD @@ -0,0 +1,39 @@ +# Contributor: Jiyunatori <tori_LEAVETHISOUT_@0xc29.net> +# Contributor: mdev +# adopted by domanov <domanov_LEAVETHISOUT_@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=emacs-org-mode +_srcname=org +pkgver=7.9.2 +pkgrel=1 +pkgdesc="Emacs Org Mode" +arch=('any') +url="http://orgmode.org/" +depends=(emacs) +license=('GPL') +install=emacs-org-mode.install +source=(http://orgmode.org/$_srcname-$pkgver.tar.gz) +md5sums=('e79441ff81c176e70230937e09f6042c') + +build() { + cd "${srcdir}/${_srcname}-${pkgver}" + make compile || return 1 +} + +package() { + cd "${srcdir}/${_srcname}-${pkgver}" + make prefix="${pkgdir}/usr/share" install || return 1 + + ## by default now we install also the contrib directory + install -d -m755 $pkgdir/usr/share/emacs/site-lisp/org_contrib || return 1 + cp -r contrib/* $pkgdir/usr/share/emacs/site-lisp/org_contrib || return 1 + + ##! proper install of info files (thanks mdev) + ##! replace "orgmode" with "org" in the following lines if you want + ##! to replace emacs own org's info files. You also need to change the .install. + install -D -m644 doc/org $pkgdir/usr/share/info/orgmode || return 1 + gzip -9 $pkgdir/usr/share/info/orgmode || return 1 + rm $pkgdir/usr/share/info/org || return 1 +} +md5sums=('e79441ff81c176e70230937e09f6042c') diff --git a/pcr/emacs-org-mode/emacs-org-mode.install b/pcr/emacs-org-mode/emacs-org-mode.install new file mode 100644 index 000000000..e8bd91185 --- /dev/null +++ b/pcr/emacs-org-mode/emacs-org-mode.install @@ -0,0 +1,62 @@ +## NOTE: the line commented with '##!' are needed +## to REPLACE the info file shipped by emacs (currently at version 6.21) +## with the info docs from this distribution (thanks mdev) + +# arg 1: the new package version +# arg 2: the old package version + +INFODIR=/usr/share/info + +pre_install() { +##! for file in {org,org-?.gz} ; do +##! if [ -e $INFODIR/$file ] ; then +##! echo "Removing $INFODIR/$file" +##! install-info --delete $INFODIR/$file $INFODIR/dir 2> /dev/null +##! rm -f $INFODIR/$file +##! fi +##! done + cat << EOM +To enable this version of org-mode instead of the one shipped with emacs, +add the line: + (require 'org-install) +to your .emacs file. + +NOTE: info documentation for emacs-org-mode goes now as 'orgmode' in /usr/share/info, + It does NOT replace the 'org' info files shipped with emacs: + $ info orgmode ## this version + $ info org ## emacs' org version (currently 6.21) +EOM +} + + +post_install() { +##! mv $INFODIR/orgmode.gz $INFODIR/org.gz +##! install-info $INFODIR/org.gz $INFODIR/dir 2> /dev/null +##! and comment out the following line: + install-info --name='orgmode' --description='Org Mode provided by emacs-org-mode (AUR)' $INFODIR/orgmode.gz $INFODIR/dir 2> /dev/null +} + +pre_upgrade() { + /bin/true +} + +post_upgrade() { + post_install $1 +} + + +pre_remove() { + install-info --delete $INFODIR/orgmode.gz $INFODIR/dir 2> /dev/null +##! comment out the line above and uncomment the following: +##! install-info --delete $INFODIR/org.gz $INFODIR/dir 2> /dev/null +##! rm $INFODIR/org.gz 2> /dev/null +} + +# arg 1: the old package version +post_remove() { + /bin/true +} + +op=$1 +shift +$op $* diff --git a/pcr/emacs-tuareg-mode/PKGBUILD b/pcr/emacs-tuareg-mode/PKGBUILD new file mode 100644 index 000000000..eba2834e0 --- /dev/null +++ b/pcr/emacs-tuareg-mode/PKGBUILD @@ -0,0 +1,29 @@ +# Contributor: Limao Luo <luolimao+AUR@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=emacs-tuareg-mode +pkgver=2.0.6 +pkgrel=2 +pkgdesc="Emacs tuareg mode for ocaml" +arch=(any) +url=https://forge.ocamlcore.org/projects/tuareg/ +license=(GPL) +depends=(emacs) +DLAGENTS=("https::/usr/bin/curl -fkLC - --retry 3 --retry-delay 3 -o %o %u") +install=$pkgname.install +source=(https://forge.ocamlcore.org/frs/download.php/882/tuareg-$pkgver.tar.gz) +sha256sums=('ea79ac24623b82ab8047345f8504abca557a537e639d16ce1ac3e5b27f5b1189') +sha512sums=('a7162daea30baa38bf1673b62ac545936a24b87b5e4d65329304ce5da68e151af1ef9f6e7720067f1f741614b3b6e1dfeab7080c4e9e7ebf14af594f3a0b0d46') + +build() { + cd "$srcdir"/tuareg-$pkgver/ + make +} + +package() { + cd "$srcdir"/tuareg-$pkgver/ + for i in *.el{,c}; do + install -Dm644 $i "$pkgdir"/usr/share/emacs/site-lisp/tuareg/$i + done + install -Dm644 README "$pkgdir"/usr/share/doc/tuareg/README +} diff --git a/pcr/emacs-tuareg-mode/emacs-tuareg-mode.install b/pcr/emacs-tuareg-mode/emacs-tuareg-mode.install new file mode 100644 index 000000000..f9ee9c970 --- /dev/null +++ b/pcr/emacs-tuareg-mode/emacs-tuareg-mode.install @@ -0,0 +1,17 @@ +post_install() { + cat <<__EOF__ +==> Put this in your $HOME/.emacs file to enable tuareg-mode autoloading +==> and autorecognition of ocaml source files: + + (setq auto-mode-alist (cons '("\\\\.ml[iylp]?\\\\'" . tuareg-mode) auto-mode-alist)) + (autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t) + (autoload 'ocamldebug "ocamldebug" "Run the Caml debugger" t) + +==> Note to users of previous versions: 'camldebug' is now known as 'ocamldebug' +__EOF__ +} + + +post_upgrade() { + post_install +} diff --git a/pcr/emhacks/PKGBUILD b/pcr/emhacks/PKGBUILD new file mode 100644 index 000000000..66f0045e5 --- /dev/null +++ b/pcr/emhacks/PKGBUILD @@ -0,0 +1,33 @@ +# Contributor: Junmin Huang <junmin(dot)h(at)gmail(dot)com> +# Contributor: Stefan Husmann <stefan-husmann@t-online.de> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=emhacks +pkgver=20070920 +pkgrel=4 +pkgdesc="Useful Emacs Lisp libraries, including gdiff, jjar, jmaker, swbuff and tabbar, packaged from gentoo portage" +arch=('any') +url="http://emhacks.sourceforge.net/" +license=('GPL2') +depends=(emacs) +install=emhacks.install +source=(http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/$pkgname-$pkgver.tar.bz2) +md5sums=('d349c78d25ce91a6f9c3e6446b129fc8') + +build() { + cd $srcdir/$pkgname-$pkgver + + # remove files included in Emacs>=22 or not useful on GNU/Linux + rm -r findstr* overlay-fix* recentf* ruler-mode* tree-widget* + for _i in gdiff-setup jjar jmaker swbuff tabbar + do + [ -f ${_i}.el.gz ] && rm ${_i}.el.gz + emacs -batch -q -f batch-byte-compile ${_i}.el + gzip ${_i}.el + done +} +package() { + install -d $pkgdir/usr/share/emacs/site-lisp/$pkgname + install -Dm644 $srcdir/$pkgname-$pkgver/* \ + $pkgdir/usr/share/emacs/site-lisp/$pkgname +} diff --git a/pcr/emhacks/emhacks.install b/pcr/emhacks/emhacks.install new file mode 100644 index 000000000..7d2bdf2b6 --- /dev/null +++ b/pcr/emhacks/emhacks.install @@ -0,0 +1,21 @@ +post_install() { +cat << EOM + +Don't forget to add the following code into your ~/.emacs file: +--- +(add-to-list 'load-path "/usr/share/emacs/site-lisp/emhacks") +--- + +EOM +} + +post_remove() { +cat << EOM + +The following code in your ~/.emacs file can be removed: +--- +(add-to-list 'load-path "/usr/share/emacs/site-lisp/emhacks") +--- + +EOM +}
\ No newline at end of file diff --git a/pcr/eterm/PKGBUILD b/pcr/eterm/PKGBUILD new file mode 100644 index 000000000..00030e80a --- /dev/null +++ b/pcr/eterm/PKGBUILD @@ -0,0 +1,39 @@ +# Contributor: Andrea Scarpino <andrea@archlinux.org> +# Contributor: Adam 'battlemidget' Stokes <adam.stokes@gmail.com> +# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> +# Contributor: Brad Fanella <bradfanella@archlinux.us> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=eterm +pkgver=0.9.6 +pkgrel=1 +pkgdesc="A vt102 terminal emulator intended as a replacement for xterm." +arch=('i686' 'x86_64') +url="http://www.eterm.org/" +license=('custom') +depends=('freetype2>=2.3.5' 'libast>=0.7' 'libxmu' 'libxres') +options=('!libtool') +source=(http://www.eterm.org/download/Eterm-${pkgver}.tar.gz) +md5sums=('90e424584c22d4050496874d14f78bb1') + +build() { + cd ${srcdir}/Eterm-${pkgver} + CONF="" + [ "${CARCH}" = "x86_64" ] && CONF="--disable-mmx" + ./configure --prefix=/usr --mandir=/usr/share/man \ + --enable-trans --enable-utmp \ + --enable-multi-charset=utf-8 \ + --enable-xim --with-theme-update \ + --with-backspace=bs --without-terminfo \ + --enable-multi-charset ${CONF} + make || return 1 +} + +package() { + cd ${srcdir}/Eterm-${pkgver} + make DESTDIR=${pkgdir} install + + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} + +md5sums=('90e424584c22d4050496874d14f78bb1') diff --git a/pcr/fpdns/PKGBUILD b/pcr/fpdns/PKGBUILD new file mode 100644 index 000000000..b4cff364a --- /dev/null +++ b/pcr/fpdns/PKGBUILD @@ -0,0 +1,28 @@ +# Contributor: Ermak <ermak@email.it> +# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +pkgname=fpdns +pkgver=0.9.3 +pkgrel=1 +pkgdesc="Program that remotely determines DNS server versions" +url="http://code.google.com/p/fpdns/" +depends=('') +license=('BSD') +options=('!emptydirs') +arch=('i686' 'x86_64') +source=('http://fpdns.googlecode.com/files/Net-DNS-Fingerprint-0.9.3.tar.gz') +md5sums=('16f1fbc9e5c8b935a0a48a509dc58899') + +build() { + cd ${srcdir}/Net-DNS-Fingerprint-0.9.3 + eval `perl -V:archname` + /usr/bin/perl Makefile.PL \ + INSTALLARCHLIB=/usr/lib/perl5/current/${archname} \ + INSTALLSITELIB=/usr/lib/perl5/site_perl/current \ + INSTALLSITEARCH=/usr/lib/perl5/site_perl/current/${archname} + /usr/bin/make || return 1 + /usr/bin/make DESTDIR=${pkgdir} install + /usr/bin/find ${pkgdir} -name '.packlist' -delete + /usr/bin/find ${pkgdir} -name '*.pod' -delete +} + diff --git a/pcr/fwsnort/PKGBUILD b/pcr/fwsnort/PKGBUILD new file mode 100644 index 000000000..37a863822 --- /dev/null +++ b/pcr/fwsnort/PKGBUILD @@ -0,0 +1,44 @@ +# Contributor: Colin Shea <colin@evaryont.me> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=fwsnort +pkgver=1.6.2 +pkgrel=1 +pkgdesc="application layer IDS/IPS by translating snort rules into iptables" +arch=('any') +url="http://www.cipherdyne.org/fwsnort/" +license=('GPL') +depends=('perl' 'perl-net-ipv4addr' 'perl-iptables-parse' 'iptables' 'net-tools') +makedepends=('wget') +source=(http://www.cipherdyne.org/$pkgname/download/$pkgname-$pkgver.tar.bz2 + 'install_pl.patch') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + mkdir -p $pkgdir/var/log/fwsnort \ + $pkgdir/usr/lib/fwsnort \ + $pkgdir/usr/share/man/man8 \ + $pkgdir/usr/sbin \ + $pkgdir/etc/fwsnort/snort_rules \ + $pkgdir/etc/fwsnort/archive \ + $pkgdir/etc/fwsnort/snort_rules_queue + + patch -p0 -i $srcdir/install_pl.patch + sed -e "/mpath.*man8/s|/usr|$pkgdir&|" \ + -e "/^my\\ \\\$sbin/s|/usr|$pkgdir&|" \ + -i install.pl + + cp fwsnort.conf fwsnort.conf.bak + + sed -e "s|/var/log/fwsnort|$pkgdir&|" \ + -e "s|/usr/lib/fwsnort|$pkgdir&|" \ + -e "s|/etc/fwsnort|$pkgdir&|" \ + ./fwsnort.conf -i + # -S skips installing the perl modules, which we did with packages + echo y | ./install.pl -S + mv -f fwsnort.conf.bak $pkgdir/etc/fwsnort/fwsnort.conf + chmod 755 $pkgdir/usr/sbin/fwsnort +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/fwsnort/install_pl.patch b/pcr/fwsnort/install_pl.patch new file mode 100644 index 000000000..b9cfb4a33 --- /dev/null +++ b/pcr/fwsnort/install_pl.patch @@ -0,0 +1,27 @@ +--- install.pl 2011-02-05 05:02:38.845785881 -0700 ++++ install2.pl 2011-02-05 05:03:21.350360881 -0700 +@@ -120,10 +120,6 @@ + ### make sure the system binaries are where we think they are. + &check_commands(); + +-### check to make sure we are running as root +-$< == 0 && $> == 0 or die "You need to be root (or equivalent UID 0", +- " account) to install/uninstall fwsnort!\n"; +- + if ($uninstall) { + &uninstall(); + } else { +--- install.pl 2011-01-02 18:38:51.000000000 -0700 ++++ install2.pl 2011-02-05 04:59:01.653910881 -0700 +@@ -471,8 +471,11 @@ + sub check_commands() { + my @path = qw( + /bin ++ /sbin + /usr/bin ++ /usr/sbin + /usr/local/bin ++ /usr/local/sbin + ); + CMD: for my $cmd (keys %cmds) { + unless (-x $cmds{$cmd}) { diff --git a/pcr/gcc-gcj/PKGBUILD b/pcr/gcc-gcj/PKGBUILD new file mode 100644 index 000000000..7ed03b889 --- /dev/null +++ b/pcr/gcc-gcj/PKGBUILD @@ -0,0 +1,83 @@ +# Contributor: Renan Manola <rmanola@gmail.com> +# Contributor: Stefan Husmann <stefan-husmann@t-online.de> +# Based on a modified version of the gcc PKGBUILD +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=gcc-gcj +pkgver=4.7.2 +pkgrel=2 +pkgdesc="The GNU Compiler for Java" +arch=('i686' 'x86_64') +license=('GPL' 'LGPL') +url="http://gcc.gnu.org" +depends=("gcc=$pkgver" 'gtk2' 'file' 'zip' 'libsm' 'libxtst' 'alsa-lib' 'libart-lgpl') +makedepends=('binutils>=2.20.1' 'mpfr>=2.4.2-2' 'cloog>=0.16.2-1' 'elfutils' + 'libmpc>=0.8.2-2' 'jack') +options=('!libtool') +install=$pkgname.install +source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 libjava-sjlj.dpatch gcc_pure64.patch) +md5sums=('cc308a0891e778cfda7a151ab8a6e762' + 'afe3541abf5ce163223f94ccdbc66e30' + 'ced48436c1b3c981d721a829f1094de1') + +build() { + cd ${srcdir}/gcc-${pkgver} + + # Do not install libiberty + sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in + + # Do not run fixincludes + sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + + chmod +x ${srcdir}/*.dpatch + ${srcdir}/libjava-sjlj.dpatch -patch + + echo ${pkgver} > gcc/BASE-VER + + [ -d build ] || mkdir build + if [ "${CARCH}" = "x86_64" ]; then + patch -p1 < $srcdir/gcc_pure64.patch + fi + cd build + + ../configure --prefix=/usr --enable-shared --enable-languages=java \ + --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info \ + --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib \ + --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch \ + --with-tune=generic --enable-java-awt=gtk --with-java-home="$JAVA_HOME" \ + --enable-libgcj-multifile --disable-plugin --with-system-zlib + make +} + +package() { + cd ${srcdir}/gcc-${pkgver}/build + make -j1 DESTDIR=${pkgdir} install-target-libjava + + cd gcc + make -j1 DESTDIR=${pkgdir} java.install-common java.install-man + + install -m755 jc1 ${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/ + install -m755 jvgenmain ${pkgdir}/usr/lib/gcc/${CHOST}/${pkgver}/ + + # Remove files which belong to the base gcc package + rm -f ${pkgdir}/usr/bin/{c,g}++ + if [ "${CARCH}" = "x86_64" ]; then + rm -f ${pkgdir}/usr/bin/x86_64-unknown-linux-gnu-{c,g}++ + else + rm -f ${pkgdir}/usr/bin/i686-pc-linux-gnu-{c,g}++ + fi + rm -f ${pkgdir}/usr/man/man1/g++.* + # Rename two files to not conflict to classpath + mv ${pkgdir}/usr/share/info/cp-tools.info ${pkgdir}/usr/share/info/cp-tools-gcj.info + rm ${pkgdir}/usr/share/info/dir + mv ${pkgdir}/usr/share/man/man1/gjdoc.1 ${pkgdir}/usr/share/man/man1/gjdoc.gcj.1 + + find ${pkgdir}/usr/lib -type f -name '*.so.*' -exec strip --strip-unneeded {} \; + + linkdir=`basename $pkgdir/usr/lib/gcj-${pkgver}*` + ln -sf $linkdir ${pkgdir}/usr/lib/gcj-${pkgver%.?} + ln -sf libgcj-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj-${pkgver%.?}.jar + ln -sf libgcj-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj.jar + ln -sf libgcj-tools-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj-tools-${pkgver%.?}.jar + ln -sf libgcj-tools-${pkgver}.jar ${pkgdir}/usr/share/java/libgcj-tools.jar +} diff --git a/pcr/gcc-gcj/gcc-gcj.install b/pcr/gcc-gcj/gcc-gcj.install new file mode 100644 index 000000000..916aa6a17 --- /dev/null +++ b/pcr/gcc-gcj/gcc-gcj.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(cp-tools-gcj.info) + +post_install() { + [[ -x usr/bin/install-info ]] || return 0 + for file in "${filelist[@]}"; do + install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null + done +} + +post_upgrade() { + post_install "$1" +} + +pre_remove() { + [[ -x usr/bin/install-info ]] || return 0 + for file in "${filelist[@]}"; do + install-info --delete "$infodir/$file.gz" "$infodir/dir" 2> /dev/null + done +}
\ No newline at end of file diff --git a/pcr/gcc-gcj/gcc_pure64.patch b/pcr/gcc-gcj/gcc_pure64.patch new file mode 100644 index 000000000..a9b09bbcf --- /dev/null +++ b/pcr/gcc-gcj/gcc_pure64.patch @@ -0,0 +1,26 @@ +diff -Naur gcc-orig/gcc/config/i386/linux64.h gcc/gcc/config/i386/linux64.h +--- gcc-orig/gcc/config/i386/linux64.h 2011-07-08 01:38:34.000000000 +1000 ++++ gcc/gcc/config/i386/linux64.h 2011-07-24 19:48:05.000000000 +1000 +@@ -28,6 +28,6 @@ + #define GNU_USER_LINK_EMULATION64 "elf_x86_64" + #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" ++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2" + #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" +diff -Naur gcc-orig/gcc/config/i386/t-linux64 gcc/gcc/config/i386/t-linux64 +--- gcc-orig/gcc/config/i386/t-linux64 2011-07-08 01:38:34.000000000 +1000 ++++ gcc/gcc/config/i386/t-linux64 2011-07-24 19:49:41.000000000 +1000 +@@ -34,8 +34,8 @@ + comma=, + MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) + MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) +-MULTILIB_OSDIRNAMES = m64=../lib64 +-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) ++MULTILIB_OSDIRNAMES = m64=../lib ++MULTILIB_OSDIRNAMES+= m32=../lib32 + MULTILIB_OSDIRNAMES+= mx32=../libx32 + + LIBGCC = stmp-multilib diff --git a/pcr/gcc-gcj/libjava-sjlj.dpatch b/pcr/gcc-gcj/libjava-sjlj.dpatch new file mode 100755 index 000000000..95b4673b3 --- /dev/null +++ b/pcr/gcc-gcj/libjava-sjlj.dpatch @@ -0,0 +1,65 @@ +#! /bin/sh -e + +# DP: Don't try to use _Unwind_Backtrace on SJLJ targets. +# DP: See bug #387875, #388505, GCC PR 29206. + +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p1 < $0 + #cd ${dir}gcc && autoconf + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p1 < $0 + #rm ${dir}gcc/configure + ;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +--- + libjava/sysdep/generic/backtrace.h | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +Index: src/libjava/sysdep/generic/backtrace.h +=================================================================== +--- src.orig/libjava/sysdep/generic/backtrace.h 2006-11-06 14:00:32.000000000 -0500 ++++ src/libjava/sysdep/generic/backtrace.h 2006-11-06 14:04:38.000000000 -0500 +@@ -13,6 +13,20 @@ details. */ + + #include <java-stack.h> + ++#ifdef SJLJ_EXCEPTIONS ++ ++#undef _Unwind_GetIPInfo ++#define _Unwind_GetIPInfo(ctx,ip_before_insn) \ ++ (abort (), (void) (ctx), *ip_before_insn = 1, 0) ++ ++#undef _Unwind_GetRegionStart ++#define _Unwind_GetRegionStart(ctx) \ ++ (abort (), (void) (ctx), 0) ++ ++#undef _Unwind_Backtrace ++#define _Unwind_Backtrace(trace_fn,state_ptr) \ ++ (fallback_backtrace (trace_fn, state_ptr)) ++ + /* Unwind through the call stack calling TRACE_FN with STATE for every stack + frame. Returns the reason why the unwinding was stopped. */ + _Unwind_Reason_Code +@@ -20,4 +34,7 @@ fallback_backtrace (_Unwind_Trace_Fn, _J + { + return _URC_NO_REASON; + } ++ ++#endif /* SJLJ_EXCEPTIONS */ ++ + #endif diff --git a/pcr/gloobus-preview-bzr/PKGBUILD b/pcr/gloobus-preview-bzr/PKGBUILD new file mode 100644 index 000000000..ae8a2fd87 --- /dev/null +++ b/pcr/gloobus-preview-bzr/PKGBUILD @@ -0,0 +1,73 @@ +# Contributor: Alessio Sergi <asergi at archlinux dot us> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=gloobus-preview-bzr +_pkgname=gloobus-preview +pkgver=290 +pkgrel=1 +pkgdesc="A quicklook for GNU/Linux" +arch=('i686' 'x86_64') +url="https://launchpad.net/gloobus-preview" +license=('GPL3') +depends=('desktop-file-utils' 'djvulibre' 'gstreamer0.10-base' \ + 'gtksourceview3' 'libspectre' 'poppler-glib' \ + 'python2-gconf' 'taglib') +makedepends=('boost' 'bzr' 'intltool') +optdepends=('gdk-pixbuf-psd: PSD images support' + 'gdk-pixbuf-xcf: XCF images support' + 'gloobus-sushi-bzr: nautilus 3.x support' + 'libicns: ICNS files support' + 'marlin-bzr: file manager integration support' + 'nautilus-actions: nautilus menu integration' + 'nautilus-elementary-bzr: file manager integration support' + 'unoconv: LibO files support') +provides=($_pkgname) +conflicts=($_pkgname) +options=('!libtool') +install=$pkgname.install + +_bzrtrunk="https://code.launchpad.net/~gloobus-dev/$_pkgname/last_working_branch" +_bzrmod="$pkgname" + +build() { + cd "$srcdir" + + msg "Connecting to Bazaar server...." + + if [[ -d "$_bzrmod" ]]; then + cd "$_bzrmod" && bzr --no-plugins pull "$_bzrtrunk" -r "$pkgver" + msg "The local files are updated." + else + bzr --no-plugins branch "$_bzrtrunk" "$_bzrmod" -q -r "$pkgver" + fi + + msg "Bazaar checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/$_bzrmod-build" + cp -r "$srcdir/$_bzrmod" "$srcdir/$_bzrmod-build" + cd "$srcdir/$_bzrmod-build" + + # no psd and xcf loaders + sed -i '/loaders/d' src/Makefile.am + sed -i '/src\/loaders/d' configure.ac + + # automake 1.12.1 fix + sed -i 's/-Werror//' configure.ac + + # python2 fix + sed -i 's_python_&2_' src/"$_pkgname"-configuration + + ./autogen.sh + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/$_bzrmod-build" + + make DESTDIR="$pkgdir/" install +} + +# vim:set ts=2 sw=2 et: +md5sums=() diff --git a/pcr/gloobus-preview-bzr/gloobus-preview-bzr.install b/pcr/gloobus-preview-bzr/gloobus-preview-bzr.install new file mode 100644 index 000000000..63031e5be --- /dev/null +++ b/pcr/gloobus-preview-bzr/gloobus-preview-bzr.install @@ -0,0 +1,28 @@ +post_install() { + gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor + update-desktop-database -q + + echo ">>> To use GP instead of GNOME Sushi with Nautilus 3.x install gloobus-sushi-bzr." + echo "" + echo ">>> To use GP with marlin:" + echo '>>> $ gsettings set org.gnome.marlin.preferences previewer-path "'gloobus-preview'"' + echo "" + echo ">>> To use GP with nautilus-actions:" + echo ">>> Label: Quicklook" + echo ">>> Path: gloobus-preview" + echo ">>> Parameters: %f" + echo "" + echo ">>> For more info: http://gloobus.net/" + echo ">>> IRC channel: #gloobus @ irc.freenode.net" +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor + update-desktop-database -q +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/gnome-boxes/PKGBUILD b/pcr/gnome-boxes/PKGBUILD new file mode 100644 index 000000000..0ac23a06b --- /dev/null +++ b/pcr/gnome-boxes/PKGBUILD @@ -0,0 +1,33 @@ +# Contributor: Stefano Facchini <stefano.facchini@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=gnome-boxes +pkgver=3.6.1 +pkgrel=2 +pkgdesc="A simple GNOME 3 application to access remote or virtual systems" +arch=('i686' 'x86_64') +url="http://live.gnome.org/Boxes" +license=('LGPL2.1') +depends=('gtk3' 'clutter-gtk' 'spice-gtk3' 'libvirt-glib' 'tracker' + 'gtk-vnc' 'udev' 'libosinfo' 'dconf' 'hicolor-icon-theme' + 'desktop-file-utils' 'shared-mime-info') +optdepends=('qemu-kvm-spice: to create new VMs') +makedepends=('intltool') +install=gnome-boxes.install +source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz) +sha256sums=('fc6ffd0b3886e2da917abdb63470ab9869eef168c002461b9f02ce5aec5383ba') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr --libexec=/usr/lib/gnome-boxes + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install +} + +# vim:set ts=2 sw=2 et: +sha256sums=('fc6ffd0b3886e2da917abdb63470ab9869eef168c002461b9f02ce5aec5383ba') diff --git a/pcr/gnome-boxes/gnome-boxes.install b/pcr/gnome-boxes/gnome-boxes.install new file mode 100644 index 000000000..2b172e29c --- /dev/null +++ b/pcr/gnome-boxes/gnome-boxes.install @@ -0,0 +1,13 @@ +post_install() { + glib-compile-schemas usr/share/glib-2.0/schemas + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/pcr/gnome-rdp/PKGBUILD b/pcr/gnome-rdp/PKGBUILD new file mode 100644 index 000000000..67a96bb7f --- /dev/null +++ b/pcr/gnome-rdp/PKGBUILD @@ -0,0 +1,46 @@ +# Contributor: György Balló <ballogy@freestart.hu> +# Contributor: Hyperair <hyperair@gmail.com> +# Contributor: kumico <norrian@gmail.com> +# Contributor: adamruss <mail@russ.co.il> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=gnome-rdp +pkgver=0.3.1.0 +pkgrel=1 +pkgdesc="Remote desktop client for the GNOME Desktop with RDP/VNC/SSH capabilities, written in C Sharp" +arch=('any') +url="http://sourceforge.net/projects/gnome-rdp/" +license=('GPL' 'LGPL') +depends=('gtk-sharp-2' 'gnome-keyring-sharp') +optdepends=('openssh: SSH client' + 'gnome-terminal: required for the SSH client' + 'rdesktop: RDP client' + 'tightvnc: VNC client') +source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + appindicator.patch) +md5sums=('3c1329702914f8b1c213c0bb00d078cf' + '7bbe98eadfe199c5664fd69a4531fb3d') + +build() { + cd "$srcdir/$pkgname-$pkgver" + sed -i 's/tight-vncviewer/vncviewer/' Sessions/SessionCollection.cs + patch -R -Np3 -i "$srcdir/appindicator.patch" + sed -i 's/pkglib_SCRIPTS/programfiles_SCRIPTS/' Makefile.include + sed -i 's|@expanded_libdir@|@prefix@/@libdir@|' gnome-rdp.in + + autoreconf -fi + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir/" install + + # Install desktop and icon files + install -Dm644 Menu/$pkgname.desktop "$pkgdir/usr/share/applications/$pkgname.desktop" + install -Dm644 Menu/$pkgname.png "$pkgdir/usr/share/pixmaps/$pkgname.png" +} +md5sums=('3c1329702914f8b1c213c0bb00d078cf' + '7bbe98eadfe199c5664fd69a4531fb3d') diff --git a/pcr/gnome-rdp/appindicator.patch b/pcr/gnome-rdp/appindicator.patch new file mode 100644 index 000000000..4cb4d7a65 --- /dev/null +++ b/pcr/gnome-rdp/appindicator.patch @@ -0,0 +1,249 @@ +Index: /trunk/gnome-rdp/configure.ac
+===================================================================
+--- /trunk/gnome-rdp/configure.ac (revision 263)
++++ /trunk/gnome-rdp/configure.ac (revision 264)
+@@ -50,6 +50,7 @@
+ PKG_CHECK_MODULES([GLIB_SHARP_20], [glib-sharp-2.0])
+ PKG_CHECK_MODULES([GLADE_SHARP_20], [glade-sharp-2.0])
+ PKG_CHECK_MODULES([GNOME_KEYRING_SHARP_10], [gnome-keyring-sharp-1.0])
++PKG_CHECK_MODULES([APPINDICATOR_SHARP_01], [appindicator-sharp-0.1])
+
+ dnl package checks, per config
+
+Index: /trunk/gnome-rdp/MainWindow.cs
+===================================================================
+--- /trunk/gnome-rdp/MainWindow.cs (revision 257)
++++ /trunk/gnome-rdp/MainWindow.cs (revision 264)
+@@ -31,14 +31,18 @@
+ using GnomeRDP.Vnc;
+
++using AppIndicator;
++
+ namespace GnomeRDP
+ {
+ public partial class MainWindow: Gtk.Window
+ {
+- private StatusIcon statusIcon;
++ private ApplicationIndicator applicationIndicator;
+ private Gtk.Action actionQuit;
++ private Gtk.Action actionToggleVisible;
++ private bool hideOnDelete = false;
+
+ private const string sessionKey = "Session";
+
+- public MainWindow(): base (Gtk.WindowType.Toplevel)
++ public MainWindow (): base (Gtk.WindowType.Toplevel)
+ {
+ Build ();
+@@ -46,72 +50,80 @@
+ this.DeleteEvent += (s, e) =>
+ {
+- Visible = false;
+- e.RetVal = true;
++ if (hideOnDelete)
++ {
++ Visible = false;
++ e.RetVal = true;
++ }
+ };
+
+- this.actionQuit = new Gtk.Action("QuitAction", "Quit");
+- this.actionQuit.Activated+= (s, e) => Application.Quit();
++ this.actionQuit = new Gtk.Action ("QuitAction", "Quit");
++ this.actionQuit.Activated += (s, e) => Application.Quit ();
++
++ this.actionToggleVisible = new Gtk.Action("ToggleVisibleAction", "Show/Hide");
++ this.actionToggleVisible.Activated += (s, e) => { this.Visible = !this.Visible; };
++
++ this.applicationIndicator = new ApplicationIndicator ("gnome-rdp", "gnome-rdp", Category.ApplicationStatus);
++ this.applicationIndicator.ConnectionChanged += (s, e) => { hideOnDelete = this.applicationIndicator.Connected; };
+
+- this.statusIcon = new StatusIcon(ResourceLoader.Find(ResourceLoader.Icons.gnomeRdp));
+- this.statusIcon.Visible = true;
+- this.statusIcon.Tooltip = "GnomeRDP";
+- this.statusIcon.Activate += OnStatusIcon_Activate;
+- this.statusIcon.PopupMenu += OnStatusIcon_PopupMenu;
+-
++ this.applicationIndicator.Menu = CreateMenu();
++ this.applicationIndicator.Status = Status.Active;
++
+ this.Icon = ResourceLoader.Find(ResourceLoader.Icons.gnomeRdp);
+ }
+-
+- private void OnStatusIcon_Activate(object sender, EventArgs e)
++
++ public void UpdateMenu()
+ {
+- Visible = !Visible;
++ Menu oldMenu = this.applicationIndicator.Menu;
++
++ this.applicationIndicator.Menu = CreateMenu();
++
++ oldMenu.Dispose();
+ }
+-
+- private void OnStatusIcon_PopupMenu(object sender, PopupMenuArgs e)
++
++ private Menu CreateMenu()
+ {
+- try
+- {
+- Menu topMenu = new Menu();
+- topMenu.Popup();
++ Menu topMenu = new Menu();
++
++ topMenu.Append(actionToggleVisible.CreateMenuItem());
++ topMenu.Append(new SeparatorMenuItem());
+
+- foreach (var group in Program.SessionCollection.Groups)
+- {
+- MenuItem groupMenu = new MenuItem(group);
+- topMenu.Append(groupMenu);
+-
+- Menu subMenu = new Menu();
+- foreach(var session in Program.SessionCollection.Items.Where(s => s.Group == group).OrderBy(s => s.Server))
+- {
+- MenuItem menuItem = new MenuItem(session.MenuFormat);
+- menuItem.TooltipText = session.Tooltip;
+- menuItem.Activated += PopupMenuItem_Activated;
+- menuItem.Data[sessionKey] = session;
+-
+- subMenu.Append(menuItem);
+- }
+- groupMenu.Submenu = subMenu;
+- }
+-
+- topMenu.Append(new SeparatorMenuItem());
+-
+- foreach (var session in Program.SessionCollection.Items.Where(s => string.IsNullOrEmpty(s.Group)).OrderBy(s => s.Server))
++ foreach (var group in Program.SessionCollection.Groups)
++ {
++ MenuItem groupMenu = new MenuItem(group);
++
++ Menu subMenu = new Menu();
++ foreach(var session in Program.SessionCollection.Items.Where(s => s.Group == group).OrderBy(s => s.Server))
+ {
+ MenuItem menuItem = new MenuItem(session.MenuFormat);
+ menuItem.TooltipText = session.Tooltip;
+ menuItem.Activated += PopupMenuItem_Activated;
+- menuItem.Data[sessionKey] = session;
+-
+- topMenu.Append(menuItem);
++ menuItem.Data[sessionKey] = session;
++
++ subMenu.Append(menuItem);
+ }
++ groupMenu.Submenu = subMenu;
++
++ topMenu.Append(groupMenu);
++ }
++
++ topMenu.Append(new SeparatorMenuItem());
++
++ foreach (var session in Program.SessionCollection.Items.Where(s => string.IsNullOrEmpty(s.Group)).OrderBy(s => s.Server))
++ {
++ MenuItem menuItem = new MenuItem(session.MenuFormat);
++ menuItem.TooltipText = session.Tooltip;
++ menuItem.Activated += PopupMenuItem_Activated;
++ menuItem.Data[sessionKey] = session;
+
+- topMenu.Append(new SeparatorMenuItem());
+- topMenu.Append(actionQuit.CreateMenuItem());
+- topMenu.ShowAll();
+-// topMenu.Popup();
++ topMenu.Append(menuItem);
+ }
+- catch
+- {
+- }
+- }
+-
++
++ topMenu.Append(new SeparatorMenuItem());
++ topMenu.Append(actionQuit.CreateMenuItem());
++
++ topMenu.ShowAll();
++ return topMenu;
++ }
++
+ private void PopupMenuItem_Activated(object sender, EventArgs e)
+ {
+@@ -126,20 +138,4 @@
+ }
+ }
+-
+- protected virtual void OnNewRdpActionActivated (object sender, System.EventArgs e)
+- {
+- }
+-
+- protected virtual void OnNewVncActionActivated (object sender, System.EventArgs e)
+- {
+- }
+-
+- protected virtual void OnNewSshActionActivated (object sender, System.EventArgs e)
+- {
+- }
+-
+-
+-
+-
+ }
+ }
+Index: /trunk/gnome-rdp/ChangeLog
+===================================================================
+--- /trunk/gnome-rdp/ChangeLog (revision 262)
++++ /trunk/gnome-rdp/ChangeLog (revision 264)
+@@ -1,2 +1,11 @@
++2011-11-02 James P Michels III <jmichels@bluefintrading.com>
++
++ * Program.cs:
++ * gnome-rdp.sln:
++ * MainWindow.cs:
++ * gnome-rdp.csproj:
++ * gui.stetic:
++ * SessionsWidget.cs: Changes to support AppIndicator
++
+ 2011-05-22 James P Michels III <james.p.michels@gmail.com>
+
+Index: /trunk/gnome-rdp/Sessions/SessionsWidget.cs
+===================================================================
+--- /trunk/gnome-rdp/Sessions/SessionsWidget.cs (revision 257)
++++ /trunk/gnome-rdp/Sessions/SessionsWidget.cs (revision 264)
+@@ -205,4 +205,5 @@
+ }
+
++ Program.UpdateMainWindowMenu();
+ }
+ catch (Exception ex)
+Index: /trunk/gnome-rdp/gtk-gui/gui.stetic
+===================================================================
+--- /trunk/gnome-rdp/gtk-gui/gui.stetic (revision 261)
++++ /trunk/gnome-rdp/gtk-gui/gui.stetic (revision 264)
+@@ -7,5 +7,6 @@
+ <import>
+ <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+- <widget-library name="../bin/Debug/gnome-rdp.exe" internal="true" />
++ <widget-library name="appindicator-sharp, Version=0.2.0.0, Culture=neutral, PublicKeyToken=bcae265d1c7ab4c2" />
++ <widget-library name="../bin/Release/gnome-rdp.exe" internal="true" />
+ </import>
+ <widget class="Gtk.Window" id="GnomeRDP.MainWindow" design-size="798 565">
+Index: /trunk/gnome-rdp/Program.cs
+===================================================================
+--- /trunk/gnome-rdp/Program.cs (revision 261)
++++ /trunk/gnome-rdp/Program.cs (revision 264)
+@@ -196,5 +196,14 @@
+ });
+ }
+-
++
++ public static void UpdateMainWindowMenu()
++ {
++ GLib.Timeout.Add(0, () =>
++ {
++ mainWindow.UpdateMenu();
++ return false;
++ });
++ }
++
+ public static void SetMainWindowVisible(bool visible)
+ {
diff --git a/pcr/gnucash-docs/PKGBUIDL b/pcr/gnucash-docs/PKGBUIDL new file mode 100644 index 000000000..94c5d62d0 --- /dev/null +++ b/pcr/gnucash-docs/PKGBUIDL @@ -0,0 +1 @@ +md5sums=('38daeb3b15f296726ee8124122040f08') diff --git a/pcr/gnucash-docs/PKGBUILD b/pcr/gnucash-docs/PKGBUILD new file mode 100644 index 000000000..0895692f2 --- /dev/null +++ b/pcr/gnucash-docs/PKGBUILD @@ -0,0 +1,28 @@ +# Contributor: Mark Schneider <queueRAM@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=gnucash-docs +pkgver=2.4.1 +pkgrel=1 +pkgdesc="User documentation for gnucash" +arch=('i686' 'x86_64') +url="http://www.gnucash.org" +license=('GPL') +depends=('gnucash' 'docbook-xml' 'rarian' 'yelp') +source=(http://downloads.sourceforge.net/gnucash/${pkgname}-${pkgver}.tar.gz) +install=${pkgname}.install +md5sums=('38daeb3b15f296726ee8124122040f08') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-scrollkeeper + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install +} +md5sums=('38daeb3b15f296726ee8124122040f08') +md5sums=('38daeb3b15f296726ee8124122040f08') diff --git a/pcr/gnucash-docs/gnucash-docs.install b/pcr/gnucash-docs/gnucash-docs.install new file mode 100644 index 000000000..e82d4b10b --- /dev/null +++ b/pcr/gnucash-docs/gnucash-docs.install @@ -0,0 +1,20 @@ +post_install() { + echo "updating scrollkeeper catalogue ..." + scrollkeeper-update -q -p /var/lib/scrollkeeper + update-desktop-database -q +} + +post_upgrade() { + echo "updating scrollkeeper catalogue ..." + update-desktop-database -q + scrollkeeper-update -q -p /var/lib/scrollkeeper +} + +post_remove() { + post_install $1 +} + +op=$1 +shift + +$op $* diff --git a/pcr/gnuit/PKGBUILD b/pcr/gnuit/PKGBUILD new file mode 100644 index 000000000..6c1983e32 --- /dev/null +++ b/pcr/gnuit/PKGBUILD @@ -0,0 +1,30 @@ +# Contributor: James Reed <supplantr at archlinux dot info> +# Contributor: Leslie P. Polzer <polzer at stardawn dot org> +# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +pkgname=gnuit +pkgver=4.9.5 +pkgrel=1 +pkgdesc="A set of interactive text-mode tools." +arch=('i686' 'x86_64') +url="http://www.gnu.org/software/gnuit/" +license=('GPL3') +depends=('bash') +install=${pkgname}.install +source=(http://ftp.gnu.org/gnu/gnuit/$pkgname-$pkgver.tar.gz) + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --disable-transition + make +} + +check() { + cd "$srcdir/$pkgname-$pkgver" + make -k check +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install +} diff --git a/pcr/gnuit/gnuit.install b/pcr/gnuit/gnuit.install new file mode 100644 index 000000000..e26e79dae --- /dev/null +++ b/pcr/gnuit/gnuit.install @@ -0,0 +1,16 @@ +infodir=usr/share/info +file=gnuit.info + +post_install() { + [[ -x usr/bin/install-info ]] || return 0 + install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null +} + +post_upgrade() { + post_install "$1" +} + +pre_remove() { + [[ -x usr/bin/install-info ]] || return 0 + install-info --delete "$infodir/$file.gz" "$infodir/dir" 2> /dev/null +} diff --git a/pcr/gnuplot-py/PKGBUILD b/pcr/gnuplot-py/PKGBUILD new file mode 100644 index 000000000..315c7b695 --- /dev/null +++ b/pcr/gnuplot-py/PKGBUILD @@ -0,0 +1,23 @@ +# Contributor: Michael Krauss <hippodriver@gmx.net> +# Contributor : Baptiste Jonglez <zerstorer at free dot fr> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=gnuplot-py +pkgver=1.8 +pkgrel=3 +pkgdesc="Gnuplot.py is a Python package that interfaces to gnuplot." +arch=('any') +url="http://$pkgname.sourceforge.net/" +license=('LGPL') +depends=('python2-numpy' 'gnuplot') +#options=(!emptydirs) +source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz") +md5sums=('abd6f571e7aec68ae7db90a5217cd5b1') + +package() { + cd $srcdir/$pkgname-$pkgver + python2 setup.py install --prefix=/usr --root=$pkgdir/ --optimize=1 +} + +# vim:set ts=2 sw=2 et: +md5sums=('abd6f571e7aec68ae7db90a5217cd5b1') diff --git a/pcr/gtkpacman/PKGBUILD b/pcr/gtkpacman/PKGBUILD new file mode 100644 index 000000000..0e66e33e5 --- /dev/null +++ b/pcr/gtkpacman/PKGBUILD @@ -0,0 +1,30 @@ +# Contributor: Tetsumaki <http://goo.gl/YMBdA> +# Contributor: Stefan Husmann <stefan-husmann@t-online.de> +# Contributor: Stefano Esposito <ragnarok@email.it> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + +pkgname=gtkpacman +pkgver=2.3.1 +pkgrel=4 +pkgdesc="GTK package manager for archlinux based on pacman" +arch=('any') +url="http://gtkpacman.berlios.de/" +license=('GPL') +depends=('pygtk' 'vte') +source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.bz2") +sha256sums=('0ee571a5b1efcf5d8594a6eb04456a598c6354301ee6300c6508999c1eb87b88') + +build () { + cd "${srcdir}/${pkgname}-${pkgver}" + + # python2 fix + for _file in $(find . -name '*.py' -print); do + sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' "${_file}" + sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' "${_file}" + done +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + python2 setup.py install --root="${pkgdir}" +} diff --git a/pcr/h264enc/PKGBUILD b/pcr/h264enc/PKGBUILD new file mode 100644 index 000000000..9f47c3640 --- /dev/null +++ b/pcr/h264enc/PKGBUILD @@ -0,0 +1,35 @@ +# Contributor: AlexanderR <rvacheva at nxt dot ru> +# Contributor: Markus Heuser <markus.heuser@web.de> +# Contributor: Stefan Clarke <fm0nk3y@yahoo.co.uk> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=h264enc +pkgver=9.4.8 +pkgrel=1 +pkgdesc="Advanced shell script for encoding DVDs or video files to the H.264 format using the encoding utility MEncoder from MPlayer." +arch=('any') +url='http://h264enc.sourceforge.net/' +license=('GPL') +depends=('x264' 'lsdvd' 'lame' 'bc' 'mencoder') +optdepends=('mkvtoolnix' 'gpac' 'ogmtools' 'mplayer' 'pv' 'neroaacenc' 'aacplusenc' 'tsmuxer' 'vorbis-tools' 'dcaenc') +options=(!strip) +install="${pkgname}.install" +source=("http://sf.net/projects/h264enc/files/$pkgname/$pkgname-$pkgver.tar.gz") + +build() { + cd "$srcdir/$pkgname-$pkgver" + + sed -i -e "s|/usr/local|$pkgdir/usr|g" \ + -e 's|usr/local/|usr/|g' \ + -e 's|/man/man1|/share/man/man1|g' install +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + ./install + rm ${pkgdir}/usr/share/doc/h264enc/{uninstall,LICENSE} +} + +sha1sums=('3d8b713c831a152994ce124a3fd4aebafcd4fd6d') +sha1sums=('3d8b713c831a152994ce124a3fd4aebafcd4fd6d') diff --git a/pcr/h264enc/h264enc.install b/pcr/h264enc/h264enc.install new file mode 100644 index 000000000..3c17e8130 --- /dev/null +++ b/pcr/h264enc/h264enc.install @@ -0,0 +1,9 @@ +post_install() { + echo "Hint: run 'h264enc -r' after installation of optional packages." +} + +post_upgrade() { + if [[ "$2" < "9.4.3" ]]; then + echo "~/.h264enc/config syntax changed since version 9.4.2. Update it by hands."; + fi +} diff --git a/pcr/ibus-bogo/PKGBUILD b/pcr/ibus-bogo/PKGBUILD new file mode 100644 index 000000000..44652b204 --- /dev/null +++ b/pcr/ibus-bogo/PKGBUILD @@ -0,0 +1,55 @@ +# Contributor: Nguyen Ha Duong <cmpitg@gmail.com> +# Contributor: Ngo Trung <ndtrung4419@gmail.com> +# Contributor: Dam Tien Long <longdt90@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname="ibus-bogo" +pkgver=0.1.0 +pkgrel=1 +pkgdesc=" Bogo Engine for Ibus" + +arch=('i686' 'x86_64') +url="https://github.com/BoGoEngine" +license=('GPLv3') +depends=('ibus' 'python2' 'glibmm' 'python2-gobject') +makedepends=('git' 'cmake' 'gcc' 'python2') +provides=('ibus-bogo') + +_gitpython="https://github.com/BoGoEngine/ibus-bogo-python.git" +_gitpythonname="ibus-bogo-python" + +install=install + +build() { + cd ${srcdir} + + if [ -d ${_gitpythonname} ] ; then + cd ${srcdir}/${_gitpythonname} && git pull + msg "Local ${srcdir}/${_gitpythonname} updated" + + else + git clone ${_gitpython} ${_gitpythonname} + + fi + + + + msg "Starting make..." + + mkdir ${pkgdir}/usr/ + + + # Building ibus-bogo-python + cd ${srcdir}/${_gitpythonname} + if [ -d build ]; then + cd build + else + mkdir build + cd build + fi + cmake -DCMAKE_INSTALL_PREFIX:PATH="${pkgdir}/usr" .. + make + make install + rm ${pkgdir}/usr/share/glib-2.0/schemas/gschemas.compiled + + } diff --git a/pcr/ibus-bogo/install b/pcr/ibus-bogo/install new file mode 100644 index 000000000..0ed8986d0 --- /dev/null +++ b/pcr/ibus-bogo/install @@ -0,0 +1,40 @@ +post_install () { + + glib-compile-schemas /usr/share/glib-2.0/schemas + + } + +pre_upgrade () { + + cd /usr/share + if [ -d ibus-bogo ]; then + rm -rf ibus-bogo/* + fi + + cd /usr/share/ibus/component/ + if [ -f bogo.xml ]; then + rm bogo.xml + fi + + cd /usr/lib/python2.7/site-packages/ + if [ -d BoGo ]; then + rm -rf BoGo/* + fi + + for i in `ls /usr/lib | grep bogo`; do + rm -rf /usr/lib/$i + done + + } + +post_upgrade () { + + glib-compile-schemas /usr/share/glib-2.0/schemas + + } + +post_remove () { + + glib-compile-schemas /usr/share/glib-2.0/schemas + + } diff --git a/pcr/ipycli-git/PKGBUILD b/pcr/ipycli-git/PKGBUILD new file mode 100644 index 000000000..86f6289d1 --- /dev/null +++ b/pcr/ipycli-git/PKGBUILD @@ -0,0 +1,56 @@ +# Contributor: Francois Boulogne <fboulogne at april dot org> +# Maintainer: Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +pkgname=ipycli-git +pkgver=20121109 +pkgrel=2 +pkgdesc="IPython subapp that supports adding arbitrary notebooks from the command line" +arch=('i686' 'x86_64') +url="https://github.com/dalejung/ipycli/" +license=('UNKNOWN') +depends=('python2' 'ipython2') +optdepends=() +makedepends=('git' 'python2') +install= +provides=() +conflicts=() +source=() + + +_gitroot="git://github.com/dalejung/ipycli.git" +_gitname="ipycli" + +build() { + + cd "$srcdir" + msg "Connecting to GIT server...." + + if [ -d $_gitname ] ; then + cd $_gitname && git pull origin + msg "The local files are updated." + else + git clone $_gitroot $_gitname + fi + + msg "GIT checkout done or server timeout" + msg "Starting make..." + + rm -rf "$srcdir/$_gitname-build" + git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" + cd "$srcdir/$_gitname-build" + + #lib + python2 setup.py install --root="${pkgdir}" + + #bin + mkdir "${pkgdir}/usr/bin" + cp "bin/nb" "${pkgdir}/usr/bin" + sed -i -e "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" "${pkgdir}/usr/bin/nb" + cp "bin/ipycli" "${pkgdir}/usr/bin" + sed -i -e "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" "${pkgdir}/usr/bin/ipycli" + + #templates/statics + cp -r "ipycli/static" "${pkgdir}/usr/lib/python2.7/site-packages/ipycli/" + cp -r "ipycli/templates" "${pkgdir}/usr/lib/python2.7/site-packages/ipycli/" +} +# vim:set ts=2 sw=2 et: diff --git a/pcr/jdee/PKGBUILD b/pcr/jdee/PKGBUILD new file mode 100644 index 000000000..41cddfb08 --- /dev/null +++ b/pcr/jdee/PKGBUILD @@ -0,0 +1,49 @@ +# PKGBUILD for JDEE 2.4.0.1 +# Contributor: Brandon Ednes <brandon@as220.org> +# $Id$ +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=jdee +_pkgname=jde +pkgver=2.4.0.1 +pkgrel=1 +pkgdesc="The Java Development Environment for Emacs" +arch=('i686' 'x86_64') +url="http://jdee.sourceforge.net/" +license="GPL" +depends=('emacs' 'cedet' 'emacs-elib') +makedepends=() +conflicts=() +replaces=() +backup=() +install="$pkgname.install" +source=(http://downloads.sourceforge.net/project/jdee/jdee/2.4.0.1/jdee-bin-2.4.0.1.zip) +md5sums=('8e1d3e764f01c6dc1e337f9c6882ec85') + +build() { + cd $startdir/src/$pkgname-$pkgver + mkdir -p $startdir/pkg/usr/share/emacs/site-lisp/$_pkgname + + # Fix up permissions for package files. This is nice but not required. + find . -type f | xargs chmod 644 + + # Because of the way JDEE builds, it assumes the jde directory has its + # dependencies in sibling directories. We set up some symlinks to fake + # this. + ln -sf /usr/share/emacs/site-lisp/elib ../elib + ln -sf /usr/share/emacs/site-lisp/cedet ../cedet + # Byte-compile everything. + emacs -q --no-site-file -batch -l $startdir/jdee-build.el -f jde-compile-jde + + # There is no install per se, just copy everything into the pkg directory. + cp -R $startdir/src/$pkgname-$pkgver/* \ + $startdir/pkg/usr/share/emacs/site-lisp/$_pkgname + + # Clean up the symlinks. + rm ../elib + rm ../cedet +} + +# Local Variables: +# mode: shell-script +# End: diff --git a/pcr/jdee/jdee-build.el b/pcr/jdee/jdee-build.el new file mode 100644 index 000000000..a8ec13358 --- /dev/null +++ b/pcr/jdee/jdee-build.el @@ -0,0 +1,8 @@ +;;; jde-build.el +;;; Set up the Emacs environment to byte-compile JDEE +;;; $Id: jdee-build.el,v 99d30c485449 2008/06/23 05:38:36 jbromley $ +(add-to-list 'load-path "../elib") +(add-to-list 'load-path "../cedet") +(add-to-list 'load-path "./lisp") +(load-file (expand-file-name "../cedet/common/cedet.el")) +(require 'jde) diff --git a/pcr/jdee/jdee.install b/pcr/jdee/jdee.install new file mode 100644 index 000000000..08b6501a4 --- /dev/null +++ b/pcr/jdee/jdee.install @@ -0,0 +1,54 @@ +# jdee.install +# Show Emacs configuration instructions. +# $Id: jdee.install,v 99d30c485449 2008/06/23 05:38:36 jbromley $ +post_install () { +echo "" +echo "==> You may need to update your .emacs file. The following shows" +echo "==> the minimal configuration needed. Note that it shows what is" +echo "==> needed to configure JDEE's dependencies elib and cedet." +echo "" +echo "==> ;; This .emacs file illustrates the minimal setup" +echo "==> ;; required to run the JDE." +echo "==>" +echo "==> ;; Update the Emacs load-path to include the path to" +echo "==> ;; the JDE and its require packages. This code assumes" +echo "==> ;; that you have installed the packages in the emacs/site" +echo "==> ;; subdirectory of your home directory." +echo "==> (add-to-list 'load-path (expand-file-name \"~/emacs/site/jde/lisp\"))" +echo "==> (add-to-list 'load-path (expand-file-name \"~/emacs/site/cedet/common\"))" +echo "==> (add-to-list 'load-path (expand-file-name \"~/emacs/site/elib\"))" +echo "==>" +echo "==> ;; Initialize CEDET." +echo "==> (load-file (expand-file-name \"~/emacs/site/cedet/common/cedet.el\"))" +echo "==>" +echo "==>" +echo "==> ;; If you want Emacs to defer loading the JDE until you open a" +echo "==> ;; Java file, edit the following line" +echo "==> (setq defer-loading-jde nil)" +echo "==> ;; to read:" +echo "==> ;;" +echo "==> ;; (setq defer-loading-jde t)" +echo "==> ;;" +echo "==>" +echo "==> (if defer-loading-jde" +echo "==> (progn" +echo "==> (autoload 'jde-mode \"jde\" \"JDE mode.\" t)" +echo "==> (setq auto-mode-alist" +echo "==> (append" +echo "==> '((\"\\\\.java\\\\'\" . jde-mode))" +echo "==> auto-mode-alist)))" +echo "==> (require 'jde))" +echo "" +} + +post_upgrade () { + post_install $1 +} + +op=$1 +shift +$op $* + +# Local Variables: +# mode: shell-script +# End: diff --git a/pcr/knot/PKGBUILD b/pcr/knot/PKGBUILD new file mode 100644 index 000000000..4f785493a --- /dev/null +++ b/pcr/knot/PKGBUILD @@ -0,0 +1,31 @@ +# Contributor: Otto Sabart <seberm[at]gmail[dot]com> +# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +pkgname=knot +pkgver=1.1.0 +pkgrel=1 +pkgdesc="high-performance authoritative-only DNS server" +url="http://www.knot-dns.cz/setlang/?language=en" +arch=('i686' 'x86_64') +license=('GPLv3') +depends=('liburcu>=0.5.4' 'flex>=2.5.3' 'libtool' 'bison>=2.3') +optdepends=('libcap') +makedepends=('autoconf>=2.65') +conflicts=() +replaces=() +backup=() +#install='foo.install' +source=("http://public.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.gz") + +md5sums=('b2d4a53d8e98565ebb389531c2b66690') + +build() { + + cd "${srcdir}/${pkgname}-${pkgver}" + + #autoreconf -if + ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc/knot + + make && make install DESTDIR="${pkgdir}" || return 1 + #ldconfig +} diff --git a/pcr/kompozer/NS_IMETHOD_i686.patch b/pcr/kompozer/NS_IMETHOD_i686.patch new file mode 100644 index 000000000..79abc50de --- /dev/null +++ b/pcr/kompozer/NS_IMETHOD_i686.patch @@ -0,0 +1,11 @@ +--- xpcom/base/nscore.h 2009-05-02 17:43:48.000000000 +0100 ++++ xpcom/base/nscore.h 2012-08-10 23:08:07.168628118 +0100 +@@ -182,7 +182,7 @@ + #define NS_IMPORT_(type) NS_EXTERNAL_VIS_(type) + #define NS_EXPORT NS_EXTERNAL_VIS + #define NS_EXPORT_(type) NS_EXTERNAL_VIS_(type) +-#define NS_IMETHOD_(type) virtual IMETHOD_VISIBILITY type NS_DEFCALL ++#define NS_IMETHOD_(type) virtual type + #define NS_IMETHODIMP_(type) type + #define NS_METHOD_(type) type + #define NS_CALLBACK_(_type, _name) _type (* _name) diff --git a/pcr/kompozer/PKGBUILD b/pcr/kompozer/PKGBUILD new file mode 100644 index 000000000..7b556e166 --- /dev/null +++ b/pcr/kompozer/PKGBUILD @@ -0,0 +1,59 @@ +# Contributor: peace4all <markspost at rocketmail dot com> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + +# thanks to tadzio, and techlive for the investigation +# work and fix included as the NS_IMETHOD_i686.patch + +pkgname=kompozer +pkgver=0.8b3 +pkgrel=10 +pkgdesc="A Dreamweaver style WYSIWYG web editor; Nvu unofficial bug-fix release" +arch=('x86_64' 'i686') +license=('GPL') +url="http://www.kompozer.net" +depends=('gtk2' 'glib2' 'pango' 'pangox-compat' 'nss' 'libxt' 'libidl2' 'gnome-vfs') +makedepends=('zip' 'pkgconfig') +source=("http://downloads.sourceforge.net/kompozer/$pkgname-$pkgver-src.tar.bz2" + 'kompozer.desktop' + 'mozconfig.patch' + 'kompozer-libpng15.patch' + 'kompozer-libpng14.patch' + 'gcc46_default_ctors.patch' + 'kompozer_gcc_4.7.patch' + 'any_kernel_26_plus.patch' + 'NS_IMETHOD_i686.patch') +md5sums=('cd4664ecda908666b19ef0607010c627' + 'ed8edf6817892a38b8b181fc9b2caaea' + '4778f967307cf569089daca843de1df9' + '4852034f99e7943071946e7eedc6c2f5' + 'd5ba90f7fbaed76f77a6d9717e86f3a5' + 'ad3ec5cbc6677dd712b140148398f58f' + '75b0e1cad65dbeb8feedac5d4f52be32' + '58a294356b3e17ad070e4c93180bf0ad' + '186c47586bebf83b9b76d339e3a38c95') + +build() { + cd "$srcdir/mozilla" + + patch -Np0 -i "$srcdir/mozconfig.patch" + patch -Np0 -i "$srcdir/kompozer-libpng14.patch" + patch -Np0 -i "$srcdir/kompozer-libpng15.patch" + patch -Np0 -i "$srcdir/gcc46_default_ctors.patch" + patch -Np0 -i "$srcdir/kompozer_gcc_4.7.patch" + patch -Np0 -i "$srcdir/any_kernel_26_plus.patch" + patch -Np0 -i "$srcdir/NS_IMETHOD_i686.patch" + + make -f client.mk build +} + +package() { + cd "$srcdir/obj-kompozer" + + make DESTDIR=$pkgdir install + install -m755 -dD "$pkgdir/usr/share/applications/" + install -m644 "$srcdir/kompozer.desktop" "$pkgdir/usr/share/applications/" + + mkdir -p "$pkgdir/usr/share/pixmaps/" + ln -s "/usr/lib/kompozer/icons/mozicon256.png" "$pkgdir/usr/share/pixmaps/kompozer.png" + ln -s "/usr/lib/kompozer/icons/mozicon50.xpm" "$pkgdir/usr/share/pixmaps/kompozer.xpm" +} diff --git a/pcr/kompozer/any_kernel_26_plus.patch b/pcr/kompozer/any_kernel_26_plus.patch new file mode 100644 index 000000000..69610ef3f --- /dev/null +++ b/pcr/kompozer/any_kernel_26_plus.patch @@ -0,0 +1,31 @@ +--- security/coreconf/config.mk 2009-05-02 17:42:18.000000000 +0100 ++++ security/coreconf/config.mk 2012-05-22 00:08:39.000000000 +0100 +@@ -63,7 +63,7 @@ + ####################################################################### + + TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \ +- OpenVMS AIX ++ OpenVMS AIX Linux + + ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) + include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk +--- security/coreconf/Linux.mk 2009-05-02 17:42:18.000000000 +0100 ++++ security/coreconf/Linux.mk 2012-05-22 00:36:03.533374797 +0100 +@@ -176,3 +176,17 @@ + # Always set CPU_TAG on Linux, OpenVMS, WINCE. + # + CPU_TAG = _$(CPU_ARCH) ++ ++# ++#Try to compile with any kernel version 2.6 and above. ++# ++DSO_LDOPTS += -Wl,-z,defs ++ ++OS_REL_CFLAGS += -DLINUX2_1 ++MKSHLIB = $(CC) $(DSO_LDOPTS) -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) ++ ++ifdef MAPFILE ++ MKSHLIB += -Wl,--version-script,$(MAPFILE) ++endif ++PROCESS_MAP_FILE = grep -v ';-' $< | \ ++ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ diff --git a/pcr/kompozer/gcc46_default_ctors.patch b/pcr/kompozer/gcc46_default_ctors.patch new file mode 100644 index 000000000..7f3fa7810 --- /dev/null +++ b/pcr/kompozer/gcc46_default_ctors.patch @@ -0,0 +1,22 @@ +--- intl/unicharutil/util/nsUnicharUtils.h 2011-05-10 17:02:12.472642196 +0200 ++++ intl/unicharutil/util/nsUnicharUtils.h 2011-05-10 17:02:50.656034735 +0200 +@@ -64,6 +64,9 @@ + : public nsStringComparator + { + public: ++ nsCaseInsensitiveStringComparator() ++ { ++ } + virtual int operator()( const PRUnichar*, const PRUnichar*, PRUint32 aLength ) const; + virtual int operator()( PRUnichar, PRUnichar ) const; + }; +--- toolkit/xre/nsAppRunner.cpp 2011-05-10 17:26:05.853608464 +0200 ++++ toolkit/xre/nsAppRunner.cpp 2011-05-10 17:26:15.079221177 +0200 +@@ -491,6 +491,7 @@ + + { + public: ++ nsXULAppInfo() {} + NS_DECL_ISUPPORTS_INHERITED + NS_DECL_NSIXULAPPINFO + NS_DECL_NSIXULRUNTIME diff --git a/pcr/kompozer/kompozer-libpng14.patch b/pcr/kompozer/kompozer-libpng14.patch new file mode 100644 index 000000000..224bc7f61 --- /dev/null +++ b/pcr/kompozer/kompozer-libpng14.patch @@ -0,0 +1,17 @@ +diff -Naur mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.cpp{-,} +--- mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.cpp- 2010-06-10 19:34:09.000000000 -0700 ++++ modules/libpr0n/encoders/png/nsPNGEncoder.cpp 2010-06-10 19:35:13.000000000 -0700 +@@ -111,9 +111,9 @@ + + // initialize + png_struct* png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, +- png_voidp_NULL, +- png_error_ptr_NULL, +- png_error_ptr_NULL); ++ NULL, ++ NULL, ++ NULL); + if (! png_ptr) + return NS_ERROR_OUT_OF_MEMORY; + png_info* info_ptr = png_create_info_struct(png_ptr); + diff --git a/pcr/kompozer/kompozer-libpng15.patch b/pcr/kompozer/kompozer-libpng15.patch new file mode 100644 index 000000000..f236e402a --- /dev/null +++ b/pcr/kompozer/kompozer-libpng15.patch @@ -0,0 +1,64 @@ +diff -urp mozilla.orig/modules/libpr0n/decoders/png/nsPNGDecoder.cpp mozilla/modules/libpr0n/decoders/png/nsPNGDecoder.cpp +--- mozilla.orig/modules/libpr0n/decoders/png/nsPNGDecoder.cpp 2011-11-14 21:55:42.513856274 +0000 ++++ modules/libpr0n/decoders/png/nsPNGDecoder.cpp 2011-11-14 22:15:35.899962674 +0000 +@@ -171,7 +171,7 @@ static NS_METHOD ReadDataOut(nsIInputStr + } + + // we need to do the setjmp here otherwise bad things will happen +- if (setjmp(decoder->mPNG->jmpbuf)) { ++ if (setjmp (png_jmpbuf(decoder->mPNG))) { + png_destroy_read_struct(&decoder->mPNG, &decoder->mInfo, NULL); + + decoder->mError = PR_TRUE; +@@ -227,7 +227,7 @@ info_callback(png_structp png_ptr, png_i + if (width > MOZ_PNG_MAX_DIMENSION || height > MOZ_PNG_MAX_DIMENSION) { + nsPNGDecoder *decoder = NS_STATIC_CAST(nsPNGDecoder*, + png_get_progressive_ptr(png_ptr)); +- longjmp(decoder->mPNG->jmpbuf, 1); ++ longjmp(png_jmpbuf(decoder->mPNG), 1); + } + #undef MOZ_PNG_MAX_DIMENSION + +@@ -307,7 +307,7 @@ info_callback(png_structp png_ptr, png_i + + decoder->mImage = do_CreateInstance("@mozilla.org/image/container;1"); + if (!decoder->mImage) +- longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY ++ longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY + + decoder->mImageLoad->SetImage(decoder->mImage); + +@@ -319,7 +319,7 @@ info_callback(png_structp png_ptr, png_i + + decoder->mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2"); + if (!decoder->mFrame) +- longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY ++ longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY + + gfx_format format; + +@@ -341,7 +341,7 @@ info_callback(png_structp png_ptr, png_i + // then initalize the frame and append it to the container + nsresult rv = decoder->mFrame->Init(0, 0, width, height, format, 24); + if (NS_FAILED(rv)) +- longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY ++ longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY + + decoder->mImage->AppendFrame(decoder->mFrame); + +@@ -362,7 +362,7 @@ info_callback(png_structp png_ptr, png_i + decoder->ibpr = bpr; + decoder->interlacebuf = (PRUint8 *)nsMemory::Alloc(decoder->ibpr*height); + if (!decoder->interlacebuf) { +- longjmp(decoder->mPNG->jmpbuf, 5); // NS_ERROR_OUT_OF_MEMORY ++ longjmp(png_jmpbuf(decoder->mPNG), 5); // NS_ERROR_OUT_OF_MEMORY + } + } + +@@ -555,7 +555,7 @@ void + error_callback(png_structp png_ptr, png_const_charp error_msg) + { + PR_LOG(gPNGLog, PR_LOG_ERROR, ("libpng error: %s\n", error_msg)); +- longjmp(png_ptr->jmpbuf, 1); ++ longjmp(png_jmpbuf(png_ptr), 1); + } diff --git a/pcr/kompozer/kompozer.desktop b/pcr/kompozer/kompozer.desktop new file mode 100644 index 000000000..c395f9af7 --- /dev/null +++ b/pcr/kompozer/kompozer.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Exec=kompozer +Icon=kompozer +Type=Application +Terminal=false +Name=KompoZer +GenericName=Web Authoring System +Comment=WYSIWYG Web Editor +MimeType=text/html;text/xml;text/css;text/x-javascript;text/javascript;application/xhtml+xml; +Categories=Development;WebDevelopment;Network; + diff --git a/pcr/kompozer/kompozer_gcc_4.7.patch b/pcr/kompozer/kompozer_gcc_4.7.patch new file mode 100644 index 000000000..196609fce --- /dev/null +++ b/pcr/kompozer/kompozer_gcc_4.7.patch @@ -0,0 +1,107 @@ +--- xpcom/glue/nsBaseHashtable.h 2009-05-02 17:43:39.000000000 +0100 ++++ xpcom/glue/nsBaseHashtable.h 2012-07-27 13:43:55.000000000 +0100 +@@ -123,7 +123,7 @@ + */ + PRBool Get(KeyType aKey, UserDataType* pData) const + { +- EntryType* ent = GetEntry(aKey); ++ EntryType* ent = this->GetEntry(aKey); + + if (!ent) + return PR_FALSE; +@@ -142,7 +142,7 @@ + */ + PRBool Put(KeyType aKey, UserDataType aData) + { +- EntryType* ent = PutEntry(aKey); ++ EntryType* ent = this->PutEntry(aKey); + + if (!ent) + return PR_FALSE; +@@ -156,7 +156,7 @@ + * remove the data for the associated key + * @param aKey the key to remove from the hashtable + */ +- void Remove(KeyType aKey) { RemoveEntry(aKey); } ++ void Remove(KeyType aKey) { this->RemoveEntry(aKey); } + + /** + * function type provided by the application for enumeration. +--- xpcom/glue/nsClassHashtable.h 2009-05-02 17:43:39.000000000 +0100 ++++ xpcom/glue/nsClassHashtable.h 2012-07-27 13:15:10.000000000 +0100 +@@ -98,7 +98,7 @@ + nsClassHashtable<KeyClass,T>::Get(KeyType aKey, T** retVal) const + { + typename nsBaseHashtable<KeyClass,nsAutoPtr<T>,T*>::EntryType* ent = +- GetEntry(aKey); ++ this->GetEntry(aKey); + + if (ent) + { +@@ -126,7 +126,7 @@ + PR_Lock(this->mLock); + + typename nsBaseHashtableMT<KeyClass,nsAutoPtr<T>,T*>::EntryType* ent = +- GetEntry(aKey); ++ this->GetEntry(aKey); + + if (ent) + { +--- xpcom/glue/nsInterfaceHashtable.h 2009-05-02 17:43:39.000000000 +0100 ++++ xpcom/glue/nsInterfaceHashtable.h 2012-07-27 13:30:08.000000000 +0100 +@@ -111,7 +111,7 @@ + (KeyType aKey, UserDataType* pInterface) const + { + typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent = +- GetEntry(aKey); ++ this->GetEntry(aKey); + + if (ent) + { +@@ -139,7 +139,7 @@ + (KeyType aKey, PRBool* aFound) const + { + typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent = +- GetEntry(aKey); ++ this->GetEntry(aKey); + + if (ent) + { +@@ -167,7 +167,7 @@ + PR_Lock(this->mLock); + + typename nsBaseHashtableMT<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent = +- GetEntry(aKey); ++ this->GetEntry(aKey); + + if (ent) + { +--- xpcom/glue/nsRefPtrHashtable.h 2009-05-02 17:43:39.000000000 +0100 ++++ xpcom/glue/nsRefPtrHashtable.h 2012-07-27 13:52:48.000000000 +0100 +@@ -112,7 +112,7 @@ + (KeyType aKey, UserDataType* pRefPtr) const + { + typename nsBaseHashtable<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent = +- GetEntry(aKey); ++ this->GetEntry(aKey); + + if (ent) + { +@@ -140,7 +140,7 @@ + (KeyType aKey, PRBool* aFound) const + { + typename nsBaseHashtable<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent = +- GetEntry(aKey); ++ this->GetEntry(aKey); + + if (ent) + { +@@ -168,7 +168,7 @@ + PR_Lock(this->mLock); + + typename nsBaseHashtableMT<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent = +- GetEntry(aKey); ++ this->GetEntry(aKey); + + if (ent) + { diff --git a/pcr/kompozer/mozconfig.patch b/pcr/kompozer/mozconfig.patch new file mode 100644 index 000000000..bebad1d20 --- /dev/null +++ b/pcr/kompozer/mozconfig.patch @@ -0,0 +1,142 @@ +--- .mozconfig 2009-04-26 16:19:33.000000000 +0100 ++++ .mozconfig 1970-01-01 10:14:21.000000000 +0100 +@@ -1,85 +1,80 @@ +-# Pulling Composer from the 1.8 Mozilla branch (cvs) +-#$ cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r MOZILLA_1_8_BRANCH mozilla/client.mk +-#$ cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -r FIREFOX_2_0_0_20_RELEASE mozilla/client.mk +-#$ cd mozilla +-#$ make -f client.mk checkout MOZ_CO_PROJECT=composer +-#$ find . -name CVS -prune -exec rm -rf {} \; +-#$ find . -name .cvsignore -prune -exec rm -rf {} \; +- +-# Building Composer on the 1.8 Mozilla branch +-# Note: on Ubuntu 8.04, requires libgtk2-dev, libxt-dev, libidl-dev +-# + dbus-glib-1-dev, curl (for Mozilla 1.9+) +-#$ make -f client.mk build +-# ++# Build configuration script for Debian ++ ++# build in a separate directory (optional) ++#mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-@CONFIG_GUESS@ + +-export BUILD_OFFICIAL=1 + export MOZILLA_OFFICIAL=1 ++export BUILD_OFFICIAL=1 ++ ++export MOZ_STANDALONE_COMPOSER=1 ++mk_add_options MOZ_STANDALONE_COMPOSER=1 ++ ++# if you want don't want to use gcc and g or want to use ++# a specific version of the compilers, specify it in the ++# two following lines and uncomment them ++#export CC="gcc-3.0" ++#export CXX="g-3.0" ++ ++# Uncomment the 3 following lines on Debian ++#export OS_LIBS="-lc -lpthread" ++#export CFLAGS="-DDEBIAN" ++#export CXXFLAGS="-DDEBIAN" ++mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-kompozer + +-mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-@CONFIG_GUESS@ +-#mk_add_options MOZ_CO_PROJECT=composer ++# build the standalone composer, obviously ++mk_add_options MOZ_CO_PROJECT=composer + ac_add_options --enable-application=composer + ++# change these two line to build in debug mode + ac_add_options --enable-optimize ++ac_add_options --with-pthreads + ac_add_options --disable-debug +-#ac_add_options --disable-optimize +-#ac_add_options --enable-debug +- +-#ac_add_options --disable-shared +-#ac_add_options --enable-static +-#ac_add_options --disable-libxul +-#ac_add_options --disable-xpfe-components +-ac_add_options --enable-xpfe-components +-ac_add_options --disable-tests +-ac_add_options --disable-installer +- +-#ac_add_options --disable-libxul + +-#ac_add_options --disable-crashreporter ++# adapt the following lines according to your distribution + +-#ac_add_options --enable-optimize +-#ac_add_options --enable-default-toolkit=gtk2 +-##ac_add_options --enable-default-toolkit=cairo-gtk2 +-#ac_add_options --enable-xft +-#ac_add_options --disable-canvas +-##ac_add_options --disable-cairo +- +-#ac_add_options --enable-extensions="default inspector venkman" +-ac_add_options --enable-extensions="default spellcheck" +-#ac_add_options --enable-inspector-apis +- +-##ac_add_options --enable-extensions=wallet,xml-rpc,xmlextras,pref,universalchardet,spellcheck +-##ac_add_options --enable-extensions=xml-rpc,xmlextras,pref,universalchardet +-#ac_add_options --disable-extensions +-## (now by default) ac_add_options --enable-necko-protocols=http,ftp,file,jar,viewsource,res,data +-ac_add_options --enable-necko-protocols=http,ftp,file,jar,viewsource,res,data +-##ac_add_options --enable-mathml +-#ac_add_options --enable-svg +- +-#ac_add_options --disable-installer +-#ac_add_options --disable-javaxpcom +-#ac_add_options --disable-activex +-#ac_add_options --disable-activex-scripting ++ac_add_options --prefix=/usr ++ac_add_options --libdir=/usr/lib ++ac_add_options --disable-tests ++ac_add_options --enable-necko-protocols=http,ftp,file,jar,viewsource,res,data + +-# Ubuntu 7.10 default flags: https://wiki.mozilla.org/Linux/Compiler_Options + ac_add_options --enable-default-toolkit=gtk2 + ac_add_options --enable-xft + ac_add_options --enable-pango + ac_add_options --enable-postscript + ac_add_options --disable-xprint + +-ac_add_options --enable-mathml ++#ac_add_options --enable-mathml + ac_add_options --enable-svg +-ac_add_options --enable-svg-renderer=cairo ++#ac_add_options --enable-svg-renderer=cairo + ac_add_options --enable-system-cairo + ac_add_options --enable-canvas + +-ac_add_options --with-system-png=/usr +-ac_add_options --with-system-jpeg=/usr +-ac_add_options --with-system-zlib=/usr ++ac_add_options --with-system-png ++ac_add_options --with-system-jpeg ++ac_add_options --with-system-zlib + + ac_add_options --enable-gnomevfs +-ac_add_options --enable-xinerama + ac_add_options --enable-single-profile + ac_add_options --disable-profilesharing + ac_add_options --enable-system-myspell + ++ac_add_options --disable-installer ++ac_add_options --disable-xpfe-components ++ac_add_options --with-default-mozilla-five-home=/usr/lib/kompozer ++ac_add_options --with-distribution-id=aur.archlinux.org ++ac_add_options --without-system-nspr ++ac_add_options --without-system-nss ++ ++#ac_add_options --disable-elf-dynstr-gc ++#ac_add_options --disable-gtktest ++ac_add_options --enable-strip ++#ac_add_options --disable-strip-lib ++ac_add_options --disable-updater ++ ++ac_add_options --enable-xinerama ++ac_add_options --enable-xpcom-fastload ++ ++ac_cv_visibility_pragma=no ++ ++ ++ diff --git a/pcr/lessc/PKGBUILD b/pcr/lessc/PKGBUILD new file mode 100644 index 000000000..ec9f8cf90 --- /dev/null +++ b/pcr/lessc/PKGBUILD @@ -0,0 +1,29 @@ +# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=lessc +pkgver=1.3.1 +pkgrel=1 +_commit=9a46f67f44ca908f7da36036c5b3ae83ef8188dc +pkgdesc="A standalone compiler for the LESS CSS language." +arch=('any') +url="http://lesscss.org/" +license=('Apache') +depends=('nodejs') +source=($pkgname-$pkgver.tar.gz::https://github.com/cloudhead/less.js/archive/$_commit.tar.gz) + +build() { + cd "$srcdir/less.js-$_commit" + make less +} + +package() { + cd "$srcdir/less.js-$_commit" + install -d "$pkgdir/usr/lib/node" + install -d "$pkgdir/usr/bin" + cp -r lib/less "$pkgdir/usr/lib/node/less" + ln -s "node/less" "$pkgdir/usr/lib/less" + install -Dm755 "bin/lessc" "$pkgdir/usr/bin/lessc" +} + +sha256sums=('43a2df3466c08e6d30ae0cd847febf981ef5d15d4d9d6ce86c1b1901154bb22a') diff --git a/pcr/libast/LICENSE.txt b/pcr/libast/LICENSE.txt new file mode 100644 index 000000000..67c75f783 --- /dev/null +++ b/pcr/libast/LICENSE.txt @@ -0,0 +1,21 @@ +/* + * Copyright (C) 1997-2004, Michael Jennings + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies of the Software, its documentation and marketing & publicity + * materials, and acknowledgment shall be given in the documentation, materials + * and software packages that this Software was used. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ diff --git a/pcr/libast/PKGBUILD b/pcr/libast/PKGBUILD new file mode 100644 index 000000000..ede9ab2ce --- /dev/null +++ b/pcr/libast/PKGBUILD @@ -0,0 +1,33 @@ +# $Id: PKGBUILD 40906 2011-03-01 14:45:04Z andrea $ +# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> +# Contributor: Adam 'battlemidget' Stokes <adam.stokes@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=libast +pkgver=0.7 +pkgrel=3 +pkgdesc="The Library of Assorted Spiffy Things." +arch=('i686' 'x86_64') +url="http://eterm.sourceforge.net" +license=('BSD') +depends=('imlib2' 'pcre' 'libsm') +options=('!libtool') +source=(http://www.eterm.org/download/${pkgname}-${pkgver}.tar.gz LICENSE.txt) +md5sums=('a9ec3b2da317f35869316e6d9571d296' + '97071898559acc4f900ceb6cb9579492') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + ./configure --prefix=/usr --with-x + make +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + make prefix=${pkgdir}/usr install + install -Dm644 ${srcdir}/LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} +md5sums=('a9ec3b2da317f35869316e6d9571d296' + '97071898559acc4f900ceb6cb9579492') diff --git a/pcr/libcacard/PKGBUILD b/pcr/libcacard/PKGBUILD new file mode 100755 index 000000000..0886b9847 --- /dev/null +++ b/pcr/libcacard/PKGBUILD @@ -0,0 +1,29 @@ +# Contributor: Jameson Pugh <imntreal@gmail.com> +# Maintainer : Parabola / GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=libcacard +pkgver=0.1.2 +pkgrel=3 +pkgdesc="Virtual Smart Card Emulator" +arch=('x86_64' 'i686') +url="http://spice-space.org" +license=('GPL') +options=('!libtool') +depends=('nss') +source=(http://spice-space.org/download/libcacard/$pkgname-$pkgver.tar.bz2) +md5sums=('ca61fd1d7feaa09e37011daac95c0168') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir/" install +} + +# vim:set ts=2 sw=2 et: +md5sums=('ca61fd1d7feaa09e37011daac95c0168') diff --git a/pcr/libdshconfig/PKGBUILD b/pcr/libdshconfig/PKGBUILD new file mode 100644 index 000000000..adf9d18b2 --- /dev/null +++ b/pcr/libdshconfig/PKGBUILD @@ -0,0 +1,20 @@ +# Contributor: SkiltZ <skiltz@free.fr> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=libdshconfig +pkgver=0.20.9 +pkgrel=2 +pkgdesc="Library for parsing dsh-style configuration files. Required by dsh and other applications." +arch=(i686 x86_64) +url="http://www.netfort.gr.jp/~dancer/software/dsh.html.en" +license=('GPL') +depends=('glibc') +source=(http://www.netfort.gr.jp/~dancer/software/downloads/libdshconfig-$pkgver.tar.gz) + + +build() { + cd $startdir/src/$pkgname-$pkgver + ./configure --prefix=/usr + make || return 1 + make prefix=$startdir/pkg/usr install + } diff --git a/pcr/libibus/PKGBUILD b/pcr/libibus/PKGBUILD new file mode 100644 index 000000000..1a934121a --- /dev/null +++ b/pcr/libibus/PKGBUILD @@ -0,0 +1,44 @@ +# $Id$ +# Contributor: Felix Yan <felixonmars@gmail.com> +# Contributor: Rainy <rainylau(at)gmail(dot)com> +# Contributor: Lee.MaRS <leemars at gmail dot com> +# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> +# Contributor: Brad Fanella <bradfanella@archlinux.us> +# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +_pkgbase=ibus +pkgname=lib$_pkgbase +pkgver=1.4.99.20121109 +pkgrel=1 +pkgdesc="Library for Next Generation Input Bus for Linux" +arch=('i686' 'x86_64') +url="http://ibus.googlecode.com" +license=('LGPL') +depends=('glib2') +makedepends=('gobject-introspection' 'dconf' 'iso-codes' 'intltool' 'gtk2' 'gtk3') +options=('!libtool') +provides=("$_pkgbase=$pkgver") +conflicts=('ibus') +source=(http://ibus.googlecode.com/files/${_pkgbase}-${pkgver}.tar.gz) + +build() { + cd "$srcdir/${_pkgbase}-${pkgver}" + export PYTHON=python2 + ./configure \ + --prefix=/usr \ + --libexecdir=/usr/lib/ibus \ + --sysconfdir=/etc \ + --disable-gconf \ + --enable-dconf \ + --disable-memconf \ + --enable-ui + make +} + +package() { + cd "$srcdir/${_pkgbase}-${pkgver}" + make DESTDIR="${pkgdir}" install-pkgconfigDATA + cd src + make DESTDIR="${pkgdir}" install +} +md5sums=('be482479357210283e91a47f43a0a0fe') diff --git a/pcr/libnatpmp/PKGBUILD b/pcr/libnatpmp/PKGBUILD new file mode 100644 index 000000000..0fa0ff469 --- /dev/null +++ b/pcr/libnatpmp/PKGBUILD @@ -0,0 +1,28 @@ +# Maintainer: Pierre Bourdon <delroth@gmail.com> +# Maintainer: Parabola Gnu / Linux-libre Aurélien Desbrières + +pkgname=libnatpmp +pkgver=20120821 +pkgrel=1 +pkgdesc="A portable and fully compliant implementation of the NAT-PMP protocol" +arch=('i686' 'x86_64') +url="http://miniupnp.free.fr/libnatpmp.html" +license=('custom:BSD') +depends=('glibc') +makedepends=() +source=(http://miniupnp.free.fr/files/download.php?file=libnatpmp-$pkgver.tar.gz) + +build() { + cd "$srcdir/$pkgname-$pkgver" + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make INSTALLPREFIX="$pkgdir/usr" \ + INSTALLDIRINC="$pkgdir/usr/include/libnatpmp" install + + # Needed by some packages + install -m 644 getgateway.h declspec.h "$pkgdir/usr/include/libnatpmp" +} +md5sums=('22a1225b890471a7750a9bf26eb863f7') diff --git a/pcr/libpng12/PKGBUILD b/pcr/libpng12/PKGBUILD new file mode 100644 index 000000000..df75ddeaa --- /dev/null +++ b/pcr/libpng12/PKGBUILD @@ -0,0 +1,48 @@ +# $Id: PKGBUILD 58551 2009-11-08 22:37:12Z eric $ +# Contributor: dorphell <archlinux.org: dorphell> +# Contributor: Travis Willard <archlinux.org: travis> +# Contributor: Douglas Soares de Andrade <archlinux.org: douglas> +# Maintainer: Jesse Jaara <gmail.com: jesse.jaara> + +pkgname=libpng12 +_realname=libpng +pkgver=1.2.50 +pkgrel=1 +pkgdesc="A collection of routines used to create PNG format graphics files" +arch=('i686' 'x86_64') +url="http://www.libpng.org/pub/png/libpng.html" +license=('custom') +depends=('zlib') +options=('!libtool') +source=("http://sourceforge.net/projects/libpng/files/libpng-${pkgver}.tar.xz" + "http://sourceforge.net/projects/apng/files/libpng/libpng12/libpng-${pkgver}-apng.patch.gz") + +build() { + cd "${srcdir}/${_realname}-${pkgver}" + + patch -Np0 -i "${srcdir}/libpng-${pkgver}-apng.patch" + + libtoolize --force --copy + aclocal + autoconf + automake --add-missing + + ./configure --prefix=/usr + + make ECHO=echo +} + +package() { + cd "${srcdir}/${_realname}-${pkgver}" + + make ECHO=echo DESTDIR="${pkgdir}" install + + rm -rf "${pkgdir}/usr/share" + rm -rf "${pkgdir}/usr/bin/libpng-config" + rm -rf "${pkgdir}/usr/lib/"{libpng.so,libpng.a} + rm -fr "${pkgdir}/usr/lib/pkgconfig/libpng.pc" + rm -rf "${pkgdir}/usr/include/"{pngconf.h,png.h} +} + +md5sums=('a3e00fccbfe356174ab515b5c00641c7' + 'b06ac3f6a6f982abc2036359665e82a9') diff --git a/pcr/libtxc_dxtn/PKGBUILD b/pcr/libtxc_dxtn/PKGBUILD new file mode 100644 index 000000000..d491ed6fb --- /dev/null +++ b/pcr/libtxc_dxtn/PKGBUILD @@ -0,0 +1,29 @@ +# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=libtxc_dxtn +pkgver=1.0.1 +pkgrel=2 +arch=(i686 x86_64) +pkgdesc="Texture compression library for Mesa" +url="http://dri.freedesktop.org/wiki/S3TC" +license=(custom:BSD) +depends=(mesa) +options=(!libtool) +source=(http://people.freedesktop.org/~cbrill/$pkgname/$pkgname-$pkgver.tar.bz2) + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + + # License + mkdir -p "$pkgdir/usr/share/licenses/$pkgname" + sed -n '5,22{s|^ \* \?||;p}' txc_dxtn.h \ + > "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/pcr/liburcu/PKGBUILD b/pcr/liburcu/PKGBUILD new file mode 100644 index 000000000..ced12e005 --- /dev/null +++ b/pcr/liburcu/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +pkgname=liburcu +pkgver=0.7.5 +pkgrel=1 +pkgdesc="LGPLv2.1 userspace RCU (read-copy-update) library" +arch=('i686' 'x86_64') +url="http://lttng.org/urcu" +license=('LGPL2.1') +source=(http://lttng.org/files/urcu/userspace-rcu-${pkgver}.tar.bz2) +md5sums=('2c5083fac662ecd38d6076dffa86259b') + +build() { + cd ${srcdir}/userspace-rcu-${pkgver} + ./configure --prefix=/usr + make +} + +package() { + cd ${srcdir}/userspace-rcu-${pkgver} + make DESTDIR=${pkgdir} install +} diff --git a/pcr/maruku/PKGBUILD b/pcr/maruku/PKGBUILD new file mode 100644 index 000000000..a647e5a12 --- /dev/null +++ b/pcr/maruku/PKGBUILD @@ -0,0 +1,24 @@ +# Contributor: Adam Lloyd <lloyda2 (at) rpi (dot) edu> +# Maintainter : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=maruku +pkgver=0.6.0 +pkgrel=1 +pkgdesc="A Markdown-superset interpreter" +arch=(any) +url="http://maruku.rubyforge.org/" +license=('GPL2') +depends=(ruby ruby-syntax) +makedepends=(rubygems) +source=(http://gems.rubyforge.org/gems/maruku-$pkgver.gem) +noextract=(maruku-$pkgver.gem) +md5sums=('6e2575e43b675eb4e15bbcee0fd1fd29') + +build() { + cd $srcdir + local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" + gem install --ignore-dependencies -i "$pkgdir$_gemdir" maruku-$pkgver.gem +} + +# vim:set ts=2 sw=2 et: +md5sums=('6e2575e43b675eb4e15bbcee0fd1fd29') diff --git a/pcr/mednafen-wip/PKGBUILD b/pcr/mednafen-wip/PKGBUILD index 2abee7f46..c3e5d6137 100755 --- a/pcr/mednafen-wip/PKGBUILD +++ b/pcr/mednafen-wip/PKGBUILD @@ -8,7 +8,7 @@ pkgbase=mednafen pkgname=mednafen-wip pkgver=0.9.26 _pkgver=422 -pkgrel=1 +pkgrel=2 pkgdesc='A command-line multi-system gaming emulator, WIP version' url="http://$pkgbase.sourceforge.net/" license=( @@ -20,7 +20,7 @@ arch=( mips64el ) depends=( - jack2 + jack 'libcdio>=0.83' sdl-libre ) diff --git a/pcr/mit-scheme/PKGBUILD b/pcr/mit-scheme/PKGBUILD new file mode 100644 index 000000000..f769acfc8 --- /dev/null +++ b/pcr/mit-scheme/PKGBUILD @@ -0,0 +1,80 @@ +# Contributor: peter feigl <peter.feigl@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=mit-scheme +pkgver=9.1.1 +pkgrel=1 +pkgdesc="MIT/GNU Scheme" +arch=('x86_64' i686) +license=('GPL') +url="http://www.gnu.org/software/mit-scheme/" +groups= +provides=('mit-scheme') +depends=('libx11' 'texinfo' 'texlive-core') +optdepends=('mhash: support for mhash' 'gdbm: support for gdbm' + 'postgresql-libs: support for postresql' 'openssl: support for openssl' + 'mcrypt: support for mcrypt' 'db: support for berkeley db') +_my_arch=$(uname -m) +if [ ${_my_arch} = "x86_64" ] +then +_my_arch="x86-64" +md5sums=('268cb5ac97646f34742828ebc370586d') +else +_my_arch="i386" +md5sums=('e35590a06549d71edba723a719329070') +fi + +source=("http://ftp.gnu.org/gnu/mit-scheme/stable.pkg/${pkgver}/${pkgname}-${pkgver}-${_my_arch}.tar.gz") + +build() { + cd $startdir/src/${pkgname}-${pkgver}/src + ./configure --with-x --enable-native-code --prefix=/usr || return 1 + make compile-microcode || return 1 + make DESTDIR=${pkgdir} install || return 1 + # TODO: add indexer + echo Making Documentation + cd ../doc && ./configure --prefix=/usr && make -j 1 && make DESTDIR=${pkgdir} install && rm ${pkgdir}/usr/share/info/dir && mv ${pkgdir}/usr/share/man/man1/scheme.1 ${pkgdir}/usr/share/man/man1/mit-scheme.1 || return 0 +} + + +infodir=usr/share/info + +filelist=(mit-scheme-ffi.info mit-scheme-imail.info mit-scheme-ref.info mit-scheme-sos.info mit-scheme-user.info) + + + +post_install() { + + [[ -x usr/bin/install-info ]] || return 0 + + for file in "${filelist[@]}"; do + + install-info "$infodir/$file.gz" "$infodir/dir" 2> /dev/null + + done + +} + + + +post_upgrade() { + + post_install "$1" + +} + + + +pre_remove() { + + [[ -x usr/bin/install-info ]] || return 1 + + for file in "${filelist[@]}"; do + + install-info --delete "$infodir/$file.gz" "$infodir/dir" 2>/dev/null + + done + +} + +md5sums=('e35590a06549d71edba723a719329070') diff --git a/pcr/moblock/MoBlock-nfq.sh.patch b/pcr/moblock/MoBlock-nfq.sh.patch new file mode 100644 index 000000000..f9136c3c7 --- /dev/null +++ b/pcr/moblock/MoBlock-nfq.sh.patch @@ -0,0 +1,53 @@ +--- MoBlock-0.8/MoBlock-nfq.sh.orig 2008-11-30 03:44:02.000000000 -0500 ++++ MoBlock-0.8/MoBlock-nfq.sh 2008-12-01 18:56:15.000000000 -0500 +@@ -3,14 +3,10 @@ + # MoBlock.sh - MoBlock start script + # --------------------------------- + +-ACTIVATE_CHAINS=1 +-WHITE_TCP_IN="" +-WHITE_UDP_IN="" +-WHITE_TCP_OUT="" +-WHITE_UDP_OUT="" +-WHITE_TCP_FORWARD="" +-WHITE_UDP_FORWARD="" ++# Some configuration options have been moved to an external conf file ++# This should make maintenance and upgrading easier + ++. /etc/moblock/config + + PIDF=/var/run/moblock.pid + +@@ -78,6 +74,17 @@ + iptables -I MOBLOCK_FW -p udp --dport $PORT -j ACCEPT + done + ++# For added IP whitelisting support ++ ++for IP in $WHITE_IP_OUT; do ++ iptables -I MOBLOCK_OUT -p all -m iprange --dst-range $IP -j ACCEPT ++done ++for IP in $WHITE_IP_IN; do ++ iptables -I MOBLOCK_IN -p all -m iprange --src-range $IP -j ACCEPT ++done ++for IP in $WHITE_IP_FW; do ++ iptables -I MOBLOCK_FW -p all -m iprange --dst-range $IP -j ACCEPT ++done + + # Loopback traffic fix + +@@ -85,7 +92,8 @@ + iptables -I OUTPUT -p all -o lo -j ACCEPT + + # Here you can change block list and log files +-./moblock -p /etc/guarding.p2p ./moblock.log ++#./moblock -p /etc/guarding.p2p ./moblock.log ++/usr/bin/moblock -p /etc/moblock/banned.list /var/log/moblock.log >/dev/null 2>&1 + + # On exit delete the rules we added + +@@ -108,3 +116,4 @@ + if [ -f $PIDF ]; then + rm $PIDF; + fi ++ diff --git a/pcr/moblock/PKGBUILD b/pcr/moblock/PKGBUILD new file mode 100755 index 000000000..15504d1c1 --- /dev/null +++ b/pcr/moblock/PKGBUILD @@ -0,0 +1,55 @@ +# Contributor: Kevin Edmonds <edmondskevin@hotmail.com> +# Contributor: Filip Wojciechowski, filip at loka dot pl +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=moblock +pkgver=0.9rc2 +pkgrel=8 +pkgdesc="Console application that blocks connections from/to hosts listed in a file in peerguardian format" +arch=('i686' 'x86_64') +url="http://moblock.berlios.de/" +license=('GPL') +depends=(libnetfilter_queue iptables) +backup=(etc/moblock/config) +install=moblock.install +source=(http://download.berlios.de/moblock/MoBlock-0.8-i586.tar.bz2 \ + moblock_0.9_rc2.patch \ + MoBlock-nfq.sh.patch \ + moblock_include.patch \ + config \ + moblock-update \ + moblock \ + moblock.logrotate) + +build() { + cd $startdir/src/MoBlock-0.8 + + # patch to update moblock to the latest cvs version + patch -Np1 -i ../moblock_0.9_rc2.patch || return 1 + # add IP whitelisting and move configs to a separate conf file + patch -Np1 -i ../MoBlock-nfq.sh.patch || return 1 + # necessary to make moblock build with recent kernels + patch -Np1 -i ../moblock_include.patch || return 1 + + # change the CFLAGS for both i686 and x84_64 builds + sed -i "s#-Wall -O.*-ffast-math#$CFLAGS#g" Makefile + + # build + make || return 1 + + #move the files + install -D -m 755 ./MoBlock-nfq.sh $startdir/pkg/usr/bin/moblock-nfq || return 1 + install -D -m 744 ./moblock $startdir/pkg/usr/bin/moblock || return 1 + install -D -m 755 ../moblock-update $startdir/pkg/usr/bin/moblock-update || return 1 + install -D -m 744 ../moblock $startdir/pkg/etc/rc.d/moblock || return 1 + install -D -m 644 ../config $startdir/pkg/etc/moblock/config || return 1 + install -D -m 644 ../moblock.logrotate $startdir/pkg/etc/logrotate.d/moblock || return 1 +} +md5sums=('199967adb48b153be90db10fe21325c5' + 'e4e33c515677fa53eaca4616591d4e44' + 'e9f3c6b09f5e07dee948450780340ea3' + 'b23b5214965df59632de5cec317ddbde' + '840bb52a99529305e49212a69c9ced8a' + '49a16feb221d4d912cc7200313517f7b' + '1bdc949fcff0ce751a5096e489061513' + 'a8285fd3e68043cd8d21993d3dbbf9d4') diff --git a/pcr/moblock/config b/pcr/moblock/config new file mode 100644 index 000000000..7d7c287cc --- /dev/null +++ b/pcr/moblock/config @@ -0,0 +1,30 @@ +# Original MoBlock configuration options from MoBlock-nfq.sh file +ACTIVATE_CHAINS=1 +WHITE_TCP_IN="" +WHITE_UDP_IN="" +WHITE_TCP_OUT="" # Add "http https" here to prevent moblock from blocking webpages +WHITE_UDP_OUT="" +WHITE_TCP_FORWARD="" +WHITE_UDP_FORWARD="" + +# Added IP whitelisting support +WHITE_IP_IN="" +WHITE_IP_OUT="" +WHITE_IP_FW="" + +# Individual lists can be disabled by prefixing them with '!' +# Bluetack blacklists (http://www.bluetack.co.uk) +BLUETACK=(level1 level2 !level3 !edu ads-trackers-and-bad-pr0n bogon spyware spider Microsoft !proxy hijacked templist !rangetest dshield) + +# blocklist.org lists (currently doesn't work) +#BLOCKLIST=(p2p gov spy ads edu) + +# backup lists (might be outdated) +#PHOENIXLABS=(!p2b.p2b edu.txt spider.txt spyware.txt level1.txt !level2.txt !level3.txt) + +# Change to 'yes' if you want to backup up the old list before writing +# a new one. Only one backup copy will be kept. +BACKUP_OLD_LIST="no" + +# Options passed to wget +WGET_OPTS="-q" diff --git a/pcr/moblock/moblock b/pcr/moblock/moblock new file mode 100755 index 000000000..d88bd2e8d --- /dev/null +++ b/pcr/moblock/moblock @@ -0,0 +1,70 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting MoBlock" + if [ ! -f /var/run/moblock.pid ] + then + /usr/bin/moblock-nfq & + if [ $? -gt 0 ] + then + stat_fail + else + add_daemon moblock + stat_done + fi + else + stat_fail + fi + ;; + update) + stat_busy "Updating MoBlock block list..." + error=0 + /usr/bin/moblock-update || error=1 + stat_busy "Updating MoBlock block list" + if [ $error -eq 1 ]; then + stat_fail + else + stat_done + fi + ;; + stats) + stat_busy "Logging stats to /var/log/MoBlock.stats" + PID=`cat /var/run/moblock.pid 2>/dev/null` + if [ ! -z "$PID" ]; then + /bin/kill -USR2 $PID + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + else + stat_fail + fi + ;; + stop) + stat_busy "Stopping MoBlock" + PID=`cat /var/run/moblock.pid 2>/dev/null` + if [ ! -z "$PID" ]; then + /bin/kill $PID + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon moblock + stat_done + fi + else + stat_fail + fi + ;; + restart) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart|update|stats}" +esac diff --git a/pcr/moblock/moblock-update b/pcr/moblock/moblock-update new file mode 100755 index 000000000..aae861d13 --- /dev/null +++ b/pcr/moblock/moblock-update @@ -0,0 +1,174 @@ +#!/bin/bash + +. /etc/moblock/config + +CONF_DIR=/etc/moblock +TEMP_DIR=$(/usr/bin/mktemp -t -d moblock-updateXXXXXXXX) +LIST_FILE=banned.list + +USECOLOR="no" +. /etc/rc.d/functions +PREFIX_REG=" >" +PREFIX_HL="::" + +function extract() +{ + /usr/bin/find $TEMP_DIR -type f -name '*.gz' -o -name '*.zip' |\ + while read N + do + case "$N" in + *.zip) /usr/bin/unzip -oqq "$N" 2>/dev/null + if [ $? -gt 0 ]; then + rm -f "$N" + return 1 + else + rm -f "$N" + fi + ;; + *.gz) /bin/gunzip -f "$N" 2>/dev/null + if [ $? -gt 0 ]; then + rm -f "$N" + return 1 + fi + ;; + *) continue + ;; + esac + done + return 0 +} + +cd $TEMP_DIR + +printf "${C_SEPARATOR} ------------------------------\n" +printhl "Downloading and extracting files:\n" + +# Bluetack lists (with fallback) +for i in ${BLUETACK[@]} +do + if [ $(echo $i | /bin/grep '^[^\!]' | /usr/bin/wc -l) -eq 1 ]; then + stat_busy "BLUETACK '${i}'... " + /usr/bin/wget ${WGET_OPTS} "http://www.bluetack.co.uk/config/${i}.gz" && extract + if [ $? -gt 0 ] || [ ! -f ${i} ]; then + stat_fail + bfile=$i + if [ "$bfile" = "ads-trackers-and-bad-pr0n" ]; then + bfile="ads" + elif [ "$bfile" = "Microsoft" ];then + bfile="microsoft" + fi + stat_busy "[!!] BLUETACK '${i}' (fallback link)... " + /usr/bin/wget ${WGET_OPTS} "http://list.iblocklist.com/?list=bt_${bfile%%-*}" -O "${i}.gz" && extract + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + else + stat_done + fi + fi +done + +# Blocklist lists +for i in ${BLOCKLIST[@]} +do + if [ $(echo $i | /bin/grep '^[^\!]' | /usr/bin/wc -l) -eq 1 ]; then + stat_busy "BLOCKLIST '${i}'... " + /usr/bin/wget ${WGET_OPTS} "blocklist.org/${i}.p2b.gz" && extract + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + fi +done + +# Old phoenixlabs.org lists +for i in ${PHOENIXLABS[@]} +do + if [ $(echo $i | /bin/grep '^[^\!]' | /usr/bin/wc -l) -eq 1 ]; then + stat_busy "PHOENIXLABS '${i}'... " + /usr/bin/wget ${WGET_OPTS} "fox.phoenixlabs.org/${i}" && extract + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + fi +done + +if [ $(/bin/cat "$TEMP_DIR"/* | /usr/bin/wc -l) -eq 0 ]; then + printf "\n" + printhl "ERROR: No files were downloaded" + printf "${C_SEPARATOR} ------------------------------\n" + exit 1 +fi + +# Check files +printsep +printhl "Checking integrity of downloaded files:\n" + +/usr/bin/find -type f | while read N +do + stat_busy "File '$(echo $N | /bin/awk -F/ '{print $NF}')'... " + scan1=$(/bin/cat "$N" | /usr/bin/wc -l) + scan2=$(/bin/egrep -o ":[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*-[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" "$N" | /usr/bin/wc -l) + if [ $scan1 -eq $scan2 ]; then + stat_done + else + if [ $scan2 -gt 0 ]; then + if [ $scan1 -gt $scan2 ]; then + stat_append "$(($scan1-$scan2)) of $scan1 entries failed validation; keeping the file" + stat_done + fi + else + stat_fail + stat_busy "[!!] Removing corrupted file... " + rm "$N" 2>/dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + stat_done + fi + fi + fi +done + +printsep +printhl "Saving the list:\n" + +# Make backup +if [ "$BACKUP_OLD_LIST" = "yes" ] && [ -f "$CONF_DIR"/"$LIST_FILE" ]; then + stat_busy "Backing up old list to '$CONF_DIR/$LIST_FILE.gz'... " + /bin/gzip -f "$CONF_DIR"/"$LIST_FILE" 2>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi +fi + +# Save the list +stat_busy "Saving new list to '$CONF_DIR/$LIST_FILE'... " +/bin/cat "$TEMP_DIR"/* > "$CONF_DIR"/"$LIST_FILE" 2>&1 +if [ $? -gt 0 ]; then + stat_fail + exit 1 +else + stat_done + printf "\n" + printhl "Saved `cat "$CONF_DIR"/"$LIST_FILE" | wc -l` ranges" + printf "${C_SEPARATOR} ------------------------------\n" +fi + +rm -rf "$TEMP_DIR" + +# Restart MoBlock +if [ -f /var/run/moblock.pid ]; then + /bin/kill -HUP `cat /var/run/moblock.pid` >/dev/null 2>&1 +fi + +exit 0 + diff --git a/pcr/moblock/moblock.install b/pcr/moblock/moblock.install new file mode 100644 index 000000000..6afe1d5d9 --- /dev/null +++ b/pcr/moblock/moblock.install @@ -0,0 +1,26 @@ +post_install() { + #clean up after an old hack + if [ -h /usr/lib/libnfnetlink.so.1 ]; then + rm /usr/lib/libnfnetlink.so.1 + fi + echo "" + echo ">>> moblock-update script no longer uses /var/spool/moblock" + echo ">>> as a temporary directory. You can safely delete it." + echo "" +} + +post_upgrade() { + #clean up after an old hack + if [ -h /usr/lib/libnfnetlink.so.1 ]; then + rm /usr/lib/libnfnetlink.so.1 + fi + echo "" + echo ">>> moblock-update script no longer uses /var/spool/moblock" + echo ">>> as a temporary directory. You can safely delete it." + echo "" +} + +op=$1 +shift +$op $* + diff --git a/pcr/moblock/moblock.logrotate b/pcr/moblock/moblock.logrotate new file mode 100644 index 000000000..6ed64bb81 --- /dev/null +++ b/pcr/moblock/moblock.logrotate @@ -0,0 +1,11 @@ +"/var/log/moblock.log" /var/log/MoBlock.stats { + daily + missingok + notifempty + sharedscripts + postrotate + /usr/bin/test -f /var/run/moblock.pid && /bin/kill -HUP `cat /var/run/moblock.pid 2>/dev/null` 2>/dev/null || exit 0 + endscript + compress +} + diff --git a/pcr/moblock/moblock_0.9_rc2.patch b/pcr/moblock/moblock_0.9_rc2.patch new file mode 100644 index 000000000..69994ffe8 --- /dev/null +++ b/pcr/moblock/moblock_0.9_rc2.patch @@ -0,0 +1,912 @@ +diff -Naur MoBlock-0.8_orig/Changelog MoBlock-0.8/Changelog +--- MoBlock-0.8_orig/Changelog 2006-03-22 12:44:31.000000000 -0500 ++++ MoBlock-0.8/Changelog 2008-02-10 11:56:08.000000000 -0500 +@@ -4,6 +4,23 @@ + + --- + ++0.9: - fix for kernel 2.6.23 ++ - support for MARKing packets instead of DROPping or ++ ACCEPTing ++ - example start script that REJECTs packets instead of ++ DROPping. ++ - Integrated a patch from David Walluck for proper loading ++ of p2b files (version 2) ++ - command line options for logging to syslog, stdout ++ and log timestamping ++ - fixed loading pg1 lists with comments (lines starting ++ with '#') ++ - fixed a bug in ranges merge ++ - applied patch 2223 by badfish99: "IPs logged with bytes ++ reversed on big-endian m/c" ++ ++--- ++ + 0.8: - support for NFQUEUE-ing from iptables FORWARD chain (thx to + hyakki for suggestions and testing!) + - included patches from Maximilian Mehnert to support log file +diff -Naur MoBlock-0.8_orig/Makefile MoBlock-0.8/Makefile +--- MoBlock-0.8_orig/Makefile 2006-03-22 12:44:31.000000000 -0500 ++++ MoBlock-0.8/Makefile 2007-11-22 08:10:44.000000000 -0500 +@@ -1,4 +1,3 @@ +- + # To use the old-soon-to-be-deprecated libipq interface + # uncomment the following line and comment the NFQUEUE one, + # then comment the gcc line with netfilter_queue and +@@ -7,7 +6,7 @@ + #QUEUE_LIB=LIBIPQ + QUEUE_LIB=NFQUEUE + +-CFLAGS=-Wall -O2 -march=i586 -mtune=i686 -fomit-frame-pointer -ffast-math \ ++CFLAGS=-Wall -O3 -march=i586 -mtune=i686 -fomit-frame-pointer -ffast-math \ + -D_GNU_SOURCE -D$(QUEUE_LIB) -L/usr/include/libipq + CC=gcc + +diff -Naur MoBlock-0.8_orig/MoBlock-nfq-reject.sh MoBlock-0.8/MoBlock-nfq-reject.sh +--- MoBlock-0.8_orig/MoBlock-nfq-reject.sh 1969-12-31 19:00:00.000000000 -0500 ++++ MoBlock-0.8/MoBlock-nfq-reject.sh 2007-11-22 08:10:44.000000000 -0500 +@@ -0,0 +1,104 @@ ++#!/bin/sh ++# ++# MoBlock.sh - MoBlock start script ++# --------------------------------- ++ ++ACTIVATE_CHAINS=1 ++WHITE_TCP_IN="" ++WHITE_UDP_IN="" ++WHITE_TCP_OUT="" ++WHITE_UDP_OUT="" ++WHITE_TCP_FORWARD="" ++WHITE_UDP_FORWARD="" ++REJECT_MARK="10" ++ ++PIDF=/var/run/moblock.pid ++ ++FNAME=`basename $0 .sh` ++MODE=`echo $FNAME|awk -F- '{print $2}'` ++ ++if [ -f $PIDF ]; then ++ PID=`cat $PIDF` ++ if [ `ps -p $PID|wc -l` -gt 1 ]; then ++ echo "$0: $PIDF exists and processs seems to be running. Exiting." ++ exit 1; ++ fi; ++fi; ++ ++if [ $MODE == "ipq" ]; then ++ modprobe ip_queue ++ TARGET="QUEUE" ++elif [ $MODE == "nfq" ]; then ++ modprobe ipt_NFQUEUE ++ TARGET="NFQUEUE" ++fi; ++ ++modprobe ipt_state ++ ++# Filter all traffic, edit for your needs ++ ++iptables -N MOBLOCK_IN ++iptables -N MOBLOCK_OUT ++iptables -N MOBLOCK_FW ++ ++if [ $ACTIVATE_CHAINS -eq 1 ]; then ++ iptables -I INPUT -p all -m state --state NEW -j MOBLOCK_IN ++ iptables -I OUTPUT -p all -m state --state NEW -j MOBLOCK_OUT ++ iptables -I FORWARD -p all -m state --state NEW -j MOBLOCK_FW ++fi; ++ ++ ++iptables -I MOBLOCK_IN -p all -j $TARGET ++ ++iptables -I MOBLOCK_OUT -p all -j $TARGET ++ ++iptables -I MOBLOCK_FW -p all -j $TARGET ++ ++for PORT in $WHITE_TCP_OUT; do ++ iptables -I MOBLOCK_OUT -p tcp --dport $PORT -j ACCEPT ++done ++for PORT in $WHITE_UDP_OUT; do ++ iptables -I MOBLOCK_OUT -p udp --dport $PORT -j ACCEPT ++done ++ ++for PORT in $WHITE_TCP_IN; do ++ iptables -I MOBLOCK_IN -p tcp --dport $PORT -j ACCEPT ++done ++for PORT in $WHITE_UDP_IN; do ++ iptables -I MOBLOCK_IN -p udp --dport $PORT -j ACCEPT ++done ++ ++for PORT in $WHITE_TCP_FORWARD; do ++ iptables -I MOBLOCK_FW -p tcp --dport $PORT -j ACCEPT ++done ++for PORT in $WHITE_UDP_FORWARD; do ++ iptables -I MOBLOCK_FW -p udp --dport $PORT -j ACCEPT ++done ++ ++iptables -I OUTPUT -p all -m state --state NEW -m mark --mark $REJECT_MARK -j REJECT ++iptables -I FORWARD -p all -m state --state NEW -m mark --mark $REJECT_MARK -j REJECT ++ ++# Here you can change block list and log files ++./moblock -d /etc/ipfilter.dat -t -s -r $REJECT_MARK ./moblock.log ++ ++# On exit delete the rules we added ++ ++if [ $ACTIVATE_CHAINS -eq 1 ]; then ++ iptables -D INPUT -p all -m state --state NEW -j MOBLOCK_IN ++ iptables -D OUTPUT -p all -m state --state NEW -j MOBLOCK_OUT ++ iptables -D FORWARD -p all -m state --state NEW -j MOBLOCK_FW ++fi; ++ ++iptables -D OUTPUT -p all -m state --state NEW -m mark --mark $REJECT_MARK -j REJECT ++iptables -D FORWARD -p all -m state --state NEW -m mark --mark $REJECT_MARK -j REJECT ++ ++iptables -F MOBLOCK_IN ++iptables -X MOBLOCK_IN ++iptables -F MOBLOCK_OUT ++iptables -X MOBLOCK_OUT ++iptables -F MOBLOCK_FW ++iptables -X MOBLOCK_FW ++ ++if [ -f $PIDF ]; then ++ rm $PIDF; ++fi +diff -Naur MoBlock-0.8_orig/MoBlock.c MoBlock-0.8/MoBlock.c +--- MoBlock-0.8_orig/MoBlock.c 2006-03-22 12:44:31.000000000 -0500 ++++ MoBlock-0.8/MoBlock.c 2008-02-10 11:56:08.000000000 -0500 +@@ -35,6 +35,8 @@ + #include <linux/netfilter_ipv4.h>
+ #include <signal.h>
+ #include <regex.h>
++#include <time.h>
++#include <syslog.h>
+
+ // in Makefile define LIBIPQ to use soon-to-be-deprecated ip_queue,
+ // NFQUEUE for ipt_NFQUEUE (from kernel 2.6.14)
+@@ -46,7 +48,7 @@ + #include <libnetfilter_queue/libnetfilter_queue.h>
+ #endif
+
+-#define MB_VERSION "0.8"
++#define MB_VERSION "0.9rc2"
+
+ #define BUFSIZE 2048
+ #define PAYLOADSIZE 21
+@@ -58,6 +60,9 @@ + #define SRC_ADDR(payload) (*(in_addr_t *)((payload)+12))
+ #define DST_ADDR(payload) (*(in_addr_t *)((payload)+16))
+
++#define likely(x) __builtin_expect((x),1)
++#define unlikely(x) __builtin_expect((x),0)
++
+ // rbt datatypes/functions
+
+ typedef enum {
+@@ -96,7 +101,8 @@ + char filename[100];
+ } blocklist_info;
+
+-int merged_ranges=0, skipped_ranges=0;
++u_int32_t merged_ranges=0, skipped_ranges=0, accept_mark=0, reject_mark=0;
++u_int8_t log2syslog=0, log2file=0, log2stdout=0, timestamp=0;
+
+ #ifdef LIBIPQ
+ static void die(struct ipq_handle *h)
+@@ -112,11 +118,13 @@ + static char buf[2][ sizeof("aaa.bbb.ccc.ddd") ];
+ static short int index=0;
+
++ ip = ntohl(ip);
++
+ sprintf(buf[index],"%d.%d.%d.%d",
+- (ip) & 0xff,
+- (ip >> 8) & 0xff,
++ (ip >> 24) & 0xff,
+ (ip >> 16) & 0xff,
+- (ip >> 24) & 0xff);
++ (ip >> 8) & 0xff,
++ (ip) & 0xff);
+
+ if (index) {
+ index=0;
+@@ -134,10 +142,38 @@ + fflush(stdout);
+ }
+
++void log_action(char *msg)
++{
++ char timestr[30];
++ time_t tv;
++
++ if (timestamp) {
++ tv = time(NULL);
++ strncpy(timestr, ctime(&tv), 19);
++ timestr[19] = '\0';
++ strcat(timestr, "| ");
++ }
++ else strcpy(timestr, "");
++
++ if (log2syslog) {
++ syslog(LOG_INFO, msg);
++ }
++
++ if (log2file) {
++ fprintf(logfile,"%s%s",timestr,msg);
++ fflush(logfile);
++ }
++
++ if (log2stdout) {
++ fprintf(stdout,"%s%s",timestr,msg);
++ }
++}
++
+ inline void ranged_insert(char *name,char *ipmin,char *ipmax)
+ {
+ recType tmprec;
+ int ret;
++ char msgbuf[255];
+
+ if ( strlen(name) > (BNAME_LEN-1) ) {
+ strncpy(tmprec.blockname, name, BNAME_LEN);
+@@ -149,10 +185,11 @@ + if ( (ret=insert(ntohl(inet_addr(ipmin)),&tmprec)) != STATUS_OK )
+ switch(ret) {
+ case STATUS_MEM_EXHAUSTED:
+- fprintf(logfile,"Error inserting range, MEM_EXHAUSTED.\n");
++ log_action("Error inserting range, MEM_EXHAUSTED.\n");
+ break;
+ case STATUS_DUPLICATE_KEY:
+- fprintf(logfile,"Duplicated range ( %s )\n",name);
++ sprintf(msgbuf,"Duplicated range ( %s )\n",name);
++ log_action(msgbuf);
+ break;
+ case STATUS_MERGED:
+ merged_ranges++;
+@@ -161,8 +198,9 @@ + skipped_ranges++;
+ break;
+ default:
+- fprintf(logfile,"Unexpected return value from ranged_insert()!\n");
+- fprintf(logfile,"Return value was: %d\n",ret);
++ log_action("Unexpected return value from ranged_insert()!\n");
++ sprintf(msgbuf,"Return value was: %d\n",ret);
++ log_action(msgbuf);
+ break;
+ }
+ }
+@@ -177,15 +215,19 @@ + regex_t regmain;
+ regmatch_t matches[4];
+ int i;
++ char msgbuf[255];
+
+ regcomp(®main, "^(.*)[:]([0-9.]*)[-]([0-9.]*)$", REG_EXTENDED);
+
+ fp=fopen(filename,"r");
+ if ( fp == NULL ) {
+- fprintf(logfile,"Error opening %s, aborting...\n", filename);
++ sprintf(msgbuf,"Error opening %s, aborting...\n", filename);
++ log_action(msgbuf);
+ exit(-1);
+ }
+ while ( (count=getline(&line,&len,fp)) != -1 ) {
++ if ( line[0] == '#' ) //comment line, skip
++ continue;
+ for(i=count-1; i>=0; i--) {
+ if ((line[i] == '\r') || (line[i] == '\n') || (line[i] == ' ')) {
+ line[i] = 0;
+@@ -207,36 +249,78 @@ + line+matches[3].rm_so);
+ ntot++;
+ } else {
+- fprintf(logfile,"Short guarding.p2p line %s, skipping it...\n", line);
++ sprintf(msgbuf,"Short guarding.p2p line %s, skipping it...\n", line);
++ log_action(msgbuf);
+ }
+ }
+ if (line)
+ free(line);
+ fclose(fp);
+- fprintf(logfile,"Ranges loaded: %d\n",ntot);
+- printf("* Ranges loaded: %d\n",ntot);
++ sprintf(msgbuf, "* Ranges loaded: %d\n", ntot);
++ log_action(msgbuf);
++ if ( !log2stdout )
++ printf(msgbuf);
+ }
+
+-void loadlist_pg2(char *filename) // experimental, no check for list sanity
++void loadlist_pg2(char *filename) // supports only v2 files
+ {
+ FILE *fp;
+- int i,retval,ntot=0;
+- char name[100],ipmin[16]; // hope we don't have a list with longer names...
++ int i, j, c, retval=0, ntot=0;
++ char name[100],ipmin[16], msgbuf[255]; // hope we don't have a list with longer names...
+ uint32_t start_ip, end_ip;
+ struct in_addr startaddr,endaddr;
++ size_t s;
+
+ fp=fopen(filename,"r");
+ if ( fp == NULL ) {
+- fprintf(logfile,"Error opening %s, aborting...\n", filename);
++ sprintf(msgbuf, "Error opening %s, aborting...\n", filename);
++ log_action(msgbuf);
+ exit(-1);
+ }
+
+- fgetc(fp); // skip first 4 bytes, don't know what they are
+- fgetc(fp);
+- fgetc(fp);
+- retval=fgetc(fp);
++ for (j=0; j<4; j++) {
++ c=fgetc(fp);
++ if ( c != 0xff ) {
++ sprintf(msgbuf,"Byte %d: 0x%x != 0xff, aborting...\n", j+1, c);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++ }
++
++ c=fgetc(fp);
++ if ( c != 'P' ) {
++ sprintf(msgbuf,"Byte 5: %c != P, aborting...\n", c);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++
++ c=fgetc(fp);
++ if ( c != '2' ) {
++ sprintf(msgbuf,"Byte 6: %c != 2, aborting...\n", c);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
+
+- while ( retval != EOF ) {
++ c=fgetc(fp);
++ if ( c != 'B' ) {
++ sprintf(msgbuf,"Byte 7: %c != B, aborting...\n", c);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++
++ c=fgetc(fp);
++ if ( c != 0x02 ) {
++ sprintf(msgbuf,"Byte 8: version: %d != 2, aborting...\n", c);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++
++ do {
+ i=0;
+ do {
+ name[i]=fgetc(fp);
+@@ -244,9 +328,22 @@ + } while ( name[i-1] != 0x00 && name[i-1] != EOF);
+ if ( name[i-1] != EOF ) {
+ name[i-1]='\0';
+- fread(&start_ip,4,1,fp);
+- fread(&end_ip,4,1,fp);
+- startaddr.s_addr=start_ip;
++ s=fread(&start_ip,4,1,fp);
++ if ( s != 1 ) {
++ sprintf(msgbuf,"Failed to read start IP: %d != 1, aborting...\n", (int)s);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++ s=fread(&end_ip,4,1,fp);
++ if ( s != 1 ) {
++ sprintf(msgbuf,"Failed to read end IP: %d != 1, aborting...\n", (int)s);
++ log_action(msgbuf);
++ fclose(fp);
++ exit(-1);
++ }
++
++ startaddr.s_addr=start_ip;
+ endaddr.s_addr=end_ip;
+ strcpy(ipmin,inet_ntoa(startaddr));
+ ranged_insert(name,ipmin,inet_ntoa(endaddr));
+@@ -255,22 +352,25 @@ + else {
+ retval=EOF;
+ }
+- }
++ } while ( retval != EOF );
+ fclose(fp);
+- fprintf(logfile,"Ranges loaded: %d\n",ntot);
+- printf("* Ranges loaded: %d\n",ntot);
++ sprintf(msgbuf, "* Ranges loaded: %d\n",ntot);
++ log_action(msgbuf);
++ if ( !log2stdout )
++ printf(msgbuf);
+ }
+
+ void loadlist_dat(char *filename)
+ {
+ FILE *fp;
+ int ntot=0;
+- char readbuf[200], *name, start_ip[16], end_ip[16];
++ char readbuf[200], *name, start_ip[16], end_ip[16], msgbuf[255];
+ unsigned short ip1_0, ip1_1, ip1_2, ip1_3, ip2_0, ip2_1, ip2_2, ip2_3;
+
+ fp=fopen(filename,"r");
+ if ( fp == NULL ) {
+- fprintf(logfile,"Error opening %s, aborting...\n", filename);
++ sprintf(msgbuf,"Error opening %s, aborting...\n", filename);
++ log_action(msgbuf);
+ exit(-1);
+ }
+
+@@ -286,38 +386,45 @@ + ntot++;
+ }
+ fclose(fp);
+- fprintf(logfile,"Ranges loaded: %d\n",ntot);
+- printf("* Ranges loaded: %d\n",ntot);
++ sprintf(msgbuf, "* Ranges loaded: %d\n", ntot);
++ log_action(msgbuf);
++ if ( !log2stdout )
++ printf(msgbuf);
+ }
+
+ void reopen_logfile(void)
+ {
++ char msgbuf[255];
++
+ if (logfile != NULL) {
+ fclose(logfile);
+ logfile=NULL;
+ }
+ logfile=fopen(logfile_name,"a");
+ if (logfile == NULL) {
+- fprintf(stderr, "Unable to open logfile %s\n", logfile_name);
++ sprintf(msgbuf, "Unable to open logfile %s\n", logfile_name);
++ log_action(msgbuf);
+ exit(-1);
+ }
+- fprintf(logfile, "Reopening logfile.\n");
++ log_action("Reopening logfile.\n");
+ }
+
+ void my_sahandler(int sig)
+ {
++ char msgbuf[255];
++
+ switch( sig ) {
+ case SIGUSR1:
+- fprintf(logfile,"Got SIGUSR1! Dumping stats...\n");
++ log_action("Got SIGUSR1! Dumping stats...\n");
+ ll_show(logfile);
+ reopen_logfile();
+ break;
+ case SIGUSR2:
+- fprintf(logfile,"Got SIGUSR2! Dumping stats to /var/log/MoBlock.stats\n");
++ log_action("Got SIGUSR2! Dumping stats to /var/log/MoBlock.stats\n");
+ ll_log();
+ break;
+ case SIGHUP:
+- fprintf(logfile,"\nGot SIGHUP! Dumping and resetting stats, reloading blocklist\n\n");
++ log_action("Got SIGHUP! Dumping and resetting stats, reloading blocklist\n");
+ ll_log();
+ ll_clear(); // clear stats list
+ destroy_tree(); // clear loaded ranges
+@@ -332,17 +439,18 @@ + loadlist_pg2(blocklist_info.filename);
+ break;
+ default:
+- fprintf(logfile,"Unknown blocklist type while reloading list, contact the developer!\n");
++ log_action("Unknown blocklist type while reloading list, contact the developer!\n");
+ break;
+ }
+ reopen_logfile();
+ break;
+ case SIGTERM:
+- fprintf(logfile,"Got SIGTERM! Dumping stats and exiting.\n");
++ log_action("Got SIGTERM! Dumping stats and exiting.\n");
+ ll_log();
+ exit(0);
+ default:
+- fprintf(logfile,"Received signal = %d but not handled\n",sig);
++ sprintf(msgbuf,"Received signal = %d but not handled\n",sig);
++ log_action(msgbuf);
+ break;
+ }
+ }
+@@ -378,7 +486,7 @@ + {
+ int id=0, status=0;
+ struct nfqnl_msg_packet_hdr *ph;
+- char *payload;
++ char *payload, msgbuf[255];
+ recType tmprec;
+
+ ph = nfq_get_msg_packet_hdr(nfa);
+@@ -389,34 +497,78 @@ + switch (ph->hook) {
+ case NF_IP_LOCAL_IN:
+ if ( find(ntohl(SRC_ADDR(payload)),&tmprec) == STATUS_OK ) {
++ // we drop the packet instead of rejecting
++ // we don't want the other host to know we are alive
+ status=nfq_set_verdict(qh, id, NF_DROP, 0, NULL);
+- fprintf(logfile,"Blocked IN: %s,hits: %d,SRC: %s\n",tmprec.blockname,tmprec.hits,ip2str(SRC_ADDR(payload)));
+- } else status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ sprintf(msgbuf,"Blocked IN: %s,hits: %d,SRC: %s\n",tmprec.blockname,tmprec.hits,ip2str(SRC_ADDR(payload)));
++ log_action(msgbuf);
++ }
++ else if ( unlikely(accept_mark) ) {
++ // we set the user-defined accept_mark and set NF_REPEAT verdict
++ // it's up to other iptables rules to decide what to do with this marked packet
++ status = nfq_set_verdict_mark(qh, id, NF_REPEAT, accept_mark, 0, NULL);
++ }
++ else {
++ // no accept_mark, just NF_ACCEPT the packet
++ status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ }
+ break;
+ case NF_IP_LOCAL_OUT:
+ if ( find(ntohl(DST_ADDR(payload)),&tmprec) == STATUS_OK ) {
+- status=nfq_set_verdict(qh, id, NF_DROP, 0, NULL);
+- fprintf(logfile,"Blocked OUT: %s,hits: %d,DST: %s\n",tmprec.blockname,tmprec.hits,ip2str(DST_ADDR(payload)));
+- } else status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ if ( likely(reject_mark) ) {
++ // we set the user-defined reject_mark and set NF_REPEAT verdict
++ // it's up to other iptables rules to decide what to do with this marked packet
++ status = nfq_set_verdict_mark(qh, id, NF_REPEAT, reject_mark, 0, NULL);
++ }
++ else {
++ status = nfq_set_verdict(qh, id, NF_DROP, 0, NULL);
++ }
++ sprintf(msgbuf,"Blocked OUT: %s,hits: %d,DST: %s\n",tmprec.blockname,tmprec.hits,ip2str(DST_ADDR(payload)));
++ log_action(msgbuf);
++ }
++ else if ( unlikely(accept_mark) ) {
++ // we set the user-defined accept_mark and set NF_REPEAT verdict
++ // it's up to other iptables rules to decide what to do with this marked packet
++ status = nfq_set_verdict_mark(qh, id, NF_REPEAT, accept_mark, 0, NULL);
++ }
++ else {
++ // no accept_mark, just NF_ACCEPT the packet
++ status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ }
+ break;
+ case NF_IP_FORWARD:
+ if ( find2(ntohl(SRC_ADDR(payload)), ntohl(DST_ADDR(payload)), &tmprec) == STATUS_OK ) {
+- status=nfq_set_verdict(qh, id, NF_DROP, 0, NULL);
+- fprintf(logfile,"Blocked FWD: %s,hits: %d,SRC: %s, DST: %s\n",
++ if ( likely(reject_mark) ) {
++ // we set the user-defined reject_mark and set NF_REPEAT verdict
++ // it's up to other iptables rules to decide what to do with this marked packet
++ status = nfq_set_verdict_mark(qh, id, NF_REPEAT, reject_mark, 0, NULL);
++ }
++ else {
++ status = nfq_set_verdict(qh, id, NF_DROP, 0, NULL);
++ }
++ sprintf(msgbuf,"Blocked FWD: %s,hits: %d,SRC: %s, DST: %s\n",
+ tmprec.blockname, tmprec.hits, ip2str(SRC_ADDR(payload)), ip2str(DST_ADDR(payload)));
+- fflush(logfile);
+- } else status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ log_action(msgbuf);
++ }
++ else if ( unlikely(accept_mark) ) {
++ // we set the user-defined accept_mark and set NF_REPEAT verdict
++ // it's up to other iptables rules to decide what to do with this marked packet
++ status = nfq_set_verdict_mark(qh, id, NF_REPEAT, accept_mark, 0, NULL);
++ }
++ else {
++ // no accept_mark, just NF_ACCEPT the packet
++ status = nfq_set_verdict(qh, id, NF_ACCEPT, 0, NULL);
++ }
+ break;
+ default:
+- fprintf(logfile,"Not NF_LOCAL_IN/OUT/FORWARD packet!\n");
++ log_action("Not NF_LOCAL_IN/OUT/FORWARD packet!\n");
+ break;
+ }
+ }
+ else {
+- fprintf(logfile,"NFQUEUE: can't get msg packet header.\n");
++ log_action("NFQUEUE: can't get msg packet header.\n");
+ return(1); // from nfqueue source: 0 = ok, >0 = soft error, <0 hard error
+ }
+- fflush(logfile);
+ return(0);
+ }
+ #endif
+@@ -492,46 +644,48 @@ + struct nfq_q_handle *qh;
+ struct nfnl_handle *nh;
+ int fd,rv;
+- char buf[BUFSIZE];
++ char buf[BUFSIZE], msgbuf[255];
+
+ h = nfq_open();
+ if (!h) {
+- fprintf(logfile, "Error during nfq_open()\n");
++ log_action("Error during nfq_open()\n");
+ exit(-1);
+ }
+
+ if (nfq_unbind_pf(h, AF_INET) < 0) {
+- fprintf(logfile, "error during nfq_unbind_pf()\n");
+- exit(-1);
++ log_action("error during nfq_unbind_pf()\n");
++ //exit(-1);
+ }
+
+ if (nfq_bind_pf(h, AF_INET) < 0) {
+- fprintf(logfile, "Error during nfq_bind_pf()\n");
++ log_action("Error during nfq_bind_pf()\n");
+ exit(-1);
+ }
+
+- fprintf(logfile,"NFQUEUE: binding to queue '%hd'\n", queuenum);
++ sprintf(msgbuf,"NFQUEUE: binding to queue '%hd'\n", queuenum);
++ log_action(msgbuf);
+ qh = nfq_create_queue(h, queuenum, &nfqueue_cb, NULL);
+ if (!qh) {
+- fprintf(logfile, "error during nfq_create_queue()\n");
++ log_action("error during nfq_create_queue()\n");
+ exit(-1);
+ }
+
+ if (nfq_set_mode(qh, NFQNL_COPY_PACKET, PAYLOADSIZE) < 0) {
+- fprintf(logfile, "can't set packet_copy mode\n");
++ log_action("can't set packet_copy mode\n");
+ exit(-1);
+ }
+
+ nh = nfq_nfnlh(h);
+ fd = nfnl_fd(nh);
+
+- while ((rv = recv(fd, buf, sizeof(buf), 0)) && rv >= 0) {
++ while ((rv = recv(fd, buf, sizeof(buf), 0)) >= 0) {
+ nfq_handle_packet(h, buf, rv);
+ }
+
+- printf("NFQUEUE: unbinding from queue 0\n");
++ log_action("NFQUEUE: unbinding from queue 0\n");
+ nfq_destroy_queue(qh);
+ nfq_close(h);
++ nfq_unbind_pf(h, AF_INET);
+ return(0);
+ #endif
+
+@@ -540,11 +694,16 @@ + void print_options(void)
+ {
+ printf("\nMoBlock %s by Morpheus",MB_VERSION);
+- printf("\nSyntax: MoBlock -dnp <blocklist> [-b] [-q 0-65535] <logfile>\n\n");
++ printf("\nSyntax: MoBlock -dnp <blocklist> [-q 0-65535] <logfile>\n\n");
+ printf("\t-d\tblocklist is an ipfilter.dat file\n");
+ printf("\t-n\tblocklist is a peerguardian 2.x file (.p2b)\n");
+ printf("\t-p\tblocklist is a peerguardian file (.p2p)\n");
+ printf("\t-q\t0-65535 NFQUEUE number (as specified in --queue-num with iptables)\n");
++ printf("\t-r MARK\tmark packet with MARK instead of DROP\n");
++ printf("\t-a MARK\tmark packet with MARK instead of ACCEPT\n");
++ printf("\t-l\tlog to stdout\n");
++ printf("\t-s\tlog to syslog\n");
++ printf("\t-t\tlog timestamping\n\n");
+ }
+
+ void on_quit()
+@@ -556,6 +715,7 @@ + {
+ int ret=0;
+ unsigned short int queuenum=0;
++ char msgbuf[255];
+
+ if (argc < 3) {
+ print_options();
+@@ -591,10 +751,11 @@ + }
+ logfile_name=malloc(strlen(argv[argc-1])+1);
+ strcpy(logfile_name,argv[argc-1]);
++ log2file = 1;
+ printf("* Logging to %s\n",logfile_name);
+
+ while (1) { //scan command line options
+- ret=getopt(argc, argv, "d:n:p:q:");
++ ret=getopt(argc, argv, "d:n:p:q:a:r:stl");
+ if ( ret == -1 ) break;
+
+ switch (ret) {
+@@ -619,6 +780,28 @@ + case 'q':
+ queuenum=(unsigned short int)atoi(optarg);
+ break;
++ case 'r':
++ reject_mark=(u_int32_t)atoi(optarg);
++ printf("* DROP MARK: %d\n", reject_mark);
++ reject_mark=htonl(reject_mark);
++ break;
++ case 'a':
++ accept_mark=(u_int32_t)atoi(optarg);
++ printf("* ACCEPT MARK: %d\n", accept_mark);
++ accept_mark=htonl(accept_mark);
++ break;
++ case 's':
++ log2syslog = 1;
++ printf("* Logging to syslog\n");
++ break;
++ case 't':
++ timestamp = 1;
++ printf("* Log timestamp enabled\n");
++ break;
++ case 'l':
++ log2stdout = 1;
++ printf("* Log to stdout enabled\n");
++ break;
+ case '?': // unknown option
+ print_options();
+ exit(-1);
+@@ -626,10 +809,14 @@ + }
+ }
+
+- printf("* Merged ranges: %d\n", merged_ranges);
+- fprintf(logfile, "Merged ranges: %d\n", merged_ranges);
+- printf("* Skipped useless ranges: %d\n", skipped_ranges);
+- fprintf(logfile,"Skipped useless ranges: %d\n", skipped_ranges);
++ sprintf(msgbuf, "* Merged ranges: %d\n", merged_ranges);
++ log_action(msgbuf);
++ if ( !log2stdout )
++ printf(msgbuf);
++ sprintf(msgbuf,"* Skipped useless ranges: %d\n", skipped_ranges);
++ log_action(msgbuf);
++ if ( !log2stdout )
++ printf(msgbuf);
+ fflush(NULL);
+
+ netlink_loop(queuenum);
+diff -Naur MoBlock-0.8_orig/README MoBlock-0.8/README +--- MoBlock-0.8_orig/README 2006-03-22 12:44:31.000000000 -0500 ++++ MoBlock-0.8/README 2007-11-22 08:10:44.000000000 -0500 +@@ -1,5 +1,5 @@ + +-MoBlock README v0.8 ++MoBlock README v0.9 + http://moblock.berlios.de + + .Introduction. +@@ -47,6 +47,22 @@ + ip_conntrack 40044 1 ipt_state + iptable_filter 2176 1 + ip_tables 17600 3 ipt_NFQUEUE,ipt_state,iptable_filter ++ ++ ...and these with kernel 2.6.23 using NFQUEUE interface: ++ ++ nfnetlink_queue 9344 1 ++ nfnetlink 4568 2 nfnetlink_queue ++ ipt_REJECT 3520 2 ++ xt_mark 1600 2 ++ nf_conntrack_ipv4 12424 5 ++ iptable_filter 2308 1 ++ ip_tables 10328 1 iptable_filter ++ xt_state 1984 5 ++ nf_conntrack 48356 2 nf_conntrack_ipv4,xt_state ++ xt_NFQUEUE 1664 3 ++ x_tables 11396 5 ipt_REJECT,xt_mark,ip_tables,xt_state,xt_NFQUEUE ++ ++ (notice that ipt_NFQUEUE has changed to xt_NFQUEUE, same thing for other modules too) + + 2) A valid guarding.p2p/ipfilter.dat/p2p.p2b host file in /etc ( /etc/guarding.p2p ). + MoBlock tries to skip malformed or duplicate ranges but +@@ -140,8 +156,18 @@ + To specify a NFQUEUE queue number: + + ./moblock -p /etc/guarding.p2p -q 5 MoBlock.log ++ ++ From version 0.9 MoBlock supports MARKing packets and RETURN them to ++ iptables, there's an example start script (MoBlock-nfq-reject.sh) that ++ uses this feature to REJECT packet instead of dropping them. It can help ++ in complex firewall configuration where you need more control of packets ++ flow after MoBlock inspection. ++ See the mentioned start script for reference, you can set the MARK value ++ for packets that MoBlock would drop (ip in list) with the "-r" command line ++ option and for packets that MoBlock would accept (ip not in list) with ++ the "-a" command line option. + +- To stop it: ++ To stop MoBlock: + + kill -TERM <MoBlockPid> + +@@ -149,7 +175,7 @@ + To obtain stats about blocked ranges while it's running: + + kill -USR1 <MoBlockPid> # write stats to logfile +- kill -USR2 <MoBlockPid> # write stats to /var/log/MoBlock.stats ++ kill -USR2 <MoBlockPid> # write stats to /var/log/MoBlock.stats + + ** NEW: to reload the blocklist while MoBlock is running send to it the + HUP signal: +@@ -168,7 +194,10 @@ + took some code and ideas from his FTwall + - Andrew de Quincey (adq at lidskialf dot net) for regular expressions + and command line args patch +-- Maximilian Mehnert (clessing at freenet dot de) for logfile rotation ++- clessing at freenet dot de for logfile rotation + patches, pid file creation, start script, fixes/files for debian packaging ++- David Walluck, patch for proper loading of p2b files ++- jre, for continuing clessing work on debian packaging and many other ++ contributions + +-Last Updated: 20/Mar/2006 ++Last Updated: 15/Oct/2007 +diff -Naur MoBlock-0.8_orig/rbt.c MoBlock-0.8/rbt.c +--- MoBlock-0.8_orig/rbt.c 2006-03-22 12:44:31.000000000 -0500 ++++ MoBlock-0.8/rbt.c 2008-02-10 11:56:08.000000000 -0500 +@@ -19,7 +19,7 @@ + #include <stdarg.h> + #include <time.h> + +-#define RBT_VERSION 0.8 ++#define RBT_VERSION 0.9 + #define BNAME_LEN 80 + + /* implementation dependend declarations */ +@@ -421,7 +421,7 @@ + + statusEnum insert(keyType key, recType *rec) { + nodeType *current, *parent, *x; +- keyType tmpkey; ++ //keyType tmpkey; + recType tmprec; + int ret; + +@@ -433,6 +433,23 @@ + current = root; + parent = 0; + while (current != NIL) { ++ if (compEQ2(current->key, key, rec->ipmax)) { // current node key is inside new range to be inserted ++ strcpy(tmprec.blockname, rec->blockname); // block name from new range ++ if (compLT(current->rec.ipmax, rec->ipmax)) ++ tmprec.ipmax = rec->ipmax; ++ else tmprec.ipmax = current->rec.ipmax; ++ tmprec.hits = 0; ++ //printf("deleting node :%lu\n", current->key); ++ ret=delete(current->key); ++ if ( ret != STATUS_OK ) ++ return(ret); ++ ret=insert(key, &tmprec); ++ if ( ret == STATUS_OK ) { ++ printf("new merge\n"); ++ return(STATUS_MERGED); ++ } ++ else return(ret); ++ } + if (compEQ(key, current->key)) { + if ( rec->ipmax > current->rec.ipmax ) { + current->rec.ipmax=rec->ipmax; +@@ -458,7 +475,7 @@ + } + } + //check if higher ip (ipmax) is already in a range +- if (compEQ2(rec->ipmax,current->key,current->rec.ipmax)) { ++ /*if (compEQ2(rec->ipmax,current->key,current->rec.ipmax)) { + fprintf(logfile,"higher ip in range\n"); + tmpkey=key; + strcpy(tmprec.blockname,current->rec.blockname); +@@ -470,7 +487,7 @@ + if ( ret == STATUS_OK ) + return(STATUS_MERGED); + else return(ret); +- } ++ }*/ + parent = current; + current = compLT(key, current->key) ? + current->left : current->right; +@@ -495,7 +512,7 @@ + } else { + root = x; + } +- ++ //printf("new node, key: %lu, parent: %lu\n", x->key, parent ? parent->key : 0); + insertFixup(x); + lastFind = NULL; + diff --git a/pcr/moblock/moblock_include.patch b/pcr/moblock/moblock_include.patch new file mode 100644 index 000000000..644e8240e --- /dev/null +++ b/pcr/moblock/moblock_include.patch @@ -0,0 +1,10 @@ +--- MoBlock-0.8/MoBlock.c.orig 2008-08-15 14:41:49.000000000 -0400 ++++ MoBlock-0.8/MoBlock.c 2008-08-15 14:43:45.000000000 -0400 +@@ -32,6 +32,7 @@ + #include <netinet/udp.h>
+ #include <sys/socket.h>
+ #include <arpa/inet.h>
++#include <limits.h>
+ #include <linux/netfilter_ipv4.h>
+ #include <signal.h>
+ #include <regex.h>
diff --git a/pcr/mycron-git/PKGBUILD b/pcr/mycron-git/PKGBUILD new file mode 100644 index 000000000..16022bc5f --- /dev/null +++ b/pcr/mycron-git/PKGBUILD @@ -0,0 +1,49 @@ +# Contributor: Dirk Sohler <spam@0x7be.de> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=mycron-git +pkgver=20121116 +pkgrel=1 +pkgdesc='A standards compliant and convenient crontab management system.' + +url='https://dev.0x7be.de/mycron' +arch=('any') +license=('GPL') + +depends=('python>=3.0') +makedepends=('git') + +install=mycron.install + +source=('mycron.install') +sha256sums=('a5406ae03412d3a1aaf6aadb902b4dd40bb6eadb21aa2ffb7c21ae95d656f598') + +_gitroot='https://github.com/dsohler/mycron' +_gitname='master' + +build() { + cd $srcdir + msg "Connecting to GIT server...." + + if [[ -d "$_gitname" ]]; then + cd "$_gitname" && git pull origin + msg "The local files are updated." + else + git clone "$_gitroot" "$_gitname" + fi + + msg "GIT checkout done or server timeout" + msg "Starting build..." + + rm -rf "$srcdir/$_gitname-build" + git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" +} + +package() { + cd "$srcdir/$_gitname-build" + install -Dm 755 mycron.py $pkgdir/usr/bin/mycron + install -Dm 644 example-config.cfg \ + $pkgdir/usr/share/doc/mycron/example-config.cfg + install -Dm 644 example.crontab \ + $pkgdir/usr/share/doc/mycron/example.crontab +} diff --git a/pcr/mycron-git/mycron.install b/pcr/mycron-git/mycron.install new file mode 100644 index 000000000..a56c1ab97 --- /dev/null +++ b/pcr/mycron-git/mycron.install @@ -0,0 +1,3 @@ +post_install() { + echo 'Don’t forget to set up your cron service/daemon to execute mycron every minute. See https://dev.0x7be.de/mycron for setup instructions and configuration examples.' | fold -sw 70 +} diff --git a/pcr/nautilus-dropbox/PKGBUILD b/pcr/nautilus-dropbox/PKGBUILD new file mode 100644 index 000000000..c8a81a959 --- /dev/null +++ b/pcr/nautilus-dropbox/PKGBUILD @@ -0,0 +1,45 @@ +# Contributor: josephgbr <rafael.f.f1@gmail.com> +# Contributor: cmorlok <christianmorlok@web.de> +# Contributor: fazibear <fazibear@gmail.com> +# Contributor: neuromante <lorenzo.nizzi.grifi@gmail.com> +# Contributor: Gordin <9ordin @t gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +pkgname=nautilus-dropbox +pkgver=1.4.0 +pkgrel=2 +pkgdesc="Dropbox for Linux - Nautilus extension" +arch=('i686' 'x86_64') +url="https://www.dropbox.com/" +license=('custom:CC-BY-ND-3' 'GPL') +depends=('libnotify' 'nautilus' 'dropbox' 'hicolor-icon-theme') +makedepends=('python2-docutils' 'python2' 'pygtk') +install=${pkgname}.install +options=('!libtool' '!emptydirs') +source=("https://linux.dropbox.com/packages/${pkgname}-${pkgver}.tar.bz2") + +build() { + cd "${pkgname}-${pkgver}/" + + sed "s/python/python2/" \ + -i configure \ + -i Makefile.am \ + -i Makefile.in \ + -i dropbox.in \ + -i rst2man.py + + # since python2-docutils, rst2man.py is named "rst2man2.py" + sed "s#rst2man.py#/usr/bin/rst2man2.py#" \ + -i configure + + ./configure --prefix=/usr --sysconfdir=/etc + make +} + +package() { + cd "${pkgname}-${pkgver}/" + make DESTDIR="${pkgdir}" install + rm "${pkgdir}/usr/bin/dropbox" + rm "${pkgdir}/usr/share/applications/dropbox.desktop" + install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" +} diff --git a/pcr/nautilus-dropbox/nautilus-dropbox.install b/pcr/nautilus-dropbox/nautilus-dropbox.install new file mode 100644 index 000000000..c4f3ef960 --- /dev/null +++ b/pcr/nautilus-dropbox/nautilus-dropbox.install @@ -0,0 +1,16 @@ +post_install() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + cat <<-EndOfMessage + +==> Restart nautilus with 'nautilus -q' + +EndOfMessage +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/pcr/note/PKGBUILD b/pcr/note/PKGBUILD new file mode 100644 index 000000000..f4b2eefe2 --- /dev/null +++ b/pcr/note/PKGBUILD @@ -0,0 +1,34 @@ +# Contributor: David Pflug <Viaken@Gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +_author=TLINDEN +_perlmod=note +pkgname=$_perlmod +pkgver=1.3.12 +pkgrel=2 +pkgdesc="A Perl-based note taking application with multiple backends" +arch=('i686' 'x86_64') +url="http://www.daemon.de/NOTE" +license=('GPL') +depends=('perl' 'perl-yaml') +optdepends=( + 'perl-config-general: general db backend' + 'perl-crypt-cbc: encryption support' + 'perl-crypt-pwsafe3: password safe 3 backend' + 'perl-crypt-rijndael: encryption support' + 'perl-dbd-mysql: mysql db backend' + 'perl-dbi: mysql db backend' + ) +source=(http://cpan.perl.org/modules/by-authors/id/T/TL/$_author/$_perlmod-$pkgver.tar.gz) + +build() { + cd "$srcdir/$pkgname-$pkgver" + + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make install DESTDIR="$pkgdir" +} diff --git a/pcr/ocaml-camomile/PKGBUILD b/pcr/ocaml-camomile/PKGBUILD new file mode 100644 index 000000000..48c8eb2f9 --- /dev/null +++ b/pcr/ocaml-camomile/PKGBUILD @@ -0,0 +1,28 @@ +# Contributor: Serge Zirukin <ftrvxmtrx@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=ocaml-camomile +pkgver=0.8.4 +pkgrel=2 +pkgdesc="Comprehensive Unicode library for OCaml" +arch=('i686' 'x86_64') +url="https://github.com/yoriyuki/Camomile" +license=('LGPL') +depends=('ocaml' 'ocaml-findlib>=1.2.3') +install= +source=(https://github.com/downloads/yoriyuki/${pkgname/ocaml-}/${pkgname/ocaml-/}-$pkgver.tar.bz2) +md5sums=('389f1a7e5c2a634fbb3ea6f764d77bd3') +options=(!strip !makeflags) + +build() { + cd "$srcdir/${pkgname/ocaml-/}-$pkgver" + + ./configure --prefix=/usr + mkdir -p $pkgdir$(ocamlfind printconf destdir) || return 1 + mkdir -p $pkgdir/usr/bin + sed -i -e 's|ocamlfind install|ocamlfind install -destdir '$pkgdir$(ocamlfind printconf destdir)'|' Makefile || return 1 + make || return 1 + make DATADIR="$pkgdir/usr/share" BINDIR="$pkgdir/usr/bin" install + install -Dm 644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE +} + diff --git a/pcr/ocaml-pcre/PKGBUILD b/pcr/ocaml-pcre/PKGBUILD new file mode 100644 index 000000000..bfc214b28 --- /dev/null +++ b/pcr/ocaml-pcre/PKGBUILD @@ -0,0 +1,34 @@ +# Contributor: Serge Zirukin <ftrvxmtrx@gmail.com> +# Contributor: Sergei Lebedev <superbobry@gmail.com> +# Contributor: Magnus Therning <magnus@therning.org> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + +pkgname=ocaml-pcre +pkgver=7.0.2 +pkgrel=2 +pkgdesc="Perl compatible regular expressions for OCaml" +arch=('i686' 'x86_64') +url="http://www.ocaml.info/home/ocaml_sources.html#toc18" +license=('LGPL') +depends=('ocaml' 'pcre>=4.5') +makedepends=('ocaml-findlib') +replaces=('pcre-ocaml') +conflicts=('pcre-ocaml') +source=("https://bitbucket.org/mmottl/pcre-ocaml/downloads/pcre-ocaml-$pkgver.tar.gz") +md5sums=('412eec5674a8bab76ccd09e006a24e10') +options=(!strip) + +build() { + cd "$srcdir/pcre-ocaml-$pkgver" + + ./configure --disable-debug --prefix /usr --destdir "$pkgdir" + make all +} + +package() { + cd "$srcdir/pcre-ocaml-$pkgver" + export OCAMLFIND_DESTDIR="$pkgdir$(ocamlfind printconf destdir)" + install -dm 755 "$OCAMLFIND_DESTDIR/stublibs" + make install + install -Dm 644 COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/COPYING" +} diff --git a/pcr/oinkmaster/PKGBUILD b/pcr/oinkmaster/PKGBUILD new file mode 100644 index 000000000..f533e3663 --- /dev/null +++ b/pcr/oinkmaster/PKGBUILD @@ -0,0 +1,34 @@ +# Contributor: Robert Knauer <robert@privatdemail.net> +# Contributor: Kessia Pinheiro <kessiapinheiro @ gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +pkgname=oinkmaster +pkgver=2.0 +pkgrel=7 +pkgdesc="A script that will help you update and manage your Snort rules" +arch=('i686' 'x86_64') +license=('BSD') +url="http://oinkmaster.sourceforge.net/" +depends=('snort') +backup=( + 'etc/oinkmaster.conf' +) +source=( + "http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz" +) +sha256sums=( + '3d52f0426aa7c81b122cef22b80d708d8bb8337537e48754a065804f46c46162' +) + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + install -m0655 -D 'oinkmaster.pl' "${pkgdir}/usr/bin/oinkmaster.pl" + install -m0644 -D 'oinkmaster.conf' "${pkgdir}/etc/oinkmaster.conf" + install -m0644 -D 'oinkmaster.1' "${pkgdir}/usr/man/man1/oinkmaster.1" + install -d -m0644 "${pkgdir}/usr/share/oinkmaster/" + install -d -m0755 "${pkgdir}/usr/share/licenses/oinkmaster/" + install -m0644 -D 'template-examples.conf' "${pkgdir}/usr/share/oinkmaster/" + cp -R 'contrib/' "${pkgdir}/usr/share/oinkmaster/" + install -m0644 [[:upper:]]* "${pkgdir}/usr/share/oinkmaster/" + install -m0644 -D 'LICENSE' "${pkgdir}/usr/share/licenses/${pkgname}/" +} diff --git a/pcr/owncloud/PKGBUILD b/pcr/owncloud/PKGBUILD new file mode 100644 index 000000000..7861d0917 --- /dev/null +++ b/pcr/owncloud/PKGBUILD @@ -0,0 +1,35 @@ +# Contributor: Antonio Rojas <nqn1976 @ gmail.com> +# Based on owncloud-git PKGBUILD by Alexander Ovsyannikov +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=owncloud +pkgver=4.5.2 +pkgrel=1 +pkgdesc="A cloud server to store your files centrally on a hardware controlled by you" +arch=('any') +url="http://owncloud.org/" +license=('GPL') +depends=('php-gd') +optdepends=("php-apache: to use the Apache web server" "php-sqlite: to use the SQLite database backend" "mysql: to use the MySQL database backend") +makedepends=() +source=("http://owncloud.org/releases/$pkgname-$pkgver.tar.bz2" 'owncloud.conf') +backup=('etc/httpd/conf/extra/owncloud.conf') +install=owncloud.install + +package() { +# install license + install -d $pkgdir/usr/share/licenses/$pkgname + cp $srcdir/$pkgname/COPYING-* $pkgdir/usr/share/licenses/$pkgname + +# install project + install -d $pkgdir/usr/share/webapps/ + cp -a $srcdir/$pkgname $pkgdir/usr/share/webapps/ + chown -R http:http $pkgdir/usr/share/webapps/* + +# install apache .conf file + install -d $pkgdir/etc/httpd/conf/extra + install -m 644 $srcdir/owncloud.conf $pkgdir/etc/httpd/conf/extra/ +} + + + diff --git a/pcr/owncloud/owncloud.conf b/pcr/owncloud/owncloud.conf new file mode 100644 index 000000000..5f050f134 --- /dev/null +++ b/pcr/owncloud/owncloud.conf @@ -0,0 +1,17 @@ +<IfModule mod_alias.c> +Alias /owncloud /usr/share/webapps/owncloud/ +</IfModule> +<Directory /usr/share/webapps/owncloud/> + Options FollowSymlinks + Order allow,deny + AllowOverride all + allow from all + php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/" +</Directory> +<VirtualHost *:80> + ServerAdmin foo@foofarm.com + DocumentRoot /usr/share/webapps/owncloud + ServerName owncloud.foo.com + ErrorLog logs/owncloud.foo.info-error_log + CustomLog logs/owncloud.foo.info-access_log common +</VirtualHost>
\ No newline at end of file diff --git a/pcr/owncloud/owncloud.install b/pcr/owncloud/owncloud.install new file mode 100644 index 000000000..327733f97 --- /dev/null +++ b/pcr/owncloud/owncloud.install @@ -0,0 +1,17 @@ +pkgname=ownCloud + +post_install() { + echo "Add the following lines into /etc/httpd/conf/httpd.conf:" + echo "Include /etc/httpd/conf/extra/owncloud.conf" + echo "LoadModule php5_module modules/libphp5.so" + echo "Include conf/extra/php5_module.conf" + echo + echo "Uncomment extensions xmlrpc.so zip.so gd.so" + echo "and either pdo_sqlite.so sqlite3.so (for the SQLite backend) or mysql.so mysqli.so pdo_mysql.so (for the MySQL backend)" + echo "in /etc/php/php.ini" +} + +post_upgrade() { + echo "owncloud is now installed in /usr/share/webapps/owncloud" + echo "if you want it in /srv/http, add a symlink manually" +}
\ No newline at end of file diff --git a/pcr/package-query/PKGBUILD b/pcr/package-query/PKGBUILD new file mode 100644 index 000000000..5bec58ce3 --- /dev/null +++ b/pcr/package-query/PKGBUILD @@ -0,0 +1,29 @@ +# Contributor: tuxce <tuxce.net@gmail.com> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + +pkgname=package-query +pkgver=1.1 +pkgrel=2 +pkgdesc="Query ALPM and AUR" +arch=('i686' 'x86_64' 'mips64el' 'armv6h' 'armv7h') +url="http://gitweb.archlinux.fr/package-query.git/" +license=('GPL') +depends=('pacman>=4.0' 'pacman<4.1' curl 'yajl>=2.0') +source=(http://mir.archlinux.fr/~tuxce/releases/$pkgname/$pkgname-$pkgver.tar.gz) + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --localstatedir=/var --prefix=/usr --sysconfdir=/etc --with-aur-url=https://aur.archlinux.org + make +} + +package () +{ + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} + +# vim:set ts=2 sw=2 et: + +md5sums=('becb5734dd531631cbe2e1c9cf82ae9e') +md5sums=('becb5734dd531631cbe2e1c9cf82ae9e') diff --git a/pcr/packer/PKGBUILD b/pcr/packer/PKGBUILD new file mode 100644 index 000000000..f2ea54a76 --- /dev/null +++ b/pcr/packer/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=packer +pkgver=20120302 +pkgrel=1 +pkgdesc="Bash wrapper for pacman and aur" +url="http://github.com/bruenig/packer" +license="GPL" +arch=('any') +makedepends=('git') +depends=('grep' 'sed' 'bash' 'curl' 'pacman' 'jshon') +optdepends=('sudo: install and update packages as non-root' + 'customizepkg: apply customizepkg modifications') +_gitroot='https://github.com/bruenig/packer.git' +_gitname='packer' + +# Xavion is a non-contributing idiot + +build() { + cd "$srcdir" + + msg "Connecting to github GIT server...." + + if [ -d "$srcdir/$_gitname" ] ; then + cd $_gitname && git pull origin + else + git clone "$_gitroot" + cd $_gitname + fi + + mkdir -p "$pkgdir/usr/bin/" + mkdir -p "$pkgdir/usr/share/man/man8/" + install -m 755 packer "$pkgdir/usr/bin/packer" + install -m 644 packer.8 "$pkgdir/usr/share/man/man8/packer.8" +} + diff --git a/pcr/pacman-color/0001-Add-conflict-for-replacing-owned-empty-directory.patch b/pcr/pacman-color/0001-Add-conflict-for-replacing-owned-empty-directory.patch new file mode 100644 index 000000000..85622aaac --- /dev/null +++ b/pcr/pacman-color/0001-Add-conflict-for-replacing-owned-empty-directory.patch @@ -0,0 +1,152 @@ +From 717fdb8ee0fd23cf72fc7d2832317f513caefa2c Mon Sep 17 00:00:00 2001 +From: Allan McRae <allan@archlinux.org> +Date: Sun, 8 Jul 2012 21:36:36 +1000 +Subject: [PATCH 1/4] Add conflict for replacing owned empty directory + +When two packages own an empty directory, pacman finds no conflict when +one of those packages wants to replace the directory with a file or a +symlink. When it comes to actually extracting the new file/symlink, +pacman sees the directory is still there (we do not remove empty +directories if they are owned by a package) and refuses to extract. + +Detect this potential conflict early and bail. Note that it is a +_potential_ conflict and not a guaranteed one as the other package owning +the directory could be updated or removed first which would remove +the conflict. However, pacman currently can not sort package installation +order to ensure this, so this conflict requires manual upgrade ordering. + +Signed-off-by: Allan McRae <allan@archlinux.org> +Signed-off-by: Dan McGee <dan@archlinux.org> +--- + lib/libalpm/conflict.c | 32 ++++++++++++++++++++++++++------ + test/pacman/tests/fileconflict009.py | 20 ++++++++++++++++++++ + test/pacman/tests/fileconflict010.py | 20 ++++++++++++++++++++ + 3 files changed, 66 insertions(+), 6 deletions(-) + create mode 100644 test/pacman/tests/fileconflict009.py + create mode 100644 test/pacman/tests/fileconflict010.py + +diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c +index 32f6f30..efa1a87 100644 +--- a/lib/libalpm/conflict.c ++++ b/lib/libalpm/conflict.c +@@ -328,15 +328,35 @@ const alpm_file_t *_alpm_filelist_contains(alpm_filelist_t *filelist, + return NULL; + } + +-static int dir_belongsto_pkg(const char *root, const char *dirpath, ++static int dir_belongsto_pkg(alpm_handle_t *handle, const char *dirpath, + alpm_pkg_t *pkg) + { ++ alpm_list_t *i; + struct stat sbuf; + char path[PATH_MAX]; + char abspath[PATH_MAX]; +- struct dirent *ent = NULL; + DIR *dir; ++ struct dirent *ent = NULL; ++ const char *root = handle->root; ++ ++ /* TODO: this is an overly strict check but currently pacman will not ++ * overwrite a directory with a file (case 10/11 in add.c). Adjusting that ++ * is not simple as even if the directory is being unowned by a conflicting ++ * package, pacman does not sort this to ensure all required directory ++ * "removals" happen before installation of file/symlink */ ++ ++ /* check that no other _installed_ package owns the directory */ ++ for(i = _alpm_db_get_pkgcache(handle->db_local); i; i = i->next) { ++ if(pkg == i->data) { ++ continue; ++ } ++ ++ if(_alpm_filelist_contains(alpm_pkg_get_files(i->data), dirpath)) { ++ return 0; ++ } ++ } + ++ /* check all files in directory are owned by the package */ + snprintf(abspath, PATH_MAX, "%s%s", root, dirpath); + dir = opendir(abspath); + if(dir == NULL) { +@@ -349,13 +369,13 @@ static int dir_belongsto_pkg(const char *root, const char *dirpath, + if(strcmp(name, ".") == 0 || strcmp(name, "..") == 0) { + continue; + } +- snprintf(path, PATH_MAX, "%s/%s", dirpath, name); ++ snprintf(path, PATH_MAX, "%s%s", dirpath, name); + snprintf(abspath, PATH_MAX, "%s%s", root, path); + if(stat(abspath, &sbuf) != 0) { + continue; + } + if(S_ISDIR(sbuf.st_mode)) { +- if(dir_belongsto_pkg(root, path, pkg)) { ++ if(dir_belongsto_pkg(handle, path, pkg)) { + continue; + } else { + closedir(dir); +@@ -529,9 +549,9 @@ alpm_list_t *_alpm_db_find_fileconflicts(alpm_handle_t *handle, + sprintf(dir, "%s/", filestr); + if(_alpm_filelist_contains(alpm_pkg_get_files(dbpkg), dir)) { + _alpm_log(handle, ALPM_LOG_DEBUG, +- "check if all files in %s belongs to %s\n", ++ "check if all files in %s belong to %s\n", + dir, dbpkg->name); +- resolved_conflict = dir_belongsto_pkg(handle->root, filestr, dbpkg); ++ resolved_conflict = dir_belongsto_pkg(handle, dir, dbpkg); + } + free(dir); + } +diff --git a/test/pacman/tests/fileconflict009.py b/test/pacman/tests/fileconflict009.py +new file mode 100644 +index 0000000..904af4a +--- /dev/null ++++ b/test/pacman/tests/fileconflict009.py +@@ -0,0 +1,20 @@ ++self.description = "dir->symlink change during package upgrade (directory conflict)" ++ ++lp1 = pmpkg("pkg1") ++lp1.files = ["dir/"] ++self.addpkg2db("local", lp1) ++ ++lp2 = pmpkg("pkg2") ++lp2.files = ["dir/"] ++self.addpkg2db("local", lp2) ++ ++p = pmpkg("pkg1", "1.0-2") ++p.files = ["dir -> /usr/dir"] ++self.addpkg2db("sync", p) ++ ++self.args = "-S pkg1" ++ ++self.addrule("PACMAN_RETCODE=1") ++self.addrule("PKG_VERSION=pkg1|1.0-1") ++self.addrule("PKG_VERSION=pkg2|1.0-1") ++self.addrule("DIR_EXIST=dir/") +diff --git a/test/pacman/tests/fileconflict010.py b/test/pacman/tests/fileconflict010.py +new file mode 100644 +index 0000000..0a3ce83 +--- /dev/null ++++ b/test/pacman/tests/fileconflict010.py +@@ -0,0 +1,20 @@ ++self.description = "dir->file change during package upgrade (directory conflict)" ++ ++lp1 = pmpkg("pkg1") ++lp1.files = ["dir/"] ++self.addpkg2db("local", lp1) ++ ++lp2 = pmpkg("pkg2") ++lp2.files = ["dir/"] ++self.addpkg2db("local", lp2) ++ ++p = pmpkg("pkg1", "1.0-2") ++p.files = ["dir"] ++self.addpkg2db("sync", p) ++ ++self.args = "-S pkg1" ++ ++self.addrule("PACMAN_RETCODE=1") ++self.addrule("PKG_VERSION=pkg1|1.0-1") ++self.addrule("PKG_VERSION=pkg2|1.0-1") ++self.addrule("DIR_EXIST=dir/") +-- +1.7.11.1 + diff --git a/pcr/pacman-color/0002-Check-empty-subdirectory-ownership.patch b/pcr/pacman-color/0002-Check-empty-subdirectory-ownership.patch new file mode 100644 index 000000000..6cf496d16 --- /dev/null +++ b/pcr/pacman-color/0002-Check-empty-subdirectory-ownership.patch @@ -0,0 +1,61 @@ +From 44e9fdd0e848382337edb97d41e7317638a67bac Mon Sep 17 00:00:00 2001 +From: Allan McRae <allan@archlinux.org> +Date: Sun, 8 Jul 2012 23:58:37 +1000 +Subject: [PATCH 2/4] Check empty subdirectory ownership + +When checking if a package owns a directory, it is important to check +not only that all the files in the directory are part of the package, +but also if the directory is part of a package. This catches empty +subdirectories during conflict checking for directory to file/symlink +replacements. + +Signed-off-by: Allan McRae <allan@archlinux.org> +Signed-off-by: Dan McGee <dan@archlinux.org> +--- + lib/libalpm/conflict.c | 5 +++++ + test/pacman/tests/fileconflict012.py | 17 +++++++++++++++++ + 2 files changed, 22 insertions(+) + create mode 100644 test/pacman/tests/fileconflict012.py + +diff --git a/lib/libalpm/conflict.c b/lib/libalpm/conflict.c +index efa1a87..d6e5d8c 100644 +--- a/lib/libalpm/conflict.c ++++ b/lib/libalpm/conflict.c +@@ -339,6 +339,11 @@ static int dir_belongsto_pkg(alpm_handle_t *handle, const char *dirpath, + struct dirent *ent = NULL; + const char *root = handle->root; + ++ /* check directory is actually in package - used for subdirectory checks */ ++ if(!_alpm_filelist_contains(alpm_pkg_get_files(pkg), dirpath)) { ++ return 0; ++ } ++ + /* TODO: this is an overly strict check but currently pacman will not + * overwrite a directory with a file (case 10/11 in add.c). Adjusting that + * is not simple as even if the directory is being unowned by a conflicting +diff --git a/test/pacman/tests/fileconflict012.py b/test/pacman/tests/fileconflict012.py +new file mode 100644 +index 0000000..421b739 +--- /dev/null ++++ b/test/pacman/tests/fileconflict012.py +@@ -0,0 +1,17 @@ ++self.description = "dir->file change during package upgrade (filesystem file conflict)" ++ ++lp1 = pmpkg("pkg1") ++lp1.files = ["dir/"] ++self.addpkg2db("local", lp1) ++ ++self.filesystem = ["dir/file"] ++ ++p = pmpkg("pkg1", "1.0-2") ++p.files = ["dir"] ++self.addpkg2db("sync", p) ++ ++self.args = "-S pkg1" ++ ++self.addrule("PACMAN_RETCODE=1") ++self.addrule("PKG_VERSION=pkg1|1.0-1") ++self.addrule("DIR_EXIST=dir/") +-- +1.7.11.1 + diff --git a/pcr/pacman-color/PKGBUILD b/pcr/pacman-color/PKGBUILD new file mode 100644 index 000000000..525f965b9 --- /dev/null +++ b/pcr/pacman-color/PKGBUILD @@ -0,0 +1,42 @@ +# Contributor: JokerBoy <jokerboy at punctweb dot ro> +# Contributor: vogo <vogo(at)seznam(dot)cz> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + +pkgname=pacman-color +pkgver=4.0.3 +pkgrel=3 +pkgdesc="A color patched command-line frontend for libalpm (Pacman)" +arch=('i686' 'x86_64') +url="http://www.archlinux.org/pacman/" +license=('GPL') +depends=('pacman>=4.0' 'pacman<4.1') +backup=('etc/pacman.d/color.conf') +source=("http://mirrors.kernel.org/archlinux/other/pacman/pacman-${pkgver}.tar.gz" + '0001-Add-conflict-for-replacing-owned-empty-directory.patch' + '0002-Check-empty-subdirectory-ownership.patch' + "${pkgname}-${pkgver}.patch" + 'color.conf') +md5sums=('387965c7125e60e5f0b9ff3b427fe0f9' + '1a9b79788640907a2b34e8671cacc94a' + 'a9ddd43891bed364e1e97d27b2887bf1' + '185e6a488b1aa14db4a54b71eb5e5e29' + '47665f5054196c20ba0dd280a8d4c5e1') + +build() { + cd "pacman-${pkgver}" + patch -p1 -i "${srcdir}/0001-Add-conflict-for-replacing-owned-empty-directory.patch" + patch -p1 -i "${srcdir}/0002-Check-empty-subdirectory-ownership.patch" + patch -p1 -i "${srcdir}/${pkgname}-${pkgver}.patch" + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-doc + make +} + +package() { + # install pacman-color && color.conf + install -Dm755 "pacman-${pkgver}/src/pacman/.libs/pacman" "${pkgdir}/usr/bin/pacman-color" + install -Dm644 'color.conf' "${pkgdir}/etc/pacman.d/color.conf" +} diff --git a/pcr/pacman-color/color.conf b/pcr/pacman-color/color.conf new file mode 100644 index 000000000..4978d4e62 --- /dev/null +++ b/pcr/pacman-color/color.conf @@ -0,0 +1,46 @@ +# Configuration for pacman-color +# ------------------------------ +# in default are all colors "intensive", +# it looks much better on black backround +# +# valid colors: +# black +# red +# green +# yellow +# blue +# magenta +# cyan +# white +# gray +# intensive red +# intensive green +# intensive yellow +# intensive blue +# intensive magenta +# intensive cyan +# intensive white +# intensive foreground +# none + +# error: prefix, fail, Remove (?):, MISSING +#Red = intensive red + +# done, success, pkg version, Not Modified +#Green = intensive green + +# warning: prefix, Targets (?):, MODIFIED +#Yellow = intensive yellow + +# :: prefix, pkg group, counter in install proces +#Blue = intensive blue + +# repo name, package file name +#Magenta = intensive magenta + +# url, flag installed +#Cyan = intensive cyan + +# messages with :: prefix, titles, etc +#White = intensive foreground + diff --git a/pcr/pacman-color/pacman-color-4.0.3.patch b/pcr/pacman-color/pacman-color-4.0.3.patch new file mode 100644 index 000000000..c7b52ef04 --- /dev/null +++ b/pcr/pacman-color/pacman-color-4.0.3.patch @@ -0,0 +1,1297 @@ +diff -up -Npaur a/src/pacman/callback.c b/src/pacman/callback.c +--- a/src/pacman/callback.c 2012-02-03 01:19:15.000000000 +0200 ++++ b/src/pacman/callback.c 2012-07-20 21:48:20.266827634 +0300 +@@ -221,16 +221,16 @@ void cb_event(alpm_event_t event, void * + printf(_("generating %s with %s... "), (char *)data1, (char *)data2); + break; + case ALPM_EVENT_DELTA_PATCH_DONE: +- printf(_("success!\n")); ++ color_printf(COLOR_GREEN_ALL, _("success!\n")); + break; + case ALPM_EVENT_DELTA_PATCH_FAILED: +- printf(_("failed.\n")); ++ color_printf(COLOR_RED_ALL, _("failed.\n")); + break; + case ALPM_EVENT_SCRIPTLET_INFO: + printf("%s", (char *)data1); + break; + case ALPM_EVENT_RETRIEVE_START: +- printf(_(":: Retrieving packages from %s...\n"), (char *)data1); ++ color_printf(COLOR_DOUBLECOLON, _(":: Retrieving packages from %s...\n"), (char *)data1); + break; + case ALPM_EVENT_DISKSPACE_START: + if(config->noprogressbar) { +@@ -264,14 +264,14 @@ void cb_question(alpm_question_t event, + switch(event) { + case ALPM_QUESTION_INSTALL_IGNOREPKG: + if(!config->op_s_downloadonly) { +- *response = yesno(_(":: %s is in IgnorePkg/IgnoreGroup. Install anyway?"), ++ *response = yesno(COLOR_DOUBLECOLON, _(":: %s is in IgnorePkg/IgnoreGroup. Install anyway?"), + alpm_pkg_get_name(data1)); + } else { + *response = 1; + } + break; + case ALPM_QUESTION_REPLACE_PKG: +- *response = yesno(_(":: Replace %s with %s/%s?"), ++ *response = yesno(COLOR_DOUBLECOLON, _(":: Replace %s with %s/%s?"), + alpm_pkg_get_name(data1), + (char *)data3, + alpm_pkg_get_name(data2)); +@@ -280,12 +280,12 @@ void cb_question(alpm_question_t event, + /* data parameters: target package, local package, conflict (strings) */ + /* print conflict only if it contains new information */ + if(strcmp(data1, data3) == 0 || strcmp(data2, data3) == 0) { +- *response = noyes(_(":: %s and %s are in conflict. Remove %s?"), ++ *response = noyes(COLOR_DOUBLECOLON, _(":: %s and %s are in conflict. Remove %s?"), + (char *)data1, + (char *)data2, + (char *)data2); + } else { +- *response = noyes(_(":: %s and %s are in conflict (%s). Remove %s?"), ++ *response = noyes(COLOR_DOUBLECOLON, _(":: %s and %s are in conflict (%s). Remove %s?"), + (char *)data1, + (char *)data2, + (char *)data3, +@@ -302,13 +302,13 @@ void cb_question(alpm_question_t event, + (char *)alpm_pkg_get_name(i->data)); + count++; + } +- printf(_n( ++ color_printf(COLOR_DOUBLECOLON, _n( + ":: The following package cannot be upgraded due to unresolvable dependencies:\n", + ":: The following packages cannot be upgraded due to unresolvable dependencies:\n", + count)); +- list_display(" ", namelist); ++ list_display(NULL, " ", namelist); + printf("\n"); +- *response = noyes(_n( ++ *response = noyes(NULL, _n( + "Do you want to skip the above package for this upgrade?", + "Do you want to skip the above packages for this upgrade?", + count)); +@@ -320,7 +320,7 @@ void cb_question(alpm_question_t event, + alpm_list_t *providers = (alpm_list_t *)data1; + size_t count = alpm_list_count(providers); + char *depstring = alpm_dep_compute_string((alpm_depend_t *)data2); +- printf(_(":: There are %zd providers available for %s:\n"), count, ++ color_printf(COLOR_DOUBLECOLON, _(":: There are %zd providers available for %s:\n"), count, + depstring); + free(depstring); + select_display(providers); +@@ -329,7 +329,7 @@ void cb_question(alpm_question_t event, + break; + case ALPM_QUESTION_LOCAL_NEWER: + if(!config->op_s_downloadonly) { +- *response = yesno(_(":: %s-%s: local version is newer. Upgrade anyway?"), ++ *response = yesno(COLOR_DOUBLECOLON, _(":: %s-%s: local version is newer. Upgrade anyway?"), + alpm_pkg_get_name(data1), + alpm_pkg_get_version(data1)); + } else { +@@ -337,7 +337,7 @@ void cb_question(alpm_question_t event, + } + break; + case ALPM_QUESTION_CORRUPTED_PKG: +- *response = yesno(_(":: File %s is corrupted (%s).\n" ++ *response = yesno(COLOR_DOUBLECOLON, _(":: File %s is corrupted (%s).\n" + "Do you want to delete it?"), + (char *)data1, + alpm_strerror(*(enum _alpm_errno_t *)data2)); +@@ -347,7 +347,7 @@ void cb_question(alpm_question_t event, + alpm_pgpkey_t *key = data1; + char created[12]; + strftime(created, 12, "%Y-%m-%d", localtime(&(key->created))); +- *response = yesno(_(":: Import PGP key %s, \"%s\", created %s?"), ++ *response = yesno(COLOR_DOUBLECOLON, _(":: Import PGP key %s, \"%s\", created %s?"), + key->fingerprint, key->uid, created); + } + break; +@@ -481,8 +481,9 @@ void cb_progress(alpm_progress_t event, + + } + +- printf("(%*ld/%*ld) %ls%-*s", digits, (unsigned long)current, +- digits, (unsigned long)howmany, wcstr, padwid, ""); ++ color_printf(COLOR_BLUE_ALL, "(%*ld/%*ld)", digits, (unsigned long)current, ++ digits, (unsigned long)howmany); ++ printf(" %ls%-*s", wcstr, padwid, ""); + + free(wcstr); + +diff -up -Npaur a/src/pacman/package.c b/src/pacman/package.c +--- a/src/pacman/package.c 2012-02-03 01:18:52.000000000 +0200 ++++ b/src/pacman/package.c 2012-07-20 21:48:20.266827634 +0300 +@@ -41,7 +41,7 @@ + * @param deps a list with items of type alpm_depend_t + * @return a string list, must be freed + */ +-static void deplist_display(const char *title, ++static void deplist_display(const colordata_t *colors_title, const char *title, + alpm_list_t *deps) + { + alpm_list_t *i, *text = NULL; +@@ -49,7 +49,7 @@ static void deplist_display(const char * + alpm_depend_t *dep = alpm_list_getdata(i); + text = alpm_list_add(text, alpm_dep_compute_string(dep)); + } +- list_display(title, text); ++ list_display(colors_title, title, text); + FREELIST(text); + } + +@@ -102,65 +102,65 @@ void dump_pkg_full(alpm_pkg_t *pkg, int + + /* actual output */ + if(from == PKG_FROM_SYNCDB) { +- string_display(_("Repository :"), +- alpm_db_get_name(alpm_pkg_get_db(pkg))); ++ color_string_display(COLOR_WHITE_ALL, _("Repository :"), ++ COLOR_MAGENTA_ALL, alpm_db_get_name(alpm_pkg_get_db(pkg))); + } +- string_display(_("Name :"), alpm_pkg_get_name(pkg)); +- string_display(_("Version :"), alpm_pkg_get_version(pkg)); +- string_display(_("URL :"), alpm_pkg_get_url(pkg)); +- list_display(_("Licenses :"), alpm_pkg_get_licenses(pkg)); +- list_display(_("Groups :"), alpm_pkg_get_groups(pkg)); +- deplist_display(_("Provides :"), alpm_pkg_get_provides(pkg)); +- deplist_display(_("Depends On :"), alpm_pkg_get_depends(pkg)); +- list_display_linebreak(_("Optional Deps :"), alpm_pkg_get_optdepends(pkg)); ++ color_string_display(COLOR_WHITE_ALL, _("Name :"), COLOR_WHITE_ALL, alpm_pkg_get_name(pkg)); ++ color_string_display(COLOR_WHITE_ALL, _("Version :"), COLOR_GREEN_ALL, alpm_pkg_get_version(pkg)); ++ color_string_display(COLOR_WHITE_ALL, _("URL :"), COLOR_CYAN_ALL, alpm_pkg_get_url(pkg)); ++ list_display(COLOR_WHITE_ALL, _("Licenses :"), alpm_pkg_get_licenses(pkg)); ++ list_display(COLOR_WHITE_ALL, _("Groups :"), alpm_pkg_get_groups(pkg)); ++ deplist_display(COLOR_WHITE_ALL, _("Provides :"), alpm_pkg_get_provides(pkg)); ++ deplist_display(COLOR_WHITE_ALL, _("Depends On :"), alpm_pkg_get_depends(pkg)); ++ list_display_linebreak(COLOR_WHITE_ALL, _("Optional Deps :"), alpm_pkg_get_optdepends(pkg)); + if(extra || from == PKG_FROM_LOCALDB) { +- list_display(_("Required By :"), requiredby); ++ list_display(COLOR_WHITE_ALL, _("Required By :"), requiredby); + } +- deplist_display(_("Conflicts With :"), alpm_pkg_get_conflicts(pkg)); +- deplist_display(_("Replaces :"), alpm_pkg_get_replaces(pkg)); ++ deplist_display(COLOR_WHITE_ALL, _("Conflicts With :"), alpm_pkg_get_conflicts(pkg)); ++ deplist_display(COLOR_WHITE_ALL, _("Replaces :"), alpm_pkg_get_replaces(pkg)); + + size = humanize_size(alpm_pkg_get_size(pkg), 'K', 2, &label); + if(from == PKG_FROM_SYNCDB) { +- printf(_("Download Size : %6.2f %s\n"), size, label); ++ color_printf(COLOR_WHITE_COLON, _("Download Size : %6.2f %s\n"), size, label); + } else if(from == PKG_FROM_FILE) { +- printf(_("Compressed Size: %6.2f %s\n"), size, label); ++ color_printf(COLOR_WHITE_COLON, _("Compressed Size: %6.2f %s\n"), size, label); + } + + size = humanize_size(alpm_pkg_get_isize(pkg), 'K', 2, &label); +- printf(_("Installed Size : %6.2f %s\n"), size, label); ++ color_printf(COLOR_WHITE_COLON, _("Installed Size : %6.2f %s\n"), size, label); + +- string_display(_("Packager :"), alpm_pkg_get_packager(pkg)); +- string_display(_("Architecture :"), alpm_pkg_get_arch(pkg)); +- string_display(_("Build Date :"), bdatestr); ++ string_display(COLOR_WHITE_ALL, _("Packager :"), alpm_pkg_get_packager(pkg)); ++ string_display(COLOR_WHITE_ALL, _("Architecture :"), alpm_pkg_get_arch(pkg)); ++ string_display(COLOR_WHITE_ALL, _("Build Date :"), bdatestr); + if(from == PKG_FROM_LOCALDB) { +- string_display(_("Install Date :"), idatestr); +- string_display(_("Install Reason :"), reason); ++ string_display(COLOR_WHITE_ALL, _("Install Date :"), idatestr); ++ string_display(COLOR_WHITE_ALL, _("Install Reason :"), reason); + } + if(from == PKG_FROM_FILE || from == PKG_FROM_LOCALDB) { +- string_display(_("Install Script :"), ++ string_display(COLOR_WHITE_ALL, _("Install Script :"), + alpm_pkg_has_scriptlet(pkg) ? _("Yes") : _("No")); + } + + if(from == PKG_FROM_SYNCDB) { +- string_display(_("MD5 Sum :"), alpm_pkg_get_md5sum(pkg)); +- string_display(_("SHA256 Sum :"), alpm_pkg_get_sha256sum(pkg)); +- string_display(_("Signatures :"), ++ string_display(COLOR_WHITE_ALL, _("MD5 Sum :"), alpm_pkg_get_md5sum(pkg)); ++ string_display(COLOR_WHITE_ALL, _("SHA256 Sum :"), alpm_pkg_get_sha256sum(pkg)); ++ string_display(COLOR_WHITE_ALL, _("Signatures :"), + alpm_pkg_get_base64_sig(pkg) ? _("Yes") : _("None")); + } + if(from == PKG_FROM_FILE) { + alpm_siglist_t siglist; + int err = alpm_pkg_check_pgp_signature(pkg, &siglist); + if(err && alpm_errno(config->handle) == ALPM_ERR_SIG_MISSING) { +- string_display(_("Signatures :"), _("None")); ++ string_display(COLOR_WHITE_ALL, _("Signatures :"), _("None")); + } else if(err) { +- string_display(_("Signatures :"), ++ string_display(COLOR_WHITE_ALL, _("Signatures :"), + alpm_strerror(alpm_errno(config->handle))); + } else { + signature_display(_("Signatures :"), &siglist); + } + alpm_siglist_cleanup(&siglist); + } +- string_display(_("Description :"), alpm_pkg_get_desc(pkg)); ++ string_display(COLOR_WHITE_ALL, _("Description :"), alpm_pkg_get_desc(pkg)); + + /* Print additional package info if info flag passed more than once */ + if(from == PKG_FROM_LOCALDB && extra) { +@@ -219,7 +219,7 @@ void dump_pkg_backups(alpm_pkg_t *pkg) + { + alpm_list_t *i; + const char *root = alpm_option_get_root(config->handle); +- printf(_("Backup Files:\n")); ++ color_printf(COLOR_WHITE_ALL, _("Backup Files:\n")); + if(alpm_pkg_get_backup(pkg)) { + /* package has backup files, so print them */ + for(i = alpm_pkg_get_backup(pkg); i; i = alpm_list_next(i)) { +@@ -252,7 +252,8 @@ void dump_pkg_files(alpm_pkg_t *pkg, int + for(i = 0; i < pkgfiles->count; i++) { + const alpm_file_t *file = pkgfiles->files + i; + if(!quiet) { +- printf("%s %s%s\n", pkgname, root, file->name); ++ color_printf(COLOR_WHITE_ALL, "%s", pkgname); ++ printf(" %s%s\n", root, file->name); + } else { + printf("%s%s\n", root, file->name); + } +diff -up -Npaur a/src/pacman/pacman.c b/src/pacman/pacman.c +--- a/src/pacman/pacman.c 2012-02-15 23:57:20.000000000 +0200 ++++ b/src/pacman/pacman.c 2012-07-20 21:48:20.266827634 +0300 +@@ -219,11 +219,23 @@ static void usage(int op, const char * c + */ + static void version(void) + { ++ color_printf(COLOR_YELLOW_ALL, " .--. "); ++ printf(" "); ++ color_printf(COLOR_RED_ALL, " .---. "); ++ printf(" Pacman-color v%s - libalpm v%s\n", PACKAGE_VERSION, alpm_version()); ++ color_printf(COLOR_YELLOW_ALL, "/ _.-'"); ++ color_printf(COLOR_WHITE_ALL, " .-. .-"); ++ color_printf(COLOR_RED_ALL, "|O O |"); ++ printf(" Copyright (C) 2006-2012 Pacman Development Team\n"); ++ color_printf(COLOR_YELLOW_ALL, "\\ '-."); ++ color_printf(COLOR_WHITE_ALL, " '-' '-"); ++ color_printf(COLOR_RED_ALL, "|~~~ |"); ++ printf(" Copyright (C) 2002-2006 Judd Vinet\n"); ++ color_printf(COLOR_YELLOW_ALL, " '--' "); ++ printf(" "); ++ color_printf(COLOR_RED_ALL, "|.-.-.|"); ++ printf(" Colored by vogo <vogo(at)seznam(dot)cz>\n"); + printf("\n"); +- printf(" .--. Pacman v%s - libalpm v%s\n", PACKAGE_VERSION, alpm_version()); +- printf("/ _.-' .-. .-. .-. Copyright (C) 2006-2012 Pacman Development Team\n"); +- printf("\\ '-. '-' '-' '-' Copyright (C) 2002-2006 Judd Vinet\n"); +- printf(" '--'\n"); + printf(_(" This program may be freely redistributed under\n" + " the terms of the GNU General Public License.\n")); + printf("\n"); +@@ -795,6 +807,7 @@ int main(int argc, char *argv[]) + + /* init config data */ + config = config_new(); ++ parsecolorconfig(); + + /* disable progressbar if the output is redirected */ + if(!isatty(fileno(stdout))) { +@@ -896,18 +909,18 @@ int main(int argc, char *argv[]) + + if(config->verbose > 0) { + alpm_list_t *i; +- printf("Root : %s\n", alpm_option_get_root(config->handle)); +- printf("Conf File : %s\n", config->configfile); +- printf("DB Path : %s\n", alpm_option_get_dbpath(config->handle)); +- printf("Cache Dirs: "); ++ string_display(COLOR_WHITE_ALL, "Root :", alpm_option_get_root(config->handle)); ++ string_display(COLOR_WHITE_ALL, "Conf File :", config->configfile); ++ string_display(COLOR_WHITE_ALL, "DB Path :", alpm_option_get_dbpath(config->handle)); ++ color_printf(COLOR_WHITE_ALL, "Cache Dirs: "); + for(i = alpm_option_get_cachedirs(config->handle); i; i = alpm_list_next(i)) { + printf("%s ", (char *)alpm_list_getdata(i)); + } + printf("\n"); +- printf("Lock File : %s\n", alpm_option_get_lockfile(config->handle)); +- printf("Log File : %s\n", alpm_option_get_logfile(config->handle)); +- printf("GPG Dir : %s\n", alpm_option_get_gpgdir(config->handle)); +- list_display("Targets :", pm_targets); ++ string_display(COLOR_WHITE_ALL, "Lock File :", alpm_option_get_lockfile(config->handle)); ++ string_display(COLOR_WHITE_ALL, "Log File :", alpm_option_get_logfile(config->handle)); ++ string_display(COLOR_WHITE_ALL, "GPG Dir :", alpm_option_get_gpgdir(config->handle)); ++ list_display(COLOR_WHITE_ALL, "Targets :", pm_targets); + } + + /* Log command line */ +diff -up -Npaur a/src/pacman/query.c b/src/pacman/query.c +--- a/src/pacman/query.c 2011-12-23 22:36:36.000000000 +0200 ++++ b/src/pacman/query.c 2012-07-20 21:48:20.268827634 +0300 +@@ -266,7 +266,9 @@ static int query_search(alpm_list_t *tar + alpm_pkg_t *pkg = alpm_list_getdata(i); + + if(!config->quiet) { +- printf("local/%s %s", alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg)); ++ color_printf(COLOR_MAGENTA_ALL, "local/"); ++ color_printf(COLOR_WHITE_ALL, "%s ", alpm_pkg_get_name(pkg)); ++ color_printf(COLOR_GREEN_ALL, "%s", alpm_pkg_get_version(pkg)); + } else { + printf("%s", alpm_pkg_get_name(pkg)); + } +@@ -275,16 +277,11 @@ static int query_search(alpm_list_t *tar + if(!config->quiet) { + if((grp = alpm_pkg_get_groups(pkg)) != NULL) { + alpm_list_t *k; +- printf(" ("); ++ color_printf(COLOR_BLUE_ALL, " ("); + for(k = grp; k; k = alpm_list_next(k)) { + const char *group = alpm_list_getdata(k); +- printf("%s", group); +- if(alpm_list_next(k)) { +- /* only print a spacer if there are more groups */ +- printf(" "); +- } ++ color_printf(COLOR_BLUE_ALL, "%s%s", group, (alpm_list_next(k) ? " " : ")")); + } +- printf(")"); + } + + /* we need a newline and initial indent first */ +@@ -315,7 +312,8 @@ static int query_group(alpm_list_t *targ + + for(p = grp->packages; p; p = alpm_list_next(p)) { + alpm_pkg_t *pkg = alpm_list_getdata(p); +- printf("%s %s\n", grp->name, alpm_pkg_get_name(pkg)); ++ color_printf(COLOR_BLUE_ALL, "%s ", grp->name); ++ color_printf(COLOR_WHITE_ALL, "%s\n", alpm_pkg_get_name(pkg)); + } + } + } else { +@@ -327,8 +325,8 @@ static int query_group(alpm_list_t *targ + const alpm_list_t *p; + for(p = grp->packages; p; p = alpm_list_next(p)) { + if(!config->quiet) { +- printf("%s %s\n", grpname, +- alpm_pkg_get_name(alpm_list_getdata(p))); ++ color_printf(COLOR_BLUE_ALL, "%s ", grpname); ++ color_printf(COLOR_WHITE_ALL, "%s\n", alpm_pkg_get_name(alpm_list_getdata(p))); + } else { + printf("%s\n", alpm_pkg_get_name(alpm_list_getdata(p))); + } +@@ -478,7 +476,8 @@ static int display(alpm_pkg_t *pkg) + if(!config->op_q_info && !config->op_q_list + && !config->op_q_changelog && !config->op_q_check) { + if(!config->quiet) { +- printf("%s %s\n", alpm_pkg_get_name(pkg), alpm_pkg_get_version(pkg)); ++ color_printf(COLOR_WHITE_ALL, "%s ", alpm_pkg_get_name(pkg)); ++ color_printf(COLOR_GREEN_ALL, "%s\n", alpm_pkg_get_version(pkg)); + } else { + printf("%s\n", alpm_pkg_get_name(pkg)); + } +diff -up -Npaur a/src/pacman/remove.c b/src/pacman/remove.c +--- a/src/pacman/remove.c 2012-02-06 13:36:22.000000000 +0200 ++++ b/src/pacman/remove.c 2012-07-20 21:48:20.268827634 +0300 +@@ -111,14 +111,14 @@ int pacman_remove(alpm_list_t *targets) + case ALPM_ERR_PKG_INVALID_ARCH: + for(i = data; i; i = alpm_list_next(i)) { + char *pkg = alpm_list_getdata(i); +- printf(_(":: package %s does not have a valid architecture\n"), pkg); ++ color_printf(COLOR_DOUBLECOLON, _(":: package %s does not have a valid architecture\n"), pkg); + } + break; + case ALPM_ERR_UNSATISFIED_DEPS: + for(i = data; i; i = alpm_list_next(i)) { + alpm_depmissing_t *miss = alpm_list_getdata(i); + char *depstring = alpm_dep_compute_string(miss->depend); +- printf(_(":: %s: requires %s\n"), miss->target, depstring); ++ color_printf(COLOR_DOUBLECOLON, _(":: %s: requires %s\n"), miss->target, depstring); + free(depstring); + } + break; +@@ -140,7 +140,7 @@ int pacman_remove(alpm_list_t *targets) + holdpkg = 1; + } + } +- if(holdpkg && (noyes(_("HoldPkg was found in target list. Do you want to continue?")) == 0)) { ++ if(holdpkg && (noyes(NULL, _("HoldPkg was found in target list. Do you want to continue?")) == 0)) { + retval = 1; + goto cleanup; + } +@@ -160,7 +160,7 @@ int pacman_remove(alpm_list_t *targets) + /* print targets and ask user confirmation */ + display_targets(); + printf("\n"); +- if(yesno(_("Do you want to remove these packages?")) == 0) { ++ if(yesno(NULL, _("Do you want to remove these packages?")) == 0) { + retval = 1; + goto cleanup; + } +diff -up -Npaur a/src/pacman/sync.c b/src/pacman/sync.c +--- a/src/pacman/sync.c 2012-03-13 15:24:11.000000000 +0200 ++++ b/src/pacman/sync.c 2012-07-20 21:48:20.269827634 +0300 +@@ -146,8 +146,8 @@ static int sync_cleandb_all(void) + int ret = 0; + + dbpath = alpm_option_get_dbpath(config->handle); +- printf(_("Database directory: %s\n"), dbpath); +- if(!yesno(_("Do you want to remove unused repositories?"))) { ++ color_printf(COLOR_WHITE_COLON, _("Database directory: %s\n"), dbpath); ++ if(!yesno(NULL, _("Do you want to remove unused repositories?"))) { + return 0; + } + printf(_("removing unused sync repositories...\n")); +@@ -175,7 +175,7 @@ static int sync_cleancache(int level) + int ret = 0; + + for(i = cachedirs; i; i = alpm_list_next(i)) { +- printf(_("Cache directory: %s\n"), (char *)alpm_list_getdata(i)); ++ color_printf(COLOR_WHITE_COLON, _("Cache directory: %s\n"), (char *)alpm_list_getdata(i)); + } + + if(!config->cleanmethod) { +@@ -184,19 +184,19 @@ static int sync_cleancache(int level) + } + + if(level == 1) { +- printf(_("Packages to keep:\n")); ++ color_printf(COLOR_WHITE_COLON, _("Packages to keep:\n")); + if(config->cleanmethod & PM_CLEAN_KEEPINST) { + printf(_(" All locally installed packages\n")); + } + if(config->cleanmethod & PM_CLEAN_KEEPCUR) { + printf(_(" All current sync database packages\n")); + } +- if(!yesno(_("Do you want to remove all other packages from cache?"))) { ++ if(!yesno(NULL, _("Do you want to remove all other packages from cache?"))) { + return 0; + } + printf(_("removing old packages from cache...\n")); + } else { +- if(!noyes(_("Do you want to remove ALL files from cache?"))) { ++ if(!noyes(NULL, _("Do you want to remove ALL files from cache?"))) { + return 0; + } + printf(_("removing all files from cache...\n")); +@@ -345,9 +345,9 @@ static void print_installed(alpm_db_t *d + if(lpkg) { + const char *lpkgver = alpm_pkg_get_version(lpkg); + if(strcmp(lpkgver,pkgver) == 0) { +- printf(" [%s]", _("installed")); ++ color_printf(COLOR_CYAN_ALL, " [%s]", _("installed")); + } else { +- printf(" [%s: %s]", _("installed"), lpkgver); ++ color_printf(COLOR_CYAN_ALL, " [%s: %s]", _("installed"), lpkgver); + } + } + } +@@ -380,8 +380,9 @@ static int sync_search(alpm_list_t *sync + alpm_pkg_t *pkg = alpm_list_getdata(j); + + if(!config->quiet) { +- printf("%s/%s %s", alpm_db_get_name(db), alpm_pkg_get_name(pkg), +- alpm_pkg_get_version(pkg)); ++ color_printf(COLOR_MAGENTA_ALL, "%s/", alpm_db_get_name(db)); ++ color_printf(COLOR_WHITE_ALL, "%s ", alpm_pkg_get_name(pkg)); ++ color_printf(COLOR_GREEN_ALL, "%s", alpm_pkg_get_version(pkg)); + } else { + printf("%s", alpm_pkg_get_name(pkg)); + } +@@ -389,16 +390,11 @@ static int sync_search(alpm_list_t *sync + if(!config->quiet) { + if((grp = alpm_pkg_get_groups(pkg)) != NULL) { + alpm_list_t *k; +- printf(" ("); ++ color_printf(COLOR_BLUE_ALL, " ("); + for(k = grp; k; k = alpm_list_next(k)) { + const char *group = alpm_list_getdata(k); +- printf("%s", group); +- if(alpm_list_next(k)) { +- /* only print a spacer if there are more groups */ +- printf(" "); +- } ++ color_printf(COLOR_BLUE_ALL, "%s%s", group, (alpm_list_next(k) ? " " : ")")); + } +- printf(")"); + } + + print_installed(db_local, pkg); +@@ -433,8 +429,8 @@ static int sync_group(int level, alpm_li + /* get names of packages in group */ + for(k = grp->packages; k; k = alpm_list_next(k)) { + if(!config->quiet) { +- printf("%s %s\n", grpname, +- alpm_pkg_get_name(alpm_list_getdata(k))); ++ color_printf(COLOR_BLUE_ALL, "%s ", grpname); ++ color_printf(COLOR_WHITE_ALL, "%s\n", alpm_pkg_get_name(alpm_list_getdata(k))); + } else { + printf("%s\n", alpm_pkg_get_name(alpm_list_getdata(k))); + } +@@ -451,8 +447,8 @@ static int sync_group(int level, alpm_li + + if(level > 1) { + for(k = grp->packages; k; k = alpm_list_next(k)) { +- printf("%s %s\n", grp->name, +- alpm_pkg_get_name(alpm_list_getdata(k))); ++ color_printf(COLOR_BLUE_ALL, "%s ", grp->name); ++ color_printf(COLOR_WHITE_ALL, "%s\n", alpm_pkg_get_name(alpm_list_getdata(k))); + } + } else { + /* print grp names only, no package names */ +@@ -570,8 +566,9 @@ static int sync_list(alpm_list_t *syncs, + alpm_pkg_t *pkg = alpm_list_getdata(j); + + if(!config->quiet) { +- printf("%s %s %s", alpm_db_get_name(db), alpm_pkg_get_name(pkg), +- alpm_pkg_get_version(pkg)); ++ color_printf(COLOR_MAGENTA_ALL, "%s ", alpm_db_get_name(db)); ++ color_printf(COLOR_WHITE_ALL, "%s ", alpm_pkg_get_name(pkg)); ++ color_printf(COLOR_GREEN_ALL, "%s", alpm_pkg_get_version(pkg)); + print_installed(db_local, pkg); + printf("\n"); + } else { +@@ -654,7 +651,7 @@ static int process_group(alpm_list_t *db + + + if(config->print == 0) { +- printf(_(":: There are %d members in group %s:\n"), count, ++ color_printf(COLOR_DOUBLECOLON, _(":: There are %d members in group %s:\n"), count, + group); + select_display(pkgs); + char *array = malloc(count); +@@ -771,7 +768,7 @@ static int sync_trans(alpm_list_t *targe + } + + if(config->op_s_upgrade) { +- printf(_(":: Starting full system upgrade...\n")); ++ color_printf(COLOR_DOUBLECOLON, _(":: Starting full system upgrade...\n")); + alpm_logaction(config->handle, "starting full system upgrade\n"); + if(alpm_sync_sysupgrade(config->handle, config->op_s_upgrade >= 2) == -1) { + pm_printf(ALPM_LOG_ERROR, "%s\n", alpm_strerror(alpm_errno(config->handle))); +@@ -797,14 +794,14 @@ int sync_prepare_execute(void) + case ALPM_ERR_PKG_INVALID_ARCH: + for(i = data; i; i = alpm_list_next(i)) { + char *pkg = alpm_list_getdata(i); +- printf(_(":: package %s does not have a valid architecture\n"), pkg); ++ color_printf(COLOR_DOUBLECOLON, _(":: package %s does not have a valid architecture\n"), pkg); + } + break; + case ALPM_ERR_UNSATISFIED_DEPS: + for(i = data; i; i = alpm_list_next(i)) { + alpm_depmissing_t *miss = alpm_list_getdata(i); + char *depstring = alpm_dep_compute_string(miss->depend); +- printf(_(":: %s: requires %s\n"), miss->target, depstring); ++ color_printf(COLOR_DOUBLECOLON, _(":: %s: requires %s\n"), miss->target, depstring); + free(depstring); + } + break; +@@ -813,11 +810,11 @@ int sync_prepare_execute(void) + alpm_conflict_t *conflict = alpm_list_getdata(i); + /* only print reason if it contains new information */ + if(conflict->reason->mod == ALPM_DEP_MOD_ANY) { +- printf(_(":: %s and %s are in conflict\n"), ++ color_printf(COLOR_DOUBLECOLON, _(":: %s and %s are in conflict\n"), + conflict->package1, conflict->package2); + } else { + char *reason = alpm_dep_compute_string(conflict->reason); +- printf(_(":: %s and %s are in conflict (%s)\n"), ++ color_printf(COLOR_DOUBLECOLON, _(":: %s and %s are in conflict (%s)\n"), + conflict->package1, conflict->package2, reason); + free(reason); + } +@@ -850,9 +847,9 @@ int sync_prepare_execute(void) + + int confirm; + if(config->op_s_downloadonly) { +- confirm = yesno(_("Proceed with download?")); ++ confirm = yesno(NULL, _("Proceed with download?")); + } else { +- confirm = yesno(_("Proceed with installation?")); ++ confirm = yesno(NULL, _("Proceed with installation?")); + } + if(!confirm) { + goto cleanup; +@@ -872,7 +869,7 @@ int sync_prepare_execute(void) + conflict->file, conflict->target, conflict->ctarget); + break; + case ALPM_FILECONFLICT_FILESYSTEM: +- printf(_("%s: %s exists in filesystem\n"), ++ color_printf(COLOR_WHITE_COLON, _("%s: %s exists in filesystem\n"), + conflict->target, conflict->file); + break; + } +@@ -891,7 +888,7 @@ int sync_prepare_execute(void) + break; + } + /* TODO: stderr? */ +- printf(_("Errors occurred, no packages were upgraded.\n")); ++ color_printf(COLOR_RED_ALL, _("Errors occurred, no packages were upgraded.\n")); + retval = 1; + goto cleanup; + } +@@ -939,7 +936,7 @@ int pacman_sync(alpm_list_t *targets) + + if(config->op_s_sync) { + /* grab a fresh package list */ +- printf(_(":: Synchronizing package databases...\n")); ++ color_printf(COLOR_DOUBLECOLON, _(":: Synchronizing package databases...\n")); + alpm_logaction(config->handle, "synchronizing package lists\n"); + if(!sync_synctree(config->op_s_sync, sync_dbs)) { + return 1; +@@ -992,9 +989,9 @@ int pacman_sync(alpm_list_t *targets) + alpm_list_t *tmp = NULL; + if(config->op_s_upgrade || (tmp = alpm_list_diff(targets, packages, (alpm_list_fn_cmp)strcmp))) { + alpm_list_free(tmp); +- printf(_(":: The following packages should be upgraded first :\n")); +- list_display(" ", packages); +- if(yesno(_(":: Do you want to cancel the current operation\n" ++ color_printf(COLOR_DOUBLECOLON, _(":: The following packages should be upgraded first :\n")); ++ list_display(NULL, " ", packages); ++ if(yesno(COLOR_DOUBLECOLON2, _(":: Do you want to cancel the current operation\n" + ":: and upgrade these packages now?"))) { + FREELIST(targs); + targs = packages; +diff -up -Npaur a/src/pacman/util.c b/src/pacman/util.c +--- a/src/pacman/util.c 2012-02-20 07:18:31.000000000 +0200 ++++ b/src/pacman/util.c 2012-07-20 21:48:20.270827634 +0300 +@@ -48,6 +48,20 @@ + #include "conf.h" + #include "callback.h" + ++#define COLOR_LEN 8 ++ ++typedef struct __colortab_t { ++ char red[COLOR_LEN + 1]; ++ char green[COLOR_LEN + 1]; ++ char yellow[COLOR_LEN + 1]; ++ char blue[COLOR_LEN + 1]; ++ char magenta[COLOR_LEN + 1]; ++ char cyan[COLOR_LEN + 1]; ++ char white[COLOR_LEN + 1]; ++ char none[COLOR_LEN + 1]; ++} colortab_t; ++ ++static colortab_t colortab; + + int trans_init(alpm_transflag_t flags, int check_valid) + { +@@ -463,10 +477,10 @@ static size_t string_length(const char * + return len; + } + +-void string_display(const char *title, const char *string) ++void string_display(const colordata_t *colors_title, const char *title, const char *string) + { + if(title) { +- printf("%s ", title); ++ color_printf(colors_title, "%s ", title); + } + if(string == NULL || string[0] == '\0') { + printf(_("None")); +@@ -599,14 +613,14 @@ int table_display(const char *title, con + return 0; + } + +-void list_display(const char *title, const alpm_list_t *list) ++void list_display(const colordata_t *colors_title, const char *title, const alpm_list_t *list) + { + const alpm_list_t *i; + size_t len = 0; + + if(title) { + len = string_length(title) + 1; +- printf("%s ", title); ++ color_printf(colors_title, "%s ", title); + } + + if(!list) { +@@ -640,13 +654,13 @@ void list_display(const char *title, con + } + } + +-void list_display_linebreak(const char *title, const alpm_list_t *list) ++void list_display_linebreak(const colordata_t *colors_title, const char *title, const alpm_list_t *list) + { + size_t len = 0; + + if(title) { + len = string_length(title) + 1; +- printf("%s ", title); ++ color_printf(colors_title, "%s ", title); + } + + if(!list) { +@@ -867,11 +881,11 @@ static void _display_targets(alpm_list_t + alpm_list_t *header = create_verbose_header(show_dl_size); + if(table_display(str, header, rows) != 0) { + /* fallback to list display if table wouldn't fit */ +- list_display(str, names); ++ list_display(COLOR_YELLOW_ALL, str, names); + } + alpm_list_free(header); + } else { +- list_display(str, names); ++ list_display(COLOR_YELLOW_ALL, str, names); + } + printf("\n"); + +@@ -886,21 +900,21 @@ static void _display_targets(alpm_list_t + + if(dlsize > 0 || config->op_s_downloadonly) { + size = humanize_size(dlsize, 'M', 2, &label); +- printf(_("Total Download Size: %.2f %s\n"), size, label); ++ color_printf(COLOR_WHITE_COLON, _("Total Download Size: %.2f %s\n"), size, label); + } + if(!config->op_s_downloadonly) { + if(isize > 0) { + size = humanize_size(isize, 'M', 2, &label); +- printf(_("Total Installed Size: %.2f %s\n"), size, label); ++ color_printf(COLOR_WHITE_COLON, _("Total Installed Size: %.2f %s\n"), size, label); + } + if(rsize > 0 && isize == 0) { + size = humanize_size(rsize, 'M', 2, &label); +- printf(_("Total Removed Size: %.2f %s\n"), size, label); ++ color_printf(COLOR_WHITE_COLON, _("Total Removed Size: %.2f %s\n"), size, label); + } + /* only show this net value if different from raw installed size */ + if(isize > 0 && rsize > 0) { + size = humanize_size(isize - rsize, 'M', 2, &label); +- printf(_("Net Upgrade Size: %.2f %s\n"), size, label); ++ color_printf(COLOR_WHITE_COLON, _("Net Upgrade Size: %.2f %s\n"), size, label); + } + } + } +@@ -1115,7 +1129,7 @@ void display_new_optdepends(alpm_pkg_t * + alpm_list_t *optdeps = alpm_list_diff(new,old,str_cmp); + if(optdeps) { + printf(_("New optional dependencies for %s\n"), alpm_pkg_get_name(newpkg)); +- list_display_linebreak(" ", optdeps); ++ list_display_linebreak(NULL, " ", optdeps); + } + alpm_list_free(optdeps); + } +@@ -1125,7 +1139,7 @@ void display_optdepends(alpm_pkg_t *pkg) + alpm_list_t *optdeps = alpm_pkg_get_optdepends(pkg); + if(optdeps) { + printf(_("Optional dependencies for %s\n"), alpm_pkg_get_name(pkg)); +- list_display_linebreak(" ", optdeps); ++ list_display_linebreak(NULL, " ", optdeps); + } + } + +@@ -1133,9 +1147,9 @@ static void display_repo_list(const char + { + const char *prefix= " "; + +- printf(":: "); +- printf(_("Repository %s\n"), dbname); +- list_display(prefix, list); ++ color_printf(COLOR_BLUE_ALL, ":: "); ++ color_printf(COLOR_WHITE_ALL, _("Repository %s\n"), dbname); ++ list_display(NULL, prefix, list); + } + + void select_display(const alpm_list_t *pkglist) +@@ -1354,7 +1368,7 @@ int select_question(int count) + + + /* presents a prompt and gets a Y/N answer */ +-static int question(short preset, char *fmt, va_list args) ++static int question(const colordata_t *colors, short preset, char *fmt, va_list args) + { + char response[32]; + FILE *stream; +@@ -1370,7 +1384,7 @@ static int question(short preset, char * + fflush(stdout); + fflush(stderr); + +- vfprintf(stream, fmt, args); ++ color_vfprintf(stream, colors, fmt, args); + + if(preset) { + fprintf(stream, " %s ", _("[Y/n]")); +@@ -1407,25 +1421,25 @@ static int question(short preset, char * + return 0; + } + +-int yesno(char *fmt, ...) ++int yesno(const colordata_t *colors, char *fmt, ...) + { + int ret; + va_list args; + + va_start(args, fmt); +- ret = question(1, fmt, args); ++ ret = question(colors, 1, fmt, args); + va_end(args); + + return ret; + } + +-int noyes(char *fmt, ...) ++int noyes(const colordata_t *colors, char *fmt, ...) + { + int ret; + va_list args; + + va_start(args, fmt); +- ret = question(0, fmt, args); ++ ret = question(colors, 0, fmt, args); + va_end(args); + + return ret; +@@ -1474,22 +1488,42 @@ int pm_vasprintf(char **string, alpm_log + ret = vasprintf(&msg, format, args); + + /* print a prefix to the message */ +- switch(level) { +- case ALPM_LOG_ERROR: +- pm_asprintf(string, _("error: %s"), msg); +- break; +- case ALPM_LOG_WARNING: +- pm_asprintf(string, _("warning: %s"), msg); +- break; +- case ALPM_LOG_DEBUG: +- pm_asprintf(string, "debug: %s", msg); +- break; +- case ALPM_LOG_FUNCTION: +- pm_asprintf(string, "function: %s", msg); +- break; +- default: +- pm_asprintf(string, "%s", msg); +- break; ++ if(isatty(fileno(stdout))) { ++ switch(level) { ++ case ALPM_LOG_ERROR: ++ pm_asprintf(string, "%s%s%s%s", colortab.red, _("error: "), colortab.none, msg); ++ break; ++ case ALPM_LOG_WARNING: ++ pm_asprintf(string, "%s%s%s%s", colortab.yellow, _("warning: "), colortab.none, msg); ++ break; ++ case ALPM_LOG_DEBUG: ++ pm_asprintf(string, "debug: %s", msg); ++ break; ++ case ALPM_LOG_FUNCTION: ++ pm_asprintf(string, "function: %s", msg); ++ break; ++ default: ++ pm_asprintf(string, "%s", msg); ++ break; ++ } ++ } else { ++ switch(level) { ++ case ALPM_LOG_ERROR: ++ pm_asprintf(string, _("error: %s"), msg); ++ break; ++ case ALPM_LOG_WARNING: ++ pm_asprintf(string, _("warning: %s"), msg); ++ break; ++ case ALPM_LOG_DEBUG: ++ pm_asprintf(string, "debug: %s", msg); ++ break; ++ case ALPM_LOG_FUNCTION: ++ pm_asprintf(string, "function: %s", msg); ++ break; ++ default: ++ pm_asprintf(string, "%s", msg); ++ break; ++ } + } + free(msg); + +@@ -1524,10 +1558,10 @@ int pm_vfprintf(FILE *stream, alpm_logle + /* print a prefix to the message */ + switch(level) { + case ALPM_LOG_ERROR: +- fprintf(stream, _("error: ")); ++ color_fprintf(stream, COLOR_RED_ALL, _("error: ")); + break; + case ALPM_LOG_WARNING: +- fprintf(stream, _("warning: ")); ++ color_fprintf(stream, COLOR_YELLOW_ALL, _("warning: ")); + break; + case ALPM_LOG_DEBUG: + fprintf(stream, "debug: "); +@@ -1566,4 +1600,310 @@ char *strndup(const char *s, size_t n) + } + #endif + ++/* pacman-color */ ++ ++int _set_color_sequence(const char* name, char* dest) ++{ ++ int ret = 0; ++ ++ if(strcmp(name, "black") == 0) { ++ strncpy(dest, "\033[0;30m", COLOR_LEN); ++ } else if(strcmp(name, "red") == 0) { ++ strncpy(dest, "\033[0;31m", COLOR_LEN); ++ } else if(strcmp(name, "green") == 0) { ++ strncpy(dest, "\033[0;32m", COLOR_LEN); ++ } else if(strcmp(name, "yellow") == 0) { ++ strncpy(dest, "\033[0;33m", COLOR_LEN); ++ } else if(strcmp(name, "blue") == 0) { ++ strncpy(dest, "\033[0;34m", COLOR_LEN); ++ } else if(strcmp(name, "magenta") == 0) { ++ strncpy(dest, "\033[0;35m", COLOR_LEN); ++ } else if(strcmp(name, "cyan") == 0) { ++ strncpy(dest, "\033[0;36m", COLOR_LEN); ++ } else if(strcmp(name, "white") == 0) { ++ strncpy(dest, "\033[0;37m", COLOR_LEN); ++ } else if(strcmp(name, "gray") == 0) { ++ strncpy(dest, "\033[1;30m", COLOR_LEN); ++ } else if(strcmp(name, "intensive red") == 0) { ++ strncpy(dest, "\033[1;31m", COLOR_LEN); ++ } else if(strcmp(name, "intensive green") == 0) { ++ strncpy(dest, "\033[1;32m", COLOR_LEN); ++ } else if(strcmp(name, "intensive yellow") == 0) { ++ strncpy(dest, "\033[1;33m", COLOR_LEN); ++ } else if(strcmp(name, "intensive blue") == 0) { ++ strncpy(dest, "\033[1;34m", COLOR_LEN); ++ } else if(strcmp(name, "intensive magenta") == 0) { ++ strncpy(dest, "\033[1;35m", COLOR_LEN); ++ } else if(strcmp(name, "intensive cyan") == 0) { ++ strncpy(dest, "\033[1;36m", COLOR_LEN); ++ } else if(strcmp(name, "intensive white") == 0) { ++ strncpy(dest, "\033[1;37m", COLOR_LEN); ++ } else if(strcmp(name, "intensive foreground") == 0) { ++ strncpy(dest, "\033[m\033[1m", COLOR_LEN); ++ } else if(strcmp(name, "none") == 0) { ++ strncpy(dest, "\033[m", COLOR_LEN); ++ } else { ++ ret = 1; ++ } ++ dest[COLOR_LEN] = '\0'; ++ return(ret); ++} ++ ++void _insert_color(FILE* stream, color_t color) ++{ ++ switch(color) { ++ case COLOR_RED: ++ fprintf(stream, colortab.red); ++ break; ++ case COLOR_GREEN: ++ fprintf(stream, colortab.green); ++ break; ++ case COLOR_YELLOW: ++ fprintf(stream, colortab.yellow); ++ break; ++ case COLOR_BLUE: ++ fprintf(stream, colortab.blue); ++ break; ++ case COLOR_MAGENTA: ++ fprintf(stream, colortab.magenta); ++ break; ++ case COLOR_CYAN: ++ fprintf(stream, colortab.cyan); ++ break; ++ case COLOR_WHITE: ++ fprintf(stream, colortab.white); ++ break; ++ case COLOR_NONE: ++ fprintf(stream, colortab.none); ++ break; ++ default:; ++ } ++} ++ ++int _parsecolorconfig(colortab_t* colortab, char* file) ++{ ++ _set_color_sequence("intensive red", colortab->red); ++ _set_color_sequence("intensive green", colortab->green); ++ _set_color_sequence("intensive yellow", colortab->yellow); ++ _set_color_sequence("intensive blue", colortab->blue); ++ _set_color_sequence("intensive magenta", colortab->magenta); ++ _set_color_sequence("intensive cyan", colortab->cyan); ++ _set_color_sequence("intensive foreground", colortab->white); ++ _set_color_sequence("none", colortab->none); ++ ++ FILE* fp = NULL; ++ int linenum = 0; ++ char line[PATH_MAX+1]; ++ char* ptr; ++ ++ fp = fopen(file, "r"); ++ if(fp == NULL) { ++ pm_printf(ALPM_LOG_ERROR, _("config file %s could not be read.\n"), file); ++ return 1; ++ } ++ while(fgets(line, PATH_MAX, fp)) { ++ linenum++; ++ strtrim(line); ++ ++ if(strlen(line) == 0 || line[0] == '#') { ++ continue; ++ } ++ if((ptr = strchr(line, '#'))) { ++ *ptr = '\0'; ++ } ++ ++ char* key = line; ++ ptr = line; ++ strsep(&ptr, "="); ++ strtrim(key); ++ strtrim(ptr); ++ ++ if(key == NULL) { ++ pm_printf(ALPM_LOG_ERROR, _("config file %s, line %d: syntax error in config file- missing key.\n"), ++ file, linenum); ++ return 1; ++ } ++ if(strcmp(key, "Red") == 0) { ++ if(_set_color_sequence(ptr, colortab->red)) { ++ pm_printf(ALPM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), ++ file, linenum, ptr); ++ } ++ } else if(strcmp(key, "Green") == 0) { ++ if(_set_color_sequence(ptr, colortab->green)) { ++ pm_printf(ALPM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), ++ file, linenum, ptr); ++ } ++ } else if(strcmp(key, "Yellow") == 0) { ++ if(_set_color_sequence(ptr, colortab->yellow)) { ++ pm_printf(ALPM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), ++ file, linenum, ptr); ++ } ++ } else if(strcmp(key, "Blue") == 0) { ++ if(_set_color_sequence(ptr, colortab->blue)) { ++ pm_printf(ALPM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), ++ file, linenum, ptr); ++ } ++ } else if(strcmp(key, "Magenta") == 0) { ++ if(_set_color_sequence(ptr, colortab->magenta)) { ++ pm_printf(ALPM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), ++ file, linenum, ptr); ++ } ++ } else if(strcmp(key, "Cyan") == 0) { ++ if(_set_color_sequence(ptr, colortab->cyan)) { ++ pm_printf(ALPM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), ++ file, linenum, ptr); ++ } ++ } else if(strcmp(key, "White") == 0) { ++ if(_set_color_sequence(ptr, colortab->white)) { ++ pm_printf(ALPM_LOG_ERROR, _("config file %s, line %d: color '%s' not recognized.\n"), ++ file, linenum, ptr); ++ } ++ } else { ++ pm_printf(ALPM_LOG_ERROR, _("config file %s, line %d: directive '%s' not recognized.\n"), ++ file, linenum, key); ++ return(1); ++ } ++ } ++ return(0); ++} ++ ++int parsecolorconfig() ++{ ++ return(_parsecolorconfig(&colortab, "/etc/pacman.d/color.conf")); ++} ++ ++int color_vfprintf(FILE* stream, const colordata_t* colors, const char* format, va_list args) ++{ ++ int ret = 0; ++ ++ if(isatty(fileno(stream)) && colors) { ++ char* msg = NULL; ++ ret = vasprintf(&msg, format, args); ++ if(msg == NULL) { ++ return(ret); ++ } ++ ++ const colordata_t* colorpos = colors; ++ color_t colorlast = COLOR_NONE; ++ int len = strlen(msg) + 1; ++ wchar_t* wcstr = calloc(len, sizeof(wchar_t)); ++ len = mbstowcs(wcstr, msg, len); ++ free(msg); ++ const wchar_t *strpos = wcstr; ++ ++ while(*strpos) { ++ if(colorpos->color != COLOR_END && ++ ((colorpos->separator == SEP_ANY) || ++ (colorpos->separator == SEP_LINE && *strpos == L'\n') || ++ (colorpos->separator == SEP_COLON && (*strpos == L':' || *strpos == L':')))) { ++ _insert_color(stream, colorpos->color); ++ colorlast = colorpos->color; ++ colorpos++; ++ } ++ fprintf(stream, "%lc", (wint_t)*strpos); ++ strpos++; ++ } ++ free(wcstr); ++ ++ if(colorlast != COLOR_NONE) { ++ _insert_color(stream, COLOR_NONE); ++ } ++ } else { ++ ret = vfprintf(stream, format, args); ++ } ++ return(ret); ++} ++ ++int color_fprintf(FILE* stream, const colordata_t* colors, const char* format, ...) ++{ ++ int ret; ++ va_list args; ++ va_start(args, format); ++ ret = color_vfprintf(stream, colors, format, args); ++ va_end(args); ++ return(ret); ++} ++ ++int color_printf(const colordata_t* colors, const char* format, ...) ++{ ++ int ret; ++ va_list args; ++ va_start(args, format); ++ ret = color_vfprintf(stdout, colors, format, args); ++ va_end(args); ++ return(ret); ++} ++ ++void color_string_display(const colordata_t* colors_title, const char* title, const colordata_t* colors_string, const char* string) ++{ ++ if(title) { ++ color_printf(colors_title, "%s ", title); ++ } ++ if(string == NULL || string[0] == '\0') { ++ printf(_("None")); ++ } else { ++ color_printf(colors_string, "%s", string); ++ } ++ printf("\n"); ++} ++ ++const colordata_t COLOR_WHITE_ALL[] = { ++ { SEP_ANY, COLOR_WHITE }, ++ { SEP_LINE, COLOR_NONE }, ++ { SEP_ANY, COLOR_END } }; ++ ++const colordata_t COLOR_GREEN_ALL[] = { ++ { SEP_ANY, COLOR_GREEN }, ++ { SEP_LINE, COLOR_NONE }, ++ { SEP_ANY, COLOR_END } }; ++ ++const colordata_t COLOR_RED_ALL[] = { ++ { SEP_ANY, COLOR_RED }, ++ { SEP_LINE, COLOR_NONE }, ++ { SEP_ANY, COLOR_END } }; ++ ++const colordata_t COLOR_BLUE_ALL[] = { ++ { SEP_ANY, COLOR_BLUE }, ++ { SEP_LINE, COLOR_NONE }, ++ { SEP_ANY, COLOR_END } }; ++ ++const colordata_t COLOR_YELLOW_ALL[] = { ++ { SEP_ANY, COLOR_YELLOW }, ++ { SEP_LINE, COLOR_NONE }, ++ { SEP_ANY, COLOR_END } }; ++ ++const colordata_t COLOR_MAGENTA_ALL[] = { ++ { SEP_ANY, COLOR_MAGENTA }, ++ { SEP_LINE, COLOR_NONE }, ++ { SEP_ANY, COLOR_END } }; ++ ++const colordata_t COLOR_CYAN_ALL[] = { ++ { SEP_ANY, COLOR_CYAN }, ++ { SEP_LINE, COLOR_NONE }, ++ { SEP_ANY, COLOR_END } }; ++ ++const colordata_t COLOR_DOUBLECOLON[] = { ++ { SEP_ANY, COLOR_BLUE }, ++ { SEP_ANY, COLOR_SAME }, ++ { SEP_ANY, COLOR_WHITE }, ++ { SEP_LINE, COLOR_NONE }, ++ { SEP_ANY, COLOR_END } }; ++ ++const colordata_t COLOR_DOUBLECOLON2[] = { ++ { SEP_ANY, COLOR_BLUE }, ++ { SEP_ANY, COLOR_SAME }, ++ { SEP_ANY, COLOR_WHITE }, ++ { SEP_LINE, COLOR_NONE }, ++ { SEP_ANY, COLOR_BLUE }, ++ { SEP_ANY, COLOR_SAME }, ++ { SEP_ANY, COLOR_WHITE }, ++ { SEP_LINE, COLOR_NONE }, ++ { SEP_ANY, COLOR_END } }; ++ ++const colordata_t COLOR_WHITE_COLON[] = { ++ { SEP_ANY, COLOR_WHITE }, ++ { SEP_COLON, COLOR_SAME }, ++ { SEP_ANY, COLOR_NONE }, ++ { SEP_ANY, COLOR_END } }; ++ + /* vim: set ts=2 sw=2 noet: */ +diff -up -Npaur a/src/pacman/util.h b/src/pacman/util.h +--- a/src/pacman/util.h 2012-02-03 16:56:16.000000000 +0200 ++++ b/src/pacman/util.h 2012-07-20 21:48:20.271827634 +0300 +@@ -45,6 +45,48 @@ typedef struct _pm_target_t { + int is_explicit; + } pm_target_t; + ++/* pacman-color */ ++typedef enum _separator_t { ++ SEP_ANY = 0, ++ SEP_LINE, ++ SEP_COLON, ++} separator_t; ++ ++typedef enum _color_t { ++ COLOR_END = 0, ++ COLOR_SAME, ++ COLOR_RED, ++ COLOR_GREEN, ++ COLOR_YELLOW, ++ COLOR_BLUE, ++ COLOR_MAGENTA, ++ COLOR_CYAN, ++ COLOR_WHITE, ++ COLOR_NONE, ++} color_t; ++ ++typedef struct _colordata_t { ++ separator_t separator; ++ color_t color; ++} colordata_t; ++ ++extern const colordata_t COLOR_WHITE_ALL[]; ++extern const colordata_t COLOR_GREEN_ALL[]; ++extern const colordata_t COLOR_RED_ALL[]; ++extern const colordata_t COLOR_BLUE_ALL[]; ++extern const colordata_t COLOR_YELLOW_ALL[]; ++extern const colordata_t COLOR_MAGENTA_ALL[]; ++extern const colordata_t COLOR_CYAN_ALL[]; ++extern const colordata_t COLOR_DOUBLECOLON[]; ++extern const colordata_t COLOR_DOUBLECOLON2[]; ++extern const colordata_t COLOR_WHITE_COLON[]; ++ ++int parsecolorconfig(); ++int color_fprintf(FILE* stream, const colordata_t* colors, const char* format, ...) __attribute__((format(printf,3,4))); ++int color_printf(const colordata_t* colors, const char* format, ...) __attribute__((format(printf,2,3))); ++int color_vfprintf(FILE* stream, const colordata_t* colors, const char* format, va_list args) __attribute__((format(printf,3,0))); ++void color_string_display(const colordata_t* colors_title, const char* title, const colordata_t* colors_string, const char* string); ++ + void trans_init_error(void); + int trans_init(alpm_transflag_t flags, int check_valid); + int trans_release(void); +@@ -58,12 +100,12 @@ void indentprint(const char *str, size_t + char *strtrim(char *str); + char *strreplace(const char *str, const char *needle, const char *replace); + alpm_list_t *strsplit(const char *str, const char splitchar); +-void string_display(const char *title, const char *string); ++void string_display(const colordata_t *colors_title, const char *title, const char *string); + double humanize_size(off_t bytes, const char target_unit, int precision, + const char **label); + int table_display(const char *title, const alpm_list_t *header, const alpm_list_t *rows); +-void list_display(const char *title, const alpm_list_t *list); +-void list_display_linebreak(const char *title, const alpm_list_t *list); ++void list_display(const colordata_t *colors_title, const char *title, const alpm_list_t *list); ++void list_display_linebreak(const colordata_t *colors_title, const char *title, const alpm_list_t *list); + void signature_display(const char *title, alpm_siglist_t *siglist); + void display_targets(void); + int str_cmp(const void *s1, const void *s2); +@@ -73,8 +115,8 @@ void print_packages(const alpm_list_t *p + void select_display(const alpm_list_t *pkglist); + int select_question(int count); + int multiselect_question(char *array, int count); +-int yesno(char *fmt, ...); +-int noyes(char *fmt, ...); ++int yesno(const colordata_t *colors, char *fmt, ...); ++int noyes(const colordata_t *colors, char *fmt, ...); + + int pm_printf(alpm_loglevel_t level, const char *format, ...) __attribute__((format(printf,2,3))); + int pm_asprintf(char **string, const char *format, ...); diff --git a/pcr/perl-iptables-parse/PKGBUILD b/pcr/perl-iptables-parse/PKGBUILD new file mode 100644 index 000000000..94fe8e17a --- /dev/null +++ b/pcr/perl-iptables-parse/PKGBUILD @@ -0,0 +1,22 @@ +# Contributor: Weirch Sodora <sodora@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=perl-iptables-parse +pkgver=1.1 +pkgrel=1 +pkgdesc="IPTables::Parse - Perl extension for parsing iptables and ip6tables firewall rulesets" +arch=('i686' 'x86_64') +url="http://search.cpan.org/~mrash/IPTables-Parse/" +license=('GPL' 'PerlArtistic') +depends=('perl' 'iptables') +options=('!emptydirs') +source=(http://search.cpan.org/CPAN/authors/id/M/MR/MRASH/IPTables-Parse-$pkgver.tar.gz) + +build() { + cd $startdir/src/IPTables-Parse-$pkgver + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 + make || return 1 + make install DESTDIR=$startdir/pkg || return 1 + find $startdir/pkg -name '.packlist' -delete + find $startdir/pkg -name '*.pod' -delete +} diff --git a/pcr/perl-latex-encode/PKGBUILD b/pcr/perl-latex-encode/PKGBUILD new file mode 100644 index 000000000..ef7d98b37 --- /dev/null +++ b/pcr/perl-latex-encode/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: Moritz Bunkus <moritz@bunkus.org> + +pkgname=perl-latex-encode +pkgver=0.08 +pkgrel=1 +pkgdesc="Encode characters for LaTeX formatting" +arch=(any) +license=('PerlArtistic') +url="http://search.cpan.org/dist/Rose-Object/" +options=('!emptydirs') +source=(http://search.cpan.org/CPAN/authors/id/A/AN/ANDREWF/LaTeX-Encode-${pkgver}.tar.gz) +md5sums=('0877ff573bbacdfcd6ceb130c4282ab6') +sha1sums=('9d11a38a4eb07c86b6cc026a2163b7299bc64631') + +build() { + cd ${srcdir}/LaTeX-Encode-${pkgver} + + # install module in vendor directories. + PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor + make +} + +package() { + cd ${srcdir}/LaTeX-Encode-${pkgver} + make install DESTDIR=${pkgdir} + + # remove perllocal.pod and .packlist + find ${pkgdir} '(' -name perllocal.pod -o -name .packlist ')' -delete +} diff --git a/pcr/pysheng/PKGBUILD b/pcr/pysheng/PKGBUILD new file mode 100644 index 000000000..4cbdf5d38 --- /dev/null +++ b/pcr/pysheng/PKGBUILD @@ -0,0 +1,24 @@ +# Contributor: mutlu_inek@yahoo.de +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=pysheng +pkgver=0.1 +pkgrel=1 +pkgdesc="CLI and GUI program to download pages from Google Books as PNG images" +arch=(i686 x86_64) +url="https://code.google.com/p/pysheng/" +license=('GPL') +depends=('python2') +makedepends=() +optdepends=('python2-reportlab: GUI') +provides=() +conflicts=() +replaces=() +options=() +source=(http://pysheng.googlecode.com/files/$pkgname-$pkgver.tgz) + +package() { + cd $pkgname-$pkgver + python2 setup.py install --root="$pkgdir/" --optimize=1 +} + diff --git a/pcr/python-prettytable/PKGBUILD b/pcr/python-prettytable/PKGBUILD new file mode 100644 index 000000000..92d42f18e --- /dev/null +++ b/pcr/python-prettytable/PKGBUILD @@ -0,0 +1,29 @@ +# Maintainer: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> +# Contributor: Xiao Er <xia0er@gmail.com> +# Contributor: Victor Noel <victor.noel@crazydwarves.org> + +# Hack for AUR +pkgname='python2-prettytable' +true && pkgname=('python-prettytable' 'python2-prettytable') + +pkgver=0.6.1 +pkgrel=2 +pkgdesc="A simple Python library for easily displaying tabular data in a visually appealing ASCII table format" +url="http://pypi.python.org/pypi/PrettyTable" +arch=('any') +license=('BSD') +makedepends=('python-distribute' 'python2-distribute') +source=(http://pypi.python.org/packages/source/P/PrettyTable/prettytable-${pkgver}.tar.gz) +md5sums=('8f97da999f52e47e28ec4ffe7f25c4d8') + +package_python-prettytable() { + depends=('python') + cd $srcdir/prettytable-$pkgver + python setup.py install --root="$pkgdir/" +} + +package_python2-prettytable() { + depends=('python2') + cd $srcdir/prettytable-$pkgver + python2 setup.py install --root="$pkgdir/" +} diff --git a/pcr/python2-argparse/PKGBUILD b/pcr/python2-argparse/PKGBUILD new file mode 100644 index 000000000..cda95c0e2 --- /dev/null +++ b/pcr/python2-argparse/PKGBUILD @@ -0,0 +1,25 @@ +# Contributor: Lukas Linhart <bugs@almad.net> +# Contributor: Changaco <changaco ατ changaco δοτ net> +# Contributor: Nicolas Pouillard <nicolas.pouillard@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=python2-argparse +pkgver=1.2.1 +pkgrel=1 +pkgdesc="Command line parsing library for python" +arch=('any') +url='http://code.google.com/p/argparse/' +conflicts=('argparse') +license=('Apache') +depends=('python2') +makedepends=('setuptools') +source=("http://argparse.googlecode.com/files/argparse-$pkgver.tar.gz") + +# While python 2.7 has a builtin argparse module, +# packages built with setuptools still needs this one. + +build() { + cd ${srcdir}/argparse-$pkgver + python2 setup.py build || return 1 + python2 setup.py install --root=${pkgdir} || return 1 +} diff --git a/pcr/python2-cheetah/Changelog b/pcr/python2-cheetah/Changelog new file mode 100644 index 000000000..e95e8c91f --- /dev/null +++ b/pcr/python2-cheetah/Changelog @@ -0,0 +1,12 @@ +2012-03-25 Julien Nicoulaud <julien.nicoulaud@gmail.com> + + * 2.4.4-5 : + Change dependency on 'python-markdown' to 'python2-markdown' since + FS#28265 is solved. + +2012-01-31 Julien Nicoulaud <julien.nicoulaud@gmail.com> + + * 2.4.4-4 : + Add changelog. + Remove unneeded shebang modification. + diff --git a/pcr/python2-cheetah/PKGBUILD b/pcr/python2-cheetah/PKGBUILD new file mode 100644 index 000000000..ea6b1036b --- /dev/null +++ b/pcr/python2-cheetah/PKGBUILD @@ -0,0 +1,34 @@ +# Contributor: Julien Nicoulaud <julien.nicoulaud@gmail.com> +# Contributor: James Rayner <james@archlinux.org> +# Contributor: Todd Maynard <arch@toddmaynard.com> +# Source: https://github.com/nicoulaj/archlinux-packages +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=python2-cheetah +pkgver=2.4.4 +pkgrel=5 +pkgdesc="A Python-powered template engine and code generator" +arch=(i686 x86_64) +url="http://www.cheetahtemplate.org" +license=(custom) +depends=(python2 python2-markdown) +makedepends=(python2-distribute) +optdepends=('python2-pygments: for the CodeHighlighter filter') +provides=(cheetah python-cheetah) +conflicts=(cheetah python-cheetah) +changelog=Changelog +source=(http://pypi.python.org/packages/source/C/Cheetah/Cheetah-${pkgver}.tar.gz) + +build() { + cd "${srcdir}/Cheetah-${pkgver}" + python2 setup.py build +} + +package() { + msg "Install..." + cd "${srcdir}/Cheetah-${pkgver}" + python2 setup.py install --root="${pkgdir}" || return 1 + + msg2 "Install copyright resources in /usr/share/licenses/${pkgname}..." + install -Dm644 "${srcdir}/Cheetah-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} diff --git a/pcr/python2-fabric/PKGBUILD b/pcr/python2-fabric/PKGBUILD new file mode 100644 index 000000000..7552eaabc --- /dev/null +++ b/pcr/python2-fabric/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com> +# Contributor: Francois Boulogne <fboulogne at april dot org> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=python2-fabric +pkgver=1.5.0 +pkgrel=2 +pkgdesc="Python library and command-line tool designed to streamline deploying applications or performing system administration tasks via the SSH protocol" +url="http://fabfile.org/" +license=('BSD') +arch=('any') +depends=('python2>=2.5' 'pycrypto' 'python2-paramiko>=1.9.0' 'python2-distribute' 'python2-ssh') +source=("http://pypi.python.org/packages/source/F/Fabric/Fabric-${pkgver}.tar.gz") +md5sums=('13b7b98149497fb7ab6f880e3e875f89') + +build() { + cd ${srcdir}/Fabric-${pkgver} + python2 setup.py install --root=${pkgdir} --optimize=1 + + install -D -m644 README.rst ${pkgdir}/usr/share/doc/${pkgname}/README.rst + install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} +md5sums=('13b7b98149497fb7ab6f880e3e875f89') diff --git a/pcr/python2-flask-lesscss/PKGBUILD b/pcr/python2-flask-lesscss/PKGBUILD new file mode 100644 index 000000000..3f2aecb73 --- /dev/null +++ b/pcr/python2-flask-lesscss/PKGBUILD @@ -0,0 +1,17 @@ +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname="python2-flask-lesscss" +pkgver=0.9.1 +pkgrel=1 +pkgdesc="A small Flask extension that adds LessCSS support to Flask." +arch=("any") +url="http://pypi.python.org/pypi/flask-lesscss" +license=("MIT") +depends=("python2" "lessc" "python2-flask") +makedepends=("setuptools") +source=("http://pypi.python.org/packages/source/f/flask-lesscss/flask-lesscss-${pkgver}.tar.gz") + +build() { + cd "${srcdir}/flask-lesscss-${pkgver}" + python2 ./setup.py install --root="${pkgdir}" --prefix="/usr" || return 1 +} diff --git a/pcr/python2-oauth2/PKGBUILD b/pcr/python2-oauth2/PKGBUILD new file mode 100644 index 000000000..c58e86f9c --- /dev/null +++ b/pcr/python2-oauth2/PKGBUILD @@ -0,0 +1,20 @@ +# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=python2-oauth2 +pkgver=1.5.211 +pkgrel=1 +_libname=${pkgname/python2-/} +pkgdesc="A fully tested, abstract interface to creating OAuth clients and servers" +arch=(any) +url="https://github.com/simplegeo/python-oauth2" +license=('GPL') +depends=(python2-httplib2) +makedepends=(python2-distribute) +source=(http://pypi.python.org/packages/source/${_libname:0:1}/$_libname/$_libname-$pkgver.tar.gz) + +build() { + cd "$srcdir/$_libname-$pkgver" + python2 setup.py install --root=$pkgdir + rm -rf "$pkgdir"/usr/lib/python*/site-packages/tests +} diff --git a/pcr/python2-paramiko/PKGBUILD b/pcr/python2-paramiko/PKGBUILD new file mode 100644 index 000000000..da62b4e28 --- /dev/null +++ b/pcr/python2-paramiko/PKGBUILD @@ -0,0 +1,33 @@ +# $Id$ +# Maintainer: Chris Brannon <cmbrannon79@gmail.com> +# Contributor: Douglas Soares de Andrade <douglas@archlinux.org> +# Contributor: Mario Danic <mario.danic@gmail.com> + +pkgbase=python-paramiko +pkgname=python2-paramiko +pkgver=1.9.0 +pkgrel=1 +pkgdesc="Python module that implements the SSH2 protocol" +url="http://www.lag.net/paramiko/" +license=('LGPL') +arch=('any') +depends=('python2-crypto') +conflicts=() +replaces=() +source=(http://pypi.python.org/packages/source/p/paramiko/paramiko-$pkgver.tar.gz) + + +package_python2-paramiko() { + cd "$srcdir/paramiko-$pkgver" + + python2 setup.py install --root="$pkgdir" --optimize=1 + install -Dm644 README "$pkgdir/usr/share/doc/$pkgname/README" + install -dm755 "$pkgdir/usr/share/doc/$pkgname/demos" + install -m644 demos/* "$pkgdir/usr/share/doc/$pkgname/demos" + chmod 755 "$pkgdir/usr/share/doc/$pkgname/demos/"*.py + + find "$pkgdir" -name '*.py' -print0 |xargs -0 \ + sed -i -e 's,^#!/usr/bin/env python$,#!/usr/bin/env python2,' \ + -e 's,^#!/usr/bin/python$,#!/usr/bin/python2,' +} +md5sums=('b78472021ff6586dd61ad6972032f54f') diff --git a/pcr/python2-pillow/PKGBUILD b/pcr/python2-pillow/PKGBUILD new file mode 100644 index 000000000..5840a5f82 --- /dev/null +++ b/pcr/python2-pillow/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=python2-pillow +_appname=Pillow +pkgver=1.7.8 +pkgrel=2 +pkgdesc="Python Imaging Library (PIL) fork." +arch=(i686 x86_64) +url="https://github.com/dwaiter/django-ckeditor" +license=('BSD') +depends=('python2') +provides=('python2-imaging') +conflicts=('python2-imaging') +makedepends=('python2-distribute') +source=("http://pypi.python.org/packages/source/P/${_appname}/${_appname}-${pkgver}.zip") +md5sums=('41d8688d4db72673069a6dc63b5289d6') + +package() { + cd "$srcdir/$_appname-$pkgver" + python2 setup.py install --root="$pkgdir/" --optimize=1 +} + diff --git a/pcr/python2-ropemacs/PKGBUILD b/pcr/python2-ropemacs/PKGBUILD new file mode 100644 index 000000000..84c5661ba --- /dev/null +++ b/pcr/python2-ropemacs/PKGBUILD @@ -0,0 +1,21 @@ +# Contributor: Renato Garcia <fgarcia.renato@gmail.com> +# Contributor: yescalona <yescaloan[at]ug[dot]uchile[dot]cl> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=python2-ropemacs +_pkgname=ropemacs +pkgver=0.7 +pkgrel=1 +pkgdesc='Emacs mode that uses rope_ library to provide features like python refactorings and code-assists.' +url='http://bitbucket.org/agr/ropemacs' +arch=('any') +license=('GPL') +depends=('python2-ropemode' 'pymacs') +install=python2-ropemacs.install +source=("http://bitbucket.org/agr/${_pkgname}/get/${pkgver}.tar.bz2") +md5sums=('0034d77822728da561b8ef213eea0762') + +package() { + cd "${srcdir}/agr-ropemacs-93721bd03667" + python2 ./setup.py install --root="${pkgdir}" --prefix=/usr +} diff --git a/pcr/python2-ropemacs/python2-ropemacs.install b/pcr/python2-ropemacs/python2-ropemacs.install new file mode 100644 index 000000000..4b303b8b4 --- /dev/null +++ b/pcr/python2-ropemacs/python2-ropemacs.install @@ -0,0 +1,8 @@ +post_install() { + +echo "After installing pymacs, add these lines to your ``~/.emacs`` file:" +echo "(require 'pymacs)" +echo "(pymacs-load \"ropemacs\" \"rope-\")" +/bin/true +} + diff --git a/pcr/python2-ropemode/PKGBUILD b/pcr/python2-ropemode/PKGBUILD new file mode 100644 index 000000000..bdeb58a68 --- /dev/null +++ b/pcr/python2-ropemode/PKGBUILD @@ -0,0 +1,20 @@ +# Contributor: Renato Garcia <fgarcia.renato@gmail.com> +# Contributor: Nicolás de la Torre <ndelatorre@gmail.com> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + +pkgname=python2-ropemode +_pkgname=ropemode +pkgver=0.2 +pkgrel=1 +pkgdesc="A helper for using rope refactoring library in IDEs" +url='http://bitbucket.org/agr/ropemode' +arch=('any') +license=('GPL') +depends=('python2-rope') +source=("http://bitbucket.org/agr/${_pkgname}/get/${pkgver}.tar.bz2") +md5sums=('6c1cb705e360251ac4bccc33b74ae892') + +package() { + cd "${srcdir}/agr-ropemode-61c99582317d" + python2 ./setup.py install --root="${pkgdir}" --prefix=/usr --optimize=1 +} diff --git a/pcr/python2-ssh/PKGBUILD b/pcr/python2-ssh/PKGBUILD new file mode 100644 index 000000000..84005f0ac --- /dev/null +++ b/pcr/python2-ssh/PKGBUILD @@ -0,0 +1,26 @@ +# Contributor: Your Name <youremail@domain.com> + +pkgname=python2-ssh +pkgver=1.8.0 +pkgrel=1 +pkgdesc="Python SSH2 protocol library" +arch=(any) +url="http://pypi.python.org/pypi/ssh" +license=('LGPL') +depends=('python2' 'pycrypto') +makedepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=(!emptydirs) +install= +source=("http://pypi.python.org/packages/source/s/ssh/ssh-$pkgver.tar.gz") + +package() { + cd "$srcdir/ssh-$pkgver" + python2 setup.py install --root="$pkgdir/" --optimize=1 + + install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} +md5sums=('bc4dd59ec0c7bdf78a3840652cac824e') diff --git a/pcr/quack/PKGBUILD b/pcr/quack/PKGBUILD new file mode 100644 index 000000000..18aa1025d --- /dev/null +++ b/pcr/quack/PKGBUILD @@ -0,0 +1,26 @@ +# Contributor: Geoffrey Teale <tealeg@member.fsf.org> +# Contributor: Stefan Husmann <stefan-husmann@t-online.de> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=quack +pkgver=0.45 +pkgrel=1 +pkgdesc="[Emacs] enhanced support for editing and running Scheme code." +url="http://www.neilvandyke.org/quack" +arch=('any') +license=('GPL') +depends=('emacs') +makedepends=('emacs') +install=quack.install +source=("http://www.neilvandyke.org/${pkgname}/${pkgname}.el") +md5sums=('40c52d0076c95c125e57ef6496ee881e') +EMACS=emacs # or sxemacs, or xemacs + +build() { + $EMACS --batch --eval '(byte-compile-file "quack.el")' +} + +package() { + install -Dm644 $pkgname.el $pkgdir/usr/share/$EMACS/site-lisp/$pkgname.el + install -Dm644 $pkgname.elc $pkgdir/usr/share/$EMACS/site-lisp/$pkgname.elc +} diff --git a/pcr/quack/quack.install b/pcr/quack/quack.install new file mode 100644 index 000000000..f92194ee6 --- /dev/null +++ b/pcr/quack/quack.install @@ -0,0 +1,18 @@ +### quack.install: +post_install () { +cat << EOF +==> Put this in your $HOME/.emacs file to enable quack + +(require 'quack) + +EOF +} + +post_upgrade () { + post_install $1 +} + +op=$1 +shift +$op $* +######################## diff --git a/pcr/re2-hg/PKGBUILD b/pcr/re2-hg/PKGBUILD new file mode 100644 index 000000000..915af840b --- /dev/null +++ b/pcr/re2-hg/PKGBUILD @@ -0,0 +1,29 @@ +# Contributor: Thomas Dziedzic < gostrc at gmail > +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=re2-hg +pkgver=1 +pkgrel=1 +pkgdesc='Fast, safe and thread-friendly alternative to backtracking regular expression engines' +arch=('i686' 'x86_64') +url='http://code.google.com/p/re2/' +license=('GPL2') +provides=('re2') +makedepends=('mercurial') + +build() { + rm -rf re2 + hg clone https://re2.googlecode.com/hg re2 + + cd re2 + + sed -i 's_prefix=/usr/local_prefix=/usr_' Makefile + + make +} + +package() { + cd re2 + + make DESTDIR=${pkgdir} install +} diff --git a/pcr/ruby-haml/PKGBUILD b/pcr/ruby-haml/PKGBUILD new file mode 100644 index 000000000..37290484a --- /dev/null +++ b/pcr/ruby-haml/PKGBUILD @@ -0,0 +1,35 @@ +# Contributor: Renzo Carbonara <gnuk0001@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=ruby-haml +pkgver=3.1.6 +pkgrel=1 +pkgdesc="An elegant, structured XHTML/XML templating engine. Comes with Sass, a similar CSS templating engine." +arch=('any') +url="http://haml-lang.com/" +license=('MIT') +groups=() +depends=('ruby' 'ruby-yard>=0.5.3' 'maruku>=0.5.9') +makedepends=('rubygems') +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +source=("http://gems.rubyforge.org/gems/haml-${pkgver}.gem") +noextract=("haml-${pkgver}.gem") + +build() { + cd $srcdir + local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" + gem install --ignore-dependencies -i "$pkgdir$_gemdir" haml-$pkgver.gem \ + -n "$pkgdir/usr/bin" +} + +md5sums=('c73b2755a56cf5461f6a5e430052f436') + +# vim:set ts=2 sw=2 et: +md5sums=('c73b2755a56cf5461f6a5e430052f436') +md5sums=('c73b2755a56cf5461f6a5e430052f436') diff --git a/pcr/ruby-haml/ruby-yard/PKGBUILD b/pcr/ruby-haml/ruby-yard/PKGBUILD new file mode 100644 index 000000000..a686f937d --- /dev/null +++ b/pcr/ruby-haml/ruby-yard/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Matt Harrison <matt at mistbyte dot com> +# Contributor: Renzo Carbonara <gnuk0001@gmail.com> + +pkgname=ruby-yard +_gemname=${pkgname#ruby-} +pkgver=0.8.2.1 +pkgrel=2 +pkgdesc="Documentation tool for consistent and usable documentation in Ruby." +arch=('any') +url="http://yardoc.org" +license=('MIT') +groups=() +depends=() +makedepends=('rubygems') +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +source=("http://gems.rubyforge.org/gems/yard-${pkgver}.gem") +noextract=("yard-${pkgver}.gem") + +build() { + cd $srcdir + local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" + gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" \ + -n "$pkgdir/usr/bin" ${_gemname}-$pkgver.gem + install -D "$pkgdir$_gemdir/gems/${_gemname}-$pkgver/LICENSE" \ + "$pkgdir/usr/share/licenses/${pkgname}/LICENSE" +} + +md5sums=('08a48d23f8729b68945011cae7d121fe') + +# vim:set ts=2 sw=2 et: diff --git a/pcr/ruby-libnotify/PKGBUILD b/pcr/ruby-libnotify/PKGBUILD new file mode 100644 index 000000000..f38e10d2d --- /dev/null +++ b/pcr/ruby-libnotify/PKGBUILD @@ -0,0 +1,23 @@ +# Contributor: Luca Russo <vargolo@gmail.com> +# Contributor: Sigitas Mazaliauskas <sigisnn@gmail.com> +# Contributor: Andreas W. Hauser <andy-aur@splashground.de> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=ruby-libnotify +pkgver=0.8.0 +pkgrel=1 +pkgdesc="ruby bindings for libnotify, a library for desktop notifications" +arch=('i686' 'x86_64') +url="http://rubygems.org/downloads" +license=('LGPL') +depends=('ruby' 'libnotify' 'ruby-gtk2') +makedepends=('ruby-pkgconfig') +source=(http://rubygems.org/downloads/${pkgname}-${pkgver}.gem) +noextract=(${pkgname}-${pkgver}.gem) + +build() { + cd $srcdir + local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" + + gem install --ignore-dependencies -i "$pkgdir$_gemdir" ${pkgname}-${pkgver}.gem +} diff --git a/pcr/ruby-syntax/PKGBUILD b/pcr/ruby-syntax/PKGBUILD new file mode 100644 index 000000000..6845206bb --- /dev/null +++ b/pcr/ruby-syntax/PKGBUILD @@ -0,0 +1,23 @@ +# Contributor: Adam Lloyd <lloyda2 (at) rpi (dot) edu> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> +pkgname=ruby-syntax +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Syntax - lexical analysis for syntax highlighting" +arch=(any) +url="http://syntax.rubyforge.org/" +license=('custom:BSD') +depends=(ruby) +makedepends=(rubygems) +source=(http://gems.rubyforge.org/gems/syntax-$pkgver.gem) +noextract=(syntax-$pkgver.gem) +md5sums=('d9d2eabc03bc937adfa00e35f228f9a8') + +build() { + cd $srcdir + local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" + gem install --ignore-dependencies -i "$pkgdir$_gemdir" syntax-$pkgver.gem +} + +# vim:set ts=2 sw=2 et: +md5sums=('d9d2eabc03bc937adfa00e35f228f9a8') diff --git a/pcr/ruby-yard/PKGBUILD b/pcr/ruby-yard/PKGBUILD new file mode 100644 index 000000000..a686f937d --- /dev/null +++ b/pcr/ruby-yard/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Matt Harrison <matt at mistbyte dot com> +# Contributor: Renzo Carbonara <gnuk0001@gmail.com> + +pkgname=ruby-yard +_gemname=${pkgname#ruby-} +pkgver=0.8.2.1 +pkgrel=2 +pkgdesc="Documentation tool for consistent and usable documentation in Ruby." +arch=('any') +url="http://yardoc.org" +license=('MIT') +groups=() +depends=() +makedepends=('rubygems') +optdepends=() +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +source=("http://gems.rubyforge.org/gems/yard-${pkgver}.gem") +noextract=("yard-${pkgver}.gem") + +build() { + cd $srcdir + local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" + gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" \ + -n "$pkgdir/usr/bin" ${_gemname}-$pkgver.gem + install -D "$pkgdir$_gemdir/gems/${_gemname}-$pkgver/LICENSE" \ + "$pkgdir/usr/share/licenses/${pkgname}/LICENSE" +} + +md5sums=('08a48d23f8729b68945011cae7d121fe') + +# vim:set ts=2 sw=2 et: diff --git a/pcr/spice-gtk3/PKGBUILD b/pcr/spice-gtk3/PKGBUILD new file mode 100644 index 000000000..903b9b56b --- /dev/null +++ b/pcr/spice-gtk3/PKGBUILD @@ -0,0 +1,38 @@ +# Contributor: Stefano Facchini <stefano.facchini@gmail.com> +# Contributor: Jonathan Lestrelin <zanko@daemontux.org> +# Derived from the spice-gtk PKGBUILD by +# Contributor: Lucio Zara <pennega@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=spice-gtk3 +_pkgname=spice-gtk +pkgver=0.14 +pkgrel=1 +pkgdesc="A Gtk client and libraries for SPICE remote desktop servers (gtk3 version)." +arch=('x86_64' 'i686') +url="http://spice-space.org" +license=('GPL') +makedepends=('intltool' 'vala' 'python2-pyparsing') +depends=('libpulse' 'gtk3' 'spice' 'libusb' 'usbredir') +conflicts=('spice-gtk') +options=('!libtool') +source=("http://www.spice-space.org/download/gtk/$_pkgname-$pkgver.tar.bz2") +sha256sums=('a16fa27364541493b886cc943f72c8f96ec251083af0a29d405a2c4f490274f5') + +build() { + cd "$srcdir/$_pkgname-$pkgver" + + sed -i 's,/usr/bin/env python,/usr/bin/python2,' spice-common/spice_codegen.py + + ./configure --prefix=/usr \ + --with-gtk=3.0 \ + --enable-vala \ + --enable-smartcard=no + make +} + +package() { + cd "$srcdir/$_pkgname-$pkgver" + + make DESTDIR="$pkgdir/" install +} diff --git a/pcr/spice-protocol/PKGBUILD b/pcr/spice-protocol/PKGBUILD new file mode 100644 index 000000000..03c122275 --- /dev/null +++ b/pcr/spice-protocol/PKGBUILD @@ -0,0 +1,36 @@ +# Contributor: Parabola GNU / Linux-libre <aurelien@cwb.io> + + pkgname=spice-protocol + pkgver=0.12.2 + pkgrel=1 + pkgdesc="SPICE protocol" + arch=('x86_64' 'i686') + url="http://spice-space.org" + license=('GPL') + makedepends=(python2-pyparsing) + depends=(pixman celt cegui alsa-utils libxrandr libxinerama libsasl +libcacard) + + source=(http://spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2) + + build() { + cd "$srcdir/$pkgname-$pkgver" + sed -i 's,/usr/bin/env python,/usr/bin/python2,' spice-common/spice_codegen.py + PYTHON=python2 \ + ./configure --prefix=/usr \ + --enable-gui \ + --enable-opengl \ + --enable-smartcard \ + # --enable-tunnel + make + } + + package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir/" install + } + + # vim:set ts=2 sw=2 et: +md5sums=('8bab5b67a00ec8429334963d361692ab') +md5sums=('8bab5b67a00ec8429334963d361692ab') diff --git a/pcr/spice/PKGBUILD b/pcr/spice/PKGBUILD new file mode 100644 index 000000000..d54f1657d --- /dev/null +++ b/pcr/spice/PKGBUILD @@ -0,0 +1,38 @@ +# Contributor: Lucio Zara <pennega@gmail.com> +# Contributor: Jameson Pugh <imntreal@gmail.com> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + + pkgname=spice + pkgver=0.12.0 + pkgrel=1 + pkgdesc="SPICE client and server" + arch=('x86_64' 'i686') + url="http://spice-space.org" + license=('GPL') + makedepends=(python2-pyparsing) + depends=(pixman celt cegui alsa-utils libxrandr libxinerama libsasl +libcacard ) + + source=(http://spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2) + md5sums=('12c6ea4938215f8f9f10d2925f7bec9b') + + build() { + cd "$srcdir/$pkgname-$pkgver" + sed -i 's,/usr/bin/env python,/usr/bin/python2,' spice-common/spice_codegen.py + PYTHON=python2 \ + ./configure --prefix=/usr \ + --enable-gui \ + --enable-opengl \ + --enable-smartcard \ + # --enable-tunnel + make + } + + package() { + cd "$srcdir/$pkgname-$pkgver" + + make DESTDIR="$pkgdir/" install + } + + # vim:set ts=2 sw=2 et: + diff --git a/pcr/startupmanager/PKGBUILD b/pcr/startupmanager/PKGBUILD new file mode 100644 index 000000000..4b33f36a9 --- /dev/null +++ b/pcr/startupmanager/PKGBUILD @@ -0,0 +1,45 @@ +# Contributor: Alexander Rødseth <rodseth@gmail.com> +# Contributor: Chris Giles <Chris.G.27 (at) Gmail.com> +# Contributor: fernando < arch at liquuid dot net> +# Contributor: Juan Pablo González Tognarelli <lord_jotape@yahoo.com.ar> +# Maintainer : Parabola GNU / Linux-libre Aurélien Desbrières <aurelien@cwb.io> + +pkgname=startupmanager +pkgver=1.9.13 +pkgrel=4 +pkgdesc="GUI app for changing the settings of GRUB, GRUB2, Usplash and Splashy" +arch=("any") +url="http://sourceforge.net/projects/startup-manager/" +license=("MIT") +depends=("gnome-python" "imagemagick" "yelp" "python2" "xorg-xrandr>=1.3.3") +makedepends=("intltool" "setconf") +source=("http://downloads.sourceforge.net/sourceforge/startup-manager/${pkgname}_${pkgver}.tar.gz") +sha1sums=('b82a65ac6ec488ca7fe16fd3ea277cd15a3627c6') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # Make the startup script use python2 + echo "#!/usr/bin/env python2" > pyfix + tail -n +2 startupmanager >> pyfix + cat pyfix > startupmanager + + # Change the grub2 detection to be Arch-friendly + setconf bootconfig/grub.py self.update_grub_command \'/sbin/grub-mkconfig\' + setconf bootconfig/grub.py self.grub_install_command \'/sbin/grub-install\' + + # TIP: bug-workaround: If you have problems with resolution-detection when starting + # startupmanager, try changing line 159 in /usr/lib/python2.7/site-packages/bootconfig/utils.py to: + # + # try: + # return matches.group(1) + 'x' + matches.group(2) + # except: + # return "640x480" + # + # Where "640x480" is just an example (but should make it work) + + python2 setup.py install --prefix="$pkgdir/usr/" + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/stumpwm-git/PKGBUILD b/pcr/stumpwm-git/PKGBUILD new file mode 100644 index 000000000..986a8f740 --- /dev/null +++ b/pcr/stumpwm-git/PKGBUILD @@ -0,0 +1,151 @@ +# Contributor: M Rawash <mrawash@gmail.com> +# Contributor: olvar <beren dot olvar (at) gmail dot com> +# Contributor: Andrew Antle <andrew dot antle at gmail dot com> +# Contributor: joyfulgirl <joyfulgirl (at) archlinux.us> +# Contributor: Jonathan Friedman <jonf@gojon.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=stumpwm-git +pkgver=20110924 +pkgrel=1 +pkgdesc="A tiling, keyboard-driven window manager written in common lisp" +arch=('i686' 'x86_64') +url="http://www.nongnu.org/stumpwm/" +license=('GPL2') +provides=('stumpwm') + +if pacman -Qq sbcl &>/dev/null; then + depends=('sbcl' 'clx' 'cl-ppcre') + _lisp=sbcl +elif pacman -Qq clisp-new-clx &>/dev/null; then + # If somebody compiled this specially, chances are they want to use it + depends=('clisp-new-clx' 'cl-ppcre' 'cl-asdf') + _lisp=clisp + source=(http://common-lisp.net/project/asdf/asdf.lisp) + md5sums=('0f172cc814e11054c37c29fa2acfbfae') +else + # No, this isn't redundant. + depends=('sbcl' 'clx' 'cl-ppcre') + _lisp=sbcl +fi + +makedepends=('git' 'texinfo' 'autoconf') +optdepends=('emacs: Edit and eval stumpwm code with M-x stumpwm-mode' + 'alsa-utils: Use contrib/amixer.lisp to control audio volume' + 'aumix: Use contrib/aumix.lisp to control audio volume' + 'mpd: Use contrib/mpd.lisp to control the mpd' + 'surfraw: Use contrib/surfraw.lisp to surf the Internet') +install=stumpwm.install +options=(!strip) # Thanks to sidereus for pointing this out + +_gitroot="git://git.savannah.nongnu.org/stumpwm.git" +_gitname="stumpwm" + +build() { + msg "Connecting to ${_gitroot}..." + + if [ -d ${srcdir}/${_gitname} ] ; then + cd ${srcdir}/${_gitname} && git pull origin master + else + git clone $_gitroot + fi + + msg "GIT checkout done or server timeout" + msg "Starting make..." + + rm -rf ${srcdir}/${_gitname}-build + cp -a ${srcdir}/${_gitname} ${srcdir}/${_gitname}-build + cd ${srcdir}/${_gitname}-build + + autoconf + if [ "$_lisp" = "sbcl" ]; then + + ./configure --prefix=/usr \ + --with-lisp=$_lisp \ + --with-ppcre=/usr/share/common-lisp/source/cl-ppcre + + # this is necesary since the AUR packages do not modify the asdf's registry by default + _sbcl_bopt="sbcl_BUILDOPTS=--eval \"(require :asdf)\" \ + --eval \"(pushnew #p\\\"/usr/share/common-lisp/systems/\\\" asdf:*central-registry* :test #'equal)\" \ + --eval \"(asdf:operate 'asdf:load-op 'clx)\" \ + --load ./make-image.lisp" + _sbcl_iopt="sbcl_INFOOPTS=--eval \"(require 'asdf)\" \ + --eval \"(pushnew #p\\\"/usr/share/common-lisp/systems/\\\" asdf:*central-registry* :test #'equal)\" \ + --eval \"(asdf:operate 'asdf:load-op 'clx)\" \ + --eval \"(require 'stumpwm)\" \ + --load ./manual.lisp \ + --eval \"(progn (stumpwm::generate-manual) (sb-ext:quit))\"" + + make "$_sbcl_bopt" "$_sbcl_iopt" + + elif [ "$_lisp" = "clisp" ]; then + _lisp_source=/usr/share/common-lisp/source/ + _ppcre_source=${_lisp_source}cl-ppcre/ + + # Sometimes there are no compiled versions of ppcre. + # in this case we need to compile and use our own, and then we install them + if [ ! -f ${_ppcre_source}/api.fas ]; then + + _own_fas=1 + + mkdir ${srcdir}/cl-ppcre_temp + mkdir ${srcdir}/cl-ppcre_temp/systems + mkdir ${srcdir}/cl-ppcre_temp/source + + export ASDF_OUTPUT_TRANSLATIONS="/usr/share/common-lisp/source/:${srcdir}/cl-ppcre_temp/source/" + # for compiling we use the asdf source we donwloaded + clisp -norc -K full -on-error exit \ + -x "(require 'asdf '(\"${srcdir}/asdf.lisp\"))" \ + -x "(pushnew #p\"/usr/share/common-lisp/systems/\" asdf:*central-registry* :test #'equal)" \ + -x "(asdf:operate 'asdf:compile-op 'cl-ppcre)" + + # once we have cl-ppcre compiled we copy the necesary files to + # this new location, and set the necessary options for make + cp $_ppcre_source/cl-ppcre.asd ${srcdir}/cl-ppcre_temp/source/cl-ppcre/ + cp $_ppcre_source/*.lisp ${srcdir}/cl-ppcre_temp/source/cl-ppcre/ + _ppcre_source=${srcdir}/cl-ppcre_temp/source/cl-ppcre/ + + _clisp_bopt="clisp_BUILDOPTS=-K full -on-error exit \ + -x \"(require 'asdf '(\\\"asdf.lisp\\\"))\" \ + -x \"(pushnew \\\"${srcdir}/cl-ppcre_temp/systems/\\\" \ + asdf:*central-registry* \ + :test #'equal)\" \ + -x \"(load \\\"./make-image.lisp\\\")\"" + fi + + ./configure --prefix=/usr \ + --with-lisp=$_lisp \ + --with-ppcre=$_ppcre_source + + if [ -z "$_clisp_bopt" ]; then + make + else + make "$_clisp_bopt" + fi + fi + + make destdir=$pkgdir install + + rm -f ${pkgdir}/usr/share/info/dir + + # Installation of stumpish, the contributed lisp, + # and the emacs stumpwm mode. + install -m 755 ${srcdir}/${_gitname}-build/contrib/stumpish ${pkgdir}/usr/bin + + install -Dm 644 sample-stumpwmrc.lisp ${pkgdir}/etc/stumpwmrc.sample + install -d ${pkgdir}/usr/share/${_gitname} + install -m 644 ${srcdir}/${_gitname}-build/contrib/*.lisp ${pkgdir}/usr/share/${_gitname} + + install -Dm 644 ${srcdir}/${_gitname}-build/contrib/stumpwm-mode.el \ + ${pkgdir}/usr/share/emacs/site-lisp/stumpwm-mode.el + + + # if we had to compile our own fas files, then we need to install them too. + if [ "x$_own_fas" = "x1" ]; then + install -d ${pkgdir}/usr/share/common-lisp/source/cl-ppcre + install -m 644 ${srcdir}/cl-ppcre_temp/source/cl-ppcre/*.fas \ + ${pkgdir}/usr/share/common-lisp/source/cl-ppcre/ + fi +} + +# vim:sw=2 ts=2 et si: diff --git a/pcr/stumpwm-git/stumpwm.install b/pcr/stumpwm-git/stumpwm.install new file mode 100644 index 000000000..3661fa6e3 --- /dev/null +++ b/pcr/stumpwm-git/stumpwm.install @@ -0,0 +1,17 @@ +post_install() { + cd /usr/share/info + install-info stumpwm.info dir + cat << "EOM" + To load contrib/ modules, put the following line in your ~/.stumpwmrc: + (set-contrib-dir "/usr/share/stumpwm") +EOM +} + +post_upgrade() { + post_install +} + +pre_remove() { + cd /usr/share/info + install-info --remove stumpwm.info dir +} diff --git a/pcr/theide/PKGBUILD b/pcr/theide/PKGBUILD new file mode 100644 index 000000000..26dc34f0f --- /dev/null +++ b/pcr/theide/PKGBUILD @@ -0,0 +1,54 @@ +# Contributor: Jan Dolinar <dolik.rce@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=theide +pkgver=5485 +pkgrel=1 +pkgdesc="Modern IDE designed for developping large U++/C++ applications" +arch=('i686' 'x86_64') +url="http://www.ultimatepp.org" +license=('BSD') +groups=() +depends=('gtk2' 'libnotify' 'desktop-file-utils') +makedepends=() +provides=('theide') +conflicts=('theide') +replaces=() +backup=() +options=(!makeflags emptydirs) +install='theide.install' +source=('http://downloads.sourceforge.net/project/upp/upp/'$pkgver'/upp-x11-src-'$pkgver'.tar.gz' + 'http://upp-mirror.googlecode.com/svn-history/r'$pkgver'/trunk/uppbox/lpbuild2/mkfile' + 'http://upp-mirror.googlecode.com/svn-history/r'$pkgver'/trunk/uppbox/lpbuild2/theide.1' + 'http://upp-mirror.googlecode.com/svn-history/r'$pkgver'/trunk/uppbox/lpbuild2/umk.1' + 'license.txt') +noextract=() + +build() { + cd "$srcdir/upp-x11-src-$pkgver" + #build + echo "#define IDE_VERSION \"$pkgver-Arch-$(uname -m)\"" > "uppsrc/ide/version.h" + msg2 "Building $pkgname..." + make -f "$srcdir/mkfile" PKG=umk FLAGS="GCC" NESTS="uppsrc" TIME= COLOR=0 USEMAINCFG=0 JOBS=5 ECHO=0 TARGET="$srcdir/umk" + make -f "$srcdir/mkfile" PKG=ide FLAGS="GCC GUI" NESTS="uppsrc" TIME= COLOR=0 USEMAINCFG=0 JOBS=5 ECHO=0 TARGET="$srcdir/theide" +} + +package(){ + #license + install -D "$srcdir/license.txt" "$pkgdir/usr/share/licenses/$pkgname/license.txt" + #man pagess + install -D "$srcdir/theide.1" "$pkgdir/usr/share/man/man1/theide.1" + install -D "$srcdir/umk.1" "$pkgdir/usr/share/man/man1/umk.1" + #desktop entry + install -D "$srcdir/upp-x11-src-$pkgver/uppsrc/ide/theide.desktop" "$pkgdir/usr/share/applications/theide.desktop" + #icon + install -D "$srcdir/upp-x11-src-$pkgver/uppsrc/ide/theide-48.png" "$pkgdir/usr/share/pixmaps/theide.png" + #fix permissions + find "$pkgdir/usr/" -print0 | xargs -0 chown root:root + find "$pkgdir/usr/" -type f -print0 | xargs -0 chmod 644 + find "$pkgdir/usr/" -type d -print0 | xargs -0 chmod 755 + #install applications + install -D "$srcdir/umk" "$pkgdir/usr/bin/umk" + install -D "$srcdir/theide" "$pkgdir/usr/bin/theide" +} + diff --git a/pcr/theide/license.txt b/pcr/theide/license.txt new file mode 100644 index 000000000..6cea058a6 --- /dev/null +++ b/pcr/theide/license.txt @@ -0,0 +1,9 @@ +Copyright (C) 2010 Mirek Fidler, Tomas Rylek and various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies of the Software and its Copyright notices. In addition publicly documented acknowledgment must be given that this software has been used if no source code of this software is made available publicly. This includes +acknowledgments in either Copyright notices, Manuals, Publicity and Marketing documents or any documentation provided with any product containing this software. This License does not apply to any software that links to the libraries provided by this software (statically or dynamically), but only to +the software provided. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/pcr/theide/theide.install b/pcr/theide/theide.install new file mode 100644 index 000000000..5e16c038a --- /dev/null +++ b/pcr/theide/theide.install @@ -0,0 +1,3 @@ +post_install() { + update-desktop-database -q +} diff --git a/pcr/toluapp/PKGBUILD b/pcr/toluapp/PKGBUILD new file mode 100644 index 000000000..fa8c841c6 --- /dev/null +++ b/pcr/toluapp/PKGBUILD @@ -0,0 +1,28 @@ +# Contributor: Stéphane Gaudreault <stephane.gaudreault@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=toluapp +pkgver=1.0.93 +pkgrel=5 +pkgdesc="Tool to integrate C/C++ code with Lua" +url="http://www.codenix.com/~tolua" +depends=('lua') +makedepends=('scons') +license=('MIT') +arch=('i686' 'x86_64') +source=(http://www.codenix.com/~tolua/tolua++-${pkgver}.tar.bz2 config_linux.py) +md5sums=('100aa6907b8108582080b37d79c0afd7' 'f85232adfa873ea012088dd4d7fb63d7') + +build() { + cd "${srcdir}/tolua++-${pkgver}" + cp ../config_linux.py ${srcdir}/tolua++-${pkgver} + + scons all +} + +package() { + cd "${srcdir}/tolua++-${pkgver}" + scons prefix=${pkgdir}/usr install +} +md5sums=('100aa6907b8108582080b37d79c0afd7' + 'f85232adfa873ea012088dd4d7fb63d7') diff --git a/pcr/toluapp/config_linux.py b/pcr/toluapp/config_linux.py new file mode 100755 index 000000000..0a5fbcfeb --- /dev/null +++ b/pcr/toluapp/config_linux.py @@ -0,0 +1,22 @@ +## This is the linux configuration file +# This file was adapted to be used with ArchLinux +# Use 'scons -h' to see the list of command line options available + +# Compiler flags (based on ArchLinux's installation of lua) +#LINKFLAGS = ['-g'] +CCFLAGS = ['-O2', '-ansi', '-Wall', '-fPIC'] +#CCFLAGS = ['-g'] + +# this is the default directory for installation. Files will be installed on +# <prefix>/bin, <prefix>/lib and <prefix>/include when you run 'scons install' +# +# You can also specify this directory on the command line with the 'prefix' +# option +# +# You can see more 'generic' options for POSIX systems on config_posix.py + +prefix = '/usr' + +# libraries (based on ArchLinux's installation of lua) +LIBS = ['lua', 'dl', 'm'] + diff --git a/pcr/upp-svn/GCC.bm b/pcr/upp-svn/GCC.bm new file mode 100644 index 000000000..bfcb09c1d --- /dev/null +++ b/pcr/upp-svn/GCC.bm @@ -0,0 +1,23 @@ +BUILDER = "GCC"; +COMPILER = ""; +DEBUG_INFO = "2"; +DEBUG_BLITZ = "1"; +DEBUG_LINKMODE = "1"; +DEBUG_OPTIONS = "-O0"; +DEBUG_FLAGS = ""; +DEBUG_LINK = ""; +RELEASE_BLITZ = "0"; +RELEASE_LINKMODE = "1"; +RELEASE_OPTIONS = "-O3 -ffunction-sections -fdata-sections"; +RELEASE_SIZE_OPTIONS = "-Os -finline-limit=20 -ffunction-sections -fdata-sections"; +RELEASE_FLAGS = ""; +RELEASE_LINK = "-Wl,--gc-sections"; +DEBUGGER = "gdb"; +PATH = ""; +INCLUDE = "/usr/include/freetype2;/usr/include/gtk-2.0;/usr/include/glib-2.0;/usr/lib/glib-2.0/include;/usr/lib/gtk-2.0/include;/usr/include/cairo;/usr/include/pango-1.0;/usr/include/atk-1.0;/usr/X11R6/include;/usr/X11R6/include/freetype2;/usr/X11R6/include/gtk-2.0;/usr/X11R6/include/glib-2.0;/usr/X11R6/lib/glib-2.0/include;/usr/X11R6/lib/gtk-2.0/include;/usr/X11R6/include/cairo;/usr/X11R6/include/pango-1.0;/usr/X11R6/include/atk-1.0;/usr/include/c++/4.5.0;/usr/include/c++/4.5.0/i686-pc-linux-gnu;/usr/include/webkit-1.0;/usr/include/libsoup-2.4;/usr/include/libxml2"; +LIB = "/usr/X11R6/lib;/usr/lib;/usr/local/lib"; +REMOTE_HOST = ""; +REMOTE_OS = ""; +REMOTE_TRANSFER = ""; +REMOTE_MAP = ""; +LINKMODE_LOCK = "0"; diff --git a/pcr/upp-svn/PKGBUILD b/pcr/upp-svn/PKGBUILD new file mode 100644 index 000000000..1a5a50d4b --- /dev/null +++ b/pcr/upp-svn/PKGBUILD @@ -0,0 +1,67 @@ +# Contributor: Jan Dolinar <dolik.rce@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=upp-svn +pkgver=5554 +pkgrel=1 +pkgdesc="Radical and innovative multiplatform C++ framework (known as U++)" +arch=('any') +url="http://www.ultimatepp.org" +license=('BSD') +groups=() +depends=('gcc-libs' 'libpng' 'libxft' 'theide') +makedepends=('subversion') +optdepends=('libnotify: Enables compiling gtk-styled apps') +provides=('upp') +conflicts=('upp') +replaces=() +backup=() +options=(emptydirs !strip) +install= +source=('GCC.bm' 'license.txt') +noextract=() + +_svntrunk="http://upp-mirror.googlecode.com/svn/trunk/" +# many users have already working copy of U++ on their system, so they +# can use it for building (e.g. to save network traffic or to speed up +# things) by setting $UPPSVN environment variable +if [ "x$UPPSVN" != "x" ] +then + _svnmod=$UPPSVN +else + _svnmod="$srcdir/uppsvn" +fi + +build() { + cd "$srcdir" + #get sources + msg "Downloading sources from svn..." + for n in bazaar reference examples tutorial uppsrc + do + msg2 "$n" + if [ -d $_svnmod/.svn ]; then + (cd $_svnmod/$n && svn up -r $pkgver) + else + svn co $_svntrunk$n/ --config-dir ./ -r $pkgver $_svnmod/$n + fi + done + msg "SVN checkout done (or server timeout)" +} + +package() { + #copy source files + mkdir -p "$pkgdir/usr/share/upp" + msg2 "Copying the source codes..." + cp -r "$_svnmod/"{bazaar,examples,reference,tutorial,uppsrc} "$pkgdir/usr/share/upp/" + echo "#define IDE_VERSION \"$pkgver-Arch-$(uname -m)\"" > "$pkgdir/usr/share/upp/uppsrc/ide/version.h" + msg2 "Removing the .svn directories..." + find "$pkgdir/" -type d -name ".svn" -exec rm -rf {} \; -prune + #license + mkdir -p "$pkgdir/usr/share/licenses/upp-svn" + cp "$srcdir/license.txt" "$pkgdir/usr/share/licenses/upp-svn" + #build method + cp "$srcdir/GCC.bm" "$pkgdir/usr/share/upp" + #fix permissions + msg2 "Setting permissions..." + find "$pkgdir/usr/" -type f -exec chown root:root {} \; -exec chmod 644 {} \; +} diff --git a/pcr/upp-svn/license.txt b/pcr/upp-svn/license.txt new file mode 100644 index 000000000..6cea058a6 --- /dev/null +++ b/pcr/upp-svn/license.txt @@ -0,0 +1,9 @@ +Copyright (C) 2010 Mirek Fidler, Tomas Rylek and various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies of the Software and its Copyright notices. In addition publicly documented acknowledgment must be given that this software has been used if no source code of this software is made available publicly. This includes +acknowledgments in either Copyright notices, Manuals, Publicity and Marketing documents or any documentation provided with any product containing this software. This License does not apply to any software that links to the libraries provided by this software (statically or dynamically), but only to +the software provided. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/pcr/vim-ifdef/PKGBUILD b/pcr/vim-ifdef/PKGBUILD new file mode 100644 index 000000000..1fb983cb3 --- /dev/null +++ b/pcr/vim-ifdef/PKGBUILD @@ -0,0 +1,23 @@ +# Contributor: Manuel Mendez <mmendez534 at gmail dot com> +# Author: Laszlo Papp <djszapi @ gmail at com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=vim-ifdef +pkgver=3.2 +_scriptid=16097 +pkgrel=1 +pkgdesc="C Preprocessor Highlighting" +arch=(any) +url="http://www.vim.org/scripts/script.php?script_id=7" +license=('custom') +depends=(vim) +install=vimdoc.install +source=(ifdef.vim::http://www.vim.org/scripts/download_script.php?src_id=${_scriptid}) + +build() { + cd "$srcdir" + install -Dm644 ifdef.vim "$pkgdir"/usr/share/vim/syntax/ifdef.vim + sed -n '/^" Copyright/,/^\s*$/ p' ifdef.vim | + sed -e 's|^" ||' -e '/^\s*$/ d' > extracted-license.txt + install -Dm644 extracted-license.txt "$pkgdir"/usr/share/licenses/$pkgname/license.txt +} diff --git a/pcr/vim-ifdef/vimdoc.install b/pcr/vim-ifdef/vimdoc.install new file mode 100644 index 000000000..61c4b3a81 --- /dev/null +++ b/pcr/vim-ifdef/vimdoc.install @@ -0,0 +1,14 @@ +post_install() { + echo -n "Updating vim help tags..." + /usr/bin/vim --noplugins -u NONE -U NONE \ + --cmd ":helptags /usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1 + echo "done." +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install +} diff --git a/pcr/wallchange/PKGBUILD b/pcr/wallchange/PKGBUILD new file mode 100755 index 000000000..f8465bda5 --- /dev/null +++ b/pcr/wallchange/PKGBUILD @@ -0,0 +1,34 @@ +# Wallchange +# Contributor: ying <Jinoto Systems> +# Contributor: ying <Jinoto Systems> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=wallchange +pkgver=1.2 +pkgrel=1 +pkgdesc="A small and simple command tool which is changing the wallpaper on a switch to the next virtual desktop." +url="https://sourceforge.net/projects/wallchange-slim/files/" +arch=('i686' 'x86_64') +install=wallchange.install +license=('GPL2') +depends=('eterm' 'archlinux-wallpaper') # 'eterm' can be changed in any command tool to draw the wallpaper. +optdepends=('eterm' 'habak' 'feh' 'hsetroot' 'others') +source=("https://downloads.sourceforge.net/project/wallchange-slim/wallchange-${pkgver}.tar.gz?r=&ts=1289391543&use_mirror=master" wallchange.conf) + + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + make all +} +package() { + install -Dm755 ${pkgname}-${pkgver}/wallchange $pkgdir/usr/bin/wallchange || return + install -Dm755 wallchange.conf $pkgdir/usr/share/wallchange/wallchange.conf || return +} + + + + +md5sums=('840425f1c724aea198b7cd378fba708d' + 'd4a9b5c9b341eee1651269139e1f91c9') +md5sums=('840425f1c724aea198b7cd378fba708d' + 'd4a9b5c9b341eee1651269139e1f91c9') diff --git a/pcr/wallchange/wallchange.conf b/pcr/wallchange/wallchange.conf new file mode 100644 index 000000000..9deda3c92 --- /dev/null +++ b/pcr/wallchange/wallchange.conf @@ -0,0 +1,23 @@ +# Wallchange configuration file + +# specify the command to draw the wallpaper +command=Esetroot -s + + +# specify the wallpapers which will be used on a desktop switch. + + +# Wallpaper for the first desktop +wallpaper=/usr/share/archlinux/wallpaper/archlinux-simplyblack.png + +# Wallpaper for the second desktop +wallpaper=/usr/share/archlinux/wallpaper/archlinux-poolclouds.jpg + +# Wallpaper for the third desktop +wallpaper=/usr/share/archlinux/wallpaper/archlinux-carbonite-knight.jpg + +# Wallpaper for the fourth desktop +wallpaper=/usr/share/archlinux/wallpaper/archlinux-burn.jpg + + + diff --git a/pcr/wallchange/wallchange.install b/pcr/wallchange/wallchange.install new file mode 100644 index 000000000..ceb90e348 --- /dev/null +++ b/pcr/wallchange/wallchange.install @@ -0,0 +1,13 @@ + +post_install() { + echo "" + echo -e "\033[37;41;1m Read First \033[0m" + echo "Please copy the /usr/share/wallchange/wallchange.conf configuration file to you home folder(~/.wallchange.conf). Enjoy!" + echo "" +} + +op=$1 +shift +$op "$@" + + diff --git a/pcr/xfce-theme-greybird/PKGBUILD b/pcr/xfce-theme-greybird/PKGBUILD new file mode 100644 index 000000000..0c5f9501d --- /dev/null +++ b/pcr/xfce-theme-greybird/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: flan_suse +pkgname=xfce-theme-greybird +pkgver=1.0.7 +pkgrel=1 +pkgdesc="A grey and blue Xfce theme, introduced in the release of Xubuntu 11.04 and updated for 12.04; includes the classic low saturation theme" +arch=('any') +url="http://shimmerproject.org/projects/greybird/" +license=('GPL2' 'CC-BY-SA-3.0') +groups=('xfce-themes-shimmer-collection') +depends=('gtk-engine-murrine') +optdepends=('shimmer-wallpapers: contains the Greybird wallpaper, among others' + 'gtk3: required for CSS/GTK3 theme' + 'elementary-xfce-icons: matching icon set; use the dark icon theme' + 'lightdm-gtk-greeter: required for the LightDM GTK theme' + 'lightdm-unity-greeter: required for the LightDM Unity theme' + 'gtk-engine-unico: required for gtk3 support for the classic theme; not required for the current theme') +source=($pkgname-$pkgver.tar.gz::https://github.com/shimmerproject/Greybird/tarball/v${pkgver}) + +package() { + cd "${srcdir}/shimmerproject-Greybird"* + + # Create installation directories + install -d -m755 "${pkgdir}/usr/share/themes/Greybird"{,\ Compact} + + # Install the current theme + cp -a * "${pkgdir}/usr/share/themes/Greybird/" + + # Make a symbolic link for the compact version of the xfwm4 theme + cd "${pkgdir}/usr/share/themes/Greybird Compact" + ln -s "../${_pkgname}/xfwm4_compact" "xfwm4" +} +md5sums=('d7c291408cd644e102cf811ee62e7a37') diff --git a/pcr/zeroinstall-injector/PKGBUILD b/pcr/zeroinstall-injector/PKGBUILD new file mode 100644 index 000000000..120355775 --- /dev/null +++ b/pcr/zeroinstall-injector/PKGBUILD @@ -0,0 +1,36 @@ +# Contributor: SpepS <dreamspepser at yahoo dot it> +# Contributor: Anton Bazhenov <anton.bazhenov at gmail> +# Contributor: Lone_Wolf <lonewolf@xs4all.nl> +# Maintainer : Parabola GNU / Linux-libre <aurelien@cwb.io> + +pkgname=zeroinstall-injector +pkgver=1.8 +pkgrel=1 +pkgdesc="A decentralised loosly-coupled secure installation system" +arch=('any') +url="http://zero-install.sourceforge.net/" +license=('GPL2' 'LGPL') +depends=('pygtk' 'dbus-python' 'gnupg' 'hicolor-icon-theme' 'desktop-file-utils') +optdepends=('xdg-utils: desktop integration' + 'packagekit: packagekit integration') +install="$pkgname.install" +source=("http://downloads.sourceforge.net/zero-install/$pkgname-$pkgver.tar.bz2") +md5sums=('00b3e8b3cbfbe8ed55f81842a4d2c386') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # man path fix + sed -i "s|man/|share/&|" setup.py + + python2 setup.py build +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + python2 setup.py install --prefix=/usr --root="$pkgdir/" + + # python2 fix + sed -i "s/env python/&2/" `grep -rl "env python" "$pkgdir"` +} +md5sums=('00b3e8b3cbfbe8ed55f81842a4d2c386') diff --git a/pcr/zeroinstall-injector/zeroinstall-injector.install b/pcr/zeroinstall-injector/zeroinstall-injector.install new file mode 100644 index 000000000..293ff852a --- /dev/null +++ b/pcr/zeroinstall-injector/zeroinstall-injector.install @@ -0,0 +1,12 @@ +post_install() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + update-desktop-database -q +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/pcr/zsh-yaourt/PKGBUILD b/pcr/zsh-yaourt/PKGBUILD new file mode 100644 index 000000000..af6541183 --- /dev/null +++ b/pcr/zsh-yaourt/PKGBUILD @@ -0,0 +1,21 @@ +# Contributor: Jakub Ruzicka <yaccobb@centrum.cz> +# Contributor: Javier `Phrodo_00' Aravena <phrodo.00@gmail.com> +# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres <aurelien@cwb.io> + +pkgname=zsh-yaourt +pkgver=20110403 +_laststablerev=497acb78fe6b +pkgrel=3 +pkgdesc="ZSH functions to tab-complete repo package names for yaourt" +url="http://bitbucket.org/Phrodo_00/zsh-yaourt" +depends=(zsh) +source=("https://bitbucket.org/Phrodo_00/${pkgname}/get/${_laststablerev}.tar.gz") +arch=('i686' 'x86_64') +license=('GPL') +md5sums=('ac80ec05fa12e53fc8c58e5178609a6b') + +package() { + cd ${srcdir}/Phrodo_00-${pkgname}-${_laststablerev} + install -d -m755 ${pkgdir}/usr/share/zsh/site-functions/ + install -m644 _yaourt $startdir/pkg/usr/share/zsh/site-functions/_yaourt +} diff --git a/radio/idjc/idjc_0.8.4_configure.patch b/radio/idjc/idjc_0.8.4_configure.patch new file mode 100644 index 000000000..9f1b3c5f0 --- /dev/null +++ b/radio/idjc/idjc_0.8.4_configure.patch @@ -0,0 +1,12 @@ +diff -Naur idjc-0.8.4/configure idjc-0.8.4.new/configure +--- idjc-0.8.4/configure 2010-10-07 15:00:07.000000000 +0200 ++++ idjc-0.8.4.new/configure 2010-10-20 19:30:48.000000000 +0200 +@@ -5349,7 +5349,7 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mutagen" >&5 + $as_echo_n "checking for mutagen... " >&6; } +-python -c "import mutagen" &>/dev/null ++$PYTHON -c "import mutagen" &>/dev/null + if test $? -ne 0 ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } diff --git a/social/anubis/PKGBUILD b/social/anubis/PKGBUILD new file mode 100644 index 000000000..8835d2275 --- /dev/null +++ b/social/anubis/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Nicolás Reynolds <fauno@kiwwwi.com.ar> +# Contributor: Nathan Owe <ndowens04 at gmail> +pkgname=anubis +pkgver=4.1.1 +pkgrel=2 +pkgdesc="An SMTP message submission daemon. " +arch=('i686') +url="http://www.gnu.org/software/anubis/" +license=('GPL3') +depends=('guile' 'gpgme' 'gnutls' 'gsasl' 'pam' 'pcre' 'tcp_wrappers') +source=(ftp://ftp.gnu.org/gnu/anubis/$pkgname-$pkgver.tar.gz) +md5sums=('28df4daee11bc74a9e4b19b425d8a196') + +build() { + cd $srcdir/$pkgname-$pkgver + + ./configure --prefix=/usr \ + --with-pam \ + --with-pcre \ + --with-tcp-wrappers \ + --with-socks-proxy + make +} + +package() { + cd $srcdir/$pkgname-$pkgver + make DESTDIR=$pkgdir/ install +} + +# vim:set ts=2 sw=2 et: diff --git a/social/asterisk/PKGBUILD b/social/asterisk/PKGBUILD index 7318e71dc..896d5bacf 100755 --- a/social/asterisk/PKGBUILD +++ b/social/asterisk/PKGBUILD @@ -1,7 +1,7 @@ # Contributor: Alessio Biancalana <dottorblaster@gmail.com> pkgname=asterisk -pkgver=1.8.7.0 +pkgver=10.9.0 pkgrel=1 pkgdesc="A complete PBX solution" arch=('i686' 'x86_64') @@ -9,13 +9,13 @@ url="http://www.asterisk.org" license=('GPL') depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl') makedepends=('postgresql' 'unixodbc' 'sqlite3') -optdepends=('libpri' 'libss7' 'openr2') +optdepends=('libpri' 'libss7' 'openr2' 'iksemel') backup=(etc/asterisk/asterisk.conf) -source=(http://downloads.digium.com/pub/asterisk/releases/asterisk-$pkgver.tar.gz \ +source=(http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-$pkgver.tar.gz \ asterisk \ asterisk.logrotated) install=$pkgname.install -md5sums=('5c6616a53fa3f300420ea17fd23abae9' +md5sums=('2fb85dc753584ac13692c27f9749c6cb' '59146273738605f1e011d8e7bed3561a' '486e07a0a1405ea25ec5b1736034653e') diff --git a/social/inspircd/PKGBUILD b/social/inspircd/PKGBUILD new file mode 100644 index 000000000..6165f7c31 --- /dev/null +++ b/social/inspircd/PKGBUILD @@ -0,0 +1,62 @@ +pkgname=inspircd +pkgver=2.0.5 +pkgrel=2 +pkgdesc='A lightweight IRC daemon' +arch=('x86_64' 'i686') +url='http://www.inspircd.org/' +license=('GPL2') +depends=('perl' 'gnutls' 'openssl' 'libgcrypt') +makedepends=('pkg-config' 'mysql' 'postgresql' 'sqlite3' 'libldap' 'geoip' 'tre') +optdepends=('mysql: m_mysql' + 'pcre: m_regex_pcre' + 'postgresql: m_pgsql' + 'sqlite3: m_sqlite3' + 'libldap: m_ldapoper and m_ldapauth' + 'geoip: m_geoip' + 'tre: m_regex_tre') +install=inspircd.install +backup=('etc/inspircd/inspircd.conf') + +source=(http://www.inspircd.org/downloads/InspIRCd-$pkgver.tar.bz2 inspircd.rcd gnutls.patch) +md5sums=('60dec04bdc8f8c473f3c7bd774a1f153' + 'f4f32d944401b1602ab6716476892afd' + '6312154e759e5d71b85c7dca71b7a4fd') + +build() { + cd "${srcdir}/inspircd" + patch -Np1 -i "${srcdir}/gnutls.patch" + + ./configure \ + --enable-extras=m_geoip.cpp \ + --enable-extras=m_ldapauth.cpp \ + --enable-extras=m_ldapoper.cpp \ + --enable-extras=m_mysql.cpp \ + --enable-extras=m_pgsql.cpp \ + --enable-extras=m_regex_pcre.cpp \ + --enable-extras=m_regex_posix.cpp \ + --enable-extras=m_regex_tre.cpp \ + --enable-extras=m_sqlite3.cpp + + ./configure \ + --prefix=/usr/lib/inspircd \ + --binary-dir=/usr/sbin \ + --module-dir=/usr/lib/inspircd/modules \ + --config-dir=/etc/inspircd \ + --enable-gnutls \ + --enable-openssl \ + --enable-epoll + + make +} + +package() { + install -Dm755 "${srcdir}"/inspircd.rcd "${pkgdir}"/etc/rc.d/inspircd + install -o141 -g141 -dm750 "${pkgdir}/var/log/inspircd" + install -o141 -g141 -dm750 "${pkgdir}/var/run/inspircd" + + cd "${srcdir}/inspircd" + make DESTDIR="$pkgdir" INSTUID=141 install + + rm -rf "${pkgdir}"/usr/lib/inspircd/logs + rm -rf "${pkgdir}"/usr/lib/inspircd/data +} diff --git a/social/inspircd/gnutls.patch b/social/inspircd/gnutls.patch new file mode 100644 index 000000000..3975c418c --- /dev/null +++ b/social/inspircd/gnutls.patch @@ -0,0 +1,12 @@ +ff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp +index b8c4815..d58caa8 100644 +--- a/src/modules/extra/m_ssl_gnutls.cpp ++++ b/src/modules/extra/m_ssl_gnutls.cpp +@@ -20,7 +20,7 @@ + + /* $ModDesc: Provides SSL support for clients */ + /* $CompileFlags: pkgconfincludes("gnutls","/gnutls/gnutls.h","") */ +-/* $LinkerFlags: rpath("pkg-config --libs gnutls") pkgconflibs("gnutls","/libgnutls.so","-lgnutls") */ ++/* $LinkerFlags: rpath("pkg-config --libs gnutls") pkgconflibs("gnutls","/libgnutls.so","-lgnutls") -lgcrypt */ + + enum issl_status { ISSL_NONE, ISSL_HANDSHAKING_READ, ISSL_HANDSHAKING_WRITE, ISSL_HANDSHAKEN, ISSL_CLOSING, ISSL_CLOSED }; diff --git a/social/inspircd/inspircd.install b/social/inspircd/inspircd.install new file mode 100644 index 000000000..ec97113f5 --- /dev/null +++ b/social/inspircd/inspircd.install @@ -0,0 +1,15 @@ +post_install() { + getent group inspircd &>/dev/null || groupadd -r -g 141 inspircd >/dev/null + getent passwd inspircd &>/dev/null || useradd -r -u 141 -g inspircd -d /var/lib/inspircd -s /bin/false -c inspircd inspircd >/dev/null + + echo '==> You will need to create a config file for inspircd' + echo '==> cp /etc/inspircd/inspircd.conf.example /etc/inspircd/inspircd.conf' + echo '==> You will need to change the pidfile. To do this you can insert the following into your config.' + echo '==> <pid file="/var/run/inspircd/inspircd.pid">' + echo '==> Remember to use absolute paths in your config directory and not relative paths like you would do with a user-based inspircd install.' +} + +post_remove() { + getent passwd inspircd &>/dev/null && userdel inspircd >/dev/null + getent group inspircd &>/dev/null && groupdel inspircd >/dev/null +} diff --git a/social/inspircd/inspircd.rcd b/social/inspircd/inspircd.rcd new file mode 100644 index 000000000..a041b9be4 --- /dev/null +++ b/social/inspircd/inspircd.rcd @@ -0,0 +1,50 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +get_pid() { + pidof /usr/sbin/inspircd +} + +case "$1" in + start) + stat_busy "Starting inspircd" + PID=$(get_pid) + if [ -z "$PID" ]; then + su -s /bin/sh -c '/usr/sbin/inspircd --logfile /var/log/inspircd/startup.log --config /etc/inspircd/inspircd.conf' 'inspircd' > /dev/null + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + add_daemon inspircd + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping inspircd" + PID=$(get_pid) + [ ! -z "$PID" ] && kill $PID + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm_daemon inspircd + stat_done + fi + ;; + + restart) + $0 stop + $0 start + ;; + + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/social/libnatpmp/PKGBUILD b/social/libnatpmp/PKGBUILD index e81d3445f..ded1e6ca5 100644 --- a/social/libnatpmp/PKGBUILD +++ b/social/libnatpmp/PKGBUILD @@ -4,7 +4,7 @@ pkgname=libnatpmp pkgver=20120821 pkgrel=1 pkgdesc="A portable and fully compliant implementation of the NAT-PMP protocol" -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') url="http://miniupnp.free.fr/libnatpmp.html" license=('BSD') depends=('glibc') diff --git a/social/sobby/PKGBUILD b/social/sobby/PKGBUILD index 644c74aec..50f847db9 100755 --- a/social/sobby/PKGBUILD +++ b/social/sobby/PKGBUILD @@ -1,16 +1,14 @@ # Maintainer: Thomas Jost <schnouki@schnouki.net> pkgname=sobby -pkgver=0.4.7 +pkgver=0.4.8 pkgrel=1 pkgdesc="Standalone obby server" url="http://gobby.0x539.de/trac/" license="GPL" -depends=('obby>=0.4.7' 'libxml++') +depends=('obby=0.4.8' 'libxml++') makedepends=('pkgconfig' 'net6>=1.3.12') -arch=('i686' 'x86_64') -source=(http://releases.0x539.de/sobby/sobby-$pkgver.tar.gz) -md5sums=('816ac9e2ecf2ac79306f9bbb80699464') -sha1sums=('ca20369eabce1657d090b310d78d4a35d697f28b') +arch=('i686' 'x86_64' 'mips6el') +source=(http://releases.0x539.de/sobby/sobby-$pkgver.tar.gz{,.sig}) build() { cd $srcdir/$pkgname-$pkgver @@ -22,3 +20,5 @@ package() { cd $srcdir/$pkgname-$pkgver make DESTDIR=$pkgdir install } +md5sums=('1f7cf8c09cdeddbf2152843b28f73ce1' + '96822427ab95289ebb1520e6353c5d3c') diff --git a/social/tokyocabinet/PKGBUILD b/social/tokyocabinet/PKGBUILD index 6e9b7969d..7b3a55c80 100755 --- a/social/tokyocabinet/PKGBUILD +++ b/social/tokyocabinet/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: Nicolas Martyanoff <khaelin@gmail.com> pkgname=tokyocabinet -pkgver=1.4.47 +pkgver=1.4.48 pkgrel=1 pkgdesc="a modern implementation of DBM" arch=('i686' 'x86_64') @@ -11,7 +11,7 @@ license=('LGPL') makedepends=('gcc>=3.1' 'make' 'pkgconfig') depends=('zlib' 'bzip2') source=("http://fallabs.com/tokyocabinet/${pkgname}-${pkgver}.tar.gz") -md5sums=('3d94fe2aebf5d9ff0478ed895bc46fc9') +md5sums=('fd03df6965f8f56dd5b8518ca43b4f5e') build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/~fauno/faenza-icon-theme/PKGBUILD b/~fauno/faenza-icon-theme/PKGBUILD new file mode 100644 index 000000000..484764c73 --- /dev/null +++ b/~fauno/faenza-icon-theme/PKGBUILD @@ -0,0 +1,25 @@ +# Maintainer: Elia Notarangelo <elia.notarangelo AT gmail DOT com> +# Contributor: Frikilinux <frikilinux at frikilinux.com.ar> +# Contributor: graysky <graysky AT archlinux DOT us> +# Contributor: Samsagax <samsagax AT gmail DOT com> +# Contributor: simongmzlj <simongmzlj AT gmail DOT com> + +pkgname=faenza-icon-theme +pkgver=1.3 +pkgrel=1 +pkgdesc="Icon theme designed for Equinox GTK theme" +url="http://gnome-look.org/content/show.php/Faenza?content=128143" +license=('GPL3') +arch=('any') +makedepends=() +options=(!strip) +source=("http://ppa.launchpad.net/tiheum/equinox/ubuntu/pool/main/f/${pkgname}/${pkgname}_${pkgver}.orig.tar.gz") +md5sums=('763e0450b0853bd11f04c970ba3fd49f') + +package() { + cd "${srcdir}" + mkdir -p "${pkgdir}"/usr/share/icons + cp -rf Faenza{,-Dark,-Darkest,-Darker} "${pkgdir}"/usr/share/icons/ + +} + diff --git a/~fauno/kyotocabinet/PKGBUILD b/~fauno/kyotocabinet/PKGBUILD new file mode 100644 index 000000000..1636bfda0 --- /dev/null +++ b/~fauno/kyotocabinet/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer: Alexander Duscheleit <jinks@archlinux.us> +# Contributor: Joaquim Pedro (osmano807) <osmano807@gmail.com> +pkgname=kyotocabinet +pkgver=1.2.76 +pkgrel=1 +pkgdesc="a modern implementation of DBM in C++" +arch=('i686' 'x86_64') +url="http://fallabs.com/kyotocabinet" +license=('LGPL3') +makedepends=('gcc>=3.1' 'make' 'pkgconfig' 'zlib') +depends=('zlib' 'gcc-libs') +source=("http://fallabs.com/${pkgname}/pkg/${pkgname}-${pkgver}.tar.gz") + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make install DESTDIR="$pkgdir/" +} +sha512sums=('278db7b327eb4c21bf0137d9aa14fb67d74d5ce7ed1cb29fc9120d157a60de165ec0cf842903eb7952e8f998045ae585b958977fa973ba0e0773381de71d9f6a') diff --git a/~fauno/kyototycoon/PKGBUILD b/~fauno/kyototycoon/PKGBUILD new file mode 100644 index 000000000..af88f6020 --- /dev/null +++ b/~fauno/kyototycoon/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer: Alexander Duscheleit <jinks@archlinux.us> +pkgname=kyototycoon +pkgver=0.9.56 +pkgrel=1 +pkgdesc="A lightweight conncurent remote frontend for Kyoto Cabinet." +arch=('i686' 'x86_64') +url="http://fallabs.com/kyototycoon" +license=('GPL3') +depends=('zlib' 'kyotocabinet') +source=("http://fallabs.com/${pkgname}/pkg/${pkgname}-${pkgver}.tar.gz") +sha256sums=('553e4ea83237d9153cc5e17881092cefe0b224687f7ebcc406b061b2f31c75c6') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make install DESTDIR="$pkgdir/" +} + +# vim:set ts=2 sw=2 et: diff --git a/~fauno/spawn-fcgi-php/PKGBUILD b/~fauno/spawn-fcgi-php/PKGBUILD new file mode 100644 index 000000000..a49858417 --- /dev/null +++ b/~fauno/spawn-fcgi-php/PKGBUILD @@ -0,0 +1,40 @@ +# Contributor: Piotr Rogoża <rogoza dot piotr at gmail dot com> +pkgname=spawn-fcgi-php +pkgver=1.1.1 +pkgrel=1 +pkgdesc="script to provide simple cgi-php support for nginx http daemon" +arch=('any') +url="http://aur.archlinux.org/packages.php?ID=37439" +license=('GPL') +depends=('php-cgi' 'spawn-fcgi') +backup=('etc/conf.d/spawn-fcgi-php.conf') +source=( + 'spawn-fcgi-php' + 'spawn-fcgi-php.conf' + 'server.conf.example' + 'nginx.conf.example' + 'public_html.conf.example' +) + +build() { + # Install script and configuration file + install -Dm775 spawn-fcgi-php \ + ${pkgdir}/etc/rc.d/spawn-fcgi-php || return 1 + install -Dm664 spawn-fcgi-php.conf \ + ${pkgdir}/etc/conf.d/spawn-fcgi-php.conf || return 1 + + # Install examples of configuration + install -Dm664 public_html.conf.example \ + ${pkgdir}/etc/nginx/conf/public_html.conf.example || return 1 + install -Dm644 server.conf.example \ + ${pkgdir}/etc/nginx/conf/server.conf.example || return 1 + install -Dm664 nginx.conf.example \ + ${pkgdir}/etc/nginx/conf/nginx.conf.example || return 1 +} + +# vim:set ts=2 sw=2 et ft=sh: +md5sums=('9088c130caebf43902f958c985200811' + 'a8bfb0b50120c91449c8a08144706c9b' + 'c02189e88531386cd67d3401924c18ae' + '00bf49fc8a0d8c9f6c96305fae8471d4' + '9202545dc3701d5933804890312667e6') diff --git a/~fauno/spawn-fcgi-php/nginx.conf.example b/~fauno/spawn-fcgi-php/nginx.conf.example new file mode 100644 index 000000000..35d0868f3 --- /dev/null +++ b/~fauno/spawn-fcgi-php/nginx.conf.example @@ -0,0 +1,34 @@ +user http; +worker_processes 1; + +error_log logs/error.log; + +#pid logs/nginx.pid; + +events { + worker_connections 1024; +} + + +http { + include mime.types; + default_type application/octet-stream; + + sendfile on; + #tcp_nopush on; + + #keepalive_timeout 0; + keepalive_timeout 65; + + #gzip on; + + # the file with mapping username per port + include /etc/nginx/conf/map_user2port.conf; + #or only + #include map_user2port.conf + + # Servers configurations ... + include server.conf.example; + + } +} diff --git a/~fauno/spawn-fcgi-php/public_html.conf.example b/~fauno/spawn-fcgi-php/public_html.conf.example new file mode 100644 index 000000000..74f6c2b4b --- /dev/null +++ b/~fauno/spawn-fcgi-php/public_html.conf.example @@ -0,0 +1,16 @@ +location ~ ^/~([^/]+)(/?.*)$ { + set $username $1; + alias /home/$1/public_html/$2; + autoindex on; + location ~ \.php { + #fastcgi_pass 127.0.0.1:9000; + # or for multiusers, one port per user + fastcgi_pass 127.0.0.1:$port; + # or for unix domain sockets + #fastcgi_pass unix:/var/run/spawn-fcgi/spawn-fcgi.$username.sock; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /etc/nginx/conf/fastcgi_params; + } +} +# vi: ft=nginx diff --git a/~fauno/spawn-fcgi-php/server.conf.example b/~fauno/spawn-fcgi-php/server.conf.example new file mode 100644 index 000000000..06160cfb2 --- /dev/null +++ b/~fauno/spawn-fcgi-php/server.conf.example @@ -0,0 +1,22 @@ +server { + listen 80; + server_name domain.tld; + root /srv/http/domain.tld; + + index index.php index.html; + + access_log logs/access.log; + error_log logs/error.log; + + location ~ \.php { + # TCP + fastcgi_pass 127.0.0.1:9000; + # or SOCKET + #fastcgi_pass unix:/var/run/spawn-fcgi/spawn-fcgi.sock; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include /etc/nginx/conf/fastcgi_params; + } + include public_html.conf.example; +} +# vi: ft=nginx diff --git a/~fauno/spawn-fcgi-php/spawn-fcgi-php b/~fauno/spawn-fcgi-php/spawn-fcgi-php new file mode 100755 index 000000000..607ebab8c --- /dev/null +++ b/~fauno/spawn-fcgi-php/spawn-fcgi-php @@ -0,0 +1,460 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +NAME=spawn-fcgi-php +CONF="/etc/conf.d/spawn-fcgi-php.conf" +#------------------------------------------------------------------------------- +# Return value for: +# for check_process +PROCNOPIDEXIST=-1 # none process is running and pidfile exist +PROCNOPIDNO=0 # none process is running +PROCRUNPIDEXIST=1 # process is running, pidfile exist and has size >0b +PROCRUNPID0=2 # process is running, pidfile has size 0b +PROCRUNPIDNO=3 # process is running, pidfile doesn't exist +OTHERERROR=255 +# check_daemon +DAEMONEXIST=0 +DAEMONNOEXIST=1 +#------------------------------------------------------------------------------- + +# Reading configuration +if [ -r "$CONF" ]; then + . $CONF +else + stat_fail + stat_busy "File $CONF not found" + stat_die +fi +check_config(){ #{{{ +#=== FUNCTION ================================================================ +# NAME: check_config +# DESCRIPTION: Check configuration file +# PARAMETERS: +# RETURNS: 0 if all right +#=============================================================================== + # testing DAEMON + if [ ! -x "$DAEMON" ]; then + stat_fail + stat_busy "File $DAEMON isn't executable" + stat_die + fi + # testing USER and GROUP + if [ -z "$USER" -o -z "$GROUP" ]; then + stat_fail + stat_busy "The variable USER/GROUP isn't defined. I cann't run process $PHPCGI as root." + stat_die + fi + # testing directory of socket + if [ -n "$SOCKET" ]; then + local sockdir=$(dirname "$SOCKET") + if [ ! -d "$sockdir" ]; then + mkdir -p "$sockdir" + fi + fi + # testing directory for user's socket + if [ -n "$USERSOCKET" ]; then + local socksdir=$(dirname "$USERSOCKET") + if [ ! -d "$socksdir" ]; then + mkdir -p "$socksdir" + fi + fi + # testing directory of pidfile + if [ -n "$PIDFILE" ]; then + if [ ! -d $(dirname $PIDFILE) ]; then + mkdir -p $(dirname $PIDFILE) + fi + fi + # testing the program php-cgi + if [ -z "$PHPCGI" ]; then + stat_fail + stat_busy "The variable PHPCGI isn't defined" + stat_die + else + if [ ! -x "$PHPCGI" ]; then + stat_fail + stat_busy "The program $PHPCGI isn't executable" + stat_die + fi + fi + return 0 +} #}}} +check_process(){ #{{{ +#=== FUNCTION ================================================================ +# NAME: check_process +# DESCRIPTION: Check that process is alive +# PARAMETERS: name of process and/or pidfile +# RETURNS: look at the beginning of the script +#=============================================================================== + local process + local pidfile + if [ $# -eq 2 ]; then + process=$1 + pidfile=$2 + elif [ $# -eq 1 ]; then + process=$1 + else + return $OTHERERROR + fi + + if get_pid $process >/dev/null; then + # process is running + if [ -s "$pidfile" ]; then + return $PROCRUNPIDEXIST + elif [ -r "$pidfile" ]; then + return $PROCRUNPID0 + else + return $PROCRUNPIDNO + fi + else + # process doesn't runnig + if [ -r "$pidfile" ]; then + return $PROCNOPIDEXIST + else + return $PROCNOPIDNO + fi + fi +} #}}} +get_userpid(){ #{{{ +#=== FUNCTION ================================================================ +# NAME: get_userpid +# DESCRIPTION: looking for pid of process belong to user +# PARAMETERS: name of user, name of process +# RETURNS: pid of process or 1 if error +#=============================================================================== + local user=$1 + local process=$2 + if [ -n "$user" -a -n "$process" ]; then + local pid=$(ps aux | \ + awk -vuser=$user -vprocess=$process \ + '$1 == user && $8 ~ "s" && $11 == process {print $2}') + if [[ "$pid" =~ ^[0-9]+$ ]]; then + echo $pid + else + return 1 + fi + else + return 1 + fi +} #}}} +check_daemon(){ #{{{ +#=== FUNCTION ================================================================ +# NAME: check_daemon +# DESCRIPTION: check that daemon exist in directory +# PARAMETERS: name of daemon +# RETURNS: look at the beginning of the script +#=============================================================================== + if ck_daemon $NAME; then + return $DAEMONEXIST + else + return $DAEMONEXIST + fi +} #}}} +start(){ #{{{ +#=== FUNCTION ================================================================ +# NAME: start +# DESCRIPTION: check configuration, if a process is already running and running php-cgi daemon +# PARAMETERS: - +# RETURNS: - +#=============================================================================== + stat_busy "Checking configuration" + check_config && + stat_done || \ + stat_die + + stat_busy "Starting server $NAME" #{{{ + check_process $PHPCGI $PIDFILE + local error=$? + if [ $error -ge $PROCRUNPIDEXIST -a $error -le $PROCRUNPIDNO ]; then + stat_fail + case $error in + $PROCRUNPIDEXIST) + stat_busy "The process $PHP is running" + ;; + $PROCRUNPID0) + stat_busy "The process $PHP is running and pidfile has size 0b" + ;; + $PROCRUNPIDNO) + stat_busy "The process $PHP is running and pidfile doesn't exist" + ;; + esac + stat_die $error + elif [ $error -eq $OTHERERROR ]; then + stat_fail + stat_busy "Something went wrong..." + stat_die $returnvalue + fi + + # run the main daemon + $DAEMON $OPTIONS >/dev/null + if [ $? -eq 0 ]; then + add_daemon $NAME + stat_done + else + stat_die + fi + #}}} + #{{{ start daemons for multiusers + if [ -n "$STARTMULTI" ]; then + stat_busy "Starting server $NAME for multiusers" + gen_all_uid + if [ -z "$USERSOCKET" ]; then + # Generate file map user 2 port + :>$MAPUSER2PORT + cat >> $MAPUSER2PORT <<- EOF + # Map username to port + map \$username \$port { + default $PORT; + + EOF + local userport=$PORT + local uid + for uid in ${ALLUID[@]}; do + local login=$(uid2login $uid) + if [ $? -eq 0 ]; then + userport=$((userport+1)) + echo -e "$login $userport;" >> $MAPUSER2PORT + local gid=$(id -g $login) + local group=$(gid2group $gid) + if [ -n "$USERPIDFILE" ]; then + local userpidfile=${USERPIDFILE}.${login}.pid + fi + USEROPTIONS="-a $IPADDR -p $userport -u $login ${group:+-g $group} -f $PHPCGI -C ${USER_PHP_FCGI_CHILDREN:-1} ${userpidfile:+-P $userpidfile}" + $DAEMON $USEROPTIONS &>/dev/null + if [ $? -ne 0 ]; then + stat_die + fi + fi + done + echo '}' >> $MAPUSER2PORT + stat_done + elif [ -n "$USERSOCKET" ]; then + local uid + for uid in ${ALLUID[@]}; do + local login=$(uid2login $uid) + if [ $? -eq 0 ]; then + local gid=$(id -g $login) + local group=$(gid2group $gid) + if [ -n "$USERPIDFILE" ]; then + local userpidfile=${USERPIDFILE}.${login}.pid + fi + local usersocket=${USERSOCKET}.${login}.sock + USEROPTIONS="-s ${usersocket} -u $login ${group:+-g $group} -f $PHPCGI -C ${USER_PHP_FCGI_CHILDREN:-1} ${userpidfile:+-P $userpidfile}" + $DAEMON $USEROPTIONS &>/dev/null + if [ $? -ne 0 ]; then + stat_die + fi + fi + done + stat_done + fi + fi + #}}} +} #}}} +stop(){ #{{{ +#=== FUNCTION ================================================================ +# NAME: stop +# DESCRIPTION: check whether a process is running, stop the daemon php-cgi +# PARAMETERS: - +# RETURNS: - +#=============================================================================== + stat_busy "Stopping server $NAME" #{{{ + # for main daemon + if ! get_pid $PHPCGI &>/dev/null; then + stat_fail + stat_busy "None process $PHPCGI isn't running" + stat_die + else + #process php-cgi is running + if [ -s "$PIDFILE" ]; then + # pidfile exists + kill $(<$PIDFILE) + if [ $? -eq 0 ]; then + rm -f $PIDFILE + rm_daemon $NAME + stat_done + else + stat_die + fi + else #pidfile doesn't exist + if [ -r "$PIDFILE" ]; then + #pidfile exists and has size 0b + stat_busy "Pidfile $PIDFILE exists and has size 0b.Removing it" + rm -f "$PIDFILE" && \ + stat_done || \ + stat_fail + fi + killall -9 $PHPCGI + if [ $? -eq 0 ]; then + stat_done + rm_daemon $NAME + else + stat_die + fi + fi + fi + #}}} + #{{{ for multiusers + if [ -n "$STARTMULTI" ]; then + # waiting to kill the main daemon + sleep 1 + if get_pid $PHPCGI &>/dev/null; then + stat_busy "Stopping server $NAME for multiusers" + killall $PHPCGI + # cleaning pidfiles + if [ -n "$USERPIDFILE" ]; then + gen_all_uid + for UserID in ${ALLUID[@]}; do + local login=$(uid2login $UserID) + if [ $? -eq 0 ]; then + rm -f ${USERPIDFILE}.${login}.pid + fi + done + fi #$USERPIDFILE + stat_done + fi + fi + #}}} +} #}}} +restart(){ #{{{ +#=== FUNCTION ================================================================ +# NAME: restart +# DESCRIPTION: stop and start service +# PARAMETERS: - +# RETURNS: - +#=============================================================================== + stat_busy "Restarting server $NAME" + stop + sleep 1 + start +} #}}} +status(){ #{{{ +#=== FUNCTION ================================================================ +# NAME: status +# DESCRIPTION: check status of service +# PARAMETERS: - +# RETURNS: - +#=============================================================================== + if ! get_pid $PHPCGI>/dev/null; then + stat_busy "None process $PHPCGI isn't running" + stat_done + else + stat_busy "Process $PHPCGI is running" + stat_done + if [ -s "$PIDFILE" ]; then + stat_busy "It's spawned by process: $(cat $PIDFILE|tr '\n' ' ')"; + stat_done + elif [ -r "$PIDFILE" ]; then + stat_fail + stat_busy "Pidfile $PIDFILE exists but has size 0b" + else + stat_busy "Pidfile $PIDFILE doesn't exist" + stat_done + fi + if [ -n "$STARTMULTI" -a -n "$USERSSTATUS" ]; then + gen_all_uid + local uid + for uid in ${ALLUID[@]}; do + local login=$(uid2login $uid) + if [ $? -eq 0 ]; then + if [ -n "$USERPIDFILE" ]; then + # USERPIDFILE defined + local userpidfile=${USERPIDFILE}.${login}.pid + if [ -s "$userpidfile" ]; then + stat_busy "Process $PHPCGI of user $login is spawned by process: $(cat $userpidfile|tr '\n' ' ')"; + stat_done + fi + else + local pid=$(get_userpid $login $PHPCGI) + if [ $? -eq 0 ]; then + stat_busy "Process $PHPCGI for user $login is running and it's spawned by: $pid"; + stat_done + fi + fi + fi + done + fi + fi +} #}}} +uid2login(){ #{{{ +#=== FUNCTION ================================================================ +# NAME: uid2login +# DESCRIPTION: convert uid to username +# PARAMETERS: uid +# RETURNS: name of user for uid +#=============================================================================== + local uid=$1 + if [ ! $uid -gt 0 ]; then + return 1 + fi + local username=$(getent passwd | awk -vuid=$uid -F: '$3 == uid {print $1}') + if [ -z "$username" ]; then + return 1 + else + echo $username + fi +} #}}} +gid2group(){ #{{{ + #=== FUNCTION ================================================================ + # NAME: uid2group + # DESCRIPTION: convert gid to name of group + # PARAMETERS: gid + # RETURNS: name of group for gid + #=============================================================================== + local gid=$1 + if [ ! $gid -gt 0 ]; then + return 1 + fi + local groupname=$(getent group | awk -vgid=$1 -F: '$3 == gid {print $1}') + if [ -z "$groupname" ]; then + return 1 + else + echo $groupname + fi +} #}}} +gen_all_uid(){ #{{{ +#=== FUNCTION ================================================================ +# NAME: gen_all_uid +# DESCRIPTION: Generate array of all UID +# PARAMETERS: - +# RETURNS: - +#=============================================================================== + ALLUID=() + if [ -n "$RANGEUID" -a ${#RANGEUID[@]} -gt 0 ]; then + for line in ${RANGEUID[@]/,/ }; do + (( line )) || stat_die # not a number + if [[ ${line/-/} != $line ]]; then + for ((i=${line%-*}; i<=${line#*-}; i++)); do + ALLUID+=($i) + done + else + ALLUID+=($line) + fi + done + elif [ $FIRSTUID -gt 1 -a $LASTUID -gt 1 -a $LASTUID -ge $FIRSTUID ]; then + for ((line=FIRSTUID; line<=LASTUID; line++)); do + (( line )) || stat_die #not a number + ALLUID+=($line) + done + else + echo "Error: Wrong range UID. Change RANGEUID or FIRSTUID and LASTUID" + exit 1 + fi +} #}}} +case $1 in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + status) + status + ;; + *) + echo "Usage: $0 start|stop|restart|status" +esac diff --git a/~fauno/spawn-fcgi-php/spawn-fcgi-php.conf b/~fauno/spawn-fcgi-php/spawn-fcgi-php.conf new file mode 100644 index 000000000..d87520c1d --- /dev/null +++ b/~fauno/spawn-fcgi-php/spawn-fcgi-php.conf @@ -0,0 +1,60 @@ +# vi: ft=sh +# run PHPCGI as +USER=http +GROUP=http + +# Name of daemon +DAEMON="/usr/bin/spawn-fcgi" +PIDFILE="/var/run/spawn-fcgi-php.pid" +# spawn the process +PHPCGI="/usr/bin/php-cgi" + +#------------------------------------------------------------------------------- +# Options for php-cgi +#------------------------------------------------------------------------------- +# (PHP only) Number of children to spawn +PHP_FCGI_CHILDREN=4 +# or export PHP_FCGI_CHILDREN +# PHP FastCGI proccess exit after requests: +export PHP_FCGI_MAX_REQUESTS=1000 +# Choose ONE of PORT/IPADDR (for TCP) OR SOCKET (for unix domain sockets) +IPADDR=127.0.0.1 +PORT=9000 +#SOCKET=/var/run/spawn-fcgi/spawn-fcgi.sock +# Options only for socket +#MODE=0644 +#SOCKET_USER=other +#SOCKET_GROUP=other + +#------------------------------------------------------------------------------- +# Options for spawn-fcgi +#------------------------------------------------------------------------------- +# Number of children to fork, defaults to 1. +SPAWN_FCGI_CHILDREN=1 + + +#------------------------------------------------------------------------------- +# For many users +#------------------------------------------------------------------------------- +# Run separate processes for users with UIDs from the range RANGEUID +# uncomment STARTMULTI if you want this +STARTMULTI=yes +# Base user's socket, uncomment to use socket instead IPADDR:USERPORT +USERSOCKET='/var/run/spawn-fcgi/spawn-fcgi' +# file with mapping user to port +MAPUSER2PORT='/etc/nginx/conf/map_user2port.conf' +# Base user's pidfile +#USERPIDFILE='/var/run/spawn-fcgi-php' +# range for UIDs, use the dash for range and split groups by spaces e.g. 1000-1003 1005 1010-1020, use parenthis for all +RANGEUID=(1000-1001) +# (PHP only) Number of children to spawn +USER_PHP_FCGI_CHILDREN=1 +# for status, comment if you don't want print status for users +#USERSSTATUS=yes + +OPTIONS="-u $USER -g $GROUP -f $PHPCGI -C ${PHP_FCGI_CHILDREN:-4} ${PIDFILE:+-P $PIDFILE} -F ${SPAWN_FCGI_CHILDREN:-1} " +if [ -n "$SOCKET" ]; then + OPTIONS+="-s $SOCKET ${MODE:+-M $MODE} ${SOCKET_USER:+-U $SOCKET_USER} ${SOCKET_GROUP:+-G $SOCKET_GROUP} " +else + OPTIONS+="-a $IPADDR -p $PORT " +fi diff --git a/~mtjm/cups-usblp/PKGBUILD b/~mtjm/cups-usblp/PKGBUILD deleted file mode 100755 index 62b12072a..000000000 --- a/~mtjm/cups-usblp/PKGBUILD +++ /dev/null @@ -1,154 +0,0 @@ -# $Id: PKGBUILD 164175 2012-07-26 17:37:45Z andyrtr $ -# Maintainer: Andreas Radke <andyrtr@archlinux.org> - -_pkgname="cups" -pkgname="cups-usblp" -pkgver=1.5.4 -pkgrel=1 -pkgdesc="The CUPS Printing System - daemon package with usblp backend" -arch=('i686' 'x86_64' 'mips64el') -license=('GPL') -url="http://www.cups.org/" -depends=('acl' 'openslp' 'pam' "libcups>=${pkgver}" 'cups-filters' 'bc' 'libusb' 'dbus-core' 'libsystemd' 'hicolor-icon-theme') -makedepends=('libtiff>=4.0.0' 'libpng>=1.5.7' 'acl' 'openslp' 'pam' 'xdg-utils' 'krb5' 'gnutls>=2.8.3' 'cups-filters' 'bc' - 'xinetd' 'gzip' 'autoconf' 'php' 'libusb' 'dbus-core' 'avahi' 'hicolor-icon-theme' 'systemd') -optdepends=('php: for included phpcups.so module' - 'xdg-utils: xdg .desktop file support') -provides=("cups=${pkgver}") -conflicts=("cups" "cups-libre") -backup=(etc/cups/cupsd.conf - etc/cups/snmp.conf - etc/cups/printers.conf - etc/cups/classes.conf - etc/cups/subscriptions.conf - etc/dbus-1/system.d/cups.conf - etc/logrotate.d/cups - etc/pam.d/cups - etc/xinetd.d/cups-lpd) -install=cups.install -source=(ftp://ftp.easysw.com/pub/cups/${pkgver}/cups-${pkgver}-source.tar.bz2 - cups-avahi-1-config.patch - cups-avahi-2-backend.patch - cups-avahi-3-timeouts.patch - cups-avahi-4-poll.patch - cups-avahi-5-services.patch - cups-no-export-ssllibs.patch - cups-no-gcrypt.patch - cups-no-gzip-man.patch - cups-systemd-socket.patch - cups cups.logrotate cups.pam) -#options=('!emptydirs') -md5sums=('de3006e5cf1ee78a9c6145ce62c4e982' - '12c8af5bcd3b8f84240280b3dfaf9e89' - 'cdc1322c8014297ae349e2db78a03c5a' - '1a5112f63958643f2888abc9418dbcac' - 'c37d1bf1bb76acc3fe93362c80d91b7c' - '5d302860559960042f3b47a91b97c5fe' - '9b8467a1e51d360096b70e2c3c081e6c' - '3733c23e77eb503bd94cc368e02830dc' - 'c9159ba1233902ba6ddbbe6885a46b72' - '4505b8b2c57a7c28ea79e08388bbbbb9' - '9657daa21760bb0b5fa3d8b51d5e01a1' - 'f861b18f4446c43918c8643dcbbd7f6d' - '96f82c38f3f540b53f3e5144900acf17') - -build() { - cd ${srcdir}/${_pkgname}-${pkgver} - # http://www.cups.org/str.php?L3066 - # Avahi support in the dnssd backend. patches from upstream/FC RawHide - patch -Np1 -i ${srcdir}/cups-avahi-1-config.patch - patch -Np1 -i ${srcdir}/cups-avahi-2-backend.patch - patch -Np1 -i ${srcdir}/cups-avahi-3-timeouts.patch - patch -Np1 -i ${srcdir}/cups-avahi-4-poll.patch - patch -Np1 -i ${srcdir}/cups-avahi-5-services.patch - - # add systemd socket support - Fedora patch, also used in Gentoo - patch -Np1 -i ${srcdir}/cups-systemd-socket.patch - - # Do not export SSL libs in cups-config - patch -Np1 -i "${srcdir}/cups-no-export-ssllibs.patch" - - patch -Np1 -i "${srcdir}/cups-no-gcrypt.patch" - # don't zip man pages in make install, let makepkg do that / Fedora - patch -Np1 -i ${srcdir}/cups-no-gzip-man.patch - - # Rebuild configure script for --enable-avahi. - aclocal -I config-scripts - autoconf -I config-scripts - - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ - --libdir=/usr/lib \ - --with-systemdsystemunitdir=/usr/lib/systemd/system \ - --with-logdir=/var/log/cups \ - --with-docdir=/usr/share/cups/doc \ - --with-cups-user=daemon \ - --with-cups-group=lp \ - --enable-pam=yes \ - --disable-ldap \ - --enable-raw-printing \ - --enable-dbus --with-dbusdir=/etc/dbus-1 \ - --enable-ssl=yes --enable-gnutls \ - --enable-threads \ - --enable-avahi\ - --with-php=/usr/bin/php-cgi \ - --with-pdftops=pdftops \ - --with-optim="$CFLAGS" \ - --disable-libusb - make -} - -check() { - cd "$srcdir/$_pkgname-$pkgver" - #httpAddrGetList(workstation64): FAIL - #1 TESTS FAILED! - #make[1]: *** [testhttp] Error 1 - make -k check || /bin/true -} - -package() { - cd ${srcdir}/${_pkgname}-${pkgver} - make BUILDROOT=${pkgdir} install-data install-exec - - # this one we ship in the libcups pkg - rm -f ${pkgdir}/usr/bin/cups-config - - # kill the sysv stuff - rm -rf ${pkgdir}/etc/rc*.d - rm -rf ${pkgdir}/etc/init.d - install -D -m755 ../cups ${pkgdir}/etc/rc.d/cupsd - install -D -m644 ../cups.logrotate ${pkgdir}/etc/logrotate.d/cups - install -D -m644 ../cups.pam ${pkgdir}/etc/pam.d/cups - - # fix perms on /var/spool and /etc - chmod 755 ${pkgdir}/var/spool - chmod 755 ${pkgdir}/etc - - # install ssl directory where to store the certs, solves some samba issues - install -dm700 -g lp ${pkgdir}/etc/cups/ssl - # remove directory from package, we create it in cups rc.d file - rm -rf ${pkgdir}/var/run - - # install some more configuration files that will get filled by cupsd - touch ${pkgdir}/etc/cups/printers.conf - touch ${pkgdir}/etc/cups/classes.conf - touch ${pkgdir}/etc/cups/subscriptions.conf - chgrp lp ${pkgdir}/etc/cups/{printers.conf,classes.conf,subscriptions.conf} - - # fix .desktop file - sed -i 's|^Exec=htmlview http://localhost:631/|Exec=xdg-open http://localhost:631/|g' ${pkgdir}/usr/share/applications/cups.desktop - - # compress some driver files, adopted from Fedora - find ${pkgdir}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f - - # remove client.conf man page - rm -f ${pkgdir}/usr/share/man/man5/client.conf.5 - - # remove files now part of cups-filters - check cups-filters INSTALL for packagers instructions - rm -v ${pkgdir}/usr/lib/cups/backend/{parallel,serial} - rm -v ${pkgdir}/usr/lib/cups/filter/{bannertops,commandtoescpx,commandtopclx,imagetops,imagetoraster,pdftops,rastertoescpx,rastertopclx,texttops} - rm -v ${pkgdir}/usr/share/cups/banners/* - rm -v ${pkgdir}/usr/share/cups/data/{testprint,psglyphs} - rm -v ${pkgdir}/usr/share/cups/fonts/* - # comment out all conversion rules which use any of the removed filters - perl -p -i -e 's:^(.*\s+(pdftops|texttops|imagetops|bannertops|imagetoraster)\s*)$:#\1:' ${pkgdir}/usr/share/cups/mime/mime.convs -} diff --git a/~mtjm/cups-usblp/cups b/~mtjm/cups-usblp/cups deleted file mode 100755 index 744c8e663..000000000 --- a/~mtjm/cups-usblp/cups +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash - -daemon_name=cupsd - -. /etc/rc.conf -. /etc/rc.d/functions -#. /etc/conf.d/$daemon_name.conf - -get_pid() { - pidof -o %PPID $daemon_name -} - -case "$1" in - start) - stat_busy "Starting $daemon_name daemon" - - PID=$(get_pid) - if [ -z "$PID" ]; then - [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid - # RUN - $daemon_name - # - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - echo $(get_pid) > /var/run/$daemon_name.pid - add_daemon $daemon_name - stat_done - fi - else - stat_fail - exit 1 - fi - ;; - - stop) - stat_busy "Stopping $daemon_name daemon" - PID=$(get_pid) - # KILL - [ ! -z "$PID" ] && kill $PID &> /dev/null - # - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - rm -f /var/run/$daemon_name.pid &> /dev/null - rm_daemon $daemon_name - stat_done - fi - ;; - - restart) - $0 stop - sleep 3 - $0 start - ;; - - status) - stat_busy "Checking $daemon_name status"; - ck_status $daemon_name - ;; - - *) - echo "usage: $0 {start|stop|restart|status}" -esac - -exit 0 diff --git a/~mtjm/cups-usblp/cups-avahi-1-config.patch b/~mtjm/cups-usblp/cups-avahi-1-config.patch deleted file mode 100755 index 304cd2607..000000000 --- a/~mtjm/cups-usblp/cups-avahi-1-config.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up cups-1.5.2/config.h.in.avahi-1-config cups-1.5.2/config.h.in ---- cups-1.5.2/config.h.in.avahi-1-config 2011-06-16 21:12:16.000000000 +0100 -+++ cups-1.5.2/config.h.in 2012-03-14 15:04:51.365347165 +0000 -@@ -390,6 +390,13 @@ - - - /* -+ * Do we have Avahi for DNS Service Discovery? -+ */ -+ -+#undef HAVE_AVAHI -+ -+ -+/* - * Do we have <sys/ioctl.h>? - */ - -diff -up cups-1.5.2/config-scripts/cups-dnssd.m4.avahi-1-config cups-1.5.2/config-scripts/cups-dnssd.m4 ---- cups-1.5.2/config-scripts/cups-dnssd.m4.avahi-1-config 2011-05-12 06:21:56.000000000 +0100 -+++ cups-1.5.2/config-scripts/cups-dnssd.m4 2012-03-14 15:04:51.365347165 +0000 -@@ -23,6 +23,21 @@ AC_ARG_WITH(dnssd-includes, [ --with-dn - DNSSDLIBS="" - DNSSD_BACKEND="" - -+AC_ARG_ENABLE(avahi, [ --enable-avahi turn on DNS Service Discovery support, default=no], -+ [if test x$enable_avahi = xyes; then -+ AC_MSG_CHECKING(for Avahi) -+ if $PKGCONFIG --exists avahi-client; then -+ AC_MSG_RESULT(yes) -+ CFLAGS="$CFLAGS `$PKGCONFIG --cflags avahi-client`" -+ DNSSDLIBS="`$PKGCONFIG --libs avahi-client`" -+ DNSSD_BACKEND="dnssd" -+ AC_DEFINE(HAVE_AVAHI) -+ enable_dnssd=no -+ else -+ AC_MSG_RESULT(no) -+ fi -+ fi]) -+ - if test x$enable_dnssd != xno; then - AC_CHECK_HEADER(dns_sd.h, [ - case "$uname" in
\ No newline at end of file diff --git a/~mtjm/cups-usblp/cups-avahi-2-backend.patch b/~mtjm/cups-usblp/cups-avahi-2-backend.patch deleted file mode 100755 index 00e12a0a3..000000000 --- a/~mtjm/cups-usblp/cups-avahi-2-backend.patch +++ /dev/null @@ -1,1118 +0,0 @@ -diff -up cups-1.5.3/backend/dnssd.c.avahi-2-backend cups-1.5.3/backend/dnssd.c ---- cups-1.5.3/backend/dnssd.c.avahi-2-backend 2012-05-15 16:53:18.164774446 +0200 -+++ cups-1.5.3/backend/dnssd.c 2012-05-15 17:09:07.684155704 +0200 -@@ -15,14 +15,21 @@ - * - * Contents: - * -+ * next_txt_record() - Get next TXT record from a cups_txt_records_t. -+ * parse_txt_record_pair() - Read key/value pair in cups_txt_records_t. - * main() - Browse for printers. - * browse_callback() - Browse devices. - * browse_local_callback() - Browse local devices. - * compare_devices() - Compare two devices. - * exec_backend() - Execute the backend that corresponds to the - * resolved service name. -+ * device_type() - Get DNS-SD type enumeration from string. - * get_device() - Create or update a device. - * query_callback() - Process query data. -+ * avahi_client_callback() - Avahi client callback function. -+ * avahi_query_callback() - Avahi query callback function. -+ * avahi_browse_callback() - Avahi browse callback function. -+ * find_device() - Find a device from its name and domain. - * sigterm_handler() - Handle termination signals... - * unquote() - Unquote a name string. - */ -@@ -33,7 +40,18 @@ - - #include "backend-private.h" - #include <cups/array.h> --#include <dns_sd.h> -+#ifdef HAVE_DNSSD -+# include <dns_sd.h> -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+# include <avahi-client/client.h> -+# include <avahi-client/lookup.h> -+# include <avahi-common/simple-watch.h> -+# include <avahi-common/domain.h> -+# include <avahi-common/error.h> -+# include <avahi-common/malloc.h> -+#define kDNSServiceMaxDomainName AVAHI_DOMAIN_NAME_MAX -+#endif /* HAVE_AVAHI */ - - - /* -@@ -53,7 +71,12 @@ typedef enum - - typedef struct - { -+#ifdef HAVE_DNSSD - DNSServiceRef ref; /* Service reference for resolve */ -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ int resolved; /* Did we resolve the device? */ -+#endif /* HAVE_AVAHI */ - char *name, /* Service name */ - *domain, /* Domain name */ - *fullName, /* Full name */ -@@ -65,6 +88,20 @@ typedef struct - sent; /* Did we list the device? */ - } cups_device_t; - -+typedef struct -+{ -+ char key[256]; -+ char value[256]; -+ -+#ifdef HAVE_DNSSD -+ const uint8_t *data; -+ const uint8_t *datanext; -+ const uint8_t *dataend; -+#else /* HAVE_AVAHI */ -+ AvahiStringList *txt; -+#endif /* HAVE_DNSSD */ -+} cups_txt_records_t; -+ - - /* - * Local globals... -@@ -78,6 +115,7 @@ static int job_canceled = 0; - * Local functions... - */ - -+#ifdef HAVE_DNSSD - static void browse_callback(DNSServiceRef sdRef, - DNSServiceFlags flags, - uint32_t interfaceIndex, -@@ -95,13 +133,6 @@ static void browse_local_callback(DNSSe - const char *replyDomain, - void *context) - __attribute__((nonnull(1,5,6,7,8))); --static int compare_devices(cups_device_t *a, cups_device_t *b); --static void exec_backend(char **argv); --static cups_device_t *get_device(cups_array_t *devices, -- const char *serviceName, -- const char *regtype, -- const char *replyDomain) -- __attribute__((nonnull(1,2,3,4))); - static void query_callback(DNSServiceRef sdRef, - DNSServiceFlags flags, - uint32_t interfaceIndex, -@@ -111,10 +142,119 @@ static void query_callback(DNSServiceRe - const void *rdata, uint32_t ttl, - void *context) - __attribute__((nonnull(1,5,9,11))); -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+static void avahi_client_callback (AvahiClient *client, -+ AvahiClientState state, -+ void *context); -+static void avahi_browse_callback (AvahiServiceBrowser *browser, -+ AvahiIfIndex interface, -+ AvahiProtocol protocol, -+ AvahiBrowserEvent event, -+ const char *serviceName, -+ const char *regtype, -+ const char *replyDomain, -+ AvahiLookupResultFlags flags, -+ void *context); -+#endif /* HAVE_AVAHI */ -+static cups_device_t * find_device (cups_array_t *devices, -+ cups_txt_records_t *txt, -+ cups_device_t *dkey); -+static int compare_devices(cups_device_t *a, cups_device_t *b); -+static void exec_backend(char **argv); -+static cups_device_t *get_device(cups_array_t *devices, -+ const char *serviceName, -+ const char *regtype, -+ const char *replyDomain) -+ __attribute__((nonnull(1,2,3,4))); - static void sigterm_handler(int sig); - static void unquote(char *dst, const char *src, size_t dstsize) - __attribute__((nonnull(1,2))); - -+#ifdef HAVE_AVAHI -+static AvahiSimplePoll *simple_poll = NULL; -+static int avahi_got_callback; -+#endif /* HAVE_AVAHI */ -+ -+ -+/* -+ * 'next_txt_record()' - Get next TXT record from a cups_txt_records_t. -+ */ -+ -+static cups_txt_records_t * -+next_txt_record (cups_txt_records_t *txt) -+{ -+#ifdef HAVE_DNSSD -+ txt->data = txt->datanext; -+#else /* HAVE_AVAHI */ -+ txt->txt = avahi_string_list_get_next (txt->txt); -+ if (txt->txt == NULL) -+ return NULL; -+#endif /* HAVE_DNSSD */ -+ -+ return txt; -+} -+ -+ -+/* -+ * 'parse_txt_record_pair()' - Read key/value pair in cups_txt_records_t. -+ */ -+ -+static int -+parse_txt_record_pair (cups_txt_records_t *txt) -+{ -+#ifdef HAVE_DNSSD -+ uint8_t datalen; -+ uint8_t *data = txt->data; -+ char *ptr; -+ -+ /* -+ * Read a key/value pair starting with an 8-bit length. Since the -+ * length is 8 bits and the size of the key/value buffers is 256, we -+ * don't need to check for overflow... -+ */ -+ -+ datalen = *data++; -+ if (!datalen || (data + datalen) > txt->dataend) -+ return NULL; -+ txt->datanext = data + datalen; -+ -+ for (ptr = txt->key; data < txt->datanext && *data != '='; data ++) -+ *ptr++ = *data; -+ *ptr = '\0'; -+ -+ if (data < txt->datanext && *data == '=') -+ { -+ data++; -+ -+ if (data < datanext) -+ memcpy (txt->value, data, txt->datanext - data); -+ value[txt->datanext - data] = '\0'; -+ } -+ else -+ return 1; -+#else /* HAVE_AVAHI */ -+ char *key, *value; -+ size_t len; -+ avahi_string_list_get_pair (txt->txt, &key, &value, &len); -+ if (len > sizeof (txt->value) - 1) -+ len = sizeof (txt->value) - 1; -+ -+ memcpy (txt->value, value, len); -+ txt->value[len] = '\0'; -+ len = strlen (key); -+ if (len > sizeof (txt->key) - 1) -+ len = sizeof (txt->key) - 1; -+ -+ memcpy (txt->key, key, len); -+ txt->key[len] = '\0'; -+ avahi_free (key); -+ avahi_free (value); -+#endif /* HAVE_AVAHI */ -+ -+ return 0; -+} -+ - - /* - * 'main()' - Browse for printers. -@@ -125,6 +265,13 @@ main(int argc, /* I - Number of comm - char *argv[]) /* I - Command-line arguments */ - { - const char *name; /* Backend name */ -+ cups_array_t *devices; /* Device array */ -+ cups_device_t *device; /* Current device */ -+ char uriName[1024]; /* Unquoted fullName for URI */ -+#ifdef HAVE_DNSSD -+ int fd; /* Main file descriptor */ -+ fd_set input; /* Input set for select() */ -+ struct timeval timeout; /* Timeout for select() */ - DNSServiceRef main_ref, /* Main service reference */ - fax_ipp_ref, /* IPP fax service reference */ - ipp_ref, /* IPP service reference */ -@@ -138,12 +285,11 @@ main(int argc, /* I - Number of comm - pdl_datastream_ref, /* AppSocket service reference */ - printer_ref, /* LPD service reference */ - riousbprint_ref; /* Remote IO service reference */ -- int fd; /* Main file descriptor */ -- fd_set input; /* Input set for select() */ -- struct timeval timeout; /* Timeout for select() */ -- cups_array_t *devices; /* Device array */ -- cups_device_t *device; /* Current device */ -- char uriName[1024]; /* Unquoted fullName for URI */ -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ AvahiClient *client; -+ int error; -+#endif /* HAVE_AVAHI */ - #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) - struct sigaction action; /* Actions for POSIX signals */ - #endif /* HAVE_SIGACTION && !HAVE_SIGSET */ -@@ -203,6 +349,49 @@ main(int argc, /* I - Number of comm - * Browse for different kinds of printers... - */ - -+#ifdef HAVE_AVAHI -+ if ((simple_poll = avahi_simple_poll_new ()) == NULL) -+ { -+ perror ("ERROR: Unable to create avahi simple poll object"); -+ return (1); -+ } -+ -+ client = avahi_client_new (avahi_simple_poll_get (simple_poll), -+ 0, avahi_client_callback, NULL, &error); -+ if (!client) -+ { -+ perror ("DEBUG: Unable to create avahi client"); -+ return (0); -+ } -+ -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_fax-ipp._tcp", NULL, 0, -+ avahi_browse_callback, devices); -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_ipp._tcp", NULL, 0, -+ avahi_browse_callback, devices); -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_ipp-tls._tcp", NULL, 0, -+ avahi_browse_callback, devices); -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_pdl-datastream._tcp", -+ NULL, 0, -+ avahi_browse_callback, -+ devices); -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_printer._tcp", NULL, 0, -+ avahi_browse_callback, devices); -+ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ "_riousbprint._tcp", NULL, 0, -+ avahi_browse_callback, devices); -+#endif /* HAVE_AVAHI */ -+#ifdef HAVE_DNSSD - if (DNSServiceCreateConnection(&main_ref) != kDNSServiceErr_NoError) - { - perror("ERROR: Unable to create service connection"); -@@ -263,6 +452,7 @@ main(int argc, /* I - Number of comm - riousbprint_ref = main_ref; - DNSServiceBrowse(&riousbprint_ref, kDNSServiceFlagsShareConnection, 0, - "_riousbprint._tcp", NULL, browse_callback, devices); -+#endif /* HAVE_DNSSD */ - - /* - * Loop until we are killed... -@@ -270,6 +460,9 @@ main(int argc, /* I - Number of comm - - while (!job_canceled) - { -+ int announce = 0; -+ -+#ifdef HAVE_DNSSD - FD_ZERO(&input); - FD_SET(fd, &input); - -@@ -289,11 +482,35 @@ main(int argc, /* I - Number of comm - } - else - { -+ announce = 1; -+ } -+#else /* HAVE_AVAHI */ -+ int r; -+ avahi_got_callback = 0; -+ r = avahi_simple_poll_iterate (simple_poll, 1); -+ if (r != 0 && r != EINTR) -+ { -+ /* -+ * We've been told to exit the loop. Perhaps the connection to -+ * avahi failed. -+ */ -+ -+ break; -+ } -+ -+ if (avahi_got_callback) -+ announce = 1; -+#endif /* HAVE_DNSSD */ -+ -+ if (announce) -+ { - /* - * Announce any devices we've found... - */ - -+#ifdef HAVE_DNSSD - DNSServiceErrorType status; /* DNS query status */ -+#endif /* HAVE_DNSSD */ - cups_device_t *best; /* Best matching device */ - char device_uri[1024]; /* Device URI */ - int count; /* Number of queries */ -@@ -307,6 +524,7 @@ main(int argc, /* I - Number of comm - if (device->sent) - sent ++; - -+#ifdef HAVE_DNSSD - if (device->ref) - count ++; - -@@ -338,14 +556,23 @@ main(int argc, /* I - Number of comm - count ++; - } - } -- else if (!device->sent) -+ else -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ if (!device->resolved) -+ continue; -+ else -+#endif /* HAVE_AVAHI */ -+ if (!device->sent) - { -+#ifdef HAVE_DNSSD - /* - * Got the TXT records, now report the device... - */ - - DNSServiceRefDeallocate(device->ref); - device->ref = 0; -+#endif /* HAVE_DNSSD */ - - if (!best) - best = device; -@@ -406,6 +633,7 @@ main(int argc, /* I - Number of comm - } - - -+#ifdef HAVE_DNSSD - /* - * 'browse_callback()' - Browse devices. - */ -@@ -494,6 +722,7 @@ browse_local_callback( - device->fullName); - device->sent = 1; - } -+#endif /* HAVE_DNSSD */ - - - /* -@@ -574,6 +803,41 @@ exec_backend(char **argv) /* I - Comman - - - /* -+ * 'device_type()' - Get DNS-SD type enumeration from string. -+ */ -+ -+static int -+device_type (const char *regtype) -+{ -+#ifdef HAVE_AVAHI -+ if (!strcmp(regtype, "_ipp._tcp")) -+ return (CUPS_DEVICE_IPP); -+ else if (!strcmp(regtype, "_ipps._tcp") || -+ !strcmp(regtype, "_ipp-tls._tcp")) -+ return (CUPS_DEVICE_IPPS); -+ else if (!strcmp(regtype, "_fax-ipp._tcp")) -+ return (CUPS_DEVICE_FAX_IPP); -+ else if (!strcmp(regtype, "_printer._tcp")) -+ return (CUPS_DEVICE_PDL_DATASTREAM); -+#else -+ if (!strcmp(regtype, "_ipp._tcp.")) -+ return (CUPS_DEVICE_IPP); -+ else if (!strcmp(regtype, "_ipps._tcp.") || -+ !strcmp(regtype, "_ipp-tls._tcp.")) -+ return (CUPS_DEVICE_IPPS); -+ else if (!strcmp(regtype, "_fax-ipp._tcp.")) -+ return (CUPS_DEVICE_FAX_IPP); -+ else if (!strcmp(regtype, "_printer._tcp.")) -+ return (CUPS_DEVICE_PRINTER); -+ else if (!strcmp(regtype, "_pdl-datastream._tcp.")) -+ return (CUPS_DEVICE_PDL_DATASTREAM); -+#endif /* HAVE_AVAHI */ -+ -+ return (CUPS_DEVICE_RIOUSBPRINT); -+} -+ -+ -+/* - * 'get_device()' - Create or update a device. - */ - -@@ -594,20 +858,7 @@ get_device(cups_array_t *devices, /* I - - */ - - key.name = (char *)serviceName; -- -- if (!strcmp(regtype, "_ipp._tcp.")) -- key.type = CUPS_DEVICE_IPP; -- else if (!strcmp(regtype, "_ipps._tcp.") || -- !strcmp(regtype, "_ipp-tls._tcp.")) -- key.type = CUPS_DEVICE_IPPS; -- else if (!strcmp(regtype, "_fax-ipp._tcp.")) -- key.type = CUPS_DEVICE_FAX_IPP; -- else if (!strcmp(regtype, "_printer._tcp.")) -- key.type = CUPS_DEVICE_PRINTER; -- else if (!strcmp(regtype, "_pdl-datastream._tcp.")) -- key.type = CUPS_DEVICE_PDL_DATASTREAM; -- else -- key.type = CUPS_DEVICE_RIOUSBPRINT; -+ key.type = device_type (regtype); - - for (device = cupsArrayFind(devices, &key); - device; -@@ -627,8 +878,14 @@ get_device(cups_array_t *devices, /* I - - free(device->domain); - device->domain = strdup(replyDomain); - -+#ifdef HAVE_DNSSD - DNSServiceConstructFullName(fullName, device->name, regtype, - replyDomain); -+#else /* HAVE_AVAHI */ -+ avahi_service_name_join (fullName, kDNSServiceMaxDomainName, -+ serviceName, regtype, replyDomain); -+#endif /* HAVE_DNSSD */ -+ - free(device->fullName); - device->fullName = strdup(fullName); - } -@@ -648,6 +905,9 @@ get_device(cups_array_t *devices, /* I - - device->domain = strdup(replyDomain); - device->type = key.type; - device->priority = 50; -+#ifdef HAVE_AVAHI -+ device->resolved = 0; -+#endif /* HAVE_AVAHI */ - - cupsArrayAdd(devices, device); - -@@ -655,13 +915,20 @@ get_device(cups_array_t *devices, /* I - - * Set the "full name" of this service, which is used for queries... - */ - -+#ifdef HAVE_DNSSD - DNSServiceConstructFullName(fullName, serviceName, regtype, replyDomain); -+#else /* HAVE_AVAHI */ -+ avahi_service_name_join (fullName, kDNSServiceMaxDomainName, -+ serviceName, regtype, replyDomain); -+#endif /* HAVE_DNSSD */ -+ - device->fullName = strdup(fullName); - - return (device); - } - - -+#ifdef HAVE_DNSSD - /* - * 'query_callback()' - Process query data. - */ -@@ -685,7 +952,7 @@ query_callback( - *ptr; /* Pointer into string */ - cups_device_t dkey, /* Search key */ - *device; /* Device */ -- -+ cups_txt_records_t txt; - - fprintf(stderr, "DEBUG2: query_callback(sdRef=%p, flags=%x, " - "interfaceIndex=%d, errorCode=%d, fullName=\"%s\", " -@@ -719,94 +986,233 @@ query_callback( - if ((ptr = strstr(name, "._")) != NULL) - *ptr = '\0'; - -- if (strstr(fullName, "_ipp._tcp.")) -- dkey.type = CUPS_DEVICE_IPP; -- else if (strstr(fullName, "_ipps._tcp.") || -- strstr(fullName, "_ipp-tls._tcp.")) -- dkey.type = CUPS_DEVICE_IPPS; -- else if (strstr(fullName, "_fax-ipp._tcp.")) -- dkey.type = CUPS_DEVICE_FAX_IPP; -- else if (strstr(fullName, "_printer._tcp.")) -- dkey.type = CUPS_DEVICE_PRINTER; -- else if (strstr(fullName, "_pdl-datastream._tcp.")) -- dkey.type = CUPS_DEVICE_PDL_DATASTREAM; -+ dkey.type = device_type (fullName); -+ -+ txt.data = rdata; -+ txt.dataend = rdata + rdlen; -+ device = find_device ((cups_array_t *) context, &txt, &dkey); -+ if (!device) -+ fprintf(stderr, "DEBUG: Ignoring TXT record for \"%s\"...\n", fullName); -+} -+#endif /* HAVE_DNSSD */ -+ -+ -+#ifdef HAVE_AVAHI -+/* -+ * 'avahi_client_callback()' - Avahi client callback function. -+ */ -+ -+static void -+avahi_client_callback(AvahiClient *client, -+ AvahiClientState state, -+ void *context) -+{ -+ /* -+ * If the connection drops, quit. -+ */ -+ -+ if (state == AVAHI_CLIENT_FAILURE) -+ { -+ fprintf (stderr, "ERROR: Avahi connection failed\n"); -+ avahi_simple_poll_quit (simple_poll); -+ } -+} -+ -+ -+/* -+ * 'avahi_query_callback()' - Avahi query callback function. -+ */ -+ -+static void -+avahi_query_callback(AvahiServiceResolver *resolver, -+ AvahiIfIndex interface, -+ AvahiProtocol protocol, -+ AvahiResolverEvent event, -+ const char *name, -+ const char *type, -+ const char *domain, -+ const char *host_name, -+ const AvahiAddress *address, -+ uint16_t port, -+ AvahiStringList *txt, -+ AvahiLookupResultFlags flags, -+ void *context) -+{ -+ AvahiClient *client; -+ cups_device_t key, -+ *device; -+ char uqname[1024], -+ *ptr; -+ cups_txt_records_t txtr; -+ -+ client = avahi_service_resolver_get_client (resolver); -+ if (event != AVAHI_RESOLVER_FOUND) -+ { -+ if (event == AVAHI_RESOLVER_FAILURE) -+ { -+ fprintf (stderr, "ERROR: %s\n", -+ avahi_strerror (avahi_client_errno (client))); -+ } -+ -+ avahi_service_resolver_free (resolver); -+ return; -+ } -+ -+ /* -+ * Set search key for device. -+ */ -+ -+ key.name = uqname; -+ unquote (uqname, name, sizeof (uqname)); -+ if ((ptr = strstr(name, "._")) != NULL) -+ *ptr = '\0'; -+ -+ key.domain = (char *) domain; -+ key.type = device_type (type); -+ -+ /* -+ * Find the device and the the TXT information. -+ */ -+ -+ txtr.txt = txt; -+ device = find_device ((cups_array_t *) context, &txtr, &key); -+ if (device) -+ { -+ /* -+ * Let the main loop know to announce the device. -+ */ -+ -+ device->resolved = 1; -+ avahi_got_callback = 1; -+ } - else -- dkey.type = CUPS_DEVICE_RIOUSBPRINT; -+ fprintf (stderr, "DEBUG: Ignoring TXT record for \"%s\"...\n", name); - -- for (device = cupsArrayFind(devices, &dkey); -+ avahi_service_resolver_free (resolver); -+} -+ -+ -+/* -+ * 'avahi_browse_callback()' - Avahi browse callback function. -+ */ -+ -+static void -+avahi_browse_callback(AvahiServiceBrowser *browser, -+ AvahiIfIndex interface, -+ AvahiProtocol protocol, -+ AvahiBrowserEvent event, -+ const char *name, -+ const char *type, -+ const char *domain, -+ AvahiLookupResultFlags flags, -+ void *context) -+{ -+ AvahiClient *client = avahi_service_browser_get_client (browser); -+ -+ switch (event) -+ { -+ case AVAHI_BROWSER_FAILURE: -+ fprintf (stderr, "ERROR: %s\n", -+ avahi_strerror (avahi_client_errno (client))); -+ avahi_simple_poll_quit (simple_poll); -+ return; -+ -+ case AVAHI_BROWSER_NEW: -+ /* -+ * This object is new on the network. -+ */ -+ -+ if (flags & AVAHI_LOOKUP_RESULT_LOCAL) -+ { -+ /* -+ * This comes from the local machine so ignore it. -+ */ -+ -+ fprintf (stderr, "DEBUG: ignoring local service %s\n", name); -+ } -+ else -+ { -+ /* -+ * Create a device entry for it if it doesn't yet exist. -+ */ -+ -+ get_device ((cups_array_t *)context, name, type, domain); -+ -+ /* -+ * Now look for a TXT entry. -+ */ -+ -+ if (avahi_service_resolver_new (client, interface, protocol, -+ name, type, domain, -+ AVAHI_PROTO_UNSPEC, 0, -+ avahi_query_callback, context) == NULL) -+ { -+ fprintf (stderr, "ERROR: failed to resolve service %s: %s\n", -+ name, avahi_strerror (avahi_client_errno (client))); -+ } -+ } -+ -+ break; -+ -+ case AVAHI_BROWSER_REMOVE: -+ case AVAHI_BROWSER_ALL_FOR_NOW: -+ case AVAHI_BROWSER_CACHE_EXHAUSTED: -+ break; -+ } -+} -+#endif /* HAVE_AVAHI */ -+ -+ -+/* -+ * 'find_device()' - Find a device from its name and domain. -+ */ -+ -+static cups_device_t * -+find_device (cups_array_t *devices, -+ cups_txt_records_t *txt, -+ cups_device_t *dkey) -+{ -+ cups_device_t *device; -+ char *ptr; -+ -+ for (device = cupsArrayFind(devices, dkey); - device; - device = cupsArrayNext(devices)) - { -- if (_cups_strcasecmp(device->name, dkey.name) || -- _cups_strcasecmp(device->domain, dkey.domain)) -+ if (_cups_strcasecmp(device->name, dkey->name) || -+ _cups_strcasecmp(device->domain, dkey->domain)) - { - device = NULL; - break; - } -- else if (device->type == dkey.type) -+ else if (device->type == dkey->type) - { - /* - * Found it, pull out the priority and make and model from the TXT - * record and save it... - */ - -- const uint8_t *data, /* Pointer into data */ -- *datanext, /* Next key/value pair */ -- *dataend; /* End of entire TXT record */ -- uint8_t datalen; /* Length of current key/value pair */ -- char key[256], /* Key string */ -- value[256], /* Value string */ -- make_and_model[512], -+ char make_and_model[512], - /* Manufacturer and model */ - model[256], /* Model */ -- device_id[2048];/* 1284 device ID */ -- -+ device_id[2048]; /* 1284 device ID */ - - device_id[0] = '\0'; - make_and_model[0] = '\0'; - - strcpy(model, "Unknown"); - -- for (data = rdata, dataend = data + rdlen; -- data < dataend; -- data = datanext) -+ for (;;) - { -- /* -- * Read a key/value pair starting with an 8-bit length. Since the -- * length is 8 bits and the size of the key/value buffers is 256, we -- * don't need to check for overflow... -- */ -- -- datalen = *data++; -- -- if (!datalen || (data + datalen) > dataend) -- break; -- -- datanext = data + datalen; -- -- for (ptr = key; data < datanext && *data != '='; data ++) -- *ptr++ = *data; -- *ptr = '\0'; -+ char *key; -+ char *value; - -- if (data < datanext && *data == '=') -- { -- data ++; -- -- if (data < datanext) -- memcpy(value, data, datanext - data); -- value[datanext - data] = '\0'; -+ if (parse_txt_record_pair (txt)) -+ goto next; - -- fprintf(stderr, "DEBUG2: query_callback: \"%s=%s\".\n", -- key, value); -- } -- else -- { -- fprintf(stderr, "DEBUG2: query_callback: \"%s\" with no value.\n", -- key); -- continue; -- } -- -- if (!_cups_strncasecmp(key, "usb_", 4)) -+ key = txt->key; -+ value = txt->value; -+ if (!strncasecmp(key, "usb_", 4)) - { - /* - * Add USB device ID information... -@@ -861,6 +1267,10 @@ query_callback( - if (device->type == CUPS_DEVICE_PRINTER) - device->sent = 1; - } -+ -+ next: -+ if (next_txt_record (txt) == NULL) -+ break; - } - - if (device->device_id) -@@ -917,11 +1327,9 @@ query_callback( - } - } - -- if (!device) -- fprintf(stderr, "DEBUG: Ignoring TXT record for \"%s\"...\n", fullName); -+ return device; - } - -- - /* - * 'sigterm_handler()' - Handle termination signals... - */ -diff -up cups-1.5.3/cups/http-support.c.avahi-2-backend cups-1.5.3/cups/http-support.c ---- cups-1.5.3/cups/http-support.c.avahi-2-backend 2012-02-15 02:06:12.000000000 +0100 -+++ cups-1.5.3/cups/http-support.c 2012-05-15 17:04:51.045944634 +0200 -@@ -43,6 +43,10 @@ - * http_copy_decode() - Copy and decode a URI. - * http_copy_encode() - Copy and encode a URI. - * http_resolve_cb() - Build a device URI for the given service name. -+ * avahi_resolve_uri_client_cb() -+ * - Avahi client callback for resolving URI. -+ * avahi_resolve_uri_resolver_cb() -+ * - Avahi resolver callback for resolving URI. - */ - - /* -@@ -60,6 +64,11 @@ - # include <sys/select.h> - # endif /* WIN32 */ - #endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+# include <avahi-client/client.h> -+# include <avahi-client/lookup.h> -+# include <avahi-common/simple-watch.h> -+#endif /* HAVE_AVAHI */ - - - /* -@@ -127,6 +136,24 @@ static void DNSSD_API http_resolve_cb(DN - void *context); - #endif /* HAVE_DNSSD */ - -+#ifdef HAVE_AVAHI -+static void avahi_resolve_uri_client_cb(AvahiClient *client, -+ AvahiClientState state, -+ void *simple_poll); -+static void avahi_resolve_uri_resolver_cb(AvahiServiceResolver *resolver, -+ AvahiIfIndex interface, -+ AvahiProtocol protocol, -+ AvahiResolverEvent event, -+ const char *name, -+ const char *type, -+ const char *domain, -+ const char *host_name, -+ const AvahiAddress *address, -+ uint16_t port, -+ AvahiStringList *txt, -+ AvahiLookupResultFlags flags, -+ void *context); -+#endif /* HAVE_AVAHI */ - - /* - * 'httpAssembleURI()' - Assemble a uniform resource identifier from its -@@ -1434,6 +1461,9 @@ _httpResolveURI( - - if (strstr(hostname, "._tcp")) - { -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) -+ char *regtype, /* Pointer to type in hostname */ -+ *domain; /* Pointer to domain in hostname */ - #ifdef HAVE_DNSSD - # ifdef WIN32 - # pragma comment(lib, "dnssd.lib") -@@ -1452,6 +1482,17 @@ _httpResolveURI( - fd_set input_set; /* Input set for select() */ - struct timeval stimeout; /* Timeout value for select() */ - #endif /* HAVE_POLL */ -+#else /* HAVE_AVAHI */ -+ AvahiSimplePoll *simple_poll; -+ AvahiClient *client; -+ int error; -+ struct -+ { -+ AvahiSimplePoll *poll; -+ _http_uribuf_t uribuf; -+ } user_data; -+#endif /* HAVE_DNSSD */ -+ - - if (options & _HTTP_RESOLVE_STDERR) - fprintf(stderr, "DEBUG: Resolving \"%s\"...\n", hostname); -@@ -1488,9 +1529,16 @@ _httpResolveURI( - if (domain) - *domain++ = '\0'; - -+#ifdef HAVE_DNSSD - uribuf.buffer = resolved_uri; - uribuf.bufsize = resolved_size; - uribuf.options = options; -+#else -+ user_data.uribuf.buffer = resolved_uri; -+ user_data.uribuf.bufsize = resolved_size; -+ user_data.uribuf.options = options; -+#endif -+ - resolved_uri[0] = '\0'; - - DEBUG_printf(("6_httpResolveURI: Resolving hostname=\"%s\", regtype=\"%s\", " -@@ -1504,6 +1552,7 @@ _httpResolveURI( - - uri = NULL; - -+#ifdef HAVE_DNSSD - if (DNSServiceCreateConnection(&ref) == kDNSServiceErr_NoError) - { - localref = ref; -@@ -1611,6 +1660,36 @@ _httpResolveURI( - - DNSServiceRefDeallocate(ref); - } -+#else /* HAVE_AVAHI */ -+ if ((simple_poll = avahi_simple_poll_new ()) != NULL) -+ { -+ if ((client = avahi_client_new (avahi_simple_poll_get (simple_poll), -+ 0, avahi_resolve_uri_client_cb, -+ &simple_poll, &error)) != NULL) -+ { -+ user_data.poll = simple_poll; -+ if (avahi_service_resolver_new (client, AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, hostname, -+ regtype, domain, AVAHI_PROTO_UNSPEC, 0, -+ avahi_resolve_uri_resolver_cb, -+ &user_data) != NULL) -+ { -+ avahi_simple_poll_loop (simple_poll); -+ -+ /* -+ * Collect the result. -+ */ -+ -+ if (resolved_uri[0]) -+ uri = resolved_uri; -+ } -+ -+ avahi_client_free (client); -+ } -+ -+ avahi_simple_poll_free (simple_poll); -+ } -+#endif /* HAVE_DNSSD */ - - if (options & _HTTP_RESOLVE_STDERR) - { -@@ -1622,13 +1701,13 @@ _httpResolveURI( - fputs("STATE: -connecting-to-device,offline-report\n", stderr); - } - --#else -+#else /* HAVE_DNSSD || HAVE_AVAHI */ - /* - * No DNS-SD support... - */ - - uri = NULL; --#endif /* HAVE_DNSSD */ -+#endif /* HAVE_DNSSD || HAVE_AVAHI */ - - if ((options & _HTTP_RESOLVE_STDERR) && !uri) - _cupsLangPrintFilter(stderr, "ERROR", _("Unable to find printer.")); -@@ -1916,6 +1995,115 @@ http_resolve_cb( - } - #endif /* HAVE_DNSSD */ - -+#ifdef HAVE_AVAHI -+/* -+ * 'avahi_resolve_uri_client_cb()' - Avahi client callback for resolving URI. -+ */ -+ -+static void -+avahi_resolve_uri_client_cb (AvahiClient *client, -+ AvahiClientState state, -+ void *simple_poll) -+{ -+ DEBUG_printf(("avahi_resolve_uri_client_callback(client=%p, state=%d, " -+ "simple_poll=%p)\n", client, state, simple_poll)); -+ -+ /* -+ * If the connection drops, quit. -+ */ -+ -+ if (state == AVAHI_CLIENT_FAILURE) -+ avahi_simple_poll_quit (simple_poll); -+} -+ -+ -+/* -+ * 'avahi_resolve_uri_resolver_cb()' - Avahi resolver callback for resolving -+ * URI. -+ */ -+ -+static void -+avahi_resolve_uri_resolver_cb (AvahiServiceResolver *resolver, -+ AvahiIfIndex interface, -+ AvahiProtocol protocol, -+ AvahiResolverEvent event, -+ const char *name, -+ const char *type, -+ const char *domain, -+ const char *host_name, -+ const AvahiAddress *address, -+ uint16_t port, -+ AvahiStringList *txt, -+ AvahiLookupResultFlags flags, -+ void *context) -+{ -+ const char *scheme; /* URI scheme */ -+ char rp[256]; /* Remote printer */ -+ AvahiStringList *pair; -+ char *value; -+ size_t valueLen = 0; -+ char addr[AVAHI_ADDRESS_STR_MAX]; -+ struct -+ { -+ AvahiSimplePoll *poll; -+ _http_uribuf_t uribuf; -+ } *poll_uribuf = context; -+ -+ DEBUG_printf(("avahi_resolve_uri_resolver_callback(resolver=%p, " -+ "interface=%d, protocol=%d, event=%d, name=\"%s\", " -+ "type=\"%s\", domain=\"%s\", host_name=\"%s\", address=%p, " -+ "port=%d, txt=%p, flags=%d, context=%p)\n", -+ resolver, interface, protocol, event, name, type, domain, -+ host_name, address, port, txt, flags, context)); -+ -+ if (event != AVAHI_RESOLVER_FOUND) -+ { -+ avahi_service_resolver_free (resolver); -+ avahi_simple_poll_quit (poll_uribuf->poll); -+ return; -+ } -+ -+ /* -+ * Figure out the scheme from the full name... -+ */ -+ -+ if (strstr(type, "_ipp.")) -+ scheme = "ipp"; -+ else if (strstr(type, "_printer.")) -+ scheme = "lpd"; -+ else if (strstr(type, "_pdl-datastream.")) -+ scheme = "socket"; -+ else -+ scheme = "riousbprint"; -+ -+ /* -+ * Extract the "remote printer key from the TXT record... -+ */ -+ -+ if ((pair = avahi_string_list_find (txt, "rp")) != NULL) -+ { -+ avahi_string_list_get_pair (pair, NULL, &value, &valueLen); -+ rp[0] = '/'; -+ memcpy (rp + 1, value, valueLen); -+ rp[valueLen + 1] = '\0'; -+ } -+ else -+ rp[0] = '\0'; -+ -+ /* -+ * Assemble the final device URI... -+ */ -+ -+ avahi_address_snprint (addr, AVAHI_ADDRESS_STR_MAX, address); -+ httpAssembleURI(HTTP_URI_CODING_ALL, poll_uribuf->uribuf.buffer, -+ poll_uribuf->uribuf.bufsize, scheme, NULL, -+ addr, port, rp); -+ DEBUG_printf(("avahi_resolve_uri_resolver_callback: Resolved URI is \"%s\"\n", -+ poll_uribuf->uribuf.buffer)); -+ avahi_simple_poll_quit (poll_uribuf->poll); -+} -+#endif /* HAVE_AVAHI */ -+ - - /* - * End of "$Id: http-support.c 10284 2012-02-15 01:06:12Z mike $".
\ No newline at end of file diff --git a/~mtjm/cups-usblp/cups-avahi-3-timeouts.patch b/~mtjm/cups-usblp/cups-avahi-3-timeouts.patch deleted file mode 100755 index daf852a0f..000000000 --- a/~mtjm/cups-usblp/cups-avahi-3-timeouts.patch +++ /dev/null @@ -1,381 +0,0 @@ -diff -up cups-1.5.2/scheduler/cupsd.h.avahi-3-timeouts cups-1.5.2/scheduler/cupsd.h ---- cups-1.5.2/scheduler/cupsd.h.avahi-3-timeouts 2011-05-11 23:17:34.000000000 +0100 -+++ cups-1.5.2/scheduler/cupsd.h 2012-03-14 15:06:36.509476983 +0000 -@@ -140,6 +140,15 @@ extern const char *cups_hstrerror(int); - - typedef void (*cupsd_selfunc_t)(void *data); - -+#ifdef HAVE_AVAHI -+/* -+ * Timeout callback function type... -+ */ -+ -+typedef struct _cupsd_timeout_s cupsd_timeout_t; -+typedef void (*cupsd_timeoutfunc_t)(cupsd_timeout_t *timeout, void *data); -+#endif /* HAVE_AVAHI */ -+ - - /* - * Globals... -@@ -173,6 +182,11 @@ VAR int Launchd VALUE(0); - /* Running from launchd */ - #endif /* HAVE_LAUNCH_H */ - -+#ifdef HAVE_AVAHI -+VAR cups_array_t *Timeouts; /* Timed callbacks for main loop */ -+#endif /* HAVE_AVAHI */ -+ -+ - - /* - * Prototypes... -@@ -242,6 +256,20 @@ extern void cupsdStopSelect(void); - extern void cupsdStartServer(void); - extern void cupsdStopServer(void); - -+#ifdef HAVE_AVAHI -+extern void cupsdInitTimeouts(void); -+extern cupsd_timeout_t *cupsdAddTimeout (const struct timeval *tv, -+ cupsd_timeoutfunc_t cb, -+ void *data); -+extern cupsd_timeout_t *cupsdNextTimeout (long *delay); -+extern void cupsdRunTimeout (cupsd_timeout_t *timeout); -+extern void cupsdUpdateTimeout (cupsd_timeout_t *timeout, -+ const struct timeval *tv); -+extern void cupsdRemoveTimeout (cupsd_timeout_t *timeout); -+#endif /* HAVE_AVAHI */ -+ -+extern int cupsdRemoveFile(const char *filename); -+ - - /* - * End of "$Id: cupsd.h 9766 2011-05-11 22:17:34Z mike $". -diff -up cups-1.5.2/scheduler/main.c.avahi-3-timeouts cups-1.5.2/scheduler/main.c ---- cups-1.5.2/scheduler/main.c.avahi-3-timeouts 2012-03-14 15:04:17.655305548 +0000 -+++ cups-1.5.2/scheduler/main.c 2012-03-14 15:06:36.511476986 +0000 -@@ -146,6 +146,10 @@ main(int argc, /* I - Number of comm - int launchd_idle_exit; - /* Idle exit on select timeout? */ - #endif /* HAVE_LAUNCHD */ -+#ifdef HAVE_AVAHI -+ cupsd_timeout_t *tmo; /* Next scheduled timed callback */ -+ long tmo_delay; /* Time before it must be called */ -+#endif /* HAVE_AVAHI */ - - - #ifdef HAVE_GETEUID -@@ -535,6 +539,14 @@ main(int argc, /* I - Number of comm - - httpInitialize(); - -+#ifdef HAVE_AVAHI -+ /* -+ * Initialize timed callback structures. -+ */ -+ -+ cupsdInitTimeouts(); -+#endif /* HAVE_AVAHI */ -+ - cupsdStartServer(); - - /* -@@ -874,6 +886,16 @@ main(int argc, /* I - Number of comm - } - #endif /* __APPLE__ */ - -+#ifdef HAVE_AVAHI -+ /* -+ * If a timed callback is due, run it. -+ */ -+ -+ tmo = cupsdNextTimeout (&tmo_delay); -+ if (tmo && tmo_delay == 0) -+ cupsdRunTimeout (tmo); -+#endif /* HAVE_AVAHI */ -+ - #ifndef __APPLE__ - /* - * Update the network interfaces once a minute... -@@ -1787,6 +1809,10 @@ select_timeout(int fds) /* I - Number - cupsd_job_t *job; /* Job information */ - cupsd_subscription_t *sub; /* Subscription information */ - const char *why; /* Debugging aid */ -+#ifdef HAVE_AVAHI -+ cupsd_timeout_t *tmo; /* Timed callback */ -+ long tmo_delay; /* Seconds before calling it */ -+#endif /* HAVE_AVAHI */ - - - /* -@@ -1829,6 +1855,19 @@ select_timeout(int fds) /* I - Number - } - #endif /* __APPLE__ */ - -+#ifdef HAVE_AVAHI -+ /* -+ * See if there are any scheduled timed callbacks to run. -+ */ -+ -+ if ((tmo = cupsdNextTimeout(&tmo_delay)) != NULL && -+ (now + tmo_delay) < timeout) -+ { -+ timeout = tmo_delay; -+ why = "run a timed callback"; -+ } -+#endif /* HAVE_AVAHI */ -+ - /* - * Check whether we are accepting new connections... - */ -diff -up cups-1.5.2/scheduler/Makefile.avahi-3-timeouts cups-1.5.2/scheduler/Makefile ---- cups-1.5.2/scheduler/Makefile.avahi-3-timeouts 2012-03-14 15:04:17.685305586 +0000 -+++ cups-1.5.2/scheduler/Makefile 2012-03-14 15:06:36.508476980 +0000 -@@ -39,7 +39,8 @@ CUPSDOBJS = \ - server.o \ - statbuf.o \ - subscriptions.o \ -- sysman.o -+ sysman.o \ -+ timeout.o - LIBOBJS = \ - filter.o \ - mime.o \ -diff -up cups-1.5.2/scheduler/timeout.c.avahi-3-timeouts cups-1.5.2/scheduler/timeout.c ---- cups-1.5.2/scheduler/timeout.c.avahi-3-timeouts 2012-03-14 15:06:36.552477037 +0000 -+++ cups-1.5.2/scheduler/timeout.c 2012-03-14 15:06:36.552477037 +0000 -@@ -0,0 +1,235 @@ -+/* -+ * "$Id$" -+ * -+ * Timeout functions for the Common UNIX Printing System (CUPS). -+ * -+ * Copyright (C) 2010, 2011 Red Hat, Inc. -+ * Authors: -+ * Tim Waugh <twaugh@redhat.com> -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * -+ * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -+ * OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * Contents: -+ * -+ * cupsdInitTimeouts() - Initialise timeout structure. -+ * cupsdAddTimeout() - Add a timed callback. -+ * cupsdNextTimeout() - Find the next enabled timed callback. -+ * cupsdUpdateTimeout() - Adjust the time of a timed callback or disable it. -+ * cupsdRemoveTimeout() - Discard a timed callback. -+ * compare_timeouts() - Compare timed callbacks for array sorting. -+ */ -+ -+#include <config.h> -+ -+#ifdef HAVE_AVAHI /* Applies to entire file... */ -+ -+/* -+ * Include necessary headers... -+ */ -+ -+#include "cupsd.h" -+ -+#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) -+# include <malloc.h> -+#endif /* HAVE_MALLOC_H && HAVE_MALLINFO */ -+ -+#ifdef HAVE_AVAHI -+# include <avahi-common/timeval.h> -+#endif /* HAVE_AVAHI */ -+ -+ -+struct _cupsd_timeout_s -+{ -+ struct timeval when; -+ int enabled; -+ cupsd_timeoutfunc_t callback; -+ void *data; -+}; -+ -+/* -+ * Local functions... -+ */ -+ -+/* -+ * 'compare_timeouts()' - Compare timed callbacks for array sorting. -+ */ -+ -+static int -+compare_addrs (void *p0, void *p1) -+{ -+ if (p0 == p1) -+ return (0); -+ if (p0 < p1) -+ return (-1); -+ return (1); -+} -+ -+static int -+compare_timeouts (cupsd_timeout_t *p0, cupsd_timeout_t *p1) -+{ -+ int addrsdiff = compare_addrs (p0, p1); -+ int tvdiff; -+ -+ if (addrsdiff == 0) -+ return (0); -+ -+ if (!p0->enabled || !p1->enabled) -+ { -+ if (!p0->enabled && !p1->enabled) -+ return (addrsdiff); -+ -+ return (p0->enabled ? -1 : 1); -+ } -+ -+ tvdiff = avahi_timeval_compare (&p0->when, &p1->when); -+ if (tvdiff != 0) -+ return (tvdiff); -+ -+ return (addrsdiff); -+} -+ -+ -+/* -+ * 'cupsdInitTimeouts()' - Initialise timeout structures. -+ */ -+ -+void -+cupsdInitTimeouts(void) -+{ -+ Timeouts = cupsArrayNew ((cups_array_func_t)compare_timeouts, NULL); -+} -+ -+ -+/* -+ * 'cupsdAddTimeout()' - Add a timed callback. -+ */ -+ -+cupsd_timeout_t * /* O - Timeout handle */ -+cupsdAddTimeout(const struct timeval *tv, /* I - Absolute time */ -+ cupsd_timeoutfunc_t cb, /* I - Callback function */ -+ void *data) /* I - User data */ -+{ -+ cupsd_timeout_t *timeout; -+ -+ timeout = malloc (sizeof(cupsd_timeout_t)); -+ if (timeout != NULL) -+ { -+ timeout->enabled = (tv != NULL); -+ if (tv) -+ { -+ timeout->when.tv_sec = tv->tv_sec; -+ timeout->when.tv_usec = tv->tv_usec; -+ } -+ -+ timeout->callback = cb; -+ timeout->data = data; -+ cupsArrayAdd (Timeouts, timeout); -+ } -+ -+ return timeout; -+} -+ -+ -+/* -+ * 'cupsdNextTimeout()' - Find the next enabled timed callback. -+ */ -+ -+cupsd_timeout_t * /* O - Next enabled timeout or NULL */ -+cupsdNextTimeout(long *delay) /* O - Seconds before scheduled */ -+{ -+ cupsd_timeout_t *first = cupsArrayFirst (Timeouts); -+ struct timeval curtime; -+ -+ if (first && !first->enabled) -+ first = NULL; -+ -+ if (first && delay) -+ { -+ gettimeofday (&curtime, NULL); -+ if (avahi_timeval_compare (&curtime, &first->when) > 0) -+ { -+ *delay = 0; -+ } else { -+ *delay = 1 + first->when.tv_sec - curtime.tv_sec; -+ if (first->when.tv_usec < curtime.tv_usec) -+ (*delay)--; -+ } -+ } -+ -+ return (first); -+} -+ -+ -+/* -+ * 'cupsdRunTimeout()' - Run a timed callback. -+ */ -+ -+void -+cupsdRunTimeout(cupsd_timeout_t *timeout) /* I - Timeout */ -+{ -+ if (!timeout) -+ return; -+ timeout->enabled = 0; -+ if (!timeout->callback) -+ return; -+ timeout->callback (timeout, timeout->data); -+} -+ -+/* -+ * 'cupsdUpdateTimeout()' - Adjust the time of a timed callback or disable it. -+ */ -+ -+void -+cupsdUpdateTimeout(cupsd_timeout_t *timeout, /* I - Timeout */ -+ const struct timeval *tv) /* I - Absolute time or NULL */ -+{ -+ cupsArrayRemove (Timeouts, timeout); -+ timeout->enabled = (tv != NULL); -+ if (tv) -+ { -+ timeout->when.tv_sec = tv->tv_sec; -+ timeout->when.tv_usec = tv->tv_usec; -+ } -+ cupsArrayAdd (Timeouts, timeout); -+} -+ -+ -+/* -+ * 'cupsdRemoveTimeout()' - Discard a timed callback. -+ */ -+ -+void -+cupsdRemoveTimeout(cupsd_timeout_t *timeout) /* I - Timeout */ -+{ -+ cupsArrayRemove (Timeouts, timeout); -+ free (timeout); -+} -+ -+ -+#endif /* HAVE_AVAHI ... from top of file */ -+ -+/* -+ * End of "$Id$". -+ */ diff --git a/~mtjm/cups-usblp/cups-avahi-4-poll.patch b/~mtjm/cups-usblp/cups-avahi-4-poll.patch deleted file mode 100755 index d7fa5fd56..000000000 --- a/~mtjm/cups-usblp/cups-avahi-4-poll.patch +++ /dev/null @@ -1,529 +0,0 @@ -diff -up cups-1.5.2/scheduler/avahi.c.avahi-4-poll cups-1.5.2/scheduler/avahi.c ---- cups-1.5.2/scheduler/avahi.c.avahi-4-poll 2012-03-14 15:07:29.477542381 +0000 -+++ cups-1.5.2/scheduler/avahi.c 2012-03-14 15:07:29.477542381 +0000 -@@ -0,0 +1,441 @@ -+/* -+ * "$Id$" -+ * -+ * Avahi poll implementation for the CUPS scheduler. -+ * -+ * Copyright (C) 2010, 2011 Red Hat, Inc. -+ * Authors: -+ * Tim Waugh <twaugh@redhat.com> -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * -+ * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -+ * OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * Contents: -+ * -+ * watch_read_cb - Read callback for file descriptor -+ * watch_write_cb - Write callback for file descriptor -+ * watched_fd_add_select() - Call cupsdAddSelect() as needed -+ * watch_new() - Create a new file descriptor watch -+ * watch_free() - Free a file descriptor watch -+ * watch_update() - Update watched events for a file descriptor -+ * watch_get_events() - Get events that happened for a file descriptor -+ * timeout_cb() - Run a timed Avahi callback -+ * timeout_new() - Set a wakeup time -+ * timeout_update() - Update the expiration time for a timeout -+ * timeout_free() - Free a timeout -+ * compare_watched_fds() - Compare watched file descriptors for array sorting -+ * avahi_cups_poll_new() - Create a new Avahi main loop object for CUPS -+ * avahi_cups_poll_free() - Free an Avahi main loop object for CUPS -+ * avahi_cups_poll_get() - Get the abstract poll API structure -+ */ -+ -+#include <config.h> -+ -+#ifdef HAVE_AVAHI /* Applies to entire file... */ -+ -+/* -+ * Include necessary headers... -+ */ -+ -+#include "cupsd.h" -+ -+#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) -+# include <malloc.h> -+#endif /* HAVE_MALLOC_H && HAVE_MALLINFO */ -+ -+#ifdef HAVE_AVAHI -+# include <avahi-common/timeval.h> -+#endif /* HAVE_AVAHI */ -+ -+ -+typedef struct -+{ -+ AvahiCupsPoll *cups_poll; -+ -+ int fd; -+ AvahiWatchEvent occurred; -+ cups_array_t *watches; -+} cupsd_watched_fd_t; -+ -+struct AvahiWatch -+{ -+ cupsd_watched_fd_t *watched_fd; -+ -+ AvahiWatchEvent events; -+ AvahiWatchCallback callback; -+ void *userdata; -+}; -+ -+struct AvahiTimeout -+{ -+ AvahiCupsPoll *cups_poll; -+ AvahiTimeoutCallback callback; -+ void *userdata; -+ cupsd_timeout_t *cupsd_timeout; -+}; -+ -+/* -+ * Local functions... -+ */ -+ -+static AvahiWatch * watch_new(const AvahiPoll *api, -+ int fd, -+ AvahiWatchEvent events, -+ AvahiWatchCallback callback, -+ void *userdata); -+static void watch_free(AvahiWatch *watch); -+static void watch_update(AvahiWatch *watch, -+ AvahiWatchEvent events); -+static AvahiWatchEvent watch_get_events(AvahiWatch *watch); -+ -+ -+/* -+ * 'watch_read_cb' - Read callback for file descriptor -+ */ -+ -+static void -+watch_read_cb (void *userdata) -+{ -+ AvahiWatch *watch; -+ cupsd_watched_fd_t *watched_fd = userdata; -+ watched_fd->occurred |= AVAHI_WATCH_IN; -+ for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches); -+ watch; -+ watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches)) -+ { -+ if (watch->events & watched_fd->occurred) -+ { -+ (watch->callback) (watch, watched_fd->fd, -+ AVAHI_WATCH_IN, watch->userdata); -+ watched_fd->occurred &= ~AVAHI_WATCH_IN; -+ break; -+ } -+ } -+} -+ -+ -+/* -+ * 'watch_write_cb' - Write callback for file descriptor -+ */ -+ -+static void -+watch_write_cb (void *userdata) -+{ -+ AvahiWatch *watch; -+ cupsd_watched_fd_t *watched_fd = userdata; -+ watched_fd->occurred |= AVAHI_WATCH_OUT; -+ for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches); -+ watch; -+ watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches)) -+ { -+ if (watch->events & watched_fd->occurred) -+ { -+ (watch->callback) (watch, watched_fd->fd, -+ AVAHI_WATCH_OUT, watch->userdata); -+ watched_fd->occurred &= ~AVAHI_WATCH_OUT; -+ break; -+ } -+ } -+} -+ -+ -+/* -+ * 'watched_fd_add_select' - Call cupsdAddSelect() as needed -+ */ -+ -+static int /* O - Watches? */ -+watched_fd_add_select (cupsd_watched_fd_t *watched_fd) -+{ -+ AvahiWatch *watch; -+ cupsd_selfunc_t read_cb = NULL, write_cb = NULL; -+ int any_watches = 0; -+ -+ for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches); -+ watch; -+ watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches)) -+ { -+ any_watches = 1; -+ if (watch->events & (AVAHI_WATCH_IN | -+ AVAHI_WATCH_ERR | -+ AVAHI_WATCH_HUP)) -+ { -+ read_cb = (cupsd_selfunc_t)watch_read_cb; -+ if (write_cb != NULL) -+ break; -+ } -+ -+ if (watch->events & AVAHI_WATCH_OUT) -+ { -+ write_cb = (cupsd_selfunc_t)watch_write_cb; -+ if (read_cb != NULL) -+ break; -+ } -+ } -+ -+ if (read_cb || write_cb) -+ cupsdAddSelect (watched_fd->fd, read_cb, write_cb, watched_fd); -+ else -+ cupsdRemoveSelect (watched_fd->fd); -+ -+ return (any_watches); -+} -+ -+/* -+ * 'watch_new' - Create a new file descriptor watch -+ */ -+ -+static AvahiWatch * -+watch_new (const AvahiPoll *api, -+ int fd, -+ AvahiWatchEvent events, -+ AvahiWatchCallback callback, -+ void *userdata) -+{ -+ cupsd_watched_fd_t key, *watched_fd; -+ AvahiCupsPoll *cups_poll = api->userdata; -+ AvahiWatch *watch = malloc(sizeof(AvahiWatch)); -+ if (watch == NULL) -+ return (NULL); -+ -+ watch->events = events; -+ watch->callback = callback; -+ watch->userdata = userdata; -+ -+ key.fd = fd; -+ watched_fd = cupsArrayFind (cups_poll->watched_fds, &key); -+ if (watched_fd == NULL) -+ { -+ watched_fd = malloc(sizeof(cupsd_watched_fd_t)); -+ if (watched_fd == NULL) -+ { -+ free (watch); -+ return (NULL); -+ } -+ -+ watched_fd->fd = fd; -+ watched_fd->occurred = 0; -+ watched_fd->cups_poll = cups_poll; -+ watched_fd->watches = cupsArrayNew (NULL, NULL); -+ cupsArrayAdd (cups_poll->watched_fds, watched_fd); -+ } -+ -+ watch->watched_fd = watched_fd; -+ cupsArrayAdd(watched_fd->watches, watch); -+ watched_fd_add_select (watched_fd); -+ return (watch); -+} -+ -+ -+/* -+ * 'watch_free' - Free a file descriptor watch -+ */ -+ -+static void -+watch_free (AvahiWatch *watch) -+{ -+ cupsd_watched_fd_t *watched_fd = watch->watched_fd; -+ AvahiCupsPoll *cups_poll = watched_fd->cups_poll; -+ -+ cupsArrayRemove (watched_fd->watches, watch); -+ free (watch); -+ -+ if (!watched_fd_add_select (watched_fd)) -+ { -+ /* No more watches */ -+ cupsArrayRemove (cups_poll->watched_fds, watched_fd); -+ free (watched_fd); -+ } -+} -+ -+ -+/* -+ * 'watch_update' - Update watched events for a file descriptor -+ */ -+ -+static void -+watch_update (AvahiWatch *watch, -+ AvahiWatchEvent events) -+{ -+ watch->events = events; -+ watched_fd_add_select (watch->watched_fd); -+} -+ -+ -+/* -+ * 'watch_get_events' - Get events that happened for a file descriptor -+ */ -+ -+static AvahiWatchEvent -+watch_get_events (AvahiWatch *watch) -+{ -+ return (watch->watched_fd->occurred); -+} -+ -+ -+/* -+ * 'timeout_cb()' - Run a timed Avahi callback -+ */ -+ -+static void -+timeout_cb (cupsd_timeout_t *cupsd_timeout, void *userdata) -+{ -+ AvahiTimeout *timeout = userdata; -+ (timeout->callback) (timeout, timeout->userdata); -+} -+ -+ -+/* -+ * 'timeout_new' - Set a wakeup time -+ */ -+ -+static AvahiTimeout * -+timeout_new (const AvahiPoll *api, -+ const struct timeval *tv, -+ AvahiTimeoutCallback callback, -+ void *userdata) -+{ -+ AvahiTimeout *timeout; -+ AvahiCupsPoll *cups_poll = api->userdata; -+ -+ timeout = malloc(sizeof(AvahiTimeout)); -+ if (timeout == NULL) -+ return (NULL); -+ -+ timeout->cups_poll = cups_poll; -+ timeout->callback = callback; -+ timeout->userdata = userdata; -+ timeout->cupsd_timeout = cupsdAddTimeout (tv, -+ (cupsd_timeoutfunc_t)timeout_cb, -+ timeout); -+ cupsArrayAdd (cups_poll->timeouts, timeout); -+ return (timeout); -+} -+ -+ -+/* -+ * 'timeout_update' - Update the expiration time for a timeout -+ */ -+ -+static void -+timeout_update (AvahiTimeout *timeout, -+ const struct timeval *tv) -+{ -+ cupsdUpdateTimeout (timeout->cupsd_timeout, tv); -+} -+ -+ -+/* -+ * ' timeout_free' - Free a timeout -+ */ -+ -+static void -+timeout_free (AvahiTimeout *timeout) -+{ -+ cupsArrayRemove (timeout->cups_poll->timeouts, timeout); -+ cupsdRemoveTimeout (timeout->cupsd_timeout); -+ free (timeout); -+} -+ -+ -+/* -+ * 'compare_watched_fds' - Compare watched file descriptors for array sorting -+ */ -+static int -+compare_watched_fds(cupsd_watched_fd_t *p0, -+ cupsd_watched_fd_t *p1) -+{ -+ /* -+ * Compare by fd (no two elements have the same fd) -+ */ -+ -+ if (p0->fd == p1->fd) -+ return 0; -+ -+ return (p0->fd < p1->fd ? -1 : 1); -+} -+ -+ -+/* -+ * 'avahi_cups_poll_new' - Create a new Avahi main loop object for CUPS -+ */ -+ -+AvahiCupsPoll * -+avahi_cups_poll_new (void) -+{ -+ AvahiCupsPoll *cups_poll = malloc(sizeof(AvahiCupsPoll)); -+ if (cups_poll == NULL) -+ return (NULL); -+ -+ cups_poll->watched_fds = cupsArrayNew ((cups_array_func_t)compare_watched_fds, -+ NULL); -+ cups_poll->timeouts = cupsArrayNew (NULL, NULL); -+ -+ cups_poll->api.userdata = cups_poll; -+ cups_poll->api.watch_new = watch_new; -+ cups_poll->api.watch_free = watch_free; -+ cups_poll->api.watch_update = watch_update; -+ cups_poll->api.watch_get_events = watch_get_events; -+ -+ cups_poll->api.timeout_new = timeout_new; -+ cups_poll->api.timeout_update = timeout_update; -+ cups_poll->api.timeout_free = timeout_free; -+ -+ return (cups_poll); -+} -+ -+ -+/* -+ * 'avahi_cups_poll_free' - Free an Avahi main loop object for CUPS -+ */ -+void -+avahi_cups_poll_free (AvahiCupsPoll *cups_poll) -+{ -+ cupsd_watched_fd_t *watched_fd; -+ -+ for (watched_fd = (cupsd_watched_fd_t*)cupsArrayFirst(cups_poll->watched_fds); -+ watched_fd; -+ watched_fd = (cupsd_watched_fd_t*)cupsArrayNext(cups_poll->watched_fds)) -+ cupsArrayClear (watched_fd->watches); -+ -+ cupsArrayClear (cups_poll->watched_fds); -+ cupsArrayClear (cups_poll->timeouts); -+} -+ -+ -+/* -+ * 'avahi_cups_poll_get' - Get the abstract poll API structure -+ */ -+ -+const AvahiPoll * -+avahi_cups_poll_get (AvahiCupsPoll *cups_poll) -+{ -+ return (&cups_poll->api); -+} -+ -+ -+#endif /* HAVE_AVAHI ... from top of file */ -+ -+/* -+ * End of "$Id$". -+ */ -diff -up cups-1.5.2/scheduler/avahi.h.avahi-4-poll cups-1.5.2/scheduler/avahi.h ---- cups-1.5.2/scheduler/avahi.h.avahi-4-poll 2012-03-14 15:07:29.477542381 +0000 -+++ cups-1.5.2/scheduler/avahi.h 2012-03-14 15:07:29.477542381 +0000 -@@ -0,0 +1,69 @@ -+/* -+ * "$Id$" -+ * -+ * Avahi poll implementation for the CUPS scheduler. -+ * -+ * Copyright (C) 2010, 2011 Red Hat, Inc. -+ * Authors: -+ * Tim Waugh <twaugh@redhat.com> -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * -+ * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in the -+ * documentation and/or other materials provided with the distribution. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -+ * OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+#include <config.h> -+ -+#ifdef HAVE_AVAHI -+# include <avahi-client/client.h> -+# include <avahi-client/publish.h> -+#endif /* HAVE_AVAHI */ -+ -+#ifdef HAVE_AUTHORIZATION_H -+# include <Security/Authorization.h> -+#endif /* HAVE_AUTHORIZATION_H */ -+ -+ -+#ifdef HAVE_AVAHI -+typedef struct -+{ -+ AvahiPoll api; -+ cups_array_t *watched_fds; -+ cups_array_t *timeouts; -+} AvahiCupsPoll; -+#endif /* HAVE_AVAHI */ -+ -+/* -+ * Prototypes... -+ */ -+ -+#ifdef HAVE_AVAHI -+extern AvahiCupsPoll * avahi_cups_poll_new(void); -+extern void avahi_cups_poll_free(AvahiCupsPoll *cups_poll); -+extern const AvahiPoll *avahi_cups_poll_get(AvahiCupsPoll *cups_poll); -+#endif /* HAVE_AVAHI */ -+ -+ -+/* -+ * End of "$Id$". -+ */ -diff -up cups-1.5.2/scheduler/Makefile.avahi-4-poll cups-1.5.2/scheduler/Makefile ---- cups-1.5.2/scheduler/Makefile.avahi-4-poll 2012-03-14 15:06:36.508476980 +0000 -+++ cups-1.5.2/scheduler/Makefile 2012-03-14 15:07:29.476542380 +0000 -@@ -17,6 +17,7 @@ include ../Makedefs - - CUPSDOBJS = \ - auth.o \ -+ avahi.o \ - banners.o \ - cert.o \ - classes.o \ diff --git a/~mtjm/cups-usblp/cups-avahi-5-services.patch b/~mtjm/cups-usblp/cups-avahi-5-services.patch deleted file mode 100755 index 820b3c32b..000000000 --- a/~mtjm/cups-usblp/cups-avahi-5-services.patch +++ /dev/null @@ -1,1272 +0,0 @@ -diff -up cups-1.5.2/cgi-bin/admin.c.avahi-5-services cups-1.5.2/cgi-bin/admin.c ---- cups-1.5.2/cgi-bin/admin.c.avahi-5-services 2011-08-17 22:01:53.000000000 +0100 -+++ cups-1.5.2/cgi-bin/admin.c 2012-03-14 15:08:25.701611799 +0000 -@@ -1643,7 +1643,7 @@ do_config_server(http_t *http) /* I - H - else - local_protocols[0] = '\0'; - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - if (cgiGetVariable("BROWSE_LOCAL_DNSSD")) - { - if (local_protocols[0]) -@@ -1651,7 +1651,7 @@ do_config_server(http_t *http) /* I - H - else - strcat(local_protocols, "dnssd"); - } --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - #ifdef HAVE_LDAP - if (cgiGetVariable("BROWSE_LOCAL_LDAP")) -@@ -2718,9 +2718,9 @@ do_menu(http_t *http) /* I - HTTP conn - #endif /* HAVE_GSSAPI */ - cgiSetVariable("KERBEROS", ""); - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - cgiSetVariable("HAVE_DNSSD", "1"); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - #ifdef HAVE_LDAP - cgiSetVariable("HAVE_LDAP", "1"); -diff -up cups-1.5.2/scheduler/avahi.h.avahi-5-services cups-1.5.2/scheduler/avahi.h ---- cups-1.5.2/scheduler/avahi.h.avahi-5-services 2012-03-14 15:07:29.477542381 +0000 -+++ cups-1.5.2/scheduler/avahi.h 2012-03-14 15:08:25.701611799 +0000 -@@ -3,7 +3,7 @@ - * - * Avahi poll implementation for the CUPS scheduler. - * -- * Copyright (C) 2010, 2011 Red Hat, Inc. -+ * Copyright (C) 2010, 2011, 2012 Red Hat, Inc. - * Authors: - * Tim Waugh <twaugh@redhat.com> - * -@@ -32,37 +32,40 @@ - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - --#include <config.h> -+#ifndef _CUPS_AVAHI_H_ -+# define _CUPS_AVAHI_H_ - --#ifdef HAVE_AVAHI --# include <avahi-client/client.h> --# include <avahi-client/publish.h> --#endif /* HAVE_AVAHI */ -+/* -+ * Include necessary headers... -+ */ - --#ifdef HAVE_AUTHORIZATION_H --# include <Security/Authorization.h> --#endif /* HAVE_AUTHORIZATION_H */ -+# include <config.h> - -+# ifdef HAVE_AVAHI -+# include <avahi-client/client.h> -+# include <avahi-client/publish.h> -+# endif /* HAVE_AVAHI */ - --#ifdef HAVE_AVAHI -+# ifdef HAVE_AVAHI - typedef struct - { - AvahiPoll api; - cups_array_t *watched_fds; - cups_array_t *timeouts; - } AvahiCupsPoll; --#endif /* HAVE_AVAHI */ -+# endif /* HAVE_AVAHI */ - - /* - * Prototypes... - */ - --#ifdef HAVE_AVAHI -+# ifdef HAVE_AVAHI - extern AvahiCupsPoll * avahi_cups_poll_new(void); - extern void avahi_cups_poll_free(AvahiCupsPoll *cups_poll); - extern const AvahiPoll *avahi_cups_poll_get(AvahiCupsPoll *cups_poll); --#endif /* HAVE_AVAHI */ -+# endif /* HAVE_AVAHI */ - -+#endif /* !_CUPS_AVAHI_H_ */ - - /* - * End of "$Id$". -diff -up cups-1.5.2/scheduler/client.c.avahi-5-services cups-1.5.2/scheduler/client.c ---- cups-1.5.2/scheduler/client.c.avahi-5-services 2012-01-13 23:00:22.000000000 +0000 -+++ cups-1.5.2/scheduler/client.c 2012-03-14 15:08:25.703611797 +0000 -@@ -4989,7 +4989,7 @@ valid_host(cupsd_client_t *con) /* I - - !strncmp(host, "[::1]:", 6)); - } - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - /* - * Check if the hostname is something.local (Bonjour); if so, allow it. - */ -@@ -4998,7 +4998,7 @@ valid_host(cupsd_client_t *con) /* I - - (!_cups_strcasecmp(end, ".local") || !_cups_strncasecmp(end, ".local:", 7) || - !_cups_strcasecmp(end, ".local.") || !_cups_strncasecmp(end, ".local.:", 8))) - return (1); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - /* - * Check if the hostname is an IP address... -diff -up cups-1.5.2/scheduler/conf.c.avahi-5-services cups-1.5.2/scheduler/conf.c ---- cups-1.5.2/scheduler/conf.c.avahi-5-services 2012-03-14 15:04:17.636305526 +0000 -+++ cups-1.5.2/scheduler/conf.c 2012-03-14 15:08:25.706611803 +0000 -@@ -652,7 +652,7 @@ cupsdReadConfiguration(void) - Browsing = CUPS_DEFAULT_BROWSING; - DefaultShared = CUPS_DEFAULT_DEFAULT_SHARED; - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - cupsdSetString(&DNSSDRegType, "_ipp._tcp,_cups"); - #endif /* HAVE_DNSSD */ - -diff -up cups-1.5.2/scheduler/dirsvc.c.avahi-5-services cups-1.5.2/scheduler/dirsvc.c ---- cups-1.5.2/scheduler/dirsvc.c.avahi-5-services 2012-03-14 15:04:17.674305572 +0000 -+++ cups-1.5.2/scheduler/dirsvc.c 2012-03-14 15:08:25.709611806 +0000 -@@ -27,6 +27,7 @@ - * ldap_connect() - Start new LDAP connection - * ldap_reconnect() - Reconnect to LDAP Server - * ldap_disconnect() - Disconnect from LDAP Server -+ * cupsdStartAvahiClient() - Start an Avahi client if needed - * cupsdStartBrowsing() - Start sending and receiving broadcast - * information. - * cupsdStartPolling() - Start polling servers as needed. -@@ -40,11 +41,12 @@ - * dequote() - Remote quotes from a string. - * dnssdAddAlias() - Add a DNS-SD alias name. - * dnssdBuildTxtRecord() - Build a TXT record from printer info. -- * dnssdComparePrinters() - Compare the registered names of two printers. - * dnssdDeregisterPrinter() - Stop sending broadcast information for a - * printer. - * dnssdPackTxtRecord() - Pack an array of key/value pairs into the TXT - * record format. -+ * avahiPackTxtRecord() - Pack an array of key/value pairs into an -+ * AvahiStringList. - * dnssdRegisterCallback() - DNSServiceRegister callback. - * dnssdRegisterPrinter() - Start sending broadcast information for a - * printer or update the broadcast contents. -@@ -83,6 +85,7 @@ - */ - - #include "cupsd.h" -+#include <assert.h> - #include <grp.h> - - #ifdef HAVE_DNSSD -@@ -97,6 +100,17 @@ - # endif /* HAVE_SYSTEMCONFIGURATION */ - # endif /* __APPLE__ */ - #endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+# include <avahi-common/domain.h> -+#endif /* HAVE_AVAHI */ -+ -+ -+#ifdef HAVE_DNSSD -+typedef char *cupsd_txt_record_t; -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+typedef AvahiStringList *cupsd_txt_record_t; -+#endif /* HAVE_AVAHI */ - - - /* -@@ -159,27 +173,38 @@ static void update_polling(void); - static void update_smb(int onoff); - - -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) -+static cupsd_txt_record_t dnssdBuildTxtRecord(int *txt_len, cupsd_printer_t *p, -+ int for_lpd); -+static void dnssdDeregisterPrinter(cupsd_printer_t *p); -+static void dnssdRegisterPrinter(cupsd_printer_t *p); -+static void dnssdStop(void); -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ -+ - #ifdef HAVE_DNSSD - # ifdef HAVE_COREFOUNDATION - static void dnssdAddAlias(const void *key, const void *value, - void *context); - # endif /* HAVE_COREFOUNDATION */ --static char *dnssdBuildTxtRecord(int *txt_len, cupsd_printer_t *p, -- int for_lpd); --static int dnssdComparePrinters(cupsd_printer_t *a, cupsd_printer_t *b); --static void dnssdDeregisterPrinter(cupsd_printer_t *p); --static char *dnssdPackTxtRecord(int *txt_len, char *keyvalue[][2], -- int count); - static void dnssdRegisterCallback(DNSServiceRef sdRef, - DNSServiceFlags flags, - DNSServiceErrorType errorCode, - const char *name, const char *regtype, - const char *domain, void *context); --static void dnssdRegisterPrinter(cupsd_printer_t *p); --static void dnssdStop(void); - static void dnssdUpdate(void); - #endif /* HAVE_DNSSD */ - -+#ifdef HAVE_AVAHI -+static AvahiStringList *avahiPackTxtRecord(char *keyvalue[][2], -+ int count); -+static void avahi_entry_group_cb (AvahiEntryGroup *group, -+ AvahiEntryGroupState state, -+ void *userdata); -+static void avahi_client_cb (AvahiClient *client, -+ AvahiClientState state, -+ void *userdata); -+#endif /* HAVE_AVAHI */ -+ - #ifdef HAVE_LDAP - static const char * const ldap_attrs[] =/* CUPS LDAP attributes */ - { -@@ -283,10 +308,10 @@ cupsdDeregisterPrinter( - ldap_dereg_printer(p); - #endif /* HAVE_LDAP */ - --#ifdef HAVE_DNSSD -- if (removeit && (BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDRef) -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) -+ if (removeit && (BrowseLocalProtocols & BROWSE_DNSSD)) - dnssdDeregisterPrinter(p); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - } - - -@@ -702,10 +727,10 @@ cupsdRegisterPrinter(cupsd_printer_t *p) - slpRegisterPrinter(p); */ - #endif /* HAVE_LIBSLP */ - --#ifdef HAVE_DNSSD -- if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDRef) -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) -+ if ((BrowseLocalProtocols & BROWSE_DNSSD)) - dnssdRegisterPrinter(p); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - } - - -@@ -1419,6 +1444,36 @@ ldap_disconnect(LDAP *ld) /* I - LDAP h - #endif /* HAVE_LDAP */ - - -+#ifdef HAVE_AVAHI -+/* -+ * 'cupsdStartAvahiClient()' - Start an Avahi client if needed -+ */ -+ -+void -+cupsdStartAvahiClient(void) -+{ -+ int error = 0; -+ -+ if (!AvahiCupsClient && !AvahiCupsClientConnecting) -+ { -+ if (!AvahiCupsPollHandle) -+ AvahiCupsPollHandle = avahi_cups_poll_new (); -+ -+ if (AvahiCupsPollHandle) -+ { -+ if (avahi_client_new (avahi_cups_poll_get (AvahiCupsPollHandle), -+ AVAHI_CLIENT_NO_FAIL, -+ avahi_client_cb, NULL, -+ &error) != NULL) -+ AvahiCupsClientConnecting = 1; -+ else -+ cupsdLogMessage (CUPSD_LOG_WARN, "Avahi client failed: %d", error); -+ } -+ } -+} -+#endif /* HAVE_AVAHI */ -+ -+ - /* - * 'cupsdStartBrowsing()' - Start sending and receiving broadcast information. - */ -@@ -1542,13 +1597,16 @@ cupsdStartBrowsing(void) - else - BrowseSocket = -1; - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - if ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_DNSSD) - { -+#ifdef HAVE_DNSSD - DNSServiceErrorType error; /* Error from service creation */ -+#endif /* HAVE_DNSSD */ - cupsd_listener_t *lis; /* Current listening socket */ - - -+#ifdef HAVE_DNSSD - /* - * First create a "master" connection for all registrations... - */ -@@ -1573,6 +1631,7 @@ cupsdStartBrowsing(void) - fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); - - cupsdAddSelect(fd, (cupsd_selfunc_t)dnssdUpdate, NULL, NULL); -+#endif /* HAVE_DNSSD */ - - /* - * Then get the port we use for registrations. If we are not listening -@@ -1598,17 +1657,23 @@ cupsdStartBrowsing(void) - */ - - if (BrowseRemoteProtocols & BROWSE_DNSSD) -- DNSSDPrinters = cupsArrayNew((cups_array_func_t)dnssdComparePrinters, -- NULL); -+ DNSSDPrinters = cupsArrayNew(NULL, NULL); - - /* - * Set the computer name and register the web interface... - */ - - cupsdUpdateDNSSDName(); -+ -+#ifdef HAVE_AVAHI -+ cupsdStartAvahiClient (); -+#endif /* HAVE_AVAHI */ -+ -+#ifdef HAVE_DNSSD - } -- } - #endif /* HAVE_DNSSD */ -+ } -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - #ifdef HAVE_LIBSLP - if ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_SLP) -@@ -1834,10 +1899,10 @@ cupsdStopBrowsing(void) - BrowseSocket = -1; - } - --#ifdef HAVE_DNSSD -- if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDRef) -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) -+ if ((BrowseLocalProtocols & BROWSE_DNSSD)) - dnssdStop(); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - #ifdef HAVE_LIBSLP - if (((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_SLP) && -@@ -1902,7 +1967,7 @@ cupsdStopPolling(void) - } - - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - /* - * 'cupsdUpdateDNSSDName()' - Update the computer name we use for browsing... - */ -@@ -1910,8 +1975,14 @@ cupsdStopPolling(void) - void - cupsdUpdateDNSSDName(void) - { -+#ifdef HAVE_DNSSD - DNSServiceErrorType error; /* Error from service creation */ - char webif[1024]; /* Web interface share name */ -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ int ret; /* Error from service creation */ -+ char webif[AVAHI_LABEL_MAX]; /* Web interface share name */ -+#endif /* HAVE_AVAHI */ - # ifdef HAVE_SYSTEMCONFIGURATION - SCDynamicStoreRef sc; /* Context for dynamic store */ - CFDictionaryRef btmm; /* Back-to-My-Mac domains */ -@@ -2042,6 +2113,7 @@ cupsdUpdateDNSSDName(void) - else - strlcpy(webif, "CUPS Web Interface", sizeof(webif)); - -+#ifdef HAVE_DNSSD - if (WebIFRef) - DNSServiceRefDeallocate(WebIFRef); - -@@ -2054,9 +2126,45 @@ cupsdUpdateDNSSDName(void) - NULL)) != kDNSServiceErr_NoError) - cupsdLogMessage(CUPSD_LOG_ERROR, - "DNS-SD web interface registration failed: %d", error); -+#endif /* HAVE_DNSSD */ -+ -+#ifdef HAVE_AVAHI -+ if (!AvahiCupsClient) -+ /* -+ * Client not yet running. -+ */ -+ return; -+ -+ if (AvahiWebIFGroup) -+ avahi_entry_group_reset (AvahiWebIFGroup); -+ else -+ AvahiWebIFGroup = avahi_entry_group_new (AvahiCupsClient, -+ avahi_entry_group_cb, -+ NULL); -+ -+ if (AvahiWebIFGroup) -+ { -+ ret = avahi_entry_group_add_service (AvahiWebIFGroup, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, /* flags */ -+ webif, /* name */ -+ "_http._tcp", /* type */ -+ NULL, /* domain */ -+ NULL, /* host */ -+ DNSSDPort, /* port */ -+ "path=/", NULL); -+ if (ret == 0) -+ ret = avahi_entry_group_commit (AvahiWebIFGroup); -+ -+ if (ret != 0) -+ cupsdLogMessage (CUPSD_LOG_ERROR, -+ "Avahi web interface registration failed: %d", ret); -+ } -+#endif /* HAVE_AVAHI */ - } - } --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - - #ifdef HAVE_LDAP -@@ -2334,13 +2442,15 @@ dnssdAddAlias(const void *key, /* I - K - "Bad Back to My Mac domain in dynamic store!"); - } - # endif /* HAVE_COREFOUNDATION */ -+#endif /* HAVE_DNSSD */ - - -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - /* - * 'dnssdBuildTxtRecord()' - Build a TXT record from printer info. - */ - --static char * /* O - TXT record */ -+static cupsd_txt_record_t /* O - TXT record */ - dnssdBuildTxtRecord( - int *txt_len, /* O - TXT record length */ - cupsd_printer_t *p, /* I - Printer information */ -@@ -2379,7 +2489,12 @@ dnssdBuildTxtRecord( - keyvalue[i ][0] = "ty"; - keyvalue[i++][1] = p->make_model ? p->make_model : "Unknown"; - -- snprintf(admin_hostname, sizeof(admin_hostname), "%s.local.", DNSSDHostName); -+ snprintf(admin_hostname, sizeof(admin_hostname), -+ "%s.local" -+#ifdef HAVE_DNSSD -+ "." /* terminating dot no good for Avahi */ -+#endif /* HAVE_DNSSD */ -+ , DNSSDHostName); - httpAssembleURIf(HTTP_URI_CODING_ALL, adminurl_str, sizeof(adminurl_str), - "http", NULL, admin_hostname, DNSSDPort, "/%s/%s", - (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", -@@ -2462,19 +2577,12 @@ dnssdBuildTxtRecord( - * Then pack them into a proper txt record... - */ - -+#ifdef HAVE_DNSSD - return (dnssdPackTxtRecord(txt_len, keyvalue, i)); --} -- -- --/* -- * 'dnssdComparePrinters()' - Compare the registered names of two printers. -- */ -- --static int /* O - Result of comparison */ --dnssdComparePrinters(cupsd_printer_t *a,/* I - First printer */ -- cupsd_printer_t *b)/* I - Second printer */ --{ -- return (_cups_strcasecmp(a->reg_name, b->reg_name)); -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ return (avahiPackTxtRecord(keyvalue, i)); -+#endif /* HAVE_AVAHI */ - } - - -@@ -2489,6 +2597,10 @@ dnssdDeregisterPrinter( - { - cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdDeregisterPrinter(%s)", p->name); - -+#ifdef HAVE_DNSSD -+ if (!DNSSDRef) -+ return; -+ - /* - * Closing the socket deregisters the service - */ -@@ -2524,6 +2636,24 @@ dnssdDeregisterPrinter( - free(p->printer_txt); - p->printer_txt = NULL; - } -+#endif /* HAVE_DNSSD */ -+ -+#ifdef HAVE_AVAHI -+ if (p->avahi_group) -+ { -+ avahi_entry_group_reset (p->avahi_group); -+ avahi_entry_group_free (p->avahi_group); -+ p->avahi_group = NULL; -+ -+ if (p->ipp_txt) -+ avahi_string_list_free (p->ipp_txt); -+ -+ if (p->printer_txt) -+ avahi_string_list_free (p->printer_txt); -+ -+ p->ipp_txt = p->printer_txt = NULL; -+ } -+#endif /* HAVE_AVAHI */ - - /* - * Remove the printer from the array of DNS-SD printers, then clear the -@@ -2533,8 +2663,10 @@ dnssdDeregisterPrinter( - cupsArrayRemove(DNSSDPrinters, p); - cupsdClearString(&p->reg_name); - } -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - -+#ifdef HAVE_DNSSD - /* - * 'dnssdPackTxtRecord()' - Pack an array of key/value pairs into the - * TXT record format. -@@ -2644,8 +2776,10 @@ dnssdRegisterCallback( - LastEvent |= CUPSD_EVENT_PRINTER_MODIFIED; - } - } -+#endif /* HAVE_DNSSD */ - - -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - /* - * 'dnssdRegisterPrinter()' - Start sending broadcast information for a printer - * or update the broadcast contents. -@@ -2654,20 +2788,40 @@ dnssdRegisterCallback( - static void - dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */ - { -+#ifdef HAVE_DNSSD - DNSServiceErrorType se; /* dnssd errors */ - char *ipp_txt, /* IPP TXT record buffer */ - *printer_txt, /* LPD TXT record buffer */ -- name[1024], /* Service name */ -- *nameptr; /* Pointer into name */ -+ name[1024]; /* Service name */ - int ipp_len, /* IPP TXT record length */ - printer_len, /* LPD TXT record length */ - printer_port; /* LPD port number */ -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ int ret; /* Error code */ -+ AvahiStringList *ipp_txt, /* IPP TXT record */ -+ *printer_txt; /* LPD TXT record */ -+ char name[AVAHI_LABEL_MAX], /* Service name */ -+ fullsubtype[AVAHI_LABEL_MAX]; /* Full subtype */ -+ char *regtype_copy, /* Writeable copy of reg type */ -+ *subtype, /* Current service sub type */ -+ *nextsubtype; /* Next service sub type */ -+#endif /* HAVE_AVAHI */ -+ char *nameptr; /* Pointer into name */ - const char *regtype; /* Registration type */ - - -+#ifdef HAVE_DNSSD -+ if (!DNSSDRef) -+ return; -+ - cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdRegisterPrinter(%s) %s", p->name, - !p->ipp_ref ? "new" : "update"); -- -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdRegisterPrinter(%s) %s", p->name, -+ !p->avahi_group ? "new" : "update"); -+#endif /* HAVE_AVAHI */ - /* - * If per-printer sharing was just disabled make sure we're not - * registered before returning. -@@ -2686,12 +2840,36 @@ dnssdRegisterPrinter(cupsd_printer_t *p) - if (p->info && strlen(p->info) > 0) - { - if (DNSSDComputerName) -- snprintf(name, sizeof(name), "%s @ %s", p->info, DNSSDComputerName); -+ { -+ /* -+ * Make sure there is room for at least 15 characters of -+ * DNSSDComputerName. -+ */ -+ -+ assert(sizeof(name) >= 15 + 4); -+ nameptr = name + strlcpy(name, p->info, -+ sizeof(name) - 4 - -+ strnlen(DNSSDComputerName, 15)); -+ nameptr += strlcpy(nameptr, " @ ", sizeof(name) - (nameptr - name)); -+ strlcpy(nameptr, DNSSDComputerName, sizeof(name) - (nameptr - name)); -+ } - else - strlcpy(name, p->info, sizeof(name)); - } - else if (DNSSDComputerName) -- snprintf(name, sizeof(name), "%s @ %s", p->name, DNSSDComputerName); -+ { -+ /* -+ * Make sure there is room for at least 15 characters of -+ * DNSSDComputerName. -+ */ -+ -+ assert(sizeof(name) >= 15 + 4); -+ nameptr = name + strlcpy(name, p->info, -+ sizeof(name) - 4 - -+ strnlen(DNSSDComputerName, 15)); -+ nameptr += strlcpy(nameptr, " @ ", sizeof(name) - (nameptr - name)); -+ strlcpy(nameptr, DNSSDComputerName, sizeof(name) - (nameptr - name)); -+ } - else - strlcpy(name, p->name, sizeof(name)); - -@@ -2712,6 +2890,7 @@ dnssdRegisterPrinter(cupsd_printer_t *p) - * Register IPP and (optionally) LPD... - */ - -+#ifdef HAVE_DNSSD - ipp_len = 0; /* anti-compiler-warning-code */ - ipp_txt = dnssdBuildTxtRecord(&ipp_len, p, 0); - -@@ -2884,6 +3063,209 @@ dnssdRegisterPrinter(cupsd_printer_t *p) - - if (printer_txt) - free(printer_txt); -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ if (!AvahiCupsClient) -+ /* -+ * Client not running yet. The client callback will call us again later. -+ */ -+ return; -+ -+ ipp_txt = dnssdBuildTxtRecord(NULL, p, 0); -+ printer_txt = dnssdBuildTxtRecord(NULL, p, 1); -+ regtype = (p->type & CUPS_PRINTER_FAX) ? "_fax-ipp._tcp" : DNSSDRegType; -+ -+ if (p->avahi_group && p->ipp_txt && ipp_txt && -+ !avahi_string_list_equal (p->ipp_txt, ipp_txt)) -+ { -+ /* -+ * Update the existing registration... -+ */ -+ -+ avahi_string_list_free (p->ipp_txt); -+ -+ if (p->printer_txt) -+ avahi_string_list_free (p->printer_txt); -+ -+ /* -+ * Update the service group entry. -+ */ -+ -+ regtype_copy = strdup (regtype); -+ subtype = strchr (regtype_copy, ','); -+ if (subtype) -+ *subtype = '\0'; -+ -+ cupsdLogMessage (CUPSD_LOG_DEBUG, -+ "Updating TXT record for %s (%s)", name, regtype_copy); -+ ret = avahi_entry_group_update_service_txt_strlst (p->avahi_group, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, name, -+ regtype_copy, -+ NULL, ipp_txt); -+ free (regtype_copy); -+ -+ if (ret < 0) -+ goto update_failed; -+ -+ p->ipp_txt = ipp_txt; -+ ipp_txt = NULL; -+ -+ if (BrowseLocalProtocols & BROWSE_LPD) -+ { -+ ret = avahi_entry_group_update_service_txt_strlst (p->avahi_group, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, name, -+ "_printer._tcp", NULL, -+ printer_txt); -+ if (ret < 0) -+ goto update_failed; -+ -+ p->printer_txt = printer_txt; -+ printer_txt = NULL; -+ } -+ -+ ret = avahi_entry_group_commit (p->avahi_group); -+ if (ret < 0) -+ { -+ update_failed: -+ cupsdLogMessage (CUPSD_LOG_ERROR, -+ "Failed to update TXT record for %s: %d", -+ name, ret); -+ avahi_entry_group_reset (p->avahi_group); -+ avahi_entry_group_free (p->avahi_group); -+ p->avahi_group = NULL; -+ ipp_txt = p->ipp_txt; -+ p->ipp_txt = NULL; -+ } -+ } -+ -+ if (!p->avahi_group) -+ { -+ /* -+ * Initial registration. Use the _fax subtype for fax queues... -+ */ -+ -+ p->avahi_group = avahi_entry_group_new (AvahiCupsClient, -+ avahi_entry_group_cb, -+ p); -+ -+ cupsdLogMessage(CUPSD_LOG_DEBUG, -+ "Registering Avahi printer %s with name \"%s\" and " -+ "type \"%s\"", p->name, name, regtype); -+ -+ if (!p->avahi_group) -+ { -+ ret = 0; -+ goto add_failed; -+ } -+ -+ /* -+ * Add each service type (DNSSDRegType may contain several, -+ * separated by commas). -+ */ -+ -+ subtype = regtype_copy = strdup (regtype); -+ while (subtype && *subtype) -+ { -+ nextsubtype = strchr (subtype, ','); -+ if (nextsubtype) -+ *nextsubtype++ = '\0'; -+ -+ if (subtype == regtype_copy) -+ { -+ /* -+ * Main type entry. -+ */ -+ -+ cupsdLogMessage (CUPSD_LOG_DEBUG, -+ "Adding TXT record for %s (%s)", name, regtype_copy); -+ ret = avahi_entry_group_add_service_strlst (p->avahi_group, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, name, regtype_copy, -+ NULL, NULL, -+ DNSSDPort, -+ ipp_txt); -+ } -+ else -+ { -+ /* -+ * Sub-type entry. -+ */ -+ -+ snprintf (fullsubtype, sizeof(fullsubtype), -+ "%s._sub.%s", subtype, regtype_copy); -+ cupsdLogMessage (CUPSD_LOG_DEBUG, -+ "Adding TXT record for %s (%s)", name, fullsubtype); -+ ret = avahi_entry_group_add_service_subtype (p->avahi_group, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, name, -+ regtype_copy, -+ NULL, fullsubtype); -+ } -+ -+ if (ret < 0) -+ { -+ free (regtype_copy); -+ goto add_failed; -+ } -+ -+ subtype = nextsubtype; -+ } -+ -+ free (regtype_copy); -+ p->ipp_txt = ipp_txt; -+ ipp_txt = NULL; -+ -+ if (BrowseLocalProtocols & BROWSE_LPD) -+ { -+ cupsdLogMessage(CUPSD_LOG_DEBUG, -+ "Registering Avahi printer %s with name \"%s\" and " -+ "type \"_printer._tcp\"", p->name, name); -+ -+ ret = avahi_entry_group_add_service_strlst (p->avahi_group, -+ AVAHI_IF_UNSPEC, -+ AVAHI_PROTO_UNSPEC, -+ 0, name, -+ "_printer._tcp", NULL, NULL, -+ 515, -+ printer_txt); -+ if (ret < 0) -+ goto add_failed; -+ -+ p->printer_txt = printer_txt; -+ printer_txt = NULL; -+ } -+ -+ ret = avahi_entry_group_commit (p->avahi_group); -+ -+ if (ret < 0) -+ { -+ add_failed: -+ cupsdLogMessage (CUPSD_LOG_ERROR, -+ "Failed to add Avahi entry for %s: %d", -+ name, ret); -+ if (p->avahi_group) -+ { -+ avahi_entry_group_reset (p->avahi_group); -+ avahi_entry_group_free (p->avahi_group); -+ p->avahi_group = NULL; -+ } -+ ipp_txt = p->ipp_txt; -+ p->ipp_txt = NULL; -+ } -+ } -+ -+ if (ipp_txt) -+ avahi_string_list_free (ipp_txt); -+ -+ if (printer_txt) -+ avahi_string_list_free (printer_txt); -+#endif /* HAVE_AVAHI */ - } - - -@@ -2896,6 +3278,10 @@ dnssdStop(void) - { - cupsd_printer_t *p; /* Current printer */ - -+#ifdef HAVE_DNSSD -+ if (!DNSSDRef) -+ return; -+#endif /* HAVE_DNSSD */ - - /* - * De-register the individual printers -@@ -2910,12 +3296,23 @@ dnssdStop(void) - * Shutdown the rest of the service refs... - */ - -+#ifdef HAVE_DNSSD - if (WebIFRef) - { - DNSServiceRefDeallocate(WebIFRef); - WebIFRef = NULL; - } -+#endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ if (AvahiWebIFGroup) -+ { -+ avahi_entry_group_reset (AvahiWebIFGroup); -+ avahi_entry_group_free (AvahiWebIFGroup); -+ AvahiWebIFGroup = NULL; -+ } -+#endif /* HAVE_AVAHI */ - -+#ifdef HAVE_DNSSD - if (RemoteRef) - { - DNSServiceRefDeallocate(RemoteRef); -@@ -2926,14 +3323,17 @@ dnssdStop(void) - - DNSServiceRefDeallocate(DNSSDRef); - DNSSDRef = NULL; -+#endif /* HAVE_DNSSD */ - - cupsArrayDelete(DNSSDPrinters); - DNSSDPrinters = NULL; - - DNSSDPort = 0; - } -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - -+#ifdef HAVE_DNSSD - /* - * 'dnssdUpdate()' - Handle DNS-SD queries. - */ -@@ -2955,6 +3355,153 @@ dnssdUpdate(void) - #endif /* HAVE_DNSSD */ - - -+#ifdef HAVE_AVAHI -+/* -+ * 'avahiPackTxtRecord()' - Pack an array of key/value pairs into an -+ * AvahiStringList. -+ */ -+ -+static AvahiStringList * /* O - new string list */ -+avahiPackTxtRecord(char *keyvalue[][2], /* I - Table of key value pairs */ -+ int count) /* I - Number of items in table */ -+{ -+ AvahiStringList *strlst = NULL; -+ char **elements; -+ size_t len; -+ int i = 0; -+ -+ elements = malloc ((1 + count) * sizeof (char *)); -+ if (!elements) -+ goto cleanup; -+ -+ for (i = 0; i < count; i++) -+ { -+ len = (1 + strlen (keyvalue[i][0]) + -+ (keyvalue[i][1] ? 1 + strlen (keyvalue[i][1]) : 1)); -+ elements[i] = malloc (len * sizeof (char)); -+ if (!elements[i]) -+ goto cleanup; -+ -+ snprintf (elements[i], len, "%s=%s", keyvalue[i][0], keyvalue[i][1]); -+ } -+ -+ strlst = avahi_string_list_new_from_array ((const char **) elements, count); -+ -+cleanup: -+ while (--i >= 0) -+ free (elements[i]); -+ -+ free (elements); -+ return (strlst); -+} -+ -+ -+/* -+ * 'avahi_entry_group_cb()' - Avahi entry group callback function. -+ */ -+static void -+avahi_entry_group_cb (AvahiEntryGroup *group, -+ AvahiEntryGroupState state, -+ void *userdata) -+{ -+ char *name; -+ -+ if (userdata) -+ name = ((cupsd_printer_t *) userdata)->reg_name; -+ else -+ name = "CUPS web interface"; -+ -+ switch (state) -+ { -+ case AVAHI_ENTRY_GROUP_UNCOMMITED: -+ case AVAHI_ENTRY_GROUP_REGISTERING: -+ break; -+ -+ case AVAHI_ENTRY_GROUP_ESTABLISHED: -+ cupsdLogMessage (CUPSD_LOG_DEBUG, -+ "Avahi entry group established for %s", name); -+ break; -+ -+ default: -+ cupsdLogMessage (CUPSD_LOG_DEBUG, -+ "Avahi entry group %s has state %d", -+ name, state); -+ break; -+ } -+} -+ -+ -+/* -+ * 'avahi_client_cb()' - Avahi client callback function. -+ */ -+static void -+avahi_client_cb (AvahiClient *client, -+ AvahiClientState state, -+ void *userdata) -+{ -+ cupsd_printer_t *printer; -+ switch (state) -+ { -+ case AVAHI_CLIENT_S_RUNNING: -+ /* -+ * Avahi client started successfully. -+ */ -+ AvahiCupsClient = client; -+ AvahiCupsClientConnecting = 0; -+ cupsdLogMessage (CUPSD_LOG_DEBUG, "Avahi client started"); -+ -+ cupsdUpdateDNSSDName (); -+ -+ for (printer = (cupsd_printer_t *)cupsArrayFirst(Printers); -+ printer; -+ printer = (cupsd_printer_t *)cupsArrayNext(Printers)) -+ if (Browsing && (BrowseLocalProtocols & BROWSE_DNSSD) && -+ (!(printer->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT | -+ CUPS_PRINTER_SCANNER))) && printer->shared) -+ dnssdRegisterPrinter (printer); -+ -+ break; -+ -+ case AVAHI_CLIENT_CONNECTING: -+ /* -+ * No Avahi daemon, client is waiting. -+ */ -+ cupsdLogMessage (CUPSD_LOG_DEBUG, "Avahi client connecting"); -+ break; -+ -+ case AVAHI_CLIENT_S_REGISTERING: -+ /* -+ * Not yet registered. -+ */ -+ cupsdLogMessage (CUPSD_LOG_DEBUG, "Avahi client registering"); -+ break; -+ -+ case AVAHI_CLIENT_FAILURE: -+ /* -+ * Avahi client failed, close it to allow a clean restart. -+ */ -+ cupsdLogMessage (CUPSD_LOG_ERROR, -+ "Avahi client failed, " -+ "closing client to allow a clean restart"); -+ -+ for (printer = (cupsd_printer_t *)cupsArrayFirst(Printers); -+ printer; -+ printer = (cupsd_printer_t *)cupsArrayNext(Printers)) -+ dnssdDeregisterPrinter (printer); -+ -+ avahi_client_free(client); -+ AvahiCupsClientConnecting = 0; -+ AvahiCupsClient = NULL; -+ -+ break; -+ -+ default: -+ cupsdLogMessage (CUPSD_LOG_DEBUG, "Avahi client state: %d", state); -+ } -+} -+#endif /* HAVE_AVAHI */ -+ -+ - /* - * 'get_auth_info_required()' - Get the auth-info-required value to advertise. - */ -diff -up cups-1.5.2/scheduler/dirsvc.h.avahi-5-services cups-1.5.2/scheduler/dirsvc.h ---- cups-1.5.2/scheduler/dirsvc.h.avahi-5-services 2011-03-21 02:12:14.000000000 +0000 -+++ cups-1.5.2/scheduler/dirsvc.h 2012-03-14 15:08:25.711611808 +0000 -@@ -31,6 +31,10 @@ - # endif /* HAVE_LDAP_SSL_H */ - #endif /* HAVE_LDAP */ - -+#ifdef HAVE_AVAHI -+# include <avahi-client/publish.h> -+#endif /* HAVE_AVAHI */ -+ - /* - * Browse protocols... - */ -@@ -131,19 +135,22 @@ VAR int PollPipe VALUE(0); - VAR cupsd_statbuf_t *PollStatusBuffer VALUE(NULL); - /* Status buffer for pollers */ - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - VAR char *DNSSDComputerName VALUE(NULL), - /* Computer/server name */ - *DNSSDHostName VALUE(NULL), - /* Hostname */ - *DNSSDRegType VALUE(NULL); - /* Bonjour registration type */ --VAR cups_array_t *DNSSDAlias VALUE(NULL); -- /* List of dynamic ServerAlias's */ - VAR int DNSSDPort VALUE(0); - /* Port number to register */ - VAR cups_array_t *DNSSDPrinters VALUE(NULL); - /* Printers we have registered */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ -+ -+#ifdef HAVE_DNSSD -+VAR cups_array_t *DNSSDAlias VALUE(NULL); -+ /* List of dynamic ServerAlias's */ - VAR DNSServiceRef DNSSDRef VALUE(NULL), - /* Master DNS-SD service reference */ - WebIFRef VALUE(NULL), -@@ -152,6 +159,17 @@ VAR DNSServiceRef DNSSDRef VALUE(NULL), - /* Remote printer browse reference */ - #endif /* HAVE_DNSSD */ - -+#ifdef HAVE_AVAHI -+VAR AvahiCupsPoll *AvahiCupsPollHandle VALUE(NULL); -+ /* AvahiCupsPoll object */ -+VAR AvahiClient *AvahiCupsClient VALUE(NULL); -+ /* AvahiClient object */ -+VAR int AvahiCupsClientConnecting VALUE(0); -+ /* Is AvahiClient object connecting? */ -+VAR AvahiEntryGroup *AvahiWebIFGroup VALUE(NULL); -+ /* Web interface entry group */ -+#endif /* HAVE_AVAHI */ -+ - #ifdef HAVE_LIBSLP - VAR SLPHandle BrowseSLPHandle VALUE(NULL); - /* SLP API handle */ -@@ -195,13 +213,14 @@ extern void cupsdRegisterPrinter(cupsd_p - extern void cupsdRestartPolling(void); - extern void cupsdSaveRemoteCache(void); - extern void cupsdSendBrowseList(void); -+extern void cupsdStartAvahiClient(void); - extern void cupsdStartBrowsing(void); - extern void cupsdStartPolling(void); - extern void cupsdStopBrowsing(void); - extern void cupsdStopPolling(void); --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - extern void cupsdUpdateDNSSDName(void); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - #ifdef HAVE_LDAP - extern void cupsdUpdateLDAPBrowse(void); - #endif /* HAVE_LDAP */ -diff -up cups-1.5.2/scheduler/ipp.c.avahi-5-services cups-1.5.2/scheduler/ipp.c ---- cups-1.5.2/scheduler/ipp.c.avahi-5-services 2012-03-14 15:04:17.665305560 +0000 -+++ cups-1.5.2/scheduler/ipp.c 2012-03-14 15:08:25.715611813 +0000 -@@ -6099,7 +6099,7 @@ copy_printer_attrs( - ippAddDate(con->response, IPP_TAG_PRINTER, "printer-current-time", - ippTimeToDate(curtime)); - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - if (!ra || cupsArrayFind(ra, "printer-dns-sd-name")) - { - if (printer->reg_name) -@@ -6109,7 +6109,7 @@ copy_printer_attrs( - ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_NOVALUE, - "printer-dns-sd-name", 0); - } --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - if (!ra || cupsArrayFind(ra, "printer-error-policy")) - ippAddString(con->response, IPP_TAG_PRINTER, IPP_TAG_NAME, -diff -up cups-1.5.2/scheduler/main.c.avahi-5-services cups-1.5.2/scheduler/main.c ---- cups-1.5.2/scheduler/main.c.avahi-5-services 2012-03-14 15:06:36.511476986 +0000 -+++ cups-1.5.2/scheduler/main.c 2012-03-14 15:08:25.718611817 +0000 -@@ -120,6 +120,10 @@ main(int argc, /* I - Number of comm - cupsd_listener_t *lis; /* Current listener */ - time_t current_time, /* Current time */ - activity, /* Client activity timer */ -+#ifdef HAVE_AVAHI -+ avahi_client_time, /* Time for next Avahi client -+ check */ -+#endif /* HAVE_AVAHI */ - browse_time, /* Next browse send time */ - senddoc_time, /* Send-Document time */ - expire_time, /* Subscription expire time */ -@@ -672,6 +676,9 @@ main(int argc, /* I - Number of comm - */ - - current_time = time(NULL); -+#ifdef HAVE_AVAHI -+ avahi_client_time = current_time; -+#endif /* HAVE_AVAHI */ - browse_time = current_time; - event_time = current_time; - expire_time = current_time; -@@ -894,6 +901,16 @@ main(int argc, /* I - Number of comm - tmo = cupsdNextTimeout (&tmo_delay); - if (tmo && tmo_delay == 0) - cupsdRunTimeout (tmo); -+ -+ /* -+ * Try to restart the Avahi client every 10 seconds if needed... -+ */ -+ -+ if ((current_time - avahi_client_time) >= 10) -+ { -+ avahi_client_time = current_time; -+ cupsdStartAvahiClient(); -+ } - #endif /* HAVE_AVAHI */ - - #ifndef __APPLE__ -diff -up cups-1.5.2/scheduler/printers.c.avahi-5-services cups-1.5.2/scheduler/printers.c ---- cups-1.5.2/scheduler/printers.c.avahi-5-services 2012-03-14 15:04:17.646305537 +0000 -+++ cups-1.5.2/scheduler/printers.c 2012-03-14 15:08:25.720611819 +0000 -@@ -883,9 +883,9 @@ cupsdDeletePrinter( - cupsdClearString(&p->alert); - cupsdClearString(&p->alert_description); - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - cupsdClearString(&p->pdl); --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - - cupsArrayDelete(p->filetypes); - -@@ -3787,7 +3787,7 @@ add_printer_formats(cupsd_printer_t *p) - attr->values[i].string.text = _cupsStrAlloc(mimetype); - } - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - { - char pdl[1024]; /* Buffer to build pdl list */ - mime_filter_t *filter; /* MIME filter looping var */ -@@ -3843,7 +3843,7 @@ add_printer_formats(cupsd_printer_t *p) - - cupsdSetString(&p->pdl, pdl); - } --#endif /* HAVE_DNSSD */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ - } - - -diff -up cups-1.5.2/scheduler/printers.h.avahi-5-services cups-1.5.2/scheduler/printers.h ---- cups-1.5.2/scheduler/printers.h.avahi-5-services 2011-03-18 18:42:46.000000000 +0000 -+++ cups-1.5.2/scheduler/printers.h 2012-03-14 15:08:25.721611820 +0000 -@@ -16,6 +16,9 @@ - #ifdef HAVE_DNSSD - # include <dns_sd.h> - #endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+# include "avahi.h" -+#endif /* HAVE_AVAHI */ - #include <cups/pwg-private.h> - - -@@ -95,16 +98,23 @@ struct cupsd_printer_s - time_t marker_time; /* Last time marker attributes were updated */ - _ppd_cache_t *pc; /* PPD cache and mapping data */ - --#ifdef HAVE_DNSSD -+#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) - char *reg_name, /* Name used for service registration */ -- *pdl, /* pdl value for TXT record */ -- *ipp_txt, /* IPP TXT record contents */ -+ *pdl; /* pdl value for TXT record */ -+#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ -+#ifdef HAVE_DNSSD -+ char *ipp_txt, /* IPP TXT record contents */ - *printer_txt; /* LPD TXT record contents */ - int ipp_len, /* IPP TXT record length */ - printer_len; /* LPD TXT record length */ - DNSServiceRef ipp_ref, /* Reference for _ipp._tcp,_cups */ - printer_ref; /* Reference for _printer._tcp */ - #endif /* HAVE_DNSSD */ -+#ifdef HAVE_AVAHI -+ AvahiStringList *ipp_txt, /* IPP TXT record */ -+ *printer_txt; /* LPD TXT record */ -+ AvahiEntryGroup *avahi_group; /* Avahi entry group */ -+#endif /* HAVE_AVAHI */ - }; - - diff --git a/~mtjm/cups-usblp/cups-no-export-ssllibs.patch b/~mtjm/cups-usblp/cups-no-export-ssllibs.patch deleted file mode 100755 index 9be3c819b..000000000 --- a/~mtjm/cups-usblp/cups-no-export-ssllibs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cups-1.5b1/config-scripts/cups-ssl.m4.no-export-ssllibs cups-1.5b1/config-scripts/cups-ssl.m4 ---- cups-1.5b1/config-scripts/cups-ssl.m4.no-export-ssllibs 2011-05-11 02:52:08.000000000 +0200 -+++ cups-1.5b1/config-scripts/cups-ssl.m4 2011-05-23 17:47:27.000000000 +0200 -@@ -164,7 +164,7 @@ AC_SUBST(IPPALIASES) - AC_SUBST(SSLFLAGS) - AC_SUBST(SSLLIBS) - --EXPORT_SSLLIBS="$SSLLIBS" -+EXPORT_SSLLIBS="" - AC_SUBST(EXPORT_SSLLIBS) - - diff --git a/~mtjm/cups-usblp/cups-no-gcrypt.patch b/~mtjm/cups-usblp/cups-no-gcrypt.patch deleted file mode 100755 index 42f71d0d4..000000000 --- a/~mtjm/cups-usblp/cups-no-gcrypt.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -ruN cups-1.4.7.orig//config-scripts/cups-ssl.m4 cups-1.4.7/config-scripts/cups-ssl.m4 ---- cups-1.5.0.orig//config-scripts/cups-ssl.m4 2011-01-11 08:05:58.000000000 +0100 -+++ cups-1.5.0/config-scripts/cups-ssl.m4 2011-08-02 10:44:26.011047900 +0200 -@@ -96,7 +96,6 @@ - dnl Then look for GNU TLS... - if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then - AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config) -- AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config) - if $PKGCONFIG --exists gnutls; then - have_ssl=1 - SSLLIBS=`$PKGCONFIG --libs gnutls` -@@ -110,16 +109,6 @@ - AC_DEFINE(HAVE_SSL) - AC_DEFINE(HAVE_GNUTLS) - fi -- -- if test $have_ssl = 1; then -- if $PKGCONFIG --exists gcrypt; then -- SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`" -- SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`" -- elif test "x$LIBGCRYPTCONFIG" != x; then -- SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`" -- SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`" -- fi -- fi - fi - - dnl Check for the OpenSSL library last... ---- cups-1.5.0.orig//cups/http-private.h 2011-01-22 01:07:22.000000000 +0100 -+++ cups-1.5.0/cups/http-private.h 2011-08-02 10:42:43.341604107 +0200 -@@ -93,7 +93,6 @@ - # elif defined HAVE_GNUTLS - # include <gnutls/gnutls.h> - # include <gnutls/x509.h> --# include <gcrypt.h> - # elif defined(HAVE_CDSASSL) - # include <CoreFoundation/CoreFoundation.h> - # include <Security/Security.h> diff --git a/~mtjm/cups-usblp/cups-no-gzip-man.patch b/~mtjm/cups-usblp/cups-no-gzip-man.patch deleted file mode 100755 index 6786c4430..000000000 --- a/~mtjm/cups-usblp/cups-no-gzip-man.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up cups-1.5b1/config-scripts/cups-manpages.m4.no-gzip-man cups-1.5b1/config-scripts/cups-manpages.m4 ---- cups-1.5b1/config-scripts/cups-manpages.m4.no-gzip-man 2011-05-12 07:21:56.000000000 +0200 -+++ cups-1.5b1/config-scripts/cups-manpages.m4 2011-05-23 17:25:50.000000000 +0200 -@@ -69,10 +69,10 @@ case "$uname" in - ;; - Linux* | GNU* | Darwin*) - # Linux, GNU Hurd, and Mac OS X -- MAN1EXT=1.gz -- MAN5EXT=5.gz -- MAN7EXT=7.gz -- MAN8EXT=8.gz -+ MAN1EXT=1 -+ MAN5EXT=5 -+ MAN7EXT=7 -+ MAN8EXT=8 - MAN8DIR=8 - ;; - *) diff --git a/~mtjm/cups-usblp/cups-systemd-socket.patch b/~mtjm/cups-usblp/cups-systemd-socket.patch deleted file mode 100755 index 09d17d415..000000000 --- a/~mtjm/cups-usblp/cups-systemd-socket.patch +++ /dev/null @@ -1,527 +0,0 @@ -diff -up cups-1.5.2/config.h.in.systemd-socket cups-1.5.2/config.h.in ---- cups-1.5.2/config.h.in.systemd-socket 2012-03-16 14:50:57.089449755 +0000 -+++ cups-1.5.2/config.h.in 2012-03-16 14:50:57.146449787 +0000 -@@ -503,6 +503,13 @@ - - - /* -+ * Do we have systemd support? -+ */ -+ -+#undef HAVE_SYSTEMD -+ -+ -+/* - * Various scripting languages... - */ - -diff -up cups-1.5.2/config-scripts/cups-systemd.m4.systemd-socket cups-1.5.2/config-scripts/cups-systemd.m4 ---- cups-1.5.2/config-scripts/cups-systemd.m4.systemd-socket 2012-03-16 14:50:57.146449787 +0000 -+++ cups-1.5.2/config-scripts/cups-systemd.m4 2012-03-16 14:50:57.146449787 +0000 -@@ -0,0 +1,36 @@ -+dnl -+dnl "$Id$" -+dnl -+dnl systemd stuff for CUPS. -+ -+dnl Find whether systemd is available -+ -+SDLIBS="" -+AC_ARG_WITH([systemdsystemunitdir], -+ AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), -+ [], [with_systemdsystemunitdir=$($PKGCONFIG --variable=systemdsystemunitdir systemd)]) -+if test "x$with_systemdsystemunitdir" != xno; then -+ AC_MSG_CHECKING(for libsystemd-daemon) -+ if $PKGCONFIG --exists libsystemd-daemon; then -+ AC_MSG_RESULT(yes) -+ SDCFLAGS=`$PKGCONFIG --cflags libsystemd-daemon` -+ SDLIBS=`$PKGCONFIG --libs libsystemd-daemon` -+ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) -+ AC_DEFINE(HAVE_SYSTEMD) -+ else -+ AC_MSG_RESULT(no) -+ fi -+fi -+ -+if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ; then -+ SYSTEMD_UNITS="cups.service cups.socket cups.path" -+else -+ SYSTEMD_UNITS="" -+fi -+ -+AC_SUBST(SYSTEMD_UNITS) -+AC_SUBST(SDLIBS) -+ -+dnl -+dnl "$Id$" -+dnl -diff -up cups-1.5.2/configure.in.systemd-socket cups-1.5.2/configure.in ---- cups-1.5.2/configure.in.systemd-socket 2011-08-31 02:36:33.000000000 +0100 -+++ cups-1.5.2/configure.in 2012-03-16 14:50:57.146449787 +0000 -@@ -37,6 +37,7 @@ sinclude(config-scripts/cups-pam.m4) - sinclude(config-scripts/cups-largefile.m4) - sinclude(config-scripts/cups-dnssd.m4) - sinclude(config-scripts/cups-launchd.m4) -+sinclude(config-scripts/cups-systemd.m4) - sinclude(config-scripts/cups-defaults.m4) - sinclude(config-scripts/cups-pdf.m4) - sinclude(config-scripts/cups-scripting.m4) -@@ -71,6 +72,9 @@ AC_OUTPUT(Makedefs - conf/snmp.conf - cups-config - data/testprint -+ data/cups.service -+ data/cups.socket -+ data/cups.path - desktop/cups.desktop - doc/help/ref-cupsd-conf.html - doc/help/standard.html -diff -up cups-1.5.2/cups/usersys.c.systemd-socket cups-1.5.2/cups/usersys.c ---- cups-1.5.2/cups/usersys.c.systemd-socket 2012-03-16 14:50:57.054449734 +0000 -+++ cups-1.5.2/cups/usersys.c 2012-03-16 14:50:57.148449788 +0000 -@@ -778,7 +778,7 @@ cups_read_client_conf( - struct stat sockinfo; /* Domain socket information */ - - if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) && -- (sockinfo.st_mode & S_IRWXO) == S_IRWXO) -+ (sockinfo.st_mode & (S_IROTH | S_IWOTH)) == (S_IROTH | S_IWOTH)) - cups_server = CUPS_DEFAULT_DOMAINSOCKET; - else - #endif /* CUPS_DEFAULT_DOMAINSOCKET */ -diff -up cups-1.5.2/data/cups.path.in.systemd-socket cups-1.5.2/data/cups.path.in ---- cups-1.5.2/data/cups.path.in.systemd-socket 2012-03-16 14:50:57.148449788 +0000 -+++ cups-1.5.2/data/cups.path.in 2012-03-16 14:50:57.148449788 +0000 -@@ -0,0 +1,8 @@ -+[Unit] -+Description=CUPS Printer Service Spool -+ -+[Path] -+PathExistsGlob=@CUPS_REQUESTS@/d* -+ -+[Install] -+WantedBy=multi-user.target -diff -up cups-1.5.2/data/cups.service.in.systemd-socket cups-1.5.2/data/cups.service.in ---- cups-1.5.2/data/cups.service.in.systemd-socket 2012-03-16 14:50:57.149449788 +0000 -+++ cups-1.5.2/data/cups.service.in 2012-03-16 14:50:57.149449788 +0000 -@@ -0,0 +1,10 @@ -+[Unit] -+Description=CUPS Printing Service -+ -+[Service] -+ExecStart=@sbindir@/cupsd -f -+PrivateTmp=true -+ -+[Install] -+Also=cups.socket cups.path -+WantedBy=printer.target -diff -up cups-1.5.2/data/cups.socket.in.systemd-socket cups-1.5.2/data/cups.socket.in ---- cups-1.5.2/data/cups.socket.in.systemd-socket 2012-03-16 14:50:57.150449788 +0000 -+++ cups-1.5.2/data/cups.socket.in 2012-03-16 14:50:57.150449788 +0000 -@@ -0,0 +1,11 @@ -+[Unit] -+Description=CUPS Printing Service Sockets -+ -+[Socket] -+ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@ -+ListenStream=631 -+ListenDatagram=0.0.0.0:631 -+BindIPv6Only=ipv6-only -+ -+[Install] -+WantedBy=sockets.target -diff -up cups-1.5.2/data/Makefile.systemd-socket cups-1.5.2/data/Makefile ---- cups-1.5.2/data/Makefile.systemd-socket 2011-05-12 06:21:56.000000000 +0100 -+++ cups-1.5.2/data/Makefile 2012-03-16 14:50:57.151449789 +0000 -@@ -112,6 +112,12 @@ install-data: - $(INSTALL_DATA) $$file $(DATADIR)/ppdc; \ - done - $(INSTALL_DIR) -m 755 $(DATADIR)/profiles -+ if test "x$(SYSTEMD_UNITS)" != "x" ; then \ -+ $(INSTALL_DIR) -m 755 $(SYSTEMDUNITDIR); \ -+ for file in $(SYSTEMD_UNITS); do \ -+ $(INSTALL_DATA) $$file $(SYSTEMDUNITDIR); \ -+ done; \ -+ fi - - - # -@@ -159,6 +165,9 @@ uninstall: - -$(RMDIR) $(DATADIR)/charsets - -$(RMDIR) $(DATADIR)/banners - -$(RMDIR) $(DATADIR) -+ for file in $(SYSTEMD_UNITS); do \ -+ $(RM) $(SYSTEMDUNITDIR)/$$file; \ -+ done - - - # -diff -up cups-1.5.2/Makedefs.in.systemd-socket cups-1.5.2/Makedefs.in ---- cups-1.5.2/Makedefs.in.systemd-socket 2012-03-16 14:50:57.081449751 +0000 -+++ cups-1.5.2/Makedefs.in 2012-03-16 14:50:57.152449790 +0000 -@@ -143,6 +143,7 @@ CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ - CXXLIBS = @CXXLIBS@ - DBUS_NOTIFIER = @DBUS_NOTIFIER@ - DBUS_NOTIFIERLIBS = @DBUS_NOTIFIERLIBS@ -+SYSTEMD_UNITS = @SYSTEMD_UNITS@ - DNSSD_BACKEND = @DNSSD_BACKEND@ - DSOFLAGS = -L../cups @DSOFLAGS@ - DSOLIBS = @DSOLIBS@ $(COMMONLIBS) -@@ -151,6 +152,7 @@ FONTS = @FONTS@ - IMGLIBS = @IMGLIBS@ - IMGFILTERS = @IMGFILTERS@ - LAUNCHDLIBS = @LAUNCHDLIBS@ -+SDLIBS = @SDLIBS@ - LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \ - -L../scheduler @LDARCHFLAGS@ \ - @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM) -@@ -267,6 +269,7 @@ PAMFILE = @PAMFILE@ - - DEFAULT_LAUNCHD_CONF = @DEFAULT_LAUNCHD_CONF@ - DBUSDIR = @DBUSDIR@ -+SYSTEMDUNITDIR = $(BUILDROOT)@systemdsystemunitdir@ - - - # -diff -up cups-1.5.2/scheduler/client.h.systemd-socket cups-1.5.2/scheduler/client.h ---- cups-1.5.2/scheduler/client.h.systemd-socket 2011-03-25 21:25:38.000000000 +0000 -+++ cups-1.5.2/scheduler/client.h 2012-03-16 14:50:57.153449791 +0000 -@@ -75,6 +75,9 @@ typedef struct - int fd; /* File descriptor for this server */ - http_addr_t address; /* Bind address of socket */ - http_encryption_t encryption; /* To encrypt or not to encrypt... */ -+#ifdef HAVE_SYSTEMD -+ int is_systemd; /* Is this a systemd socket? */ -+#endif /* HAVE_SYSTEMD */ - } cupsd_listener_t; - - -diff -up cups-1.5.2/scheduler/dirsvc.c.systemd-socket cups-1.5.2/scheduler/dirsvc.c ---- cups-1.5.2/scheduler/dirsvc.c.systemd-socket 2012-03-16 14:50:57.112449768 +0000 -+++ cups-1.5.2/scheduler/dirsvc.c 2012-03-16 14:50:57.155449792 +0000 -@@ -1512,7 +1512,7 @@ cupsdStartBrowsing(void) - } - } - -- if (BrowseSocket >= 0) -+ if (BrowseSocket >= 0 && !BrowseSocketIsSystemd) - { - /* - * Bind the socket to browse port... -@@ -1556,13 +1556,17 @@ cupsdStartBrowsing(void) - cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to set broadcast mode - %s.", - strerror(errno)); - -+ if (!BrowseSocketIsSystemd) -+ { - #ifdef WIN32 -- closesocket(BrowseSocket); -+ closesocket(BrowseSocket); - #else -- close(BrowseSocket); -+ close(BrowseSocket); - #endif /* WIN32 */ - -- BrowseSocket = -1; -+ BrowseSocket = -1; -+ } -+ - BrowseLocalProtocols &= ~BROWSE_CUPS; - BrowseRemoteProtocols &= ~BROWSE_CUPS; - -@@ -1885,15 +1889,22 @@ cupsdStopBrowsing(void) - if (((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_CUPS) && - BrowseSocket >= 0) - { -- /* -- * Close the socket and remove it from the input selection set. -- */ -+ if (!BrowseSocketIsSystemd) -+ { -+ /* -+ * Close the socket. -+ */ - - #ifdef WIN32 -- closesocket(BrowseSocket); -+ closesocket(BrowseSocket); - #else -- close(BrowseSocket); -+ close(BrowseSocket); - #endif /* WIN32 */ -+ } -+ -+ /* -+ * Remove it from the input selection set. -+ */ - - cupsdRemoveSelect(BrowseSocket); - BrowseSocket = -1; -@@ -5693,11 +5704,14 @@ update_cups_browse(void) - strerror(errno)); - cupsdLogMessage(CUPSD_LOG_ERROR, "CUPS browsing turned off."); - -+ if (!BrowseSocketIsSystemd) -+ { - #ifdef WIN32 -- closesocket(BrowseSocket); -+ closesocket(BrowseSocket); - #else -- close(BrowseSocket); -+ close(BrowseSocket); - #endif /* WIN32 */ -+ } - - cupsdRemoveSelect(BrowseSocket); - BrowseSocket = -1; -diff -up cups-1.5.2/scheduler/dirsvc.h.systemd-socket cups-1.5.2/scheduler/dirsvc.h ---- cups-1.5.2/scheduler/dirsvc.h.systemd-socket 2012-03-16 14:50:57.113449769 +0000 -+++ cups-1.5.2/scheduler/dirsvc.h 2012-03-16 14:50:57.157449792 +0000 -@@ -100,6 +100,8 @@ VAR int Browsing VALUE(TRUE), - /* Short names for remote printers? */ - BrowseSocket VALUE(-1), - /* Socket for browsing */ -+ BrowseSocketIsSystemd VALUE(0), -+ /* BrowseSocket is systemd-provided? */ - BrowsePort VALUE(IPP_PORT), - /* Port number for broadcasts */ - BrowseInterval VALUE(DEFAULT_INTERVAL), -diff -up cups-1.5.2/scheduler/listen.c.systemd-socket cups-1.5.2/scheduler/listen.c ---- cups-1.5.2/scheduler/listen.c.systemd-socket 2011-04-16 00:38:13.000000000 +0100 -+++ cups-1.5.2/scheduler/listen.c 2012-03-16 14:50:57.158449792 +0000 -@@ -401,7 +401,11 @@ cupsdStopListening(void) - lis; - lis = (cupsd_listener_t *)cupsArrayNext(Listeners)) - { -- if (lis->fd != -1) -+ if (lis->fd != -1 -+#ifdef HAVE_SYSTEMD -+ && !lis->is_systemd -+#endif /* HAVE_SYSTEMD */ -+ ) - { - #ifdef WIN32 - closesocket(lis->fd); -diff -up cups-1.5.2/scheduler/main.c.systemd-socket cups-1.5.2/scheduler/main.c ---- cups-1.5.2/scheduler/main.c.systemd-socket 2012-03-16 14:50:57.121449773 +0000 -+++ cups-1.5.2/scheduler/main.c 2012-03-16 14:51:55.409483636 +0000 -@@ -26,6 +26,8 @@ - * launchd_checkin() - Check-in with launchd and collect the listening - * fds. - * launchd_checkout() - Update the launchd KeepAlive file as needed. -+ * systemd_checkin() - Check-in with systemd and collect the -+ * listening fds. - * parent_handler() - Catch USR1/CHLD signals... - * process_children() - Process all dead children... - * select_timeout() - Calculate the select timeout value. -@@ -62,6 +64,10 @@ - # endif /* !LAUNCH_JOBKEY_SERVICEIPC */ - #endif /* HAVE_LAUNCH_H */ - -+#ifdef HAVE_SYSTEMD -+#include <systemd/sd-daemon.h> -+#endif /* HAVE_SYSTEMD */ -+ - #if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) - # include <malloc.h> - #endif /* HAVE_MALLOC_H && HAVE_MALLINFO */ -@@ -78,6 +84,9 @@ - static void launchd_checkin(void); - static void launchd_checkout(void); - #endif /* HAVE_LAUNCHD */ -+#ifdef HAVE_SYSTEMD -+static void systemd_checkin(void); -+#endif /* HAVE_SYSTEMD */ - static void parent_handler(int sig); - static void process_children(void); - static void sigchld_handler(int sig); -@@ -537,6 +546,13 @@ main(int argc, /* I - Number of comm - } - #endif /* HAVE_LAUNCHD */ - -+#ifdef HAVE_SYSTEMD -+ /* -+ * If we were started by systemd get the listen sockets file descriptors... -+ */ -+ systemd_checkin(); -+#endif /* HAVE_SYSTEMD */ -+ - /* - * Startup the server... - */ -@@ -759,6 +775,15 @@ main(int argc, /* I - Number of comm - } - #endif /* HAVE_LAUNCHD */ - -+#ifdef HAVE_SYSTEMD -+ /* -+ * If we were started by systemd get the listen sockets file -+ * descriptors... -+ */ -+ -+ systemd_checkin(); -+#endif /* HAVE_SYSTEMD */ -+ - /* - * Startup the server... - */ -@@ -1584,6 +1609,139 @@ launchd_checkout(void) - } - #endif /* HAVE_LAUNCHD */ - -+#ifdef HAVE_SYSTEMD -+static void -+systemd_checkin(void) -+{ -+ int n, fd; -+ -+ n = sd_listen_fds(0); -+ if (n < 0) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "systemd_checkin: Failed to acquire sockets from systemd - %s", -+ strerror(-n)); -+ exit(EXIT_FAILURE); -+ return; -+ } -+ -+ if (n == 0) -+ return; -+ -+ for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd ++) -+ { -+ http_addr_t addr; -+ socklen_t addrlen = sizeof (addr); -+ int r; -+ cupsd_listener_t *lis; -+ char s[256]; -+ -+ r = sd_is_socket(fd, AF_UNSPEC, SOCK_STREAM, 1); -+ if (r < 0) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "systemd_checkin: Unable to verify socket type - %s", -+ strerror(-r)); -+ continue; -+ } -+ -+ if (!r) -+ { -+ if (Browsing && -+ ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_CUPS)) -+ { -+ r = sd_is_socket(fd, AF_UNSPEC, SOCK_DGRAM, 0); -+ if (r < 0) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "systemd_checkin: Unable to verify socket type - %s", -+ strerror(-r)); -+ continue; -+ } -+ -+ if (r) -+ { -+ /* -+ * This is the browse socket. -+ */ -+ -+ char addrstr[256]; -+ if (getsockname(fd, (struct sockaddr*) &addr, &addrlen)) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "systemd_checkin: Unable to get local address - %s", -+ strerror(errno)); -+ continue; -+ } -+ -+ httpAddrString (&addr, addrstr, sizeof (addrstr)); -+ BrowseSocket = fd; -+ BrowseSocketIsSystemd = 1; -+ cupsdLogMessage(CUPSD_LOG_DEBUG, -+ "systemd_checkin: Matched browse (port %d) with fd %d:%s...", -+ BrowsePort, fd, addrstr); -+ continue; -+ } -+ -+ } -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "systemd_checkin: Socket not of the right type"); -+ continue; -+ } -+ -+ if (getsockname(fd, (struct sockaddr*) &addr, &addrlen)) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "systemd_checkin: Unable to get local address - %s", -+ strerror(errno)); -+ continue; -+ } -+ -+ /* -+ * Try to match the systemd socket address to one of the listeners... -+ */ -+ -+ for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners); -+ lis; -+ lis = (cupsd_listener_t *)cupsArrayNext(Listeners)) -+ if (httpAddrEqual(&lis->address, &addr)) -+ break; -+ -+ if (lis) -+ { -+ cupsdLogMessage(CUPSD_LOG_DEBUG, -+ "systemd_checkin: Matched existing listener %s with fd %d...", -+ httpAddrString(&(lis->address), s, sizeof(s)), fd); -+ } -+ else -+ { -+ cupsdLogMessage(CUPSD_LOG_DEBUG, -+ "systemd_checkin: Adding new listener %s with fd %d...", -+ httpAddrString(&addr, s, sizeof(s)), fd); -+ -+ if ((lis = calloc(1, sizeof(cupsd_listener_t))) == NULL) -+ { -+ cupsdLogMessage(CUPSD_LOG_ERROR, -+ "systemd_checkin: Unable to allocate listener - " -+ "%s.", strerror(errno)); -+ exit(EXIT_FAILURE); -+ } -+ -+ cupsArrayAdd(Listeners, lis); -+ -+ memcpy(&lis->address, &addr, sizeof(lis->address)); -+ } -+ -+ lis->fd = fd; -+ lis->is_systemd = 1; -+ -+# ifdef HAVE_SSL -+ if (_httpAddrPort(&(lis->address)) == 443) -+ lis->encryption = HTTP_ENCRYPT_ALWAYS; -+# endif /* HAVE_SSL */ -+ } -+} -+#endif /* HAVE_SYSTEMD */ - - /* - * 'parent_handler()' - Catch USR1/CHLD signals... -diff -up cups-1.5.2/scheduler/Makefile.systemd-socket cups-1.5.2/scheduler/Makefile ---- cups-1.5.2/scheduler/Makefile.systemd-socket 2012-03-16 14:50:57.130449778 +0000 -+++ cups-1.5.2/scheduler/Makefile 2012-03-16 14:50:57.160449794 +0000 -@@ -382,7 +382,7 @@ cupsd: $(CUPSDOBJS) $(LIBCUPSMIME) ../cu - $(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \ - $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \ - $(LIBPAPER) $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBS) \ -- $(LIBGSSAPI) $(LIBWRAP) -+ $(LIBGSSAPI) $(LIBWRAP) $(SDLIBS) - - cupsd-static: $(CUPSDOBJS) libcupsmime.a ../cups/$(LIBCUPSSTATIC) - echo Linking $@... -@@ -390,7 +390,7 @@ cupsd-static: $(CUPSDOBJS) libcupsmime.a - $(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \ - ../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \ - $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBGSSAPI) \ -- $(LIBWRAP) -+ $(LIBWRAP) $(SDLIBS) - - - # diff --git a/~mtjm/cups-usblp/cups.install b/~mtjm/cups-usblp/cups.install deleted file mode 100755 index 47c3d9b82..000000000 --- a/~mtjm/cups-usblp/cups.install +++ /dev/null @@ -1,26 +0,0 @@ -post_install() { - if [ -x usr/bin/xdg-icon-resource ]; then - xdg-icon-resource forceupdate --theme hicolor 2> /dev/null - fi - echo ">> If you use an HTTPS connection to CUPS, the first time you access" - echo ">> the interface it may take a very long time before the site comes up." - echo ">> This is because the first request triggers the generation of the CUPS" - echo ">> SSL certificates which can be a very time-consuming job." -} - -post_upgrade() { - if [ -x usr/bin/xdg-icon-resource ]; then - xdg-icon-resource forceupdate --theme hicolor 2> /dev/null - fi - if [ "`vercmp $2 1.4.7-2`" -lt 0 ]; then - # important upgrade notice - echo "daemon script has been renamed to /etc/rc.d/cupsd" - echo "change your entry in /etc/rc.conf" - fi -} - -post_remove() { - if [ -x usr/bin/xdg-icon-resource ]; then - xdg-icon-resource forceupdate --theme hicolor 2> /dev/null - fi -} diff --git a/~mtjm/cups-usblp/cups.logrotate b/~mtjm/cups-usblp/cups.logrotate deleted file mode 100755 index 9c49bbdaf..000000000 --- a/~mtjm/cups-usblp/cups.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -/var/log/cups/*log { - missingok - notifempty - delaycompress - postrotate - /bin/kill -HUP `cat /var/run/cups.pid 2>/dev/null` 2>/dev/null || true - endscript -} diff --git a/~mtjm/cups-usblp/cups.pam b/~mtjm/cups-usblp/cups.pam deleted file mode 100755 index 53724d1f8..000000000 --- a/~mtjm/cups-usblp/cups.pam +++ /dev/null @@ -1,3 +0,0 @@ -auth required pam_unix.so -account required pam_unix.so -session required pam_unix.so diff --git a/~mtjm/debootstrap/PKGBUILD b/~mtjm/debootstrap/PKGBUILD deleted file mode 100755 index 20ff27fcb..000000000 --- a/~mtjm/debootstrap/PKGBUILD +++ /dev/null @@ -1,31 +0,0 @@ -# Maintainer: Michał Masłowski <mtjm@mtjm.eu> - -pkgname=debootstrap -_version=1.0.37 -_ubuntu=0 -_trisquel=5.5 -_trisquelrev=1 -pkgver=$_version.$_ubuntu.$_trisquel.$_trisquelrev -pkgrel=1 -pkgdesc="Bootstrap a basic Trisquel system" -arch=('any') -url="http://packages.trisquel.info/source/brigantia/debootstrap" -license=('custom') -depends=('sh') -makedepends=('makedev') -backup=() -#source=("http://archive.trisquel.info/trisquel/pool/main/d/debootstrap/debootstrap_${_version}ubuntu${_ubuntu}+${_trisquel}trisquel${_trisquelrev}.tar.gz") -source=("http://archive.trisquel.info/trisquel/pool/main/d/debootstrap/debootstrap_${_version}+${_trisquel}trisquel${_trisquelrev}.tar.gz") -sha256sums=('13ce77c840dc83ce84b52e850275b5ef6371bb72d068663933a2e1eefbd13e1e') - -package() { - cd "$srcdir/source" - sed -i 's;MAKEDEV := /sbin/MAKEDEV;MAKEDEV := /usr/sbin/MAKEDEV -d .;' Makefile # fix Arch compatibility - sed -i 's; consoleonly;;' Makefile # doesn't work, not sure why - make all # not in build, since it needs root priviledges - make DESTDIR="$pkgdir/" install - install -m755 -d "${pkgdir}/usr/share/licenses/$pkgname" - install -m644 debian/copyright "${pkgdir}/usr/share/licenses/$pkgname" -} - -# vim:set ts=2 sw=2 et: diff --git a/~mtjm/python-getmediumurl/PKGBUILD b/~mtjm/python-getmediumurl/PKGBUILD deleted file mode 100755 index 172f6dcd9..000000000 --- a/~mtjm/python-getmediumurl/PKGBUILD +++ /dev/null @@ -1,27 +0,0 @@ -# Maintainer: Michał Masłowski <mtjm@mtjm.eu> - -_pkgname=GetMediumURL -pkgname=python-getmediumurl -pkgver=0.0a5 -pkgrel=2 -pkgdesc="A package for getting URLs of media files from some websites" -arch=("any") -url="http://savannah.nongnu.org/projects/getmediumurl/" -license=('AGPL') -depends=('python' 'python-lxml' 'python-urlreader' 'python-distribute') -checkdepends=('python2') # due to my laziness -options=(!emptydirs) -source=("http://download.savannah.gnu.org/releases/getmediumurl/${_pkgname}-${pkgver}.tar.gz") -md5sums=("0d3660e178bd58549d7a5718f8e39de2") - -check() { - cd "$srcdir/$_pkgname-$pkgver" - LANG=en_US.UTF-8 python setup.py test -} - -package() { - cd "$srcdir/$_pkgname-$pkgver" - LANG=en_US.UTF-8 python setup.py install --root="$pkgdir/" --optimize=1 -} - -# vim:set ts=2 sw=2 et: diff --git a/~mtjm/python-urlreader/PKGBUILD b/~mtjm/python-urlreader/PKGBUILD deleted file mode 100755 index 4ffe93c6f..000000000 --- a/~mtjm/python-urlreader/PKGBUILD +++ /dev/null @@ -1,27 +0,0 @@ -# Maintainer: Michał Masłowski <mtjm@mtjm.eu> - -_pkgname=URLReader -pkgname=python-urlreader -pkgver=0.0a1 -pkgrel=1 -pkgdesc="Simple package for cached URL fetching" -arch=("any") -url="http://hg.mtjm.eu/urlreader/" -license=('AGPL') -depends=('python' 'python-distribute') -checkdepends=('python2') # due to my laziness -options=(!emptydirs) -source=("http://pypi.python.org/packages/source/U/URLReader/URLReader-${pkgver}.tar.gz") -md5sums=("5a96519a24099aae05fc0612d9cfd650") - -check() { - cd "$srcdir/$_pkgname-$pkgver" - LANG=en_US.UTF-8 python setup.py test -} - -package() { - cd "$srcdir/$_pkgname-$pkgver" - LANG=en_US.UTF-8 python setup.py install --root="$pkgdir/" --optimize=1 -} - -# vim:set ts=2 sw=2 et: diff --git a/~mtjm/python2-openid/PKGBUILD b/~mtjm/python2-openid/PKGBUILD deleted file mode 100755 index 31cdf3290..000000000 --- a/~mtjm/python2-openid/PKGBUILD +++ /dev/null @@ -1,19 +0,0 @@ -# Based on https://aur.archlinux.org/packages.php?ID=12562 -# Contributor: Ryan Coyner <rcoyner@gmail.com> -# Maintainer: Laszlo Papp <dj szapi at archlinux us> -pkgname=python2-openid -pkgver=2.2.5 -pkgrel=1 -pkgdesc="OpenID library for Python" -arch=('any') -url="http://www.openidenabled.com/openid/libraries/python" -license=('Apache') -depends=('python2') -source=("http://pypi.python.org/packages/source/p/python-openid/python-openid-${pkgver}.tar.gz") -md5sums=('393f48b162ec29c3de9e2973548ea50d') - -build() { - cd "${srcdir}/python-openid-${pkgver}" - python2 setup.py build || return 1 - python2 setup.py install --root=$pkgdir || return 1 -} diff --git a/~mtjm/zbar/PKGBUILD b/~mtjm/zbar/PKGBUILD deleted file mode 100755 index 64b47b5dc..000000000 --- a/~mtjm/zbar/PKGBUILD +++ /dev/null @@ -1,28 +0,0 @@ -# Parabola maintainer: Michał Masłowski <mtjm@mtjm.eu> -# Based on https://aur.archlinux.org/packages.php?ID=33527 -# Contributor: Radu Andries <admiral0@tuxfamily.org> -pkgname=zbar -pkgver=0.10 -pkgrel=1 -pkgdesc="A library for reading bar codes from various sources" -arch=('i686' 'x86_64') -url="http://zbar.sourceforge.net/" -license=('LGPL') -depends=('glibc') -provides=() -source=("http://downloads.sourceforge.net/project/zbar/zbar/$pkgver/zbar-$pkgver.tar.bz2") -options=(!libtool !emptydirs) - -# Disabled nearly everything since I don't need it and some of it needs fixes. - -build() { - cd "$srcdir/zbar-$pkgver" - - ./configure --prefix=/usr --without-qt --disable-video --without-python \ - --without-imagemagick --without-gtk --disable-static - make || return 1 - make DESTDIR="$pkgdir/" install -} - -# vim:set ts=2 sw=2 et: -md5sums=('0fd61eb590ac1bab62a77913c8b086a5') |