summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-09-07 15:26:04 +0000
committerroot <root@rshg054.dnsready.net>2011-09-07 15:26:04 +0000
commit9a1a8d77ee00e49dfeef44d74b1e40a831332383 (patch)
tree8b80a03609eba8a12cbb0c48b1a31266c6bdc540 /libre
parentfe769389426a6aa5a2878bf7dcfc6144717e1e93 (diff)
Wed Sep 7 15:26:04 UTC 2011
Diffstat (limited to 'libre')
-rw-r--r--libre/abs-libre/PKGBUILD33
-rw-r--r--libre/aif-libre/PKGBUILD9
-rw-r--r--libre/aspell-pl-libre/PKGBUILD33
-rw-r--r--libre/filesystem/PKGBUILD12
-rw-r--r--libre/filesystem/fstab5
-rw-r--r--libre/filesystem/shells1
-rw-r--r--libre/grub/040_all_grub-0.96-nxstack.patch623
-rw-r--r--libre/grub/05-grub-0.97-initrdaddr.diff16
-rw-r--r--libre/grub/PKGBUILD92
-rw-r--r--libre/grub/ext4.patch263
-rw-r--r--libre/grub/grub-0.97-gpt.patch315
-rw-r--r--libre/grub/grub-0.97-ldflags-objcopy-remove-build-id.patch196
-rw-r--r--libre/grub/grub-inode-size.patch100
-rw-r--r--libre/grub/grub.install20
-rw-r--r--libre/grub/i2o.patch45
-rw-r--r--libre/grub/install-grub204
-rw-r--r--libre/grub/intelmac.patch67
-rw-r--r--libre/grub/menu.lst43
-rw-r--r--libre/grub/more-raid.patch100
-rw-r--r--libre/grub/rePKGBUILD34
-rw-r--r--libre/grub/special-devices.patch18
-rw-r--r--libre/grub2/PKGBUILD60
-rw-r--r--libre/grub2/archlinux_grub2_mkconfig_fixes.patch119
-rw-r--r--libre/grub2/grub.default16
-rw-r--r--libre/grub2/grub2.install47
-rw-r--r--libre/grub2/grub2_bzr_export.sh103
-rw-r--r--libre/grub2/parabola-mkconfig.patch32
-rw-r--r--libre/icecat-i18n/PKGBUILD177
-rw-r--r--libre/icecat/Makefile.in451
-rw-r--r--libre/icecat/PKGBUILD88
-rw-r--r--libre/icecat/icecat.install18
-rw-r--r--libre/icecat/mozconfig1
-rw-r--r--libre/lame-libre/PKGBUILD30
-rw-r--r--libre/libretools/PKGBUILD8
-rw-r--r--libre/libui-sh/PKGBUILD4
-rw-r--r--libre/linux-libre/PKGBUILD46
-rw-r--r--libre/linux-libre/change-default-console-loglevel.patch1
-rw-r--r--libre/linux-libre/config.i6862
-rw-r--r--libre/linux-libre/config.x86_642
-rw-r--r--libre/linux-libre/linux-libre.install15
-rw-r--r--libre/mplayer-libre/PKGBUILD17
-rw-r--r--libre/mplayer-vaapi-libre/PKGBUILD71
-rw-r--r--libre/mplayer-vaapi-libre/gcc-4.6-mp3lib-sse-code-miscompilation.patch21
-rw-r--r--libre/mplayer-vaapi-libre/patch-fixes.patch386
-rw-r--r--libre/pacman/0001-makepkg-fix-removing-symbolic-link.patch32
-rw-r--r--libre/pacman/PKGBUILD31
-rw-r--r--libre/pacman/pacman.conf3
-rw-r--r--libre/pacman/pacman.conf.mips64el3
-rw-r--r--libre/pacman/pacman.conf.x86_643
-rw-r--r--libre/python2-libre/PKGBUILD105
-rw-r--r--libre/python2-libre/WDAS.patch109
-rw-r--r--libre/python2-libre/doc_license_change.patch44
-rw-r--r--libre/sdl-libre/PKGBUILD41
-rw-r--r--libre/sdl-libre/sdl-1.2.14-fix-disappearing-cursor.patch17
-rw-r--r--libre/sdl-libre/sdl-1.2.14-fix-mouse-clicking.patch23
-rw-r--r--libre/sdl-libre/sdl-1.2.14-joystick-crash.diff14
-rw-r--r--libre/texlive-bin-libre/09-texlive-fonts.conf9
-rw-r--r--libre/texlive-bin-libre/PKGBUILD340
-rw-r--r--libre/texlive-bin-libre/archlinux-build.patch40
-rw-r--r--libre/texlive-bin-libre/fix-fontforge-encoding.patch12
-rw-r--r--libre/texlive-bin-libre/texlive.install18
-rw-r--r--libre/texlive-bin-libre/texmf.cnf676
-rw-r--r--libre/texlive-core-libre/PKGBUILD159
-rw-r--r--libre/texlive-core-libre/texlive-core.maps40
-rw-r--r--libre/texlive-core-libre/texlive.install58
-rw-r--r--libre/texlive-fontsextra-libre/PKGBUILD73
-rw-r--r--libre/texlive-fontsextra-libre/texlive-fontsextra.maps107
-rw-r--r--libre/texlive-fontsextra-libre/texlive.install52
-rw-r--r--libre/texlive-latexextra-libre/PKGBUILD97
-rw-r--r--libre/texlive-latexextra-libre/texlive-latexextra.maps3
-rw-r--r--libre/texlive-latexextra-libre/texlive.install52
71 files changed, 5715 insertions, 390 deletions
diff --git a/libre/abs-libre/PKGBUILD b/libre/abs-libre/PKGBUILD
index fa23952bd..a9be5a541 100644
--- a/libre/abs-libre/PKGBUILD
+++ b/libre/abs-libre/PKGBUILD
@@ -3,36 +3,43 @@
_pkgname=abs
pkgname=abs-libre
-pkgver=2.4.2
-pkgrel=1
+#CARCH=x86_64
+pkgver=2.4.3
+pkgrel=2
pkgdesc="Utilities to download and work with the Arch Build System (ABS)"
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'mips64el')
url="http://projects.archlinux.org/abs.git/"
license=('GPL')
depends=('bash' 'rsync')
backup=(etc/abs.conf)
-install=abs.install
source=(ftp://ftp.archlinux.org/other/abs/${_pkgname}-${pkgver}.tar.gz)
-md5sums=('7be7cfc67443cff62e20f27ca57dc17a')
+md5sums=('b8b46b22d2f9a2aec2c994ccf230b4fd')
build() {
cd ${srcdir}/${_pkgname}
- make CONFDIR=/etc/
- make CONFDIR=/etc/ DESTDIR=${pkgdir} install
+ make prefix=/usr sysconfdir=/etc prepare
+ make DESTDIR=${pkgdir} install
# Add readme file, and make base /var/abs path
install -dm0755 ${pkgdir}/var/abs/local/
install -Dm0644 ${srcdir}/abs/README ${pkgdir}/var/abs/README
sed -i -e 's|rsync.archlinux.org|parabolagnulinux.org|' ${pkgdir}/etc/abs.conf
+ sed -i -e 's|(core|(libre !libre-testing core|' ${pkgdir}/etc/abs.conf
# make adjustments to abs.conf
- if [[ $CARCH = "i686" ]]; then
- sed -i -e 's| multilib||' -e 's| !multilib-testing||' ${pkgdir}/etc/abs.conf
- fi
- if [[ $CARCH = "x86_64" ]]; then
- sed -i '/ARCH=/s|i686|x86_64|' ${pkgdir}/etc/abs.conf
- fi
+ case $CARCH in
+ "i686")
+ sed -i -e 's| multilib||' -e 's| !multilib-testing||' ${pkgdir}/etc/abs.conf
+ ;;
+ "x86_64")
+ sed -i '/ARCH=/s|i686|x86_64|' ${pkgdir}/etc/abs.conf
+ ;;
+ "mips64el")
+ sed -i -e 's| multilib||' -e 's| !multilib-testing||' ${pkgdir}/etc/abs.conf
+ sed -i '/ARCH=/s|i686|mips64el|' ${pkgdir}/etc/abs.conf
+ ;;
+ esac
}
diff --git a/libre/aif-libre/PKGBUILD b/libre/aif-libre/PKGBUILD
index 0751fb372..7decd9531 100644
--- a/libre/aif-libre/PKGBUILD
+++ b/libre/aif-libre/PKGBUILD
@@ -2,14 +2,15 @@
# Maintainer: Dieter Plaetinck <dieter@plaetinck.be>
pkgname=aif-libre
-pkgver=2011.08.1
+pkgver=2011.08.31
pkgrel=1
pkgdesc="The ArchLinux Installation Framework (Parabola Rebranded)"
arch=('any')
url="https://projects.parabolagnulinux.org/aif.git"
license=('GPL3')
depends=('util-linux-ng' 'bash' 'pacman' 'coreutils' 'grub' 'grep' 'mkinitcpio' 'awk' 'sed' 'libui-sh')
-optdepends=('cryptsetup: for encryption support'
+optdepends=('markdown: to generate the html installation guide'
+ 'cryptsetup: for encryption support'
'lvm2: for LVM support'
'dhcpd: for dhcp networking support'
'e2fsprogs: Ext support'
@@ -18,12 +19,13 @@ optdepends=('cryptsetup: for encryption support'
'xfsprogs: XFS support'
'ntp: setting date with NTP'
'dialog: for ncurses support'
+ 'curl: for the aif-report-issues.sh script'
)
replaces=('aif')
conflicts=('aif')
provides=('aif')
source=($url/snapshot/aif-${pkgver}.tar.bz2)
-md5sums=('5bbf286d305f643eae6898df20a39eb7')
+md5sums=('02428484aaf6ce35f2abcccd921c8330')
build() {
@@ -34,4 +36,3 @@ build() {
}
# vim:set ts=2 sw=2 et:
-md5sums=('f4e5215cd27354e3915878d4c2bcee09')
diff --git a/libre/aspell-pl-libre/PKGBUILD b/libre/aspell-pl-libre/PKGBUILD
new file mode 100644
index 000000000..f932a95d1
--- /dev/null
+++ b/libre/aspell-pl-libre/PKGBUILD
@@ -0,0 +1,33 @@
+# 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>
+
+pkgname=aspell-pl-libre
+pkgver=20110907
+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')
+_sourcename=sjp-aspell6-pl-6.0_$pkgver-0.tar.bz2
+source=("http://repo.parabolagnulinux.org/other/${_sourcename}")
+md5sums=('e1bb7627b553666ff6703bfbc3528c1a')
+
+# Upstream publishes only the newest daily snapshot of the source, so
+# we need to mirror it.
+mksource() {
+ [ -f ${_sourcename} ] || wget http://sjp.pl/slownik/ort/${_sourcename}
+}
+
+build() {
+ cd "$srcdir/aspell6-pl-6.0_$pkgver-0"
+
+ ./configure
+ make
+ make DESTDIR="$pkgdir" install
+}
diff --git a/libre/filesystem/PKGBUILD b/libre/filesystem/PKGBUILD
index 7a9630c34..958d21e01 100644
--- a/libre/filesystem/PKGBUILD
+++ b/libre/filesystem/PKGBUILD
@@ -1,14 +1,14 @@
-# $Id: PKGBUILD 103015 2010-12-14 07:09:05Z pierre $
-# Maintainer: Pierre Schmitz <pierre@archlinux.de>
+# $Id: PKGBUILD 135046 2011-08-09 23:41:13Z tomegun $
+# Maintainer: Tom Gundersen <teg@jklm.no>
# Maintainer (Parabola): fauno <fauno@kiwwwi.com.ar>
pkgname=filesystem
-pkgver=2011.04
+pkgver=2011.08
pkgrel=1.1
pkgdesc='Base filesystem for Parabola'
arch=('any')
license=('GPL')
-url='http://parabolagnulinux.org'
+url='https://parabolagnulinux.org'
groups=('base')
install='filesystem.install'
depends=('iana-etc' 'bash' 'coreutils')
@@ -84,12 +84,12 @@ md5sums=('772fe869b921698cc3e6fde73c4ac85a'
'6e488ffecc8ba142c0cf7e2d7aeb832e'
'8a9042a2cedf6b6b47eb8973f14289cb'
'b8355d9d2782f424f4cedcf682651be0'
- 'ef40305da5803ca69d22e428ffc2ab9b'
+ '6e81e088e67741210622e60292a39c9c'
'e5d8323a4dbee7a6d0d2a19cbf4b819f'
'7bc65f234dfb6abf24e7c3b03e86f4ff'
'd41d8cd98f00b204e9800998ecf8427e'
'6f48288b6fcaf0065fcb7b0e525413e0'
- '40dac0de4c6b99c8ca97effbd7527c84'
+ '22518e922891f9359f971f4f5b4e793c'
'd2dc4e39dbdea75b107f91789e3274ab'
'f3b6ae7db8adffaaa4bffc6099dcbd50'
'8098ffd9fbf890468d3198277596b85a')
diff --git a/libre/filesystem/fstab b/libre/filesystem/fstab
index a23e7955b..c1a07fcc7 100644
--- a/libre/filesystem/fstab
+++ b/libre/filesystem/fstab
@@ -1,6 +1,5 @@
#
# /etc/fstab: static file system information
#
-# <file system> <dir> <type> <options> <dump> <pass>
-devpts /dev/pts devpts defaults 0 0
-shm /dev/shm tmpfs nodev,nosuid 0 0
+# <file system> <dir> <type> <options> <dump> <pass>
+tmpfs /tmp tmpfs nodev,noexec,nosuid 0 0
diff --git a/libre/filesystem/shells b/libre/filesystem/shells
index ff9e38348..18c1aeffa 100644
--- a/libre/filesystem/shells
+++ b/libre/filesystem/shells
@@ -4,6 +4,5 @@
/bin/sh
/bin/bash
-/bin/dash
# End of file
diff --git a/libre/grub/040_all_grub-0.96-nxstack.patch b/libre/grub/040_all_grub-0.96-nxstack.patch
new file mode 100644
index 000000000..121941c75
--- /dev/null
+++ b/libre/grub/040_all_grub-0.96-nxstack.patch
@@ -0,0 +1,623 @@
+Fix NX segfaulting on amd64.
+
+Patch by Peter Jones.
+
+http://lists.gnu.org/archive/html/bug-grub/2005-03/msg00011.html
+
+--- grub-0.97/grub/asmstub.c
++++ grub-0.97/grub/asmstub.c
+@@ -42,6 +42,7 @@
+ #include <sys/time.h>
+ #include <termios.h>
+ #include <signal.h>
++#include <sys/mman.h>
+
+ #ifdef __linux__
+ # include <sys/ioctl.h> /* ioctl */
+@@ -79,7 +80,7 @@
+ struct apm_info apm_bios_info;
+
+ /* Emulation requirements. */
+-char *grub_scratch_mem = 0;
++void *grub_scratch_mem = 0;
+
+ struct geometry *disks = 0;
+
+@@ -103,14 +104,62 @@
+ static unsigned int serial_speed;
+ #endif /* SIMULATE_SLOWNESS_OF_SERIAL */
+
++/* This allocates page-aligned storage of the specified size, which must be
++ * a multiple of the page size as determined by calling sysconf(_SC_PAGESIZE)
++ */
++#ifdef __linux__
++static void *
++grub_mmap_alloc(size_t len)
++{
++ int mmap_flags = MAP_ANONYMOUS|MAP_PRIVATE|MAP_EXECUTABLE;
++
++#ifdef MAP_32BIT
++ mmap_flags |= MAP_32BIT;
++#endif
++ /* Mark the simulated stack executable, as GCC uses stack trampolines
++ * to implement nested functions. */
++ return mmap(NULL, len, PROT_READ|PROT_WRITE|PROT_EXEC, mmap_flags, -1, 0);
++}
++#else /* !defined(__linux__) */
++static void *
++grub_mmap_alloc(size_t len)
++{
++ int fd = 0, offset = 0, ret = 0;
++ void *pa = MAP_FAILED;
++ char template[] = "/tmp/grub_mmap_alloc_XXXXXX";
++ errno_t e;
++
++ fd = mkstemp(template);
++ if (fd < 0)
++ return pa;
++
++ unlink(template);
++
++ ret = ftruncate(fd, len);
++ if (ret < 0)
++ return pa;
++
++ /* Mark the simulated stack executable, as GCC uses stack trampolines
++ * to implement nested functions. */
++ pa = mmap(NULL, len, PROT_READ|PROT_WRITE|PROT_EXEC,
++ MAP_PRIVATE|MAP_EXECUTABLE, fd, offset);
++
++ e = errno;
++ close(fd);
++ errno = e;
++ return pa;
++}
++#endif /* defined(__linux__) */
++
+ /* The main entry point into this mess. */
+ int
+ grub_stage2 (void)
+ {
+ /* These need to be static, because they survive our stack transitions. */
+ static int status = 0;
+- static char *realstack;
+- char *scratch, *simstack;
++ static void *realstack;
++ void *simstack_alloc_base, *simstack;
++ size_t simstack_size, page_size;
+ int i;
+
+ /* We need a nested function so that we get a clean stack frame,
+@@ -140,9 +189,35 @@
+ }
+
+ assert (grub_scratch_mem == 0);
+- scratch = malloc (0x100000 + EXTENDED_MEMSIZE + 15);
+- assert (scratch);
+- grub_scratch_mem = (char *) ((((int) scratch) >> 4) << 4);
++
++ /* Allocate enough pages for 0x100000 + EXTENDED_SIZE + 15, and
++ * make sure the memory is aligned to a multiple of the system's
++ * page size */
++ page_size = sysconf (_SC_PAGESIZE);
++ simstack_size = ( 0x100000 + EXTENDED_MEMSIZE + 15);
++ if (simstack_size % page_size)
++ {
++ /* If we're not on a page_size boundary, round up to the next one */
++ simstack_size &= ~(page_size-1);
++ simstack_size += page_size;
++ }
++
++ /* Add one for a PROT_NONE boundary page at each end. */
++ simstack_size += 2 * page_size;
++
++ simstack_alloc_base = grub_mmap_alloc(simstack_size);
++ assert (simstack_alloc_base != MAP_FAILED);
++
++ /* mark pages above and below our simstack area as innaccessable.
++ * If the implementation we're using doesn't support that, then the
++ * new protection modes are undefined. It's safe to just ignore
++ * them, though. It'd be nice if we knew that we'd get a SEGV for
++ * touching the area, but that's all. it'd be nice to have. */
++ mprotect (simstack_alloc_base, page_size, PROT_NONE);
++ mprotect ((void *)((unsigned long)simstack_alloc_base +
++ simstack_size - page_size), page_size, PROT_NONE);
++
++ grub_scratch_mem = (void *)((unsigned long)simstack_alloc_base + page_size);
+
+ /* FIXME: simulate the memory holes using mprot, if available. */
+
+@@ -215,7 +290,7 @@
+ device_map = 0;
+ free (disks);
+ disks = 0;
+- free (scratch);
++ munmap(simstack_alloc_base, simstack_size);
+ grub_scratch_mem = 0;
+
+ if (serial_device)
+--- grub-0.97/stage2/builtins.c
++++ grub-0.97/stage2/builtins.c
+@@ -131,63 +131,98 @@
+ }
+
+
++/* blocklist_read_helper nee disk_read_blocklist_func was a nested
++ * function, to which pointers were taken and exposed globally. Even
++ * in the GNU-C nested functions extension, they have local linkage,
++ * and aren't guaranteed to be accessable *at all* outside of their
++ * containing scope.
++ *
++ * Above and beyond all of that, the variables within blocklist_func_context
++ * are originally local variables, with local (not even static) linkage,
++ * from within blocklist_func. These were each referenced by
++ * disk_read_blocklist_func, which is only called from other functions
++ * through a globally scoped pointer.
++ *
++ * The documentation in GCC actually uses the words "all hell will break
++ * loose" to describe this scenario.
++ *
++ * Also, "start_sector" was also used uninitialized, but gcc doesn't warn
++ * about it (possibly because of the scoping madness?)
++ */
++
++static struct {
++ int start_sector;
++ int num_sectors;
++ int num_entries;
++ int last_length;
++} blocklist_func_context = {
++ .start_sector = 0,
++ .num_sectors = 0,
++ .num_entries = 0,
++ .last_length = 0
++};
++
++/* Collect contiguous blocks into one entry as many as possible,
++ and print the blocklist notation on the screen. */
++static void
++blocklist_read_helper (int sector, int offset, int length)
++{
++ int *start_sector = &blocklist_func_context.start_sector;
++ int *num_sectors = &blocklist_func_context.num_sectors;
++ int *num_entries = &blocklist_func_context.num_entries;
++ int *last_length = &blocklist_func_context.last_length;
++
++ if (*num_sectors > 0)
++ {
++ if (*start_sector + *num_sectors == sector
++ && offset == 0 && *last_length == SECTOR_SIZE)
++ {
++ *num_sectors++;
++ *last_length = length;
++ return;
++ }
++ else
++ {
++ if (*last_length == SECTOR_SIZE)
++ grub_printf ("%s%d+%d", *num_entries ? "," : "",
++ *start_sector - part_start, *num_sectors);
++ else if (*num_sectors > 1)
++ grub_printf ("%s%d+%d,%d[0-%d]", *num_entries ? "," : "",
++ *start_sector - part_start, *num_sectors-1,
++ *start_sector + *num_sectors-1 - part_start,
++ *last_length);
++ else
++ grub_printf ("%s%d[0-%d]", *num_entries ? "," : "",
++ *start_sector - part_start, *last_length);
++ *num_entries++;
++ *num_sectors = 0;
++ }
++ }
++
++ if (offset > 0)
++ {
++ grub_printf("%s%d[%d-%d]", *num_entries ? "," : "",
++ sector-part_start, offset, offset+length);
++ *num_entries++;
++ }
++ else
++ {
++ *start_sector = sector;
++ *num_sectors = 1;
++ *last_length = length;
++ }
++}
++
+ /* blocklist */
+ static int
+ blocklist_func (char *arg, int flags)
+ {
+ char *dummy = (char *) RAW_ADDR (0x100000);
+- int start_sector;
+- int num_sectors = 0;
+- int num_entries = 0;
+- int last_length = 0;
+-
+- auto void disk_read_blocklist_func (int sector, int offset, int length);
+-
+- /* Collect contiguous blocks into one entry as many as possible,
+- and print the blocklist notation on the screen. */
+- auto void disk_read_blocklist_func (int sector, int offset, int length)
+- {
+- if (num_sectors > 0)
+- {
+- if (start_sector + num_sectors == sector
+- && offset == 0 && last_length == SECTOR_SIZE)
+- {
+- num_sectors++;
+- last_length = length;
+- return;
+- }
+- else
+- {
+- if (last_length == SECTOR_SIZE)
+- grub_printf ("%s%d+%d", num_entries ? "," : "",
+- start_sector - part_start, num_sectors);
+- else if (num_sectors > 1)
+- grub_printf ("%s%d+%d,%d[0-%d]", num_entries ? "," : "",
+- start_sector - part_start, num_sectors-1,
+- start_sector + num_sectors-1 - part_start,
+- last_length);
+- else
+- grub_printf ("%s%d[0-%d]", num_entries ? "," : "",
+- start_sector - part_start, last_length);
+- num_entries++;
+- num_sectors = 0;
+- }
+- }
+-
+- if (offset > 0)
+- {
+- grub_printf("%s%d[%d-%d]", num_entries ? "," : "",
+- sector-part_start, offset, offset+length);
+- num_entries++;
+- }
+- else
+- {
+- start_sector = sector;
+- num_sectors = 1;
+- last_length = length;
+- }
+- }
+
++ int *start_sector = &blocklist_func_context.start_sector;
++ int *num_sectors = &blocklist_func_context.num_sectors;
++ int *num_entries = &blocklist_func_context.num_entries;
++
+ /* Open the file. */
+ if (! grub_open (arg))
+ return 1;
+@@ -204,15 +241,15 @@
+ grub_printf (")");
+
+ /* Read in the whole file to DUMMY. */
+- disk_read_hook = disk_read_blocklist_func;
++ disk_read_hook = blocklist_read_helper;
+ if (! grub_read (dummy, -1))
+ goto fail;
+
+ /* The last entry may not be printed yet. Don't check if it is a
+ * full sector, since it doesn't matter if we read too much. */
+- if (num_sectors > 0)
+- grub_printf ("%s%d+%d", num_entries ? "," : "",
+- start_sector - part_start, num_sectors);
++ if (*num_sectors > 0)
++ grub_printf ("%s%d+%d", *num_entries ? "," : "",
++ *start_sector - part_start, *num_sectors);
+
+ grub_printf ("\n");
+
+@@ -1868,6 +1905,77 @@
+
+
+ /* install */
++static struct {
++ int saved_sector;
++ int installaddr;
++ int installlist;
++ char *stage2_first_buffer;
++} install_func_context = {
++ .saved_sector = 0,
++ .installaddr = 0,
++ .installlist = 0,
++ .stage2_first_buffer = NULL,
++};
++
++/* Save the first sector of Stage2 in STAGE2_SECT. */
++/* Formerly disk_read_savesect_func with local scope inside install_func */
++static void
++install_savesect_helper(int sector, int offset, int length)
++{
++ if (debug)
++ printf ("[%d]", sector);
++
++ /* ReiserFS has files which sometimes contain data not aligned
++ on sector boundaries. Returning an error is better than
++ silently failing. */
++ if (offset != 0 || length != SECTOR_SIZE)
++ errnum = ERR_UNALIGNED;
++
++ install_func_context.saved_sector = sector;
++}
++
++/* Write SECTOR to INSTALLLIST, and update INSTALLADDR and INSTALLSECT. */
++/* Formerly disk_read_blocklist_func with local scope inside install_func */
++static void
++install_blocklist_helper (int sector, int offset, int length)
++{
++ int *installaddr = &install_func_context.installaddr;
++ int *installlist = &install_func_context.installlist;
++ char **stage2_first_buffer = &install_func_context.stage2_first_buffer;
++ /* Was the last sector full? */
++ static int last_length = SECTOR_SIZE;
++
++ if (debug)
++ printf("[%d]", sector);
++
++ if (offset != 0 || last_length != SECTOR_SIZE)
++ {
++ /* We found a non-sector-aligned data block. */
++ errnum = ERR_UNALIGNED;
++ return;
++ }
++
++ last_length = length;
++
++ if (*((unsigned long *) (*installlist - 4))
++ + *((unsigned short *) *installlist) != sector
++ || *installlist == (int) *stage2_first_buffer + SECTOR_SIZE + 4)
++ {
++ *installlist -= 8;
++
++ if (*((unsigned long *) (*installlist - 8)))
++ errnum = ERR_WONT_FIT;
++ else
++ {
++ *((unsigned short *) (*installlist + 2)) = (*installaddr >> 4);
++ *((unsigned long *) (*installlist - 4)) = sector;
++ }
++ }
++
++ *((unsigned short *) *installlist) += 1;
++ *installaddr += 512;
++}
++
+ static int
+ install_func (char *arg, int flags)
+ {
+@@ -1875,8 +1983,12 @@
+ char *stage1_buffer = (char *) RAW_ADDR (0x100000);
+ char *stage2_buffer = stage1_buffer + SECTOR_SIZE;
+ char *old_sect = stage2_buffer + SECTOR_SIZE;
+- char *stage2_first_buffer = old_sect + SECTOR_SIZE;
+- char *stage2_second_buffer = stage2_first_buffer + SECTOR_SIZE;
++ /* stage2_first_buffer used to be defined as:
++ * char *stage2_first_buffer = old_sect + SECTOR_SIZE; */
++ char **stage2_first_buffer = &install_func_context.stage2_first_buffer;
++ /* and stage2_second_buffer was:
++ * char *stage2_second_buffer = stage2_first_buffer + SECTOR_SIZE; */
++ char *stage2_second_buffer = old_sect + SECTOR_SIZE + SECTOR_SIZE;
+ /* XXX: Probably SECTOR_SIZE is reasonable. */
+ char *config_filename = stage2_second_buffer + SECTOR_SIZE;
+ char *dummy = config_filename + SECTOR_SIZE;
+@@ -1885,10 +1997,11 @@
+ int src_drive, src_partition, src_part_start;
+ int i;
+ struct geometry dest_geom, src_geom;
+- int saved_sector;
++ int *saved_sector = &install_func_context.saved_sector;
+ int stage2_first_sector, stage2_second_sector;
+ char *ptr;
+- int installaddr, installlist;
++ int *installaddr = &install_func_context.installaddr;
++ int *installlist = &install_func_context.installlist;
+ /* Point to the location of the name of a configuration file in Stage 2. */
+ char *config_file_location;
+ /* If FILE is a Stage 1.5? */
+@@ -1897,67 +2010,13 @@
+ int is_open = 0;
+ /* If LBA is forced? */
+ int is_force_lba = 0;
+- /* Was the last sector full? */
+- int last_length = SECTOR_SIZE;
+-
++
++ *stage2_first_buffer = old_sect + SECTOR_SIZE;
+ #ifdef GRUB_UTIL
+ /* If the Stage 2 is in a partition mounted by an OS, this will store
+ the filename under the OS. */
+ char *stage2_os_file = 0;
+ #endif /* GRUB_UTIL */
+-
+- auto void disk_read_savesect_func (int sector, int offset, int length);
+- auto void disk_read_blocklist_func (int sector, int offset, int length);
+-
+- /* Save the first sector of Stage2 in STAGE2_SECT. */
+- auto void disk_read_savesect_func (int sector, int offset, int length)
+- {
+- if (debug)
+- printf ("[%d]", sector);
+-
+- /* ReiserFS has files which sometimes contain data not aligned
+- on sector boundaries. Returning an error is better than
+- silently failing. */
+- if (offset != 0 || length != SECTOR_SIZE)
+- errnum = ERR_UNALIGNED;
+-
+- saved_sector = sector;
+- }
+-
+- /* Write SECTOR to INSTALLLIST, and update INSTALLADDR and
+- INSTALLSECT. */
+- auto void disk_read_blocklist_func (int sector, int offset, int length)
+- {
+- if (debug)
+- printf("[%d]", sector);
+-
+- if (offset != 0 || last_length != SECTOR_SIZE)
+- {
+- /* We found a non-sector-aligned data block. */
+- errnum = ERR_UNALIGNED;
+- return;
+- }
+-
+- last_length = length;
+-
+- if (*((unsigned long *) (installlist - 4))
+- + *((unsigned short *) installlist) != sector
+- || installlist == (int) stage2_first_buffer + SECTOR_SIZE + 4)
+- {
+- installlist -= 8;
+-
+- if (*((unsigned long *) (installlist - 8)))
+- errnum = ERR_WONT_FIT;
+- else
+- {
+- *((unsigned short *) (installlist + 2)) = (installaddr >> 4);
+- *((unsigned long *) (installlist - 4)) = sector;
+- }
+- }
+-
+- *((unsigned short *) installlist) += 1;
+- installaddr += 512;
+- }
+
+ /* First, check the GNU-style long option. */
+ while (1)
+@@ -1987,10 +2049,10 @@
+ addr = skip_to (0, file);
+
+ /* Get the installation address. */
+- if (! safe_parse_maxint (&addr, &installaddr))
++ if (! safe_parse_maxint (&addr, installaddr))
+ {
+ /* ADDR is not specified. */
+- installaddr = 0;
++ *installaddr = 0;
+ ptr = addr;
+ errnum = 0;
+ }
+@@ -2084,17 +2146,17 @@
+ = (dest_drive & BIOS_FLAG_FIXED_DISK);
+
+ /* Read the first sector of Stage 2. */
+- disk_read_hook = disk_read_savesect_func;
+- if (grub_read (stage2_first_buffer, SECTOR_SIZE) != SECTOR_SIZE)
++ disk_read_hook = install_savesect_helper;
++ if (grub_read (*stage2_first_buffer, SECTOR_SIZE) != SECTOR_SIZE)
+ goto fail;
+
+- stage2_first_sector = saved_sector;
++ stage2_first_sector = *saved_sector;
+
+ /* Read the second sector of Stage 2. */
+ if (grub_read (stage2_second_buffer, SECTOR_SIZE) != SECTOR_SIZE)
+ goto fail;
+
+- stage2_second_sector = saved_sector;
++ stage2_second_sector = *saved_sector;
+
+ /* Check for the version of Stage 2. */
+ if (*((short *) (stage2_second_buffer + STAGE2_VER_MAJ_OFFS))
+@@ -2110,27 +2172,27 @@
+
+ /* If INSTALLADDR is not specified explicitly in the command-line,
+ determine it by the Stage 2 id. */
+- if (! installaddr)
++ if (! *installaddr)
+ {
+ if (! is_stage1_5)
+ /* Stage 2. */
+- installaddr = 0x8000;
++ *installaddr = 0x8000;
+ else
+ /* Stage 1.5. */
+- installaddr = 0x2000;
++ *installaddr = 0x2000;
+ }
+
+ *((unsigned long *) (stage1_buffer + STAGE1_STAGE2_SECTOR))
+ = stage2_first_sector;
+ *((unsigned short *) (stage1_buffer + STAGE1_STAGE2_ADDRESS))
+- = installaddr;
++ = *installaddr;
+ *((unsigned short *) (stage1_buffer + STAGE1_STAGE2_SEGMENT))
+- = installaddr >> 4;
++ = *installaddr >> 4;
+
+- i = (int) stage2_first_buffer + SECTOR_SIZE - 4;
++ i = (int) *stage2_first_buffer + SECTOR_SIZE - 4;
+ while (*((unsigned long *) i))
+ {
+- if (i < (int) stage2_first_buffer
++ if (i < (int) *stage2_first_buffer
+ || (*((int *) (i - 4)) & 0x80000000)
+ || *((unsigned short *) i) >= 0xA00
+ || *((short *) (i + 2)) == 0)
+@@ -2144,13 +2206,13 @@
+ i -= 8;
+ }
+
+- installlist = (int) stage2_first_buffer + SECTOR_SIZE + 4;
+- installaddr += SECTOR_SIZE;
++ *installlist = (int) *stage2_first_buffer + SECTOR_SIZE + 4;
++ *installaddr += SECTOR_SIZE;
+
+ /* Read the whole of Stage2 except for the first sector. */
+ grub_seek (SECTOR_SIZE);
+
+- disk_read_hook = disk_read_blocklist_func;
++ disk_read_hook = install_blocklist_helper;
+ if (! grub_read (dummy, -1))
+ goto fail;
+
+@@ -2233,7 +2295,7 @@
+ /* Skip the first sector. */
+ grub_seek (SECTOR_SIZE);
+
+- disk_read_hook = disk_read_savesect_func;
++ disk_read_hook = install_savesect_helper;
+ if (grub_read (stage2_buffer, SECTOR_SIZE) != SECTOR_SIZE)
+ goto fail;
+
+@@ -2303,7 +2365,7 @@
+ else
+ #endif /* GRUB_UTIL */
+ {
+- if (! devwrite (saved_sector - part_start, 1, stage2_buffer))
++ if (! devwrite (*saved_sector - part_start, 1, stage2_buffer))
+ goto fail;
+ }
+ }
+@@ -2325,7 +2387,7 @@
+ goto fail;
+ }
+
+- if (fwrite (stage2_first_buffer, 1, SECTOR_SIZE, fp) != SECTOR_SIZE)
++ if (fwrite (*stage2_first_buffer, 1, SECTOR_SIZE, fp) != SECTOR_SIZE)
+ {
+ fclose (fp);
+ errnum = ERR_WRITE;
+@@ -2352,7 +2414,7 @@
+ goto fail;
+
+ if (! devwrite (stage2_first_sector - src_part_start, 1,
+- stage2_first_buffer))
++ *stage2_first_buffer))
+ goto fail;
+
+ if (! devwrite (stage2_second_sector - src_part_start, 1,
+--- grub-0.97/stage2/shared.h
++++ grub-0.97/stage2/shared.h
+@@ -36,8 +36,8 @@
+
+ /* Maybe redirect memory requests through grub_scratch_mem. */
+ #ifdef GRUB_UTIL
+-extern char *grub_scratch_mem;
+-# define RAW_ADDR(x) ((x) + (int) grub_scratch_mem)
++extern void *grub_scratch_mem;
++# define RAW_ADDR(x) ((x) + (unsigned long) grub_scratch_mem)
+ # define RAW_SEG(x) (RAW_ADDR ((x) << 4) >> 4)
+ #else
+ # define RAW_ADDR(x) (x)
diff --git a/libre/grub/05-grub-0.97-initrdaddr.diff b/libre/grub/05-grub-0.97-initrdaddr.diff
new file mode 100644
index 000000000..ccf5f3e54
--- /dev/null
+++ b/libre/grub/05-grub-0.97-initrdaddr.diff
@@ -0,0 +1,16 @@
+--- grub-0.96/stage2/boot.c
++++ grub-0.96/stage2/boot.c
+@@ -824,8 +824,11 @@
+ moveto = (mbi.mem_upper + 0x400) << 10;
+
+ moveto = (moveto - len) & 0xfffff000;
+- max_addr = (lh->header == LINUX_MAGIC_SIGNATURE && lh->version >= 0x0203
+- ? lh->initrd_addr_max : LINUX_INITRD_MAX_ADDRESS);
++ max_addr = LINUX_INITRD_MAX_ADDRESS;
++ if (lh->header == LINUX_MAGIC_SIGNATURE &&
++ lh->version >= 0x0203 &&
++ lh->initrd_addr_max < max_addr)
++ max_addr = lh->initrd_addr_max;
+ if (moveto + len >= max_addr)
+ moveto = (max_addr - len) & 0xfffff000;
+
diff --git a/libre/grub/PKGBUILD b/libre/grub/PKGBUILD
new file mode 100644
index 000000000..bca7a98e3
--- /dev/null
+++ b/libre/grub/PKGBUILD
@@ -0,0 +1,92 @@
+# $Id: PKGBUILD 134896 2011-08-08 17:30:51Z ronald $
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+
+pkgname=grub
+pkgver=0.97
+pkgrel=20
+pkgdesc="A GNU multiboot boot loader (Parabola rebranded)"
+arch=('i686' 'x86_64')
+license=('GPL')
+url="http://www.gnu.org/software/grub/"
+groups=('base')
+depends=('ncurses' 'diffutils' 'sed')
+optdepends=('xfsprogs: freezing of xfs /boot in install-grub script')
+source=(ftp://alpha.gnu.org/gnu/grub/grub-$pkgver.tar.gz
+ menu.lst
+ install-grub
+ 040_all_grub-0.96-nxstack.patch
+ 05-grub-0.97-initrdaddr.diff
+ i2o.patch
+ special-devices.patch
+ more-raid.patch
+ intelmac.patch
+ grub-inode-size.patch
+ ext4.patch
+ grub-0.97-ldflags-objcopy-remove-build-id.patch)
+backup=('boot/grub/menu.lst')
+install=grub.install
+
+#set destination architecture here
+DESTARCH="i686"
+#DESTARCH="x86_64"
+
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+
+ # optimizations break the build -- disable them
+ # adding special devices to grub, patches are from fedora
+ patch -Np1 -i ../special-devices.patch
+ patch -Np1 -i ../i2o.patch
+ patch -Np1 -i ../more-raid.patch
+ patch -Np1 -i ../intelmac.patch
+ # Add support for bigger inode size to e2fs_stage1_5
+ patch -Np1 -i ../grub-inode-size.patch
+ # Add ext4 support
+ # http://www.mail-archive.com/bug-grub@gnu.org/msg11458.html
+ patch -Np1 -i ../ext4.patch
+ # binutils fix
+ patch -Np1 -i ../grub-0.97-ldflags-objcopy-remove-build-id.patch
+
+ sed -e'/^AC_PROG_CC/ a\AM_PROG_CC_C_O\ ' -i "${srcdir}/${pkgname}-${pkgver}/configure.ac"
+ sed -e'/^AC_PROG_CC/ a\AM_PROG_AS\ ' -i "${srcdir}/${pkgname}-${pkgver}/configure.ac"
+
+ ## recreate ./configure script with the required changes in LDFLAGS and objcopy
+ aclocal
+ autoconf
+ autoreconf
+ automake
+
+ #arch64 fixes for static build
+ if [ "$CARCH" = "x86_64" ]; then ## correcting problems for new wersion of autotools
+
+ echo "this package has to be built on i686, won't compile on x86_64"
+ sleep 5
+ else
+ if [ "$DESTARCH" = "x86_64" ]; then
+ # patch from gentoo for fixing a segfault
+ patch -Np1 -i ../040_all_grub-0.96-nxstack.patch
+ # patch from frugalware to make it boot when more than 2GB ram installed
+ patch -Np1 -i ../05-grub-0.97-initrdaddr.diff
+ CFLAGS="-static -fno-strict-aliasing" ./configure --prefix=/usr --bindir=/bin --sbindir=/sbin \
+ --mandir=/usr/share/man --infodir=/usr/share/info
+ else
+ CFLAGS="-fno-strict-aliasing" ./configure --prefix=/usr --bindir=/bin --sbindir=/sbin \
+ --mandir=/usr/share/man --infodir=/usr/share/info
+ fi
+ fi
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+
+ CFLAGS= make
+ make DESTDIR=$pkgdir install
+ install -D -m644 ../menu.lst $pkgdir/boot/grub/menu.lst
+ install -D -m755 ../install-grub $pkgdir/sbin/install-grub
+
+ if [ "$DESTARCH" = "x86_64" ]; then
+ # fool makepkg into building a x86_64 package
+ export CARCH="x86_64"
+ fi
+}
diff --git a/libre/grub/ext4.patch b/libre/grub/ext4.patch
new file mode 100644
index 000000000..8a2f9bdb0
--- /dev/null
+++ b/libre/grub/ext4.patch
@@ -0,0 +1,263 @@
+diff -ruNp grub-0.97/stage2/fsys_ext2fs.c grub-0.97-patch/stage2/fsys_ext2fs.c
+--- grub-0.97/stage2/fsys_ext2fs.c 2004-08-08 20:19:18.000000000 +0200
++++ grub-0.97-patch/stage2/fsys_ext2fs.c 2007-12-29 16:25:19.000000000
++0100
+@@ -51,6 +51,9 @@ typedef unsigned int __u32;
+ #define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1)
+ #define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1)
+
++/* Inode flags */
++#define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */
++
+ /* include/linux/ext2_fs.h */
+ struct ext2_super_block
+ {
+@@ -191,6 +194,42 @@ struct ext2_dir_entry
+ #define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \
+ ~EXT2_DIR_ROUND)
+
++/* linux/ext4_fs_extents.h */
++/*
++ * This is the extent on-disk structure.
++ * It's used at the bottom of the tree.
++ */
++struct ext4_extent {
++ __u32 ee_block; /* first logical block extent covers */
++ __u16 ee_len; /* number of blocks covered by extent */
++ __u16 ee_start_hi; /* high 16 bits of physical block */
++ __u32 ee_start; /* low 32 bits of physical block */
++};
++
++/*
++ * This is index on-disk structure.
++ * It's used at all the levels except the bottom.
++ */
++struct ext4_extent_idx {
++ __u32 ei_block; /* index covers logical blocks from 'block' */
++ __u32 ei_leaf; /* pointer to the physical block of the next *
++ * level. leaf or next index could be there */
++ __u16 ei_leaf_hi; /* high 16 bits of physical block */
++ __u16 ei_unused;
++};
++
++/*
++ * Each block (leaves and indexes), even inode-stored has header.
++ */
++struct ext4_extent_header {
++ __u16 eh_magic; /* probably will support different formats */
++ __u16 eh_entries; /* number of valid entries */
++ __u16 eh_max; /* capacity of store in entries */
++ __u16 eh_depth; /* has tree real underlying blocks? */
++ __u32 eh_generation; /* generation of the tree */
++};
++
++#define EXT4_EXT_MAGIC 0xf30a
+
+ /* ext2/super.c */
+ #define log2(n) ffz(~(n))
+@@ -279,6 +318,26 @@ ext2_rdfsb (int fsblock, int buffer)
+ EXT2_BLOCK_SIZE (SUPERBLOCK), (char *) buffer);
+ }
+
++/* Walk through extents index tree to find the good leaf */
++static struct ext4_extent_header *
++ext4_recurse_extent_index(struct ext4_extent_header *extent_block, int logical_block)
++{
++ int i;
++ struct ext4_extent_idx *index = (struct ext4_extent_idx *) (extent_block + 1);
++ if (extent_block->eh_magic != EXT4_EXT_MAGIC)
++ return NULL;
++ if (extent_block->eh_depth == 0)
++ return extent_block;
++ for (i = 0; i < extent_block->eh_entries; i++)
++ {
++ if (logical_block < index[i].ei_block)
++ break;
++ }
++ if (i == 0 || !ext2_rdfsb(index[i-1].ei_leaf, DATABLOCK1))
++ return NULL;
++ return (ext4_recurse_extent_index((struct ext4_extent_header *) DATABLOCK1, logical_block));
++}
++
+ /* from
+ ext2/inode.c:ext2_bmap()
+ */
+--- grub-0.97/stage2/fsys_ext2fs.c~ 2008-12-28 20:19:00.000000000 +0100
++++ grub-0.97/stage2/fsys_ext2fs.c 2008-12-28 20:19:00.000000000 +0100
+@@ -366,83 +366,106 @@
+ }
+ printf ("logical block %d\n", logical_block);
+ #endif /* E2DEBUG */
+-
+- /* if it is directly pointed to by the inode, return that physical addr */
+- if (logical_block < EXT2_NDIR_BLOCKS)
+- {
+-#ifdef E2DEBUG
+- printf ("returning %d\n", (unsigned char *) (INODE->i_block[logical_block]));
+- printf ("returning %d\n", INODE->i_block[logical_block]);
+-#endif /* E2DEBUG */
+- return INODE->i_block[logical_block];
+- }
+- /* else */
+- logical_block -= EXT2_NDIR_BLOCKS;
+- /* try the indirect block */
+- if (logical_block < EXT2_ADDR_PER_BLOCK (SUPERBLOCK))
++ /* standard ext2 inode */
++ if (!(INODE->i_flags & EXT4_EXTENTS_FL))
+ {
+- if (mapblock1 != 1
+- && !ext2_rdfsb (INODE->i_block[EXT2_IND_BLOCK], DATABLOCK1))
+- {
+- errnum = ERR_FSYS_CORRUPT;
+- return -1;
+- }
+- mapblock1 = 1;
+- return ((__u32 *) DATABLOCK1)[logical_block];
+- }
+- /* else */
+- logical_block -= EXT2_ADDR_PER_BLOCK (SUPERBLOCK);
+- /* now try the double indirect block */
+- if (logical_block < (1 << (EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK) * 2)))
+- {
+- int bnum;
+- if (mapblock1 != 2
+- && !ext2_rdfsb (INODE->i_block[EXT2_DIND_BLOCK], DATABLOCK1))
+- {
+- errnum = ERR_FSYS_CORRUPT;
+- return -1;
+- }
+- mapblock1 = 2;
+- if ((bnum = (((__u32 *) DATABLOCK1)
+- [logical_block >> EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK)]))
+- != mapblock2
+- && !ext2_rdfsb (bnum, DATABLOCK2))
+- {
+- errnum = ERR_FSYS_CORRUPT;
+- return -1;
+- }
+- mapblock2 = bnum;
++ /* if it is directly pointed to by the inode, return that physical addr */
++ if (logical_block < EXT2_NDIR_BLOCKS)
++ {
++#ifdef E2DEBUG
++ printf ("returning %d\n", (unsigned char *) (INODE->i_block[logical_block]));
++ printf ("returning %d\n", INODE->i_block[logical_block]);
++#endif /* E2DEBUG */
++ return INODE->i_block[logical_block];
++ }
++ /* else */
++ logical_block -= EXT2_NDIR_BLOCKS;
++ /* try the indirect block */
++ if (logical_block < EXT2_ADDR_PER_BLOCK (SUPERBLOCK))
++ {
++ if (mapblock1 != 1
++ && !ext2_rdfsb (INODE->i_block[EXT2_IND_BLOCK], DATABLOCK1))
++ {
++ errnum = ERR_FSYS_CORRUPT;
++ return -1;
++ }
++ mapblock1 = 1;
++ return ((__u32 *) DATABLOCK1)[logical_block];
++ }
++ /* else */
++ logical_block -= EXT2_ADDR_PER_BLOCK (SUPERBLOCK);
++ /* now try the double indirect block */
++ if (logical_block < (1 << (EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK) * 2)))
++ {
++ int bnum;
++ if (mapblock1 != 2
++ && !ext2_rdfsb (INODE->i_block[EXT2_DIND_BLOCK], DATABLOCK1))
++ {
++ errnum = ERR_FSYS_CORRUPT;
++ return -1;
++ }
++ mapblock1 = 2;
++ if ((bnum = (((__u32 *) DATABLOCK1)
++ [logical_block >> EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK)]))
++ != mapblock2
++ && !ext2_rdfsb (bnum, DATABLOCK2))
++ {
++ errnum = ERR_FSYS_CORRUPT;
++ return -1;
++ }
++ mapblock2 = bnum;
++ return ((__u32 *) DATABLOCK2)
++ [logical_block & (EXT2_ADDR_PER_BLOCK (SUPERBLOCK) - 1)];
++ }
++ /* else */
++ mapblock2 = -1;
++ logical_block -= (1 << (EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK) * 2));
++ if (mapblock1 != 3
++ && !ext2_rdfsb (INODE->i_block[EXT2_TIND_BLOCK], DATABLOCK1))
++ {
++ errnum = ERR_FSYS_CORRUPT;
++ return -1;
++ }
++ mapblock1 = 3;
++ if (!ext2_rdfsb (((__u32 *) DATABLOCK1)
++ [logical_block >> (EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK)
++ * 2)],
++ DATABLOCK2))
++ {
++ errnum = ERR_FSYS_CORRUPT;
++ return -1;
++ }
++ if (!ext2_rdfsb (((__u32 *) DATABLOCK2)
++ [(logical_block >> EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK))
++ & (EXT2_ADDR_PER_BLOCK (SUPERBLOCK) - 1)],
++ DATABLOCK2))
++ {
++ errnum = ERR_FSYS_CORRUPT;
++ return -1;
++ }
+ return ((__u32 *) DATABLOCK2)
+- [logical_block & (EXT2_ADDR_PER_BLOCK (SUPERBLOCK) - 1)];
+- }
+- /* else */
+- mapblock2 = -1;
+- logical_block -= (1 << (EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK) * 2));
+- if (mapblock1 != 3
+- && !ext2_rdfsb (INODE->i_block[EXT2_TIND_BLOCK], DATABLOCK1))
+- {
+- errnum = ERR_FSYS_CORRUPT;
+- return -1;
++ [logical_block & (EXT2_ADDR_PER_BLOCK (SUPERBLOCK) - 1)];
+ }
+- mapblock1 = 3;
+- if (!ext2_rdfsb (((__u32 *) DATABLOCK1)
+- [logical_block >> (EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK)
+- * 2)],
+- DATABLOCK2))
+- {
+- errnum = ERR_FSYS_CORRUPT;
+- return -1;
+- }
+- if (!ext2_rdfsb (((__u32 *) DATABLOCK2)
+- [(logical_block >> EXT2_ADDR_PER_BLOCK_BITS (SUPERBLOCK))
+- & (EXT2_ADDR_PER_BLOCK (SUPERBLOCK) - 1)],
+- DATABLOCK2))
++ /* inode is in extents format */
++ else
+ {
++ int i;
++ struct ext4_extent_header *extent_hdr = ext4_recurse_extent_index((struct ext4_extent_header *) INODE->i_block, logical_block);
++ struct ext4_extent *extent = (struct ext4_extent *) (extent_hdr + 1);
++ if ( extent_hdr == NULL || extent_hdr->eh_magic != EXT4_EXT_MAGIC)
++ {
++ errnum = ERR_FSYS_CORRUPT;
++ return -1;
++ }
++ for (i = 0; i<extent_hdr->eh_entries; i++)
++ {
++ if (extent[i].ee_block <= logical_block && logical_block < extent[i].ee_block + extent[i].ee_len && !(extent[i].ee_len>>15))
++ return (logical_block - extent[i].ee_block + extent[i].ee_start);
++ }
++ /* We should not arrive here */
+ errnum = ERR_FSYS_CORRUPT;
+ return -1;
+ }
+- return ((__u32 *) DATABLOCK2)
+- [logical_block & (EXT2_ADDR_PER_BLOCK (SUPERBLOCK) - 1)];
+ }
+
+ /* preconditions: all preconds of ext2fs_block_map */
diff --git a/libre/grub/grub-0.97-gpt.patch b/libre/grub/grub-0.97-gpt.patch
new file mode 100644
index 000000000..7b1a55cd8
--- /dev/null
+++ b/libre/grub/grub-0.97-gpt.patch
@@ -0,0 +1,315 @@
+diff -ruBbd --unidirectional-new-file grub-0.96/stage2/builtins.c grub-0.96-patched/stage2/builtins.c
+--- grub-0.96/stage2/builtins.c 2004-06-20 09:33:04.000000000 -0400
++++ grub-0.96-patched/stage2/builtins.c 2007-01-04 13:56:06.000000000 -0500
+@@ -1229,14 +1229,15 @@
+ for (drive = 0x80; drive < 0x88; drive++)
+ {
+ unsigned long part = 0xFFFFFF;
+- unsigned long start, len, offset, ext_offset;
+- int type, entry;
++ unsigned long start, len, offset, ext_offset, gpt_offset;
++ int type, entry, gpt_count, gpt_size;
+ char buf[SECTOR_SIZE];
+
+ current_drive = drive;
+ while (next_partition (drive, 0xFFFFFF, &part, &type,
+ &start, &len, &offset, &entry,
+- &ext_offset, buf))
++ &ext_offset, &gpt_offset,
++ &gpt_count, &gpt_size, buf))
+ {
+ if (type != PC_SLICE_TYPE_NONE
+ && ! IS_PC_SLICE_TYPE_BSD (type)
+@@ -2806,8 +2807,8 @@
+ {
+ int new_type;
+ unsigned long part = 0xFFFFFF;
+- unsigned long start, len, offset, ext_offset;
+- int entry, type;
++ unsigned long start, len, offset, ext_offset, gpt_offset;
++ int entry, type, gpt_count, gpt_size;
+ char mbr[512];
+
+ /* Get the drive and the partition. */
+@@ -2844,7 +2845,14 @@
+ /* Look for the partition. */
+ while (next_partition (current_drive, 0xFFFFFF, &part, &type,
+ &start, &len, &offset, &entry,
+- &ext_offset, mbr))
++ &ext_offset, &gpt_offset, &gpt_count, &gpt_size, mbr))
++ /* The partition may not be a GPT partition. */
++ if (gpt_offset != 0)
++ {
++ errnum = ERR_BAD_ARGUMENT;
++ return 1;
++ }
++
+ {
+ if (part == current_partition)
+ {
+diff -ruBbd --unidirectional-new-file grub-0.96/stage2/disk_io.c grub-0.96-patched/stage2/disk_io.c
+--- grub-0.96/stage2/disk_io.c 2004-05-23 12:35:24.000000000 -0400
++++ grub-0.96-patched/stage2/disk_io.c 2007-01-04 14:01:08.000000000 -0500
+@@ -21,6 +21,7 @@
+
+ #include <shared.h>
+ #include <filesys.h>
++#include <gpt.h>
+
+ #ifdef SUPPORT_NETBOOT
+ # define GRUB 1
+@@ -502,8 +503,8 @@
+ set_partition_hidden_flag (int hidden)
+ {
+ unsigned long part = 0xFFFFFF;
+- unsigned long start, len, offset, ext_offset;
+- int entry, type;
++ unsigned long start, len, offset, ext_offset, gpt_offset;
++ int entry, type, gpt_count, gpt_size;
+ char mbr[512];
+
+ /* The drive must be a hard disk. */
+@@ -524,7 +525,14 @@
+ /* Look for the partition. */
+ while (next_partition (current_drive, 0xFFFFFF, &part, &type,
+ &start, &len, &offset, &entry,
+- &ext_offset, mbr))
++ &ext_offset, &gpt_offset, &gpt_count, &gpt_size, mbr))
++ /* The partition may not be a GPT partition. */
++ if (gpt_offset != 0)
++ {
++ errnum = ERR_BAD_ARGUMENT;
++ return 1;
++ }
++
+ {
+ if (part == current_partition)
+ {
+@@ -577,11 +585,14 @@
+ unsigned long *partition, int *type,
+ unsigned long *start, unsigned long *len,
+ unsigned long *offset, int *entry,
+- unsigned long *ext_offset, char *buf)
++ unsigned long *ext_offset,
++ unsigned long *gpt_offset, int *gpt_count,
++ int *gpt_size, char *buf)
+ {
+ /* Forward declarations. */
+ auto int next_bsd_partition (void);
+ auto int next_pc_slice (void);
++ auto int next_gpt_slice(void);
+
+ /* Get next BSD partition in current PC slice. */
+ int next_bsd_partition (void)
+@@ -666,6 +677,40 @@
+ return 0;
+ }
+
++ /* If this is a GPT partition table, read it as such. */
++ if (*entry == -1 && *offset == 0 && PC_SLICE_TYPE (buf, 0) == PC_SLICE_TYPE_GPT)
++ {
++ struct grub_gpt_header *hdr = (struct grub_gpt_header *) buf;
++
++ /* Read in the GPT Partition table header. */
++ if (! rawread (drive, 1, 0, SECTOR_SIZE, buf))
++ return 0;
++
++ if (hdr->magic == GPT_HEADER_MAGIC && hdr->version == 0x10000)
++ {
++ /* Let gpt_offset point to the first entry in the GPT
++ partition table. This can also be used by callers of
++ next_partition to determine if a entry comes from a
++ GPT partition table or not. */
++ *gpt_offset = hdr->partitions;
++ *gpt_count = hdr->maxpart;
++ *gpt_size = hdr->partentry_size;
++
++ return next_gpt_slice();
++ }
++ else
++ {
++ /* This is not a valid header for a GPT partition table.
++ Re-read the MBR or the boot sector of the extended
++ partition. */
++ if (! rawread (drive, *offset, 0, SECTOR_SIZE, buf))
++ return 0;
++ }
++ }
++
++ /* Not a GPT partition. */
++ *gpt_offset = 0;
++
+ /* Increase the entry number. */
+ (*entry)++;
+
+@@ -710,6 +755,43 @@
+ return 1;
+ }
+
++ /* Get the next GPT slice. */
++ int next_gpt_slice (void)
++ {
++ struct grub_gpt_partentry *gptentry = (struct grub_gpt_partentry *) buf;
++ /* Make GPT partitions show up as PC slices. */
++ int pc_slice_no = (*partition & 0xFF0000) >> 16;
++
++ /* If this is the first time... */
++ if (pc_slice_no == 0xFF)
++ {
++ pc_slice_no = -1;
++ *entry = -1;
++ }
++
++ do {
++ (*entry)++;
++
++ if (*entry >= *gpt_count)
++ {
++ errnum = ERR_NO_PART;
++ return 0;
++ }
++ /* Read in the GPT Partition table entry. */
++ if (! rawread (drive, (*gpt_offset) + GPT_ENTRY_SECTOR (*gpt_size, *entry), GPT_ENTRY_INDEX (*gpt_size, *entry), *gpt_size, buf))
++ return 0;
++ } while (! (gptentry->type1 && gptentry->type2));
++
++ pc_slice_no++;
++ *start = gptentry->start;
++ *len = gptentry->end - gptentry->start + 1;
++ *type = PC_SLICE_TYPE_EXT2FS;
++ *entry = pc_slice_no;
++ *partition = (*entry << 16) | 0xFFFF;
++
++ return 1;
++ }
++
+ /* Start the body of this function. */
+
+ #ifndef STAGE1_5
+@@ -717,6 +799,9 @@
+ return 0;
+ #endif
+
++ if (*partition != 0xFFFFFF && *gpt_offset != 0)
++ return next_gpt_slice ();
++
+ /* If previous partition is a BSD partition or a PC slice which
+ contains BSD partitions... */
+ if ((*partition != 0xFFFFFF && IS_PC_SLICE_TYPE_BSD (*type & 0xff))
+@@ -755,6 +840,9 @@
+ unsigned long dest_partition = current_partition;
+ unsigned long part_offset;
+ unsigned long ext_offset;
++ unsigned long gpt_offset;
++ int gpt_count;
++ int gpt_size;
+ int entry;
+ char buf[SECTOR_SIZE];
+ int bsd_part, pc_slice;
+@@ -766,7 +854,8 @@
+ int ret = next_partition (current_drive, dest_partition,
+ &current_partition, &current_slice,
+ &part_start, &part_length,
+- &part_offset, &entry, &ext_offset, buf);
++ &part_offset, &entry, &ext_offset,
++ &gpt_offset, &gpt_count, &gpt_size, buf);
+ bsd_part = (current_partition >> 8) & 0xFF;
+ pc_slice = current_partition >> 16;
+ return ret;
+diff -ruBbd --unidirectional-new-file grub-0.96/stage2/gpt.h grub-0.96-patched/stage2/gpt.h
+--- grub-0.96/stage2/gpt.h 1969-12-31 19:00:00.000000000 -0500
++++ grub-0.96-patched/stage2/gpt.h 2007-01-04 13:52:14.000000000 -0500
+@@ -0,0 +1,68 @@
++/*
++ * GRUB -- GRand Unified Bootloader
++ * Copyright (C) 2002,2005,2006 Free Software Foundation, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, 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, write to the Free Software
++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++#ifndef _GPT_H
++#define _GPT_H
++
++typedef signed char grub_int8_t;
++typedef signed short grub_int16_t;
++typedef signed int grub_int32_t;
++typedef signed long long int grub_int64_t;
++typedef unsigned char grub_uint8_t;
++typedef unsigned short grub_uint16_t;
++typedef unsigned int grub_uint32_t;
++typedef unsigned long long int grub_uint64_t;
++
++struct grub_gpt_header
++{
++ grub_uint64_t magic;
++ grub_uint32_t version;
++ grub_uint32_t headersize;
++ grub_uint32_t crc32;
++ grub_uint32_t unused1;
++ grub_uint64_t primary;
++ grub_uint64_t backup;
++ grub_uint64_t start;
++ grub_uint64_t end;
++ grub_uint8_t guid[16];
++ grub_uint64_t partitions;
++ grub_uint32_t maxpart;
++ grub_uint32_t partentry_size;
++ grub_uint32_t partentry_crc32;
++} __attribute__ ((packed));
++
++struct grub_gpt_partentry
++{
++ grub_uint64_t type1;
++ grub_uint64_t type2;
++ grub_uint8_t guid[16];
++ grub_uint64_t start;
++ grub_uint64_t end;
++ grub_uint8_t attrib;
++ char name[72];
++} __attribute__ ((packed));
++
++#define GPT_HEADER_MAGIC 0x5452415020494645UL
++
++#define GPT_ENTRY_SECTOR(size,entry) \
++ ((((entry) * (size) + 1) & ~(SECTOR_SIZE - 1)) >> SECTOR_BITS)
++#define GPT_ENTRY_INDEX(size,entry) \
++ ((((entry) * (size) + 1) & (SECTOR_SIZE - 1)) - 1)
++
++#endif /* _GPT_H */
+diff -ruBbd --unidirectional-new-file grub-0.96/stage2/pc_slice.h grub-0.96-patched/stage2/pc_slice.h
+--- grub-0.96/stage2/pc_slice.h 2003-07-09 07:45:53.000000000 -0400
++++ grub-0.96-patched/stage2/pc_slice.h 2007-01-04 13:52:14.000000000 -0500
+@@ -115,6 +115,7 @@
+ #define PC_SLICE_TYPE_LINUX_EXTENDED 0x85
+ #define PC_SLICE_TYPE_VSTAFS 0x9e
+ #define PC_SLICE_TYPE_DELL_UTIL 0xde
++#define PC_SLICE_TYPE_GPT 0xee
+ #define PC_SLICE_TYPE_LINUX_RAID 0xfd
+
+
+diff -ruBbd --unidirectional-new-file grub-0.96/stage2/shared.h grub-0.96-patched/stage2/shared.h
+--- grub-0.96/stage2/shared.h 2004-06-19 12:40:09.000000000 -0400
++++ grub-0.96-patched/stage2/shared.h 2007-01-04 13:52:15.000000000 -0500
+@@ -934,7 +934,9 @@
+ unsigned long *partition, int *type,
+ unsigned long *start, unsigned long *len,
+ unsigned long *offset, int *entry,
+- unsigned long *ext_offset, char *buf);
++ unsigned long *ext_offset,
++ unsigned long *gpt_offset, int *gpt_count,
++ int *gpt_size, char *buf);
+
+ /* Sets device to the one represented by the SAVED_* parameters. */
+ int make_saved_active (void);
diff --git a/libre/grub/grub-0.97-ldflags-objcopy-remove-build-id.patch b/libre/grub/grub-0.97-ldflags-objcopy-remove-build-id.patch
new file mode 100644
index 000000000..2b7cc32d0
--- /dev/null
+++ b/libre/grub/grub-0.97-ldflags-objcopy-remove-build-id.patch
@@ -0,0 +1,196 @@
+diff --git a/Makefile.in b/Makefile.in
+index 6652366..ba058eb 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -112,6 +112,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
++LOADER_LDFLAGS = @LOADER_LDFLAGS@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAINT = @MAINT@
+ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+diff --git a/acinclude.m4 b/acinclude.m4
+index 368839c..32b3fa6 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -57,7 +57,7 @@ else
+ fi
+ grub_cv_prog_objcopy_absolute=yes
+ for link_addr in 2000 8000 7C00; do
+- if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr conftest.o -o conftest.exec]); then :
++ if AC_TRY_COMMAND([${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr -Wl,--build-id=none conftest.o -o conftest.exec]); then :
+ else
+ AC_MSG_ERROR([${CC-cc} cannot link at address $link_addr])
+ fi
+diff --git a/configure.ac b/configure.ac
+index bb9e1d9..9ac5c9f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -115,6 +115,9 @@ if test "x$ac_cv_prog_gcc" = xyes; then
+ fi
+ fi
+
++LOADER_LDFLAGS="-Wl,--build-id=none"
++AC_SUBST(LOADER_LDFLAGS)
++
+ AC_SUBST(STAGE1_CFLAGS)
+ AC_SUBST(STAGE2_CFLAGS)
+ AC_SUBST(GRUB_CFLAGS)
+diff --git a/docs/Makefile.in b/docs/Makefile.in
+index 3e2de4b..7b2c94d 100644
+--- a/docs/Makefile.in
++++ b/docs/Makefile.in
+@@ -131,6 +131,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
++LOADER_LDFLAGS = @LOADER_LDFLAGS@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAINT = @MAINT@
+ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+diff --git a/grub/Makefile.in b/grub/Makefile.in
+index 136c38f..7c23ebe 100644
+--- a/grub/Makefile.in
++++ b/grub/Makefile.in
+@@ -108,6 +108,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
++LOADER_LDFLAGS = @LOADER_LDFLAGS@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAINT = @MAINT@
+ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+diff --git a/lib/Makefile.in b/lib/Makefile.in
+index 3dae206..449e126 100644
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -107,6 +107,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
++LOADER_LDFLAGS = @LOADER_LDFLAGS@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAINT = @MAINT@
+ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+diff --git a/netboot/Makefile.in b/netboot/Makefile.in
+index 75ac299..0275768 100644
+--- a/netboot/Makefile.in
++++ b/netboot/Makefile.in
+@@ -108,6 +108,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
++LOADER_LDFLAGS = @LOADER_LDFLAGS@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAINT = @MAINT@
+ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+diff --git a/stage1/Makefile.am b/stage1/Makefile.am
+index 0afc285..3d83356 100644
+--- a/stage1/Makefile.am
++++ b/stage1/Makefile.am
+@@ -5,7 +5,7 @@ CLEANFILES = $(nodist_pkglib_DATA)
+
+ # We can't use builtins or standard includes.
+ AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc
+-LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
++LDFLAGS = $(LOADER_LDFLAGS) -nostdlib -Wl,-N,-Ttext,7C00
+
+ noinst_PROGRAMS = stage1.exec
+ stage1_exec_SOURCES = stage1.S stage1.h
+diff --git a/stage1/Makefile.in b/stage1/Makefile.in
+index 7134bdf..ee4477f 100644
+--- a/stage1/Makefile.in
++++ b/stage1/Makefile.in
+@@ -110,9 +110,10 @@ INSTALL_DATA = @INSTALL_DATA@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+-LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00
++LDFLAGS = $(LOADER_LDFLAGS) -nostdlib -Wl,-N,-Ttext,7C00
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
++LOADER_LDFLAGS = @LOADER_LDFLAGS@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAINT = @MAINT@
+ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+diff --git a/stage2/Makefile.am b/stage2/Makefile.am
+index f8e6d42..ff6f347 100644
+--- a/stage2/Makefile.am
++++ b/stage2/Makefile.am
+@@ -55,11 +55,11 @@ noinst_PROGRAMS = pre_stage2.exec start.exec start_eltorito.exec \
+ endif
+ MOSTLYCLEANFILES = $(noinst_PROGRAMS)
+
+-PRE_STAGE2_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,8200
+-START_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,8000
+-NBLOADER_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,0
+-PXELOADER_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00
+-START_ELTORITO_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00
++PRE_STAGE2_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,8200 $(LOADER_LDFLAGS)
++START_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,8000 $(LOADER_LDFLAGS)
++NBLOADER_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,0 $(LOADER_LDFLAGS)
++PXELOADER_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00 $(LOADER_LDFLAGS)
++START_ELTORITO_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00 $(LOADER_LDFLAGS)
+
+ if NETBOOT_SUPPORT
+ NETBOOT_FLAGS = -I$(top_srcdir)/netboot -DSUPPORT_NETBOOT=1
+@@ -82,7 +82,7 @@ endif
+ STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
+ $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
+
+-STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
++STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 $(LOADER_LDFLAGS)
+ STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1
+
+ # For stage2 target.
+diff --git a/stage2/Makefile.in b/stage2/Makefile.in
+index d0062bd..88b2038 100644
+--- a/stage2/Makefile.in
++++ b/stage2/Makefile.in
+@@ -355,6 +355,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
++LOADER_LDFLAGS = @LOADER_LDFLAGS@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAINT = @MAINT@
+ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+@@ -468,11 +469,11 @@ libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \
+ @DISKLESS_SUPPORT_FALSE@noinst_DATA = pre_stage2 start start_eltorito
+ @DISKLESS_SUPPORT_TRUE@noinst_DATA = pre_stage2 start start_eltorito nbloader pxeloader diskless
+ MOSTLYCLEANFILES = $(noinst_PROGRAMS)
+-PRE_STAGE2_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,8200
+-START_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,8000
+-NBLOADER_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,0
+-PXELOADER_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00
+-START_ELTORITO_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00
++PRE_STAGE2_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,8200 $(LOADER_LDFLAGS)
++START_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,8000 $(LOADER_LDFLAGS)
++NBLOADER_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,0 $(LOADER_LDFLAGS)
++PXELOADER_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00 $(LOADER_LDFLAGS)
++START_ELTORITO_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00 $(LOADER_LDFLAGS)
+ @NETBOOT_SUPPORT_FALSE@NETBOOT_FLAGS =
+ @NETBOOT_SUPPORT_TRUE@NETBOOT_FLAGS = -I$(top_srcdir)/netboot -DSUPPORT_NETBOOT=1
+ @SERIAL_SUPPORT_FALSE@SERIAL_FLAGS =
+@@ -482,7 +483,7 @@ START_ELTORITO_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00
+ STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
+ $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
+
+-STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
++STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 $(LOADER_LDFLAGS)
+ STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1
+
+ # For stage2 target.
+diff --git a/util/Makefile.in b/util/Makefile.in
+index e700cf7..cd3bf51 100644
+--- a/util/Makefile.in
++++ b/util/Makefile.in
+@@ -113,6 +113,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+ LIBS = @LIBS@
++LOADER_LDFLAGS = @LOADER_LDFLAGS@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAINT = @MAINT@
+ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
diff --git a/libre/grub/grub-inode-size.patch b/libre/grub/grub-inode-size.patch
new file mode 100644
index 000000000..f5ceb110b
--- /dev/null
+++ b/libre/grub/grub-inode-size.patch
@@ -0,0 +1,100 @@
+diff -Naur grub-0.97-800/stage2/fsys_ext2fs.c grub-0.97-810/stage2/fsys_ext2fs.c
+--- grub-0.97-800/stage2/fsys_ext2fs.c 2008-07-21 00:40:21.668879475 -0600
++++ grub-0.97-810/stage2/fsys_ext2fs.c 2008-07-21 01:01:11.063953773 -0600
+@@ -79,7 +79,52 @@
+ __u32 s_rev_level; /* Revision level */
+ __u16 s_def_resuid; /* Default uid for reserved blocks */
+ __u16 s_def_resgid; /* Default gid for reserved blocks */
+- __u32 s_reserved[235]; /* Padding to the end of the block */
++ /*
++ * These fields are for EXT2_DYNAMIC_REV superblocks only.
++ *
++ * Note: the difference between the compatible feature set and
++ * the incompatible feature set is that if there is a bit set
++ * in the incompatible feature set that the kernel doesn't
++ * know about, it should refuse to mount the filesystem.
++ *
++ * e2fsck's requirements are more strict; if it doesn't know
++ * about a feature in either the compatible or incompatible
++ * feature set, it must abort and not try to meddle with
++ * things it doesn't understand...
++ */
++ __u32 s_first_ino; /* First non-reserved inode */
++ __u16 s_inode_size; /* size of inode structure */
++ __u16 s_block_group_nr; /* block group # of this superblock */
++ __u32 s_feature_compat; /* compatible feature set */
++ __u32 s_feature_incompat; /* incompatible feature set */
++ __u32 s_feature_ro_compat; /* readonly-compatible feature set */
++ __u8 s_uuid[16]; /* 128-bit uuid for volume */
++ char s_volume_name[16]; /* volume name */
++ char s_last_mounted[64]; /* directory where last mounted */
++ __u32 s_algorithm_usage_bitmap; /* For compression */
++ /*
++ * Performance hints. Directory preallocation should only
++ * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
++ */
++ __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
++ __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
++ __u16 s_reserved_gdt_blocks;/* Per group table for online growth */
++ /*
++ * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
++ */
++ __u8 s_journal_uuid[16]; /* uuid of journal superblock */
++ __u32 s_journal_inum; /* inode number of journal file */
++ __u32 s_journal_dev; /* device number of journal file */
++ __u32 s_last_orphan; /* start of list of inodes to delete */
++ __u32 s_hash_seed[4]; /* HTREE hash seed */
++ __u8 s_def_hash_version; /* Default hash version to use */
++ __u8 s_jnl_backup_type; /* Default type of journal backup */
++ __u16 s_reserved_word_pad;
++ __u32 s_default_mount_opts;
++ __u32 s_first_meta_bg; /* First metablock group */
++ __u32 s_mkfs_time; /* When the filesystem was created */
++ __u32 s_jnl_blocks[17]; /* Backup of the journal inode */
++ __u32 s_reserved[172]; /* Padding to the end of the block */
+ };
+
+ struct ext2_group_desc
+@@ -218,6 +263,14 @@
+ #define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
+ #define EXT2_ADDR_PER_BLOCK_BITS(s) (log2(EXT2_ADDR_PER_BLOCK(s)))
+
++#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
++#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
++#define EXT2_GOOD_OLD_INODE_SIZE 128
++#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
++ EXT2_GOOD_OLD_INODE_SIZE : \
++ (s)->s_inode_size)
++#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s))
++
+ /* linux/ext2_fs.h */
+ #define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
+ /* kind of from ext2/super.c */
+@@ -553,7 +606,7 @@
+ gdp = GROUP_DESC;
+ ino_blk = gdp[desc].bg_inode_table +
+ (((current_ino - 1) % (SUPERBLOCK->s_inodes_per_group))
+- >> log2 (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)));
++ >> log2 (EXT2_INODES_PER_BLOCK (SUPERBLOCK)));
+ #ifdef E2DEBUG
+ printf ("inode table fsblock=%d\n", ino_blk);
+ #endif /* E2DEBUG */
+@@ -565,13 +618,12 @@
+ /* reset indirect blocks! */
+ mapblock2 = mapblock1 = -1;
+
+- raw_inode = INODE +
+- ((current_ino - 1)
+- & (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode) - 1));
++ raw_inode = (struct ext2_inode *)((char *)INODE +
++ ((current_ino - 1) & (EXT2_INODES_PER_BLOCK (SUPERBLOCK) - 1)) *
++ EXT2_INODE_SIZE (SUPERBLOCK));
+ #ifdef E2DEBUG
+ printf ("ipb=%d, sizeof(inode)=%d\n",
+- (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)),
+- sizeof (struct ext2_inode));
++ EXT2_INODES_PER_BLOCK (SUPERBLOCK), EXT2_INODE_SIZE (SUPERBLOCK));
+ printf ("inode=%x, raw_inode=%x\n", INODE, raw_inode);
+ printf ("offset into inode table block=%d\n", (int) raw_inode - (int) INODE);
+ for (i = (unsigned char *) INODE; i <= (unsigned char *) raw_inode;
+
diff --git a/libre/grub/grub.install b/libre/grub/grub.install
new file mode 100644
index 000000000..c1f077d59
--- /dev/null
+++ b/libre/grub/grub.install
@@ -0,0 +1,20 @@
+infodir=/usr/share/info
+filelist=(grub.info multiboot.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/libre/grub/i2o.patch b/libre/grub/i2o.patch
new file mode 100644
index 000000000..2af846c90
--- /dev/null
+++ b/libre/grub/i2o.patch
@@ -0,0 +1,45 @@
+Only in grub-0.94/docs: grub.info
+Only in grub-0.94/docs: multiboot.info
+diff -ur grub-0.94/lib/device.c grub-0.94.new/lib/device.c
+--- grub-0.94/lib/device.c 2004-05-07 04:50:36.375238696 +0200
++++ grub-0.94.new/lib/device.c 2004-05-07 04:48:57.611253104 +0200
+@@ -419,6 +419,12 @@
+ {
+ sprintf (name, "/dev/rd/c%dd%d", controller, drive);
+ }
++
++static void
++get_i2o_disk_name (char *name, int unit)
++{
++ sprintf (name, "/dev/i2o/hd%c", unit + 'a');
++}
+ #endif
+
+ /* Check if DEVICE can be read. If an error occurs, return zero,
+@@ -789,6 +795,26 @@
+ }
+ }
+ }
++
++ /* I2O disks. */
++ for (i = 0; i < 8; i++)
++ {
++ char name[16];
++
++ get_i2o_disk_name (name, i);
++ if (check_device (name))
++ {
++ (*map)[num_hd + 0x80] = strdup (name);
++ assert ((*map)[num_hd + 0x80]);
++
++ /* If the device map file is opened, write the map. */
++ if (fp)
++ fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
++
++ num_hd++;
++ }
++ }
++
+ #endif /* __linux__ */
+
+ /* OK, close the device map file if opened. */
diff --git a/libre/grub/install-grub b/libre/grub/install-grub
new file mode 100644
index 000000000..affc9c38a
--- /dev/null
+++ b/libre/grub/install-grub
@@ -0,0 +1,204 @@
+#!/bin/bash
+
+#
+# This is a little helper script that tries to convert linux-style device
+# names to grub-style. It's not very smart, so it
+# probably won't work for more complicated setups.
+#
+# If it doesn't work for you, try installing grub manually:
+#
+# # mkdir -p /boot/grub
+# # cp /usr/lib/grub/i386-pc/* /boot/grub/
+#
+# Then start up the 'grub' shell and run something like the following:
+#
+# grub> root (hd0,0)
+# grub> setup (hd0)
+#
+# The "root" line should point to the partition your kernel is located on,
+# /boot if you have a separate boot partition, otherwise your root (/).
+#
+# The "setup" line tells grub which disc/partition to install the
+# bootloader to. In the example above, it will install to the MBR of the
+# primary master hard drive.
+#
+
+usage() {
+ echo "usage: install-grub <install_device> [boot_device]"
+ echo
+ echo "where <install_device> is the device where Grub will be installed"
+ echo "and [boot_device] is the partition that contains the /boot"
+ echo "directory (auto-detected if omitted)"
+ echo
+ echo "examples: install-grub /dev/hda"
+ echo " install-grub /dev/hda /dev/hda1"
+ echo
+ exit 0
+}
+
+## new install-grub, code was taken from setup script
+ROOTDEV=${1}
+PART_ROOT=${2}
+
+if [ "${ROOTDEV}" = "" ]; then
+ usage
+fi
+if [ "${PART_ROOT}" = "" ]; then
+ PART_ROOT=$(mount | grep "on /boot type" | cut -d' ' -f 1)
+fi
+if [ "$PART_ROOT" = "" ]; then
+ PART_ROOT=$(mount | grep "on / type" | cut -d' ' -f 1)
+fi
+if [ "${PART_ROOT}" = "" ]; then
+ echo "error: could not determine BOOT_DEVICE, please specify manually" >&2
+ exit 1
+fi
+
+
+get_grub_map() {
+ [ -e /tmp/dev.map ] && rm /tmp/dev.map
+ /sbin/grub --no-floppy --device-map /tmp/dev.map >/tmp/grub.log 2>&1 <<EOF
+quit
+EOF
+}
+
+mapdev() {
+ partition_flag=0
+ device_found=0
+ devs=$(cat /tmp/dev.map | grep -v fd | sed 's/ *\t/ /' | sed ':a;$!N;$!ba;s/\n/ /g')
+ linuxdevice=$(echo $1 | cut -b1-8)
+ if [ "$(echo ${1} | egrep '[0-9]$')" ]; then
+ # /dev/hdXY
+ pnum=$(echo ${1} | cut -b9-)
+ pnum=$((${pnum}-1))
+ partition_flag=1
+ fi
+ for dev in ${devs}; do
+ if [ "(" = $(echo ${dev} | cut -b1) ]; then
+ grubdevice="${dev}"
+ else
+ if [ "${dev}" = "${linuxdevice}" ]; then
+ device_found=1
+ break
+ fi
+ fi
+ done
+ if [ "${device_found}" = "1" ]; then
+ if [ "${partition_flag}" = "0" ]; then
+ echo "${grubdevice}"
+ else
+ grubdevice_stringlen=${#grubdevice}
+ let grubdevice_stringlen--
+ grubdevice=$(echo $grubdevice | cut -b1-$grubdevice_stringlen)
+ echo "${grubdevice},${pnum})"
+ fi
+ else
+ echo " DEVICE NOT FOUND"
+ fi
+}
+
+dogrub() {
+ get_grub_map
+ if [ ! -f /boot/grub/menu.lst ]; then
+ echo "Error: Couldn't find /boot/grub/menu.lst. Is GRUB installed?"
+ exit 1
+ fi
+ # try to auto-configure GRUB...
+ if [ "${PART_ROOT}" != "" -a "$S_GRUB" != "1" ]; then
+ grubdev=$(mapdev ${PART_ROOT})
+ # look for a separately-mounted /boot partition
+ bootdev=$(mount | grep /boot | cut -d' ' -f 1)
+ if [ "${grubdev}" != "" -o "${bootdev}" != "" ]; then
+ cp /boot/grub/menu.lst /tmp/.menu.lst
+ # remove the default entries by truncating the file at our little tag (#-*)
+ head -n $(cat /tmp/.menu.lst | grep -n '#-\*' | cut -d: -f 1) /tmp/.menu.lst >/boot/grub/menu.lst
+ rm -f /tmp/.menu.lst
+
+ for kernel in /boot/vmlinuz-linux* /boot/vmlinuz26-*; do
+ if [ ${kernel} == "/boot/vmlinuz-linux*" ] || [ ${kernel} == "/boot/vmlinuz26-*" ] ; then
+ echo > /dev/null
+ else
+ VMLINUZ=$( echo ${kernel} | cut -c 7- )
+
+ if [ "$( echo ${VMLINUZ} | cut -c -13 )" = "vmlinuz-linux" ]; then # new naming scheme for linux > 3.0
+ extension=$( echo ${VMLINUZ} | cut -c 14- )
+ INITRAMFS_BASENAME=initramfs-linux${extension}
+ else # old naming scheme for lts kernel
+ extension=$( echo ${VMLINUZ} | cut -c 10- )
+ INITRAMFS_BASENAME=kernel26${extension}
+ fi
+
+ echo "" >>/boot/grub/menu.lst
+ echo "# (0) Parabola GNU/Linux-libre" >>/boot/grub/menu.lst
+ echo "title Parabola GNU/Linux-libre - ${VMLINUZ}" >>/boot/grub/menu.lst
+ subdir=
+ if [ "${bootdev}" != "" ]; then
+ grubdev=$(mapdev ${bootdev})
+ else
+ subdir="/boot"
+ fi
+ echo "root ${grubdev}" >>/boot/grub/menu.lst
+ echo "kernel ${subdir}/${VMLINUZ} root=${PART_ROOT} ro" >>/boot/grub/menu.lst
+ echo "initrd ${subdir}/${INITRAMFS_BASENAME}.img" >>/boot/grub/menu.lst
+ echo "" >>/boot/grub/menu.lst
+
+ # adding fallback/full image
+ echo "# (1) Parabola GNU/Linux-libre" >>/boot/grub/menu.lst
+ echo "title Parabola GNU/Linux-libre Fallback - ${VMLINUZ}" >>/boot/grub/menu.lst
+ echo "root ${grubdev}" >>/boot/grub/menu.lst
+ echo "kernel ${subdir}/${VMLINUZ} root=${PART_ROOT} ro" >>/boot/grub/menu.lst
+ echo "initrd ${subdir}/${INITRAMFS_BASENAME}-fallback.img" >>/boot/grub/menu.lst
+ echo "" >>/boot/grub/menu.lst
+ fi
+ done
+ fi
+ fi
+
+ echo "Installing the GRUB bootloader..."
+ cp -a /usr/lib/grub/i386-pc/* /boot/grub/
+ sync
+
+ # freeze xfs filesystems to enable grub installation on xfs filesystems
+ if [ -x /usr/sbin/xfs_freeze ]; then
+ [ "$(stat -fLc %T /boot)" == "xfs" ] && /usr/sbin/xfs_freeze -f /boot > /dev/null 2>&1
+ [ "$(stat -fLc %T /)" == "xfs" ] && /usr/sbin/xfs_freeze -f / > /dev/null 2>&1
+ fi
+
+ # look for a separately-mounted /boot partition
+ bootpart=$(mount | grep /boot | cut -d' ' -f 1)
+ if [ "${bootpart}" = "" ]; then
+ bootpart=${PART_ROOT}
+ fi
+ bootpart=$(mapdev ${bootpart})
+ bootdev=$(mapdev ${ROOTDEV})
+ if [ "${bootpart}" = "" ]; then
+ echo "Error: Missing/Invalid root device: ${bootpart}"
+ exit 1
+ fi
+
+ echo ${bootpart}
+ echo ${bootdev}
+ /sbin/grub --no-floppy --batch >/tmp/grub.log 2>&1 <<EOF
+root ${bootpart}
+setup ${bootdev}
+quit
+EOF
+ cat /tmp/grub.log
+
+ # unfreeze xfs filesystems
+ if [ -x /usr/sbin/xfs_freeze ]; then
+ [ "$(stat -fLc %T /boot)" == "xfs" ] && /usr/sbin/xfs_freeze -u /boot > /dev/null 2>&1
+ [ "$(stat -fLc %T /)" == "xfs" ] && /usr/sbin/xfs_freeze -u / > /dev/null 2>&1
+ fi
+ if grep "Error [0-9]*: " /tmp/grub.log >/dev/null; then
+ echo "Error installing GRUB. (see /tmp/grub.log for output)"
+ exit 1
+ fi
+ echo "GRUB was successfully installed."
+
+ rm -f /tmp/grub.log
+
+ exit 0
+}
+
+dogrub
diff --git a/libre/grub/intelmac.patch b/libre/grub/intelmac.patch
new file mode 100644
index 000000000..a3fabc733
--- /dev/null
+++ b/libre/grub/intelmac.patch
@@ -0,0 +1,67 @@
+--- grub-0.97.orig/stage2/asm.S 2004-06-19 18:55:22.000000000 +0200
++++ grub-0.97/stage2/asm.S 2006-04-21 11:10:52.000000000 +0200
+@@ -1651,7 +1651,29 @@
+ jnz 3f
+ ret
+
+-3: /* use keyboard controller */
++3: /*
++ * try to switch gateA20 using PORT92, the "Fast A20 and Init"
++ * register
++ */
++ mov $0x92, %dx
++ inb %dx, %al
++ /* skip the port92 code if it's unimplemented (read returns 0xff) */
++ cmpb $0xff, %al
++ jz 6f
++
++ /* set or clear bit1, the ALT_A20_GATE bit */
++ movb 4(%esp), %ah
++ testb %ah, %ah
++ jz 4f
++ orb $2, %al
++ jmp 5f
++4: and $0xfd, %al
++
++ /* clear the INIT_NOW bit don't accidently reset the machine */
++5: and $0xfe, %al
++ outb %al, %dx
++
++6: /* use keyboard controller */
+ pushl %eax
+
+ call gloop1
+@@ -1661,9 +1683,12 @@
+
+ gloopint1:
+ inb $K_STATUS
++ cmpb $0xff, %al
++ jz gloopint1_done
+ andb $K_IBUF_FUL, %al
+ jnz gloopint1
+
++gloopint1_done:
+ movb $KB_OUTPUT_MASK, %al
+ cmpb $0, 0x8(%esp)
+ jz gdoit
+@@ -1684,6 +1709,8 @@
+
+ gloop1:
+ inb $K_STATUS
++ cmpb $0xff, %al
++ jz gloop2ret
+ andb $K_IBUF_FUL, %al
+ jnz gloop1
+
+@@ -1991,6 +2018,11 @@
+ ENTRY(console_getkey)
+ push %ebp
+
++wait_for_key:
++ call EXT_C(console_checkkey)
++ incl %eax
++ jz wait_for_key
++
+ call EXT_C(prot_to_real)
+ .code16
+
diff --git a/libre/grub/menu.lst b/libre/grub/menu.lst
new file mode 100644
index 000000000..43d2ac8db
--- /dev/null
+++ b/libre/grub/menu.lst
@@ -0,0 +1,43 @@
+# Config file for GRUB - The GNU GRand Unified Bootloader
+# /boot/grub/menu.lst
+
+# DEVICE NAME CONVERSIONS
+#
+# Linux Grub
+# -------------------------
+# /dev/fd0 (fd0)
+# /dev/sda (hd0)
+# /dev/sdb2 (hd1,1)
+# /dev/sda3 (hd0,2)
+#
+
+# FRAMEBUFFER RESOLUTION SETTINGS
+# +-------------------------------------------------+
+# | 640x480 800x600 1024x768 1280x1024
+# ----+--------------------------------------------
+# 256 | 0x301=769 0x303=771 0x305=773 0x307=775
+# 32K | 0x310=784 0x313=787 0x316=790 0x319=793
+# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794
+# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795
+# +-------------------------------------------------+
+# for more details and different resolutions see
+# https://wiki.archlinux.org/index.php/GRUB#Framebuffer_resolution
+
+# general configuration:
+timeout 5
+default 0
+color light-blue/black light-cyan/blue
+
+# boot sections follow
+# each is implicitly numbered from 0 in the order of appearance below
+#
+# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
+#
+#-*
+
+# (0) Parabola GNU/Linux-libre
+title Parabola GNU/Linux-libre [/boot/vmlinuz-linux-libre]
+root (hd0,0)
+kernel /vmlinuz-linux-libre root=/dev/sda3 ro
+initrd /initramfs-linux-libre.img
+
diff --git a/libre/grub/more-raid.patch b/libre/grub/more-raid.patch
new file mode 100644
index 000000000..39db23474
--- /dev/null
+++ b/libre/grub/more-raid.patch
@@ -0,0 +1,100 @@
+--- grub-0.95/lib/device.c.moreraid 2004-11-30 17:09:36.736099360 -0500
++++ grub-0.95/lib/device.c 2004-11-30 17:12:17.319686944 -0500
+@@ -544,6 +544,17 @@
+ }
+
+ static void
++get_cciss_disk_name (char * name, int controller, int drive)
++{
++ sprintf (name, "/dev/cciss/c%dd%d", controller, drive);
++}
++
++static void
++get_cpqarray_disk_name (char * name, int controller, int drive)
++{
++ sprintf (name, "/dev/ida/c%dd%d", controller, drive);
++}
++static void
+ get_ataraid_disk_name (char *name, int unit)
+ {
+ sprintf (name, "/dev/ataraid/d%c", unit + '0');
+@@ -920,7 +931,7 @@
+
+ for (controller = 0; controller < 8; controller++)
+ {
+- for (drive = 0; drive < 15; drive++)
++ for (drive = 0; drive < 32; drive++)
+ {
+ char name[24];
+
+@@ -940,6 +951,70 @@
+ }
+ }
+ #endif /* __linux__ */
++
++#ifdef __linux__
++ /* This is for cciss - we have
++ /dev/cciss/c<controller>d<logical drive>p<partition>.
++
++ cciss driver currently supports up to 8 controllers, 16 logical
++ drives, and 7 partitions. */
++ {
++ int controller, drive;
++
++ for (controller = 0; controller < 8; controller++)
++ {
++ for (drive = 0; drive < 16; drive++)
++ {
++ char name[24];
++
++ get_cciss_disk_name (name, controller, drive);
++ if (check_device (name))
++ {
++ (*map)[num_hd + 0x80] = strdup (name);
++ assert ((*map)[num_hd + 0x80]);
++
++ /* If the device map file is opened, write the map. */
++ if (fp)
++ fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
++
++ num_hd++;
++ }
++ }
++ }
++ }
++#endif /* __linux__ */
++
++#ifdef __linux__
++ /* This is for cpqarray - we have
++ /dev/ida/c<controller>d<logical drive>p<partition>.
++
++ cpqarray driver currently supports up to 8 controllers, 16 logical
++ drives, and 15 partitions. */
++ {
++ int controller, drive;
++
++ for (controller = 0; controller < 8; controller++)
++ {
++ for (drive = 0; drive < 15; drive++)
++ {
++ char name[24];
++
++ get_cpqarray_disk_name (name, controller, drive);
++ if (check_device (name))
++ {
++ (*map)[num_hd + 0x80] = strdup (name);
++ assert ((*map)[num_hd + 0x80]);
++
++ /* If the device map file is opened, write the map. */
++ if (fp)
++ fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
++
++ num_hd++;
++ }
++ }
++ }
++ }
++#endif /* __linux__ */
+
+ /* OK, close the device map file if opened. */
+ if (fp)
diff --git a/libre/grub/rePKGBUILD b/libre/grub/rePKGBUILD
new file mode 100644
index 000000000..909ce8550
--- /dev/null
+++ b/libre/grub/rePKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Nicolas Reynolds <fauno@kiwwwi.com.ar>
+source PKGBUILD
+CARCH=x86_64
+unset build package md5sums source
+_repo=core
+source=(PKGBUILD
+ http://mirrors.kernel.org/archlinux/${_repo}/os/${CARCH}/${pkgname%-libre}-$pkgver-$pkgrel-$CARCH$PKGEXT
+ # files for pkg modifications
+ menu.lst
+ install-grub
+ )
+options=(!strip)
+
+build() {
+ cd "${srcdir}/"
+ rm PKGBUILD .{INSTALL,PKGINFO} ${pkgname%-libre}-$pkgver-$pkgrel-$CARCH$PKGEXT
+ # put actions for package modifications below this line
+
+ rm -v boot/grub/menu.lst sbin/install-grub
+}
+
+package() {
+ cd ${srcdir}
+ cp -a ./* ${pkgdir}
+
+ install -D -m644 menu.lst $pkgdir/boot/grub/menu.lst
+ install -D -m755 install-grub $pkgdir/sbin/install-grub
+
+ rm -v menu.lst install-grub ${pkgdir}/menu.lst ${pkgdir}/install-grub
+
+}
+
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre/grub/special-devices.patch b/libre/grub/special-devices.patch
new file mode 100644
index 000000000..894f3e887
--- /dev/null
+++ b/libre/grub/special-devices.patch
@@ -0,0 +1,18 @@
+--- grub-0.93/lib/device.c.raid 2002-05-20 05:53:46.000000000 -0400
++++ grub-0.93/lib/device.c 2002-12-28 23:24:10.000000000 -0500
+@@ -689,7 +689,14 @@
+ if (strcmp (dev + strlen(dev) - 5, "/disc") == 0)
+ strcpy (dev + strlen(dev) - 5, "/part");
+ }
+- sprintf (dev + strlen(dev), "%d", ((partition >> 16) & 0xFF) + 1);
++
++ sprintf (dev + strlen(dev), "%s%d",
++ /* Compaq smart and others */
++ (strncmp(dev, "/dev/ida/", 9) == 0 ||
++ strncmp(dev, "/dev/ataraid/", 13) == 0 ||
++ strncmp(dev, "/dev/cciss/", 11) == 0 ||
++ strncmp(dev, "/dev/rd/", 8) == 0) ? "p" : "",
++ ((partition >> 16) & 0xFF) + 1);
+
+ /* Open the partition. */
+ fd = open (dev, O_RDWR);
diff --git a/libre/grub2/PKGBUILD b/libre/grub2/PKGBUILD
index 6d884dcea..9f445eb1d 100644
--- a/libre/grub2/PKGBUILD
+++ b/libre/grub2/PKGBUILD
@@ -1,24 +1,28 @@
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Keshav P R <skodabenz at rocketmail dot com>
-# _grub2_rev=3072
+# The src pkg includes grub2_bzr_export.sh to create newer grub-extras snapshots. Modify the paths in it accordingly.
-_grub2_lua_ver=19
+# _grub2_rev=3238
+
+_grub2_lua_ver=20
_grub2_gpxe_ver=12
-_grub2_ntldr_ver=13
-_grub2_915_ver=6
+_grub2_ntldr_ver=17
+_grub2_915_ver=7
pkgname=('grub2-common' 'grub2-bios' 'grub2-efi-i386')
pkgbase="grub2"
-pkgver='1.99~rc1'
+pkgver='1.99'
pkgrel=4
url="http://www.gnu.org/software/grub/"
arch=('i686' 'x86_64')
license=('GPL3')
+epoch=1
makedepends=('bdf-unifont' 'python2' 'xz' 'autogen' 'texinfo' 'help2man' 'gettext' 'device-mapper')
options=(strip purge docs zipman !emptydirs)
-source=("ftp://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.gz"
+# "http://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.xz"
+source=("ftp://ftp.gnu.org/gnu/grub/grub-1.99.tar.xz"
"ftp://ftp.archlinux.org/other/grub2/grub2_extras_lua_r${_grub2_lua_ver}.tar.xz"
"ftp://ftp.archlinux.org/other/grub2/grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz"
"ftp://ftp.archlinux.org/other/grub2/grub2_extras_ntldr-img_r${_grub2_ntldr_ver}.tar.xz"
@@ -27,13 +31,25 @@ source=("ftp://alpha.gnu.org/gnu/grub/grub-${pkgver}.tar.gz"
'grub.default'
'grub.cfg'
'20_memtest86+'
- '05_archtheme')
+ 'grub2_bzr_export.sh'
+ 'parabola-mkconfig.patch')
noextract=("grub2_extras_lua_r${_grub2_lua_ver}.tar.xz"
"grub2_extras_gpxe_r${_grub2_gpxe_ver}.tar.xz"
"grub2_extras_ntldr-img_r${_grub2_ntldr_ver}.tar.xz"
"grub2_extras_915resolution_r${_grub2_915_ver}.tar.xz")
+sha1sums=('a5ae9558f30ce7757a76aa130088b053a87e2fb6'
+ '9f2dbf7a3faab24ca92266400aa513fecd3895c8'
+ 'b04994c005910b4bf123f034b30109d5c8d6fd86'
+ 'e0c1a97770cc23226cf4535c029ef50b17f67974'
+ '8bcaed545956bb33581e1b97ac96a2c3717ec793'
+ 'b7e5510c7b171e9c4dbddb42bbf54ce5ee86e2de'
+ 'd1252b837b13ebf817dbc45cfd4d772c7d1b621f'
+ '7df0516c6c45816aa330b775f1ed6f652e4f0380'
+ '82a27eca5277218cf57c6c5767e0b17a72f62229'
+ 'beb31419045db70fee7401aa6448c220a491e2a3'
+ '27930016362d6647282405183b9977f0a7b15c1a')
build() {
# set architecture dependent variables
@@ -55,6 +71,7 @@ build_grub2-common_and_bios() {
## Apply Archlinux specific fixes to enable grub2-mkconfig detect Arch kernels and initramfs
cd ${srcdir}/grub2_bios-${pkgver}
patch -Np1 -i ${srcdir}/archlinux_grub2_mkconfig_fixes.patch
+ patch -Np1 -i ${srcdir}/parabola-mkconfig.patch
# add the grub-extra sources
export GRUB_CONTRIB=${srcdir}/grub2_bios-${pkgver}/grub2-extras/
@@ -125,14 +142,11 @@ build_grub2-efi() {
package_grub2-common() {
pkgdesc="The GNU GRand Unified Bootloader version 2 - Files common for all platforms"
install="grub2.install"
- depends=('xz' 'freetype2' 'device-mapper')
+ depends=('xz' 'freetype2' 'device-mapper' 'gettext' 'texinfo')
conflicts=('grub')
backup=('boot/grub/grub.cfg' 'etc/default/grub' 'etc/grub.d/40_custom')
cd ${srcdir}/grub2_bios-${pkgver}
- make DESTDIR=${pkgdir} install
-
- ## install grub2-extras ntldr-img's grubinst as /sbin/grubinst
- install -Dm755 ${srcdir}/grub2_bios-${pkgver}/grub-core/grubinst ${pkgdir}/sbin/grubinst
+ make DESTDIR=${pkgdir} install
install -Dm755 ${pkgdir}/sbin/grub-install ${pkgdir}/sbin/grub_bios-install
install -Dm755 ${pkgdir}/sbin/grub-install ${pkgdir}/sbin/grub_efi_x86_64-install
@@ -151,7 +165,6 @@ package_grub2-common() {
${pkgdir}/sbin/grub_efi_i386-install
## install extra /etc/grub.d/ files
- install -Dm755 ${srcdir}/05_archtheme ${pkgdir}/etc/grub.d/05_archtheme
install -Dm755 ${srcdir}/20_memtest86+ ${pkgdir}/etc/grub.d/20_memtest86+
## install /etc/default/grub (used by grub-mkconfig)
@@ -166,9 +179,9 @@ package_grub2-common() {
package_grub2-bios() {
pkgdesc="The GNU GRand Unified Bootloader version 2 - Built for PC BIOS"
- depends=(grub2-common=${pkgver})
- replaces=('grub2')
- provides=('grub2')
+ depends=(grub2-common=${epoch}:${pkgver})
+ replaces=('grub2' 'grub2-libre')
+ provides=('grub2' 'grub2-libre')
cd ${srcdir}/grub2_bios-${pkgver}
make DESTDIR=${pkgdir} install
@@ -181,8 +194,8 @@ package_grub2-bios() {
package_grub2-efi-i386() {
pkgdesc="The GNU GRand Unified Bootloader version 2 - i386 UEFI version"
- depends=("grub2-common=${pkgver}" 'dosfstools')
- optdepends=('efibootmgr')
+ depends=("grub2-common=${epoch}:${pkgver}" 'dosfstools' 'efibootmgr')
+ optdepends=('mtools')
cd ${srcdir}/grub2_efi-${pkgver}
make DESTDIR=${pkgdir} install
@@ -191,14 +204,3 @@ package_grub2-efi-i386() {
rm -rf ${pkgdir}/{boot,bin,sbin,etc,usr/share}
rm ${pkgdir}/usr/lib/grub/{grub-mkconfig_lib,update-grub_lib}
}
-
-md5sums=('fd602ffaada5ba7939d0ea47091841a5'
- '21b709f119e0bef1c51978d757e885dc'
- '9e0944f3e63586dc4242fd8b7977e3c4'
- '0a124ffc9835100ba0e7de7a0ac1c389'
- '0016761d429e6a77b90d09ed6ee8a47d'
- '93f0f96911451e86014e04f96e13462f'
- '50123c37cf145a98aba4ffb0fc4efba1'
- '7cb90ebb04b856ded6ae171c3658fba2'
- '5a07e04c4ecb8ed145d54fec3043e0d5'
- 'e143ae2e453b7c3ced309667df30da55')
diff --git a/libre/grub2/archlinux_grub2_mkconfig_fixes.patch b/libre/grub2/archlinux_grub2_mkconfig_fixes.patch
index 62acd2ee8..11805e309 100644
--- a/libre/grub2/archlinux_grub2_mkconfig_fixes.patch
+++ b/libre/grub2/archlinux_grub2_mkconfig_fixes.patch
@@ -1,21 +1,7 @@
-diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
-index b041a38..6f31dce 100644
---- a/util/grub-mkconfig.in
-+++ b/util/grub-mkconfig.in
-@@ -252,6 +252,8 @@ export GRUB_DEFAULT \
- GRUB_THEME \
- GRUB_GFXPAYLOAD_LINUX \
- GRUB_DISABLE_OS_PROBER \
-+ GRUB_COLOR_NORMAL \
-+ GRUB_COLOR_HIGHLIGHT \
- GRUB_INIT_TUNE \
- GRUB_SAVEDEFAULT \
- GRUB_BADRAM
-diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in
-index 420b3f3..79fd4fb 100644
---- a/util/grub.d/00_header.in
-+++ b/util/grub.d/00_header.in
-@@ -100,6 +100,14 @@ cat <<EOF
+diff -Nur a/util/grub.d/00_header.in b/util/grub.d/00_header.in
+--- a/util/grub.d/00_header.in 2011-04-06 13:14:27.000000000 +0200
++++ b/util/grub.d/00_header.in 2011-08-01 15:19:57.919100452 +0200
+@@ -100,6 +100,14 @@
EOF
@@ -30,64 +16,75 @@ index 420b3f3..79fd4fb 100644
serial=0;
gfxterm=0;
for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
-diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index a09c3e6..cf12ea9 100644
---- a/util/grub.d/10_linux.in
-+++ b/util/grub.d/10_linux.in
-@@ -31,8 +31,8 @@ CLASS="--class gnu-linux --class gnu --class os"
+diff -Nur a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
+--- a/util/grub.d/10_linux.in 2011-05-14 22:36:49.000000000 +0200
++++ b/util/grub.d/10_linux.in 2011-08-01 15:56:53.324779083 +0200
+@@ -31,8 +31,8 @@
if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
OS=GNU/Linux
else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux"
-- CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) ${CLASS}"
+- CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
+ OS="${GRUB_DISTRIBUTOR}"
-+ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | tr -d ' ') ${CLASS}"
++ CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | tr -d ' ') ${CLASS}"
fi
# loop-AES arranges things so that /dev/loop/X can be our root device, but
-@@ -48,7 +48,7 @@ if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue"
- || uses_abstraction "${GRUB_DEVICE}" lvm; then
- LINUX_ROOT_DEVICE=${GRUB_DEVICE}
- else
-- LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
-+ LINUX_ROOT_DEVICE="/dev/disk/by-uuid/${GRUB_DEVICE_UUID}"
- fi
+@@ -65,7 +65,9 @@
+ version="$2"
+ recovery="$3"
+ args="$4"
+- if ${recovery} ; then
++ if [ -n "$5" ] ; then
++ title="$(gettext_quoted "%s, with Linux %s") $5"
++ elif ${recovery} ; then
+ title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
+ else
+ title="$(gettext_quoted "%s, with Linux %s")"
+@@ -132,7 +134,7 @@
- linux_entry ()
-@@ -111,7 +111,7 @@ EOF
- EOF
- }
-
--list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* ; do
-+list=`for i in /boot/vmlinuz* /boot/vmlinux* /vmlinuz* /vmlinux* ; do
- if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
- done`
- prepare_boot_cache=
-@@ -123,14 +123,12 @@ while [ "x$list" != "x" ] ; do
- dirname=`dirname $linux`
- rel_dirname=`make_system_path_relative_to_its_root $dirname`
- version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
-- alt_version=`echo $version | sed -e "s,\.old$,,g"`
-+ base_init=`echo $basename | sed -e "s,vmlinuz,kernel,g"`
-+ alt_version="${base_init}-fallback"
- linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
-
- initrd=
-- for i in "initrd.img-${version}" "initrd-${version}.img" \
-- "initrd-${version}" "initramfs-${version}.img" \
-- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
-- "initrd-${alt_version}" "initramfs-${alt_version}.img"; do
-+ for i in "${base_init}.img"; do
+ case x`uname -m` in
+ xi?86 | xx86_64)
+- list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
++ list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* /boot/vmlinuz26-* ; do
+ if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
+ done` ;;
+ *)
+@@ -160,7 +162,8 @@
+ "initrd.img-${alt_version}" "initrd-${alt_version}.img" \
+ "initrd-${alt_version}" "initramfs-${alt_version}.img" \
+ "initramfs-genkernel-${version}" \
+- "initramfs-genkernel-${alt_version}"; do
++ "initramfs-genkernel-${alt_version}" \
++ "${basename/vmlinuz/kernel}.img"; do
if test -e "${dirname}/${i}" ; then
initrd="$i"
break
-@@ -155,6 +153,9 @@ while [ "x$list" != "x" ] ; do
+@@ -190,6 +193,15 @@
linux_entry "${OS}" "${version}" false \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
-+ initrd="${alt_version}.img"
-+ linux_entry "${OS}" "${version} Fallback" false \
-+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
++ for i in "initramfs-${version}-fallback.img" \
++ "${basename/vmlinuz/kernel}-fallback.img"; do
++ if test -e "${dirname}/${i}"; then
++ initrd="$i"
++ linux_entry "${OS}" "${version}" true \
++ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" Fallback
++ break
++ fi
++ done
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" true \
"single ${GRUB_CMDLINE_LINUX}"
+diff -Nur a/util/grub-mkconfig.in b/util/grub-mkconfig.in
+--- a/util/grub-mkconfig.in 2011-04-06 17:45:53.000000000 +0200
++++ b/util/grub-mkconfig.in 2011-08-01 15:20:49.256867648 +0200
+@@ -252,6 +252,8 @@
+ GRUB_THEME \
+ GRUB_GFXPAYLOAD_LINUX \
+ GRUB_DISABLE_OS_PROBER \
++ GRUB_COLOR_NORMAL \
++ GRUB_COLOR_HIGHLIGHT \
+ GRUB_INIT_TUNE \
+ GRUB_SAVEDEFAULT \
+ GRUB_BADRAM
diff --git a/libre/grub2/grub.default b/libre/grub2/grub.default
index 8302bdb3f..fecc09af6 100644
--- a/libre/grub2/grub.default
+++ b/libre/grub2/grub.default
@@ -3,31 +3,37 @@
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
-GRUB_DISTRIBUTOR="Arch Linux"
+GRUB_DISTRIBUTOR="Parabola GNU/Linux-libre"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""
+# Preload both GPT and MBR modules so that they are not missed
+GRUB_PRELOAD_MODULES="part_gpt part_msdos"
+
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true
+# Uncomment to use basic console
+GRUB_TERMINAL_INPUT=console
+
# Uncomment to disable graphical terminal
-#GRUB_TERMINAL=console
+#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
-#GRUB_GFXMODE=1024x768x24
+GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
-#GRUB_GFXPAYLOAD_LINUX=keep
+GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
-#GRUB_DISABLE_RECOVERY="true"
+GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
diff --git a/libre/grub2/grub2.install b/libre/grub2/grub2.install
index 898dc9246..9baf14776 100644
--- a/libre/grub2/grub2.install
+++ b/libre/grub2/grub2.install
@@ -1,30 +1,29 @@
-post_install() {
-
- if [ -f /boot/grub/grub.cfg.pacsave ]; then
- echo "Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg"
- install -Dm644 /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg
- fi
-
- echo -n "Generating grub.cfg.example config file... "
- grub-mkconfig -o /boot/grub/grub.cfg.example 2> /dev/null
- echo "done."
-
-cat << EOF
- An example config file is created at /boot/grub/grub.cfg.example
-
- For more information and additional config settings please see http://wiki.archlinux.org/index.php/GRUB2
-
-EOF
+infodir=usr/share/info
+filelist=(grub.info grub-dev.info)
+post_install() {
+ if [ -f /boot/grub/grub.cfg.pacsave ]; then
+ echo "Copying /boot/grub/grub.cfg.pacsave to /boot/grub/grub.cfg"
+ install -Dm644 /boot/grub/grub.cfg.pacsave /boot/grub/grub.cfg
+ fi
+
+ echo -n "Generating grub.cfg.example config file... "
+ grub-mkconfig -o /boot/grub/grub.cfg.example 2> /dev/null
+ echo "done."
+
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
}
-
post_upgrade() {
-cat << EOF
- An example config file is created at /boot/grub/grub.cfg.example
-
- For more information and additional config settings please see http://wiki.archlinux.org/index.php/GRUB2
-
-EOF
+ for file in ${filelist[@]}; do
+ install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
}
+pre_remove() {
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file $infodir/dir 2> /dev/null
+ done
+}
diff --git a/libre/grub2/grub2_bzr_export.sh b/libre/grub2/grub2_bzr_export.sh
new file mode 100644
index 000000000..7c42d0c28
--- /dev/null
+++ b/libre/grub2/grub2_bzr_export.sh
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+## For actual repos
+
+# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/lua lua
+# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/gpxe gpxe
+# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/ntldr-img ntldr-img
+# bzr branch bzr://bzr.savannah.gnu.org/grub-extras/915resolution 915resolution
+
+## For launchpad mirror
+
+# bzr branch lp:~skodabenz/grub/grub2-extras-lua lua
+# bzr branch lp:~skodabenz/grub/grub2-extras-gpxe gpxe
+# bzr branch lp:~skodabenz/grub/grub2-extras-ntldr-img ntldr-img
+# bzr branch lp:~skodabenz/grub/grub2-extras-915resolution 915resolution
+
+## grub-extras zfs is integrated into grub2 bzr main repo and is no longer needed separately.
+
+wd=${PWD}/
+output_dir=${wd}/
+
+grub2_bzr_dir=${wd}/grub2_BZR/
+grub2_bzr_exp_dir=${wd}/grub2_experimental_BZR/
+grub2_extras_dir=${wd}/grub2_extras_BZR/
+
+main_snapshot() {
+
+ cd ${grub2_bzr_dir}/
+ echo
+
+ revnum=$(bzr revno ${grub2_bzr_dir})
+ bzr export --root=grub2 --format=tar ${output_dir}/grub2_r${revnum}.tar
+ echo
+
+ cd ${output_dir}/
+
+ xz -9 ${output_dir}/grub2_r${revnum}.tar
+ echo
+
+}
+
+exp_snapshot() {
+
+ cd ${grub2_bzr_exp_dir}/
+ echo
+
+ revnum=$(bzr revno ${grub2_bzr_exp_dir})
+ bzr export --root=grub2_exp --format=tar ${output_dir}/grub2_exp_r${revnum}.tar
+ echo
+
+ cd ${output_dir}/
+
+ xz -9 ${output_dir}/grub2_exp_r${revnum}.tar
+ echo
+
+}
+
+extras_snapshot() {
+
+ cd ${grub2_extras_dir}/${grub2_extras_name}/
+ echo
+
+ revnum=$(bzr revno ${grub2_extras_dir}/${grub2_extras_name})
+ bzr export --root=${grub2_extras_name} --format=tar ${output_dir}/grub2_extras_${grub2_extras_name}_r${revnum}.tar
+ echo
+
+ cd ${output_dir}/
+ echo
+
+ xz -9 ${output_dir}/grub2_extras_${grub2_extras_name}_r${revnum}.tar
+ echo
+
+}
+
+echo
+
+set -x -e
+
+# main_snapshot
+
+# exp_snapshot
+
+grub2_extras_name="lua"
+extras_snapshot
+
+grub2_extras_name="gpxe"
+extras_snapshot
+
+grub2_extras_name="ntldr-img"
+extras_snapshot
+
+grub2_extras_name="915resolution"
+extras_snapshot
+
+set +x +e
+
+echo
+
+unset wd
+unset output_dir
+unset grub2_bzr_dir
+unset grub2_extras_dir
+unset grub2_extras_name
diff --git a/libre/grub2/parabola-mkconfig.patch b/libre/grub2/parabola-mkconfig.patch
new file mode 100644
index 000000000..7c18a4cc2
--- /dev/null
+++ b/libre/grub2/parabola-mkconfig.patch
@@ -0,0 +1,32 @@
+diff -ru grub-1.99.orig/util/grub.d/10_linux.in grub-1.99/util/grub.d/10_linux.in
+--- grub-1.99.orig/util/grub.d/10_linux.in 2011-08-11 15:54:52.051246328 +0200
++++ grub-1.99/util/grub.d/10_linux.in 2011-08-11 15:55:41.297910793 +0200
+@@ -134,7 +134,7 @@
+
+ case x`uname -m` in
+ xi?86 | xx86_64)
+- list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* /boot/vmlinuz26-* ; do
++ list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* /boot/vmlinuz26-* /boot/vmlinuz26 ; do
+ if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
+ done` ;;
+ *)
+@@ -163,7 +163,8 @@
+ "initrd-${alt_version}" "initramfs-${alt_version}.img" \
+ "initramfs-genkernel-${version}" \
+ "initramfs-genkernel-${alt_version}" \
+- "${basename/vmlinuz/kernel}.img"; do
++ "${basename/vmlinuz/kernel}.img" \
++ "${basename/vmlinuz/initramfs}.img"; do
+ if test -e "${dirname}/${i}" ; then
+ initrd="$i"
+ break
+@@ -194,7 +195,8 @@
+ linux_entry "${OS}" "${version}" false \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
+ for i in "initramfs-${version}-fallback.img" \
+- "${basename/vmlinuz/kernel}-fallback.img"; do
++ "${basename/vmlinuz/kernel}-fallback.img" \
++ "${basename/vmlinuz/initramfs}-fallback.img"; do
+ if test -e "${dirname}/${i}"; then
+ initrd="$i"
+ linux_entry "${OS}" "${version}" true \
diff --git a/libre/icecat-i18n/PKGBUILD b/libre/icecat-i18n/PKGBUILD
index ad25dd934..36a55c0e6 100644
--- a/libre/icecat-i18n/PKGBUILD
+++ b/libre/icecat-i18n/PKGBUILD
@@ -2,6 +2,11 @@
# Contributor: Figue <ffigue@gmail.com>
# Based on firefox-i18n package
+# When updating to a newer upstream release:
+# - run the two commands below to get list of language packs
+# - change version in pkgver and _path
+# - replace md5sums with output of makepkg -g
+
# wget http://gnuzilla.gnu.org/download/langpacks/${pkgver}/
# echo $(egrep -o '[^>".]+\.xpi' index.html | sort -u | sed 's/\.xpi//')
_langpacks=(af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de el en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl gu-IN he hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO nl nn-NO nso or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta-LK ta te th tr uk vi zh-CN zh-TW zu)
@@ -10,8 +15,8 @@ pkgbase='icecat-i18n'
pkgname=($(for lang in ${_langpacks[@]}
do echo icecat-i18n-$lang | tr A-Z a-z
done))
-pkgver=5.0
-pkgrel=1
+pkgver=6.0
+pkgrel=2
pkgdesc="Language packs for IceCat"
arch=('any')
license=('MPL')
@@ -28,7 +33,7 @@ build() {
cd "${srcdir}"
}
-_path="/usr/lib/icecat-5.0/extensions/"
+_path="/usr/lib/icecat-6.0/extensions/"
for lang in ${_langpacks[@]}
do
@@ -37,86 +42,86 @@ do
}'
done
-md5sums=('709e73f3e6fff4221e10a7c6513df607'
- '6087d3abe606dfd0f43a426b5de58931'
- '986aaf488d8a9cc17bfc59163e8a3b41'
- '1c4ce81ce9cd5ecce717ac8ef2a8943c'
- 'db8c62ab5b0b3e489fb0b24fd18798b7'
- '2c0ae00cd48d0e679245906fb4ffe21e'
- 'a9a0eaca7b41c0c9e454d471e9868694'
- '1221cc439990b6c37dc7793ad560c6d4'
- '7e20ad6a0189f8e9f3067a4063a7534c'
- 'e7c317be23f31399086a52a0b0df8ba2'
- '2b3c0455c8e210da0cf3ef13fd935f67'
- 'eb389bdbcf33c30cf48a6e027a009729'
- '76445069ffb58126ab705fbddf095b6a'
- '3cd2c5062181b1a441e96476b9c73d9d'
- '456701170145c4f904bb0ed725b745e1'
- 'ce9402c41495cb5690b6b96bd9661824'
- '9f946d27ef2a298808fcbc159f1c56ef'
- 'b1308ceb65b8a3346fab7c454ef2966e'
- '06e7800fc32df63df2bb951f1b105ee0'
- 'bb08e9c66867a14d554e27015e42ee76'
- '5097c617081fe6c2d30036b90080ae2b'
- 'f4a439b3bb21c2ef8348fa8f0b1f197c'
- '6486e799b0592545955adafcb8038d4e'
- '47beaaf6edc8e6de00e2e231f562608d'
- '53a0d0272341f7151be706a61398b25c'
- 'bb0df19f12507cdf7d1711fc62e9ebe9'
- 'ed3d142a0025fd30762874ba03d01d7e'
- '27c80b130b1519387cbee2f649968f06'
- '90343d46bedbb1469765eb4d716ce4a9'
- 'e58339275254f9ffc3760dbb861ffdfe'
- 'dc48194af779db1fcca0b04ab3c0364f'
- '19df3b0263a546a33a520ec6a90f46b4'
- '51732b57590772660fe572be50f63588'
- 'a63081ab55a146e166b475018d14dd14'
- '698748403c10ba95a15f242a73fa5687'
- '1fbc1601bf48ca820307ea086a3d59eb'
- '4e1880d97ac398447a62e5e0d0a923c9'
- 'fa7b9acd77a77f386f65e42a57ccb0fc'
- 'e9623cbf67c98a073c55f589b92ed2b9'
- '4020a1bd7b1f500729596786afc15f99'
- '1ac05a652a08e0c36c63b5e094a006f1'
- '6bad249c8537a7a4ccc193653a6f1b6f'
- '042f7b99ce4826fe20910c2e7b79ebd4'
- '26eeb498590e7c4f825756c622370b2d'
- '1058ade4e5e63413116cd54e761d3b05'
- '2d8402db4418efb23028b3eb1ef5e7bb'
- '2e02ae8679ee04676a4ec77ae91a475e'
- 'fe605c9b1012459c0cf4801ddbe57ec7'
- 'd48f4b40fc533666027e69453bc572c0'
- 'd213716fdbb963793d798c275f02feb5'
- '9a0a08a78fc3a1806d1f6ad37e7d88ff'
- '1db8acd50d0650c640f10fe6a9ea12dd'
- 'a1ee77c675c064828b5b483be47bb448'
- '1470d2721ec5c11288efec330a593dec'
- '5a963a28a24394a31ff4bf99b3ffe7c5'
- '9ef1f8f4a6dd7f209a5e163791f6b708'
- '05ffecf8c3a670a1d8dcf4b9b46cd0a9'
- '9ce866f2d94bd44da2cc1c0c69879edd'
- '4f41494491ee5382c5c982096f00a177'
- '3affb0103d8ea19b1edbb9dd268ae71f'
- 'ecb42165bd320a1120c72703ff7bb8e5'
- '2f282455a1b42be166083710b416b981'
- 'b3889054b878c204a08bca8cdd330bff'
- '1daa1f53b18f8eab969558d11eca30fb'
- '7270826065f8432928318d7d4b015a00'
- '498cef7f3597b34ac305b2d2f189a301'
- 'd44a74015ce8535c9ec6127a6a950a5c'
- '125b4a5c7c5843e2e559d20c89fe2a97'
- 'ebb1b789bfaf4c7b25ca47ec3213ef9d'
- 'a196178fed6bd7048dabd05b484cabc4'
- '86cfd6e7ab7c2dcf00ae295d8a0fbfe4'
- 'dd0846bcd5656ae6cd8c9d8f47d9fa7c'
- '7b4f30a813fedbbbf5518748d24bd12f'
- '954434c7a9d408fb0ce277b10d25b498'
- 'f1ef105424b3b1fcb7d823f7e5d76e1a'
- 'c2a2827b2abc8804b11ae76a8e54a153'
- '691eb723fb7c26a5f8a2cd56d1a645b3'
- 'b4247bce2d0c8c159edc59c1a387d2d9'
- '008e18e486e3574b5de7fb72de091784'
- '034c580ef9283451f25dcd39e965c82a'
- 'ae170b62d2a18c6b166732e7d2edbf3a'
- 'f31fcb1fd5cea1cdda812f2b41bd02e9'
- '0507178163a0242a0eb4200db4e58255')
+md5sums=('591c7337853eedb77b86dede0c5bdf54'
+ '2b0c067f8387fb582b419dfca57d422e'
+ 'f3f6870d4b01bd64d80ac4de1db513f0'
+ 'd4f56954f7ad955481bda5503ecbc512'
+ '765d3c03355029434bbb65d121f67089'
+ '9e079762110ad2fcedc993bb87c44963'
+ '66a95194e65db2153e594fab871f5cd3'
+ '6ee12336d42c9ff23ec2b7864f44e38f'
+ '945f3c38961572b12148bc4f1c8bd283'
+ '9325c0178bff267cf4bb0583cf1d6c36'
+ '72c776ab5cd92cbaf7e3bda8d6f0d0d5'
+ '3e2a8386e6c56808a38ea749fd06d796'
+ '8a44d5a3c358bc510feccf917879baea'
+ '73574a44a75d52cfab87c3e10b2ebbb1'
+ '7486a690a30f348f07a2fec8478f3d1d'
+ '4c41dc44ff3e3b64e5a15aa2c1184660'
+ '6fde110c1244662eaf31d517ae2c9690'
+ 'b37ce2233807458f5b3835114f04c6df'
+ '8fa56995459873b5dcd03b06ee4a179c'
+ 'bfe86fdf0111d7d7d02fb689e197bdd3'
+ 'e97fe3f85ac1fc9c1c61edd56527ab25'
+ '5a51f4072f1c7f43832ac1c41a7135fd'
+ 'b13e8d2e54bbe35f9da43239cb4a2a16'
+ '71dd0c6257b419f986127db2600851a7'
+ '80a081a31a991fa63af8c26aebbaf8b3'
+ 'db7a91026ba03d4bfaadf23c4508ecf2'
+ 'a839ad07724553aefb76aa48c988ca3f'
+ 'b1e6859da4b078530fa00783c2fc8621'
+ '40abf8376133162a9f7c7ec44e5e06e6'
+ 'c4f62ffabe72ae87a096025998887bf9'
+ '1f58d2fbbaf449b4e05a83feddaa7f4e'
+ '9a54443791d8aa7004d085d79e4db1ea'
+ '948138c58a07b5fcb5c254bca5399e22'
+ '8889732de77e9e51bb43c744300a8b10'
+ 'fcc0c92d1c1aae27881cba21cd81d15c'
+ 'df3946f758bed44d30068bda21aa1af5'
+ 'e8b8fbc055f64c0b23a1c5c0ff21c603'
+ 'b358b06641cdfff8c8c500679aa632d3'
+ 'f7e67fa44a737f9b3a80abb9c3915ce5'
+ '2ee78734669c9e92a103db8c41614cca'
+ 'c0605e37d16869969b37b5936e28ff5e'
+ '51371731e61bc1369f47fd9ef263c63e'
+ '37eeb62381928a226472a916fec56844'
+ 'a22816fda39678927ca34437da1519b9'
+ 'd5910852f9ff4e142b5ad124f2135e59'
+ '3cbe3eb40bb57e6ff11d6377d966a8fc'
+ '64ce138c00140e553689d4265f018898'
+ 'c37d831b598ac6e5b0e3e49ec605ff7b'
+ '546deebbe1f27122ff21fbe85dd9ecfd'
+ '1bcacee0782d62298883426a41830531'
+ '69584792a5d7eba4ff80e85456d647c6'
+ '4515b31f20fd2f20bce55f4a1f6c0ec8'
+ '6357aeaf62d7867506c20b38bd2478a3'
+ '54da09a50365fea562b804b4cf2be2c4'
+ '0a8750cc238982882c7872edf2989341'
+ '136d2c2b747e7227207ed7dbb79b294e'
+ '43ae45dae8693c119a8cf703a0bb132a'
+ '3627b7ab8670a3741a48786df22ed2c0'
+ 'e4d3db69c334d1021b1982ab87a10d42'
+ '31c7e16225a379dc1fdabc211cd99079'
+ '142e02f1ab3db4f97b37adbf4e3a9138'
+ '617e895568a02588a168c54347f372e6'
+ '093b71d87d5e04311dab30b7a566d708'
+ 'e30278d7ac6ca5d09cb688420a221cc0'
+ '3ba61614b3ddbcf3dda18279e199afcd'
+ 'eaa1f41fa0ed45a5a3a0ab5b7b9e49d5'
+ '62999792ecd62689855651082d19d167'
+ '05a46c2dd966fd666f13e8db06441cf3'
+ 'fdf997b09ab54da41fccc590dba5201e'
+ 'bac1fc01d3bede7b4bb14a2290c33040'
+ '08c12984597bbe198329378fc59bacfb'
+ '587cb4938f8eac86e7ad05e7be4b0f9a'
+ '84914182cdb315e1a3a2062993f5cc00'
+ '15abeab9563a56bb0a061714f94bb1c5'
+ '05b190869d198992fda1624feb216a09'
+ '5885e96955025acf86f4186aaba5b794'
+ '37bddedad6898bac58987effeccadfad'
+ '49c0fbe9e0cbf66e24919eb99a612a43'
+ '9333d449ddbc8a3463d5aabacef39956'
+ 'ede65b0a4ba01afc53ba8035dc6a054c'
+ 'fe40e393535cc3106041592b626995f7'
+ 'a5941ca6a2271e0e1b4de3f9e7df5571'
+ '84da1f02c05066fe779e4813befc062e')
diff --git a/libre/icecat/Makefile.in b/libre/icecat/Makefile.in
new file mode 100644
index 000000000..bd662ba85
--- /dev/null
+++ b/libre/icecat/Makefile.in
@@ -0,0 +1,451 @@
+# vim:set ts=8 sw=8 sts=8 noet:
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Mozilla Browser code.
+#
+# The Initial Developer of the Original Code is
+# Benjamin Smedberg <bsmedberg@covad.net>
+# Portions created by the Initial Developer are Copyright (C) 2004
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH = ../..
+topsrcdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = @srcdir@
+relativesrcdir = browser/locales
+
+include $(DEPTH)/config/autoconf.mk
+
+include $(topsrcdir)/config/config.mk
+
+vpath %.xml @srcdir@/en-US/searchplugins
+vpath %.xml $(LOCALE_SRCDIR)/searchplugins
+
+ifdef LOCALE_MERGEDIR
+vpath crashreporter%.ini $(LOCALE_MERGEDIR)/browser/crashreporter
+endif
+vpath crashreporter%.ini $(LOCALE_SRCDIR)/crashreporter
+ifdef LOCALE_MERGEDIR
+vpath crashreporter%.ini @srcdir@/en-US/crashreporter
+endif
+ifdef LOCALE_MERGEDIR
+vpath book%.inc $(LOCALE_MERGEDIR)/browser/profile
+endif
+vpath book%.inc $(LOCALE_SRCDIR)/profile
+ifdef LOCALE_MERGEDIR
+vpath book%.inc @srcdir@/en-US/profile
+endif
+
+
+run_for_effects := $(shell if ! test -d $(DIST); then $(NSINSTALL) -D $(DIST); fi; if ! test -d $(DIST)/branding; then $(NSINSTALL) -D $(DIST)/branding; fi)
+_ABS_DIST := $(shell cd $(DIST) && pwd)
+
+ifdef MOZ_BRANDING_DIRECTORY
+SUBMAKEFILES += \
+ $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
+ $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
+ $(NULL)
+endif
+
+# This makefile uses variable overrides from the libs-% target to
+# build non-default locales to non-default dist/ locations. Be aware!
+
+AB = $(firstword $(subst -, ,$(AB_CD)))
+
+APP_VERSION := $(shell cat $(srcdir)/../config/version.txt)
+
+PWD := $(shell pwd)
+core_abspath = $(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(PWD)/$(1)))
+
+# These are defaulted to be compatible with the files the wget-en-US target
+# pulls. You may override them if you provide your own files. You _must_
+# override them when MOZ_PKG_PRETTYNAMES is defined - the defaults will not
+# work in that case.
+ZIP_IN ?= $(_ABS_DIST)/$(PACKAGE)
+WIN32_INSTALLER_IN ?= $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe
+
+DEFINES += \
+ -DAB_CD=$(AB_CD) \
+ -DMOZ_LANGPACK_EID=langpack-$(AB_CD)@gnuzilla.gnu.org \
+ -DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
+ -DLOCALE_SRCDIR=$(call core_abspath,$(LOCALE_SRCDIR)) \
+ -DPKG_BASENAME="$(PKG_BASENAME)" \
+ -DPKG_INST_BASENAME="$(PKG_INST_BASENAME)" \
+ $(NULL)
+
+ifndef MOZ_BRANDING_DIRECTORY
+DEFINES += -DMOZ_USE_GENERIC_BRANDING
+endif
+
+ifeq (,$(filter-out pref,$(MOZ_EXTENSIONS)))
+DEFINES += -DEXTENSION_PREF
+endif
+
+PREF_JS_EXPORTS = $(LOCALE_SRCDIR)/firefox-l10n.js
+
+include $(topsrcdir)/config/rules.mk
+
+libs::
+# @if test -f "$(LOCALE_SRCDIR)/existing-profile-defaults.js"; then \
+# $(PERL) $(topsrcdir)/config/preprocessor.pl $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
+# $(LOCALE_SRCDIR)/existing-profile-defaults.js > $(FINAL_TARGET)/defaults/existing-profile-defaults.js; \
+# fi
+install::
+# @if test -f "$(LOCALE_SRCDIR)/existing-profile-defaults.js"; then \
+# $(PERL) $(topsrcdir)/config/preprocessor.pl $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) \
+# $(LOCALE_SRCDIR)/existing-profile-defaults.js > $(DESTDIR)$(mozappdir)/defaults/existing-profile-defaults.js; \
+# fi
+
+README_FILES = \
+ README.txt \
+ $(NULL)
+
+PROFILE_FILES = \
+ localstore.rdf \
+ mimeTypes.rdf \
+ $(NULL)
+
+PROFILE_CHROME = userChrome-example.css userContent-example.css
+
+libs:: $(addprefix $(LOCALE_SRCDIR)/,$(README_FILES))
+ifeq ($(OS_ARCH),WINNT)
+ $(EXIT_ON_ERROR) \
+ for file in $^; do \
+ $(PERL) -pe 's/(?<!\r)\n/\r\n/g;' < $$file > $(FINAL_TARGET)/`basename $$file`; \
+ done
+else
+ifneq ($(OS_ARCH),OS2)
+ $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
+endif
+endif
+
+NO_JA_JP_MAC_AB_CD := $(if $(filter ja-JP-mac, $(AB_CD)),ja,$(AB_CD))
+
+%/defaults/profile/bookmarks.html: bookmarks.inc generic/profile/bookmarks.html.in
+ $(SYSINSTALL) -D $(dir $@)
+ $(PYTHON) $(topsrcdir)/config/Preprocessor.py \
+ -I $< \
+ -DAB_CD=$(NO_JA_JP_MAC_AB_CD) \
+ $(srcdir)/generic/profile/bookmarks.html.in \
+ > $@
+
+libs:: $(FINAL_TARGET)/defaults/profile/bookmarks.html ;
+
+libs:: $(addprefix generic/profile/,$(PROFILE_FILES))
+ $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile
+
+libs:: $(addprefix $(LOCALE_SRCDIR)/profile/chrome/,$(PROFILE_CHROME))
+ $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile/chrome
+
+install:: $(DESTDIR)$(mozappdir)/defaults/profile/bookmarks.html ;
+
+install:: $(addprefix generic/profile/,$(PROFILE_FILES))
+ $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile
+
+install:: $(addprefix $(LOCALE_SRCDIR)/profile/chrome/,$(PROFILE_CHROME))
+ $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile/chrome
+
+SEARCH_PLUGINS = $(shell cat $(LOCALE_SRCDIR)/searchplugins/list.txt)
+
+libs:: $(addsuffix .xml,$(SEARCH_PLUGINS))
+ $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/searchplugins
+
+install:: $(addsuffix .xml,$(SEARCH_PLUGINS))
+ $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/searchplugins
+
+tests:
+ifneq (en-US, $(AB_CD))
+ @echo "Verifying $(AB_CD) installer variable usage"
+ @$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/check-locales.pl $(LOCALE_SRCDIR)/installer
+endif
+
+clobber-%:
+ $(RM) -rf $(DIST)/xpi-stage/locale-$*
+
+libs-%:
+ $(NSINSTALL) -D $(DIST)/install
+ @$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1
+ @$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+ @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
+ifdef MOZ_BRANDING_DIRECTORY
+ @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
+endif
+ @$(MAKE) tests AB_CD=$*
+
+ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
+MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
+MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
+MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
+endif
+
+PACKAGER_NO_LIBS = 1
+include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
+
+repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
+repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
+ @echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
+ifdef MOZ_BRANDING_DIRECTORY
+ $(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
+else
+ $(MAKE) -C ../installer/windows export
+endif
+ if test ! -d $(_ABS_DIST)/$(PKG_INST_PATH); then \
+ $(NSINSTALL) -D $(_ABS_DIST)/$(PKG_INST_PATH); \
+ fi
+ $(RM) -rf l10n-stage
+ $(NSINSTALL) -D l10n-stage
+ $(CYGWIN_WRAPPER) 7z x -ol10n-stage $(WIN32_INSTALLER_IN)
+ $(RM) -r l10n-stage/localized
+ $(RM) l10n-stage/setup.exe
+# copy xpi-stage over, but not install.rdf and chrome.manifest,
+# those are just for language packs
+ cp -r $(DIST)/xpi-stage/locale-$(AB_CD) l10n-stage/localized
+ $(RM) l10n-stage/localized/install.rdf l10n-stage/localized/chrome.manifest
+ $(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen l10ngen/setup.exe l10ngen/7zSD.sfx
+ cp ../installer/windows/l10ngen/setup.exe l10n-stage
+ $(NSINSTALL) -D l10n-stage/localized/uninstall
+ cp ../installer/windows/l10ngen/helper.exe l10n-stage/localized/uninstall
+ rm -f app.7z
+ cd l10n-stage && \
+ $(CYGWIN_WRAPPER) 7z a -r -t7z ../app.7z -mx -m0=BCJ2 -m1=LZMA:d24 -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3
+ cat ../installer/windows/l10ngen/7zSD.sfx \
+ $(topsrcdir)/browser/installer/windows/app.tag \
+ app.7z > $(WIN32_INSTALLER_OUT)
+ chmod 0755 $(WIN32_INSTALLER_OUT)
+
+ifeq (WINNT,$(OS_ARCH))
+repackage-win32-installer-%: $(WIN32_INSTALLER_IN) libs-%
+ @$(MAKE) repackage-win32-installer AB_CD=$* WIN32_INSTALLER_IN=$(WIN32_INSTALLER_IN)
+else
+repackage-win32-installer-%: ;
+endif
+
+ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/MacOS
+else
+STAGEDIST = $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_DIR)
+endif
+
+$(STAGEDIST): AB_CD:=en-US
+$(STAGEDIST): UNPACKAGE=$(ZIP_IN)
+$(STAGEDIST): $(ZIP_IN)
+# only mac needs to remove the parent of STAGEDIST...
+ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ if test -d $(DIST)/l10n-stage; then \
+ $(RM) -r -v $(DIST)/l10n-stage; \
+ fi
+else
+# ... and windows doesn't like removing STAGEDIST itself, remove all children
+ if test -d $(DIST)/l10n-stage; then \
+ find $(STAGEDIST) -maxdepth 1 -print0 | xargs -0 $(RM) -r ; \
+ fi
+endif
+ $(NSINSTALL) -D $(DIST)/l10n-stage
+ cd $(DIST)/l10n-stage && \
+ $(UNMAKE_PACKAGE)
+ make clobber-zip AB_CD=en-US
+
+clobber-zip:
+ $(RM) $(STAGEDIST)/chrome/$(AB_CD).jar \
+ $(STAGEDIST)/chrome/$(AB_CD).manifest \
+ $(STAGEDIST)/defaults/pref/firefox-l10n.js
+ $(RM) -rf $(STAGEDIST)/searchplugins \
+ $(STAGEDIST)/dictionaries \
+ $(STAGEDIST)/defaults/profile \
+ $(STAGEDIST)/chrome/$(AB_CD)
+
+unpack: $(STAGEDIST)
+ @echo done unpacking
+
+repackage-zip: ZIP_OUT="$(_ABS_DIST)/$(PACKAGE)"
+repackage-zip: UNPACKAGE="$(ZIP_IN)"
+repackage-zip:
+ifeq (WINNT,$(OS_ARCH))
+ $(RM) -r $(STAGEDIST)/uninstall
+ $(NSINSTALL) -D $(STAGEDIST)/uninstall
+ cp ../installer/windows/l10ngen/helper.exe $(STAGEDIST)/uninstall
+endif
+# copy xpi-stage over, but not install.rdf and chrome.manifest,
+# those are just for language packs
+ cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
+ tar --exclude=install.rdf --exclude=chrome.manifest $(TAR_CREATE_FLAGS) - * | ( cd $(STAGEDIST) && tar -xf - )
+ifneq (en,$(AB))
+ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj
+endif
+endif
+ $(NSINSTALL) -D $(DIST)/l10n-stage/$(PKG_PATH)
+ cd $(DIST)/l10n-stage; \
+ $(MAKE_PACKAGE)
+ifdef MOZ_MAKE_COMPLETE_MAR
+ $(MAKE) -C $(DEPTH)/tools/update-packaging full-update AB_CD=$(AB_CD) \
+ MOZ_PKG_PRETTYNAMES=$(MOZ_PKG_PRETTYNAMES) \
+ PACKAGE_BASE_DIR="$(_ABS_DIST)/l10n-stage" \
+ DIST="$(_ABS_DIST)"
+endif
+# packaging done, undo l10n stuff
+ifneq (en,$(AB))
+ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+ mv $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/$(AB).lproj $(_ABS_DIST)/l10n-stage/$(MOZ_PKG_APPNAME)/$(_APPNAME)/Contents/Resources/en.lproj
+endif
+endif
+ $(MAKE) clobber-zip AB_CD=$(AB_CD)
+ $(NSINSTALL) -D $(DIST)/$(PKG_PATH)
+ mv -f "$(DIST)/l10n-stage/$(PACKAGE)" "$(DIST)/$(PACKAGE)"
+
+repackage-zip-%: $(ZIP_IN) $(STAGEDIST) libs-%
+ @$(MAKE) repackage-zip AB_CD=$* ZIP_IN=$(ZIP_IN)
+
+langpack-%: LANGPACK_FILE=$(_ABS_DIST)/$(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
+langpack-%: AB_CD=$*
+langpack-%: XPI_NAME=locale-$*
+langpack-%: libs-%
+ @echo "Making langpack $(LANGPACK_FILE)"
+ $(NSINSTALL) -D $(DIST)/$(PKG_LANGPACK_PATH)
+# $(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) -I$(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/defines.inc -I$(LOCALE_SRCDIR)/defines.inc $(srcdir)/generic/install.rdf > $(FINAL_TARGET)/install.rdf
+ cd $(DIST)/xpi-stage/locale-$(AB_CD) && \
+ $(ZIP) -r9D $(LANGPACK_FILE) install.rdf chrome chrome.manifest -x chrome/$(AB_CD).manifest
+
+langpack: langpack-$(AB_CD)
+
+# This is a generic target that will make a langpack, repack ZIP (+tarball)
+# builds, and repack an installer if applicable. It is called from the
+# tinderbox scripts. Alter it with caution.
+
+installers-%: clobber-% langpack-% repackage-win32-installer-% repackage-zip-%
+ @echo "repackaging done"
+
+ifdef MOZ_UPDATER
+libs:: $(addprefix $(LOCALE_SRCDIR)/,updater/updater.ini)
+ifeq ($(OS_ARCH),WINNT)
+ cat $< $(srcdir)/../installer/windows/nsis/updater_append.ini | \
+ sed -e "s/^InfoText=/Info=/" -e "s/^TitleText=/Title=/" | \
+ sed -e "s/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/" > \
+ $(FINAL_TARGET)/updater.ini
+else
+ cat $< | \
+ sed -e "s/^InfoText=/Info=/" -e "s/^TitleText=/Title=/" | \
+ sed -e "s/%MOZ_APP_DISPLAYNAME%/$(MOZ_APP_DISPLAYNAME)/" > \
+ $(FINAL_TARGET)/updater.ini
+endif
+endif
+
+ifdef MOZ_CRASHREPORTER
+libs:: crashreporter-override.ini
+ $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
+endif
+
+# This variable is to allow the wget-en-US target to know which ftp server to download from
+ifndef EN_US_BINARY_URL
+EN_US_BINARY_URL = $(error You must set EN_US_BINARY_URL)
+endif
+
+# This make target allows us to wget the latest en-US binary from a specified website
+# The make installers-% target needs the en-US binary in dist/
+# and for the windows repackages we need the .installer.exe in dist/sea
+wget-en-US:
+ifndef WGET
+ $(error Wget not installed)
+endif
+ (cd $(_ABS_DIST) && $(WGET) -nv -N $(EN_US_BINARY_URL)/$(PACKAGE))
+ @echo "Downloaded $(EN_US_BINARY_URL)/$(PACKAGE) to $(_ABS_DIST)/$(PACKAGE)"
+ifeq ($(OS_ARCH), WINNT)
+ $(NSINSTALL) -D $(_ABS_DIST)/$(PKG_INST_PATH)
+ (cd $(_ABS_DIST)/$(PKG_INST_PATH) && $(WGET) -nv -N "$(EN_US_BINARY_URL)/$(PKG_PATH)$(PKG_INST_BASENAME).exe")
+ @echo "Downloaded $(EN_US_BINARY_URL)/$(PKG_PATH)$(PKG_INST_BASENAME).exe to $(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe"
+endif
+
+ident:
+ @$(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(STAGEDIST)/application.ini App SourceStamp
+
+#These make targets call prepare-repackages by setting different UPLOAD_DIR
+prepare-upload-latest-%:
+ @$(MAKE) prepare-repackages-$* UPLOAD_DIR=$(DIST)/upload/latest
+
+prepare-upload-dated-%:
+ @$(MAKE) prepare-repackages-$* UPLOAD_DIR=$(DIST)/upload/`date "+%Y-%m-%d-%H"`-$(MOZ_PKG_APPNAME)$(MOZ_APP_VERSION)-l10n
+
+#Each platform uploads their xpi files to different folders
+ifeq (Linux, $(OS_ARCH))
+XPI_DESTINATION = linux-xpi
+endif
+ifeq (Darwin, $(OS_ARCH))
+XPI_DESTINATION = mac-xpi
+endif
+ifeq (WINNT, $(OS_ARCH))
+XPI_DESTINATION = windows-xpi
+endif
+
+# This target will generate a UPLOAD_DIR folder with
+# l10n repackages in the way that we offer l10n nightlies
+# 1) ./ the binary
+# 2) ./{linux,mac,windows}-xpi/locale.xpi
+prepare-repackages-%:
+ifndef XPI_DESTINATION
+ $(error XPI_DESTINATION not defined; \
+ This is the folder where the xpi files will be moved to)
+endif
+ifndef UPLOAD_DIR
+ $(error UPLOAD_DIR not defined)
+endif
+ $(NSINSTALL) -D $(UPLOAD_DIR)
+ $(NSINSTALL) -D $(UPLOAD_DIR)/$(XPI_DESTINATION)
+# Move the langpack
+ mv $(DIST)/install/firefox-$(MOZ_APP_VERSION).$*.langpack.xpi \
+ $(UPLOAD_DIR)/$(XPI_DESTINATION)/$*.xpi
+# Move the repackage
+ mv $(DIST)/firefox-$(MOZ_APP_VERSION).$*.* \
+ $(UPLOAD_DIR)/.
+# Move the windows installer
+ifeq (WINNT, $(OS_ARCH))
+ mv $(DIST)/install/sea/firefox-$(MOZ_APP_VERSION).$*.win32.installer.exe \
+ $(UPLOAD_DIR)/.
+endif
+# Set the permissions that the folders will have in ftp once uploaded
+ chmod -vR 775 $(UPLOAD_DIR)
+
+l10n-upload-%: AB_CD=$*
+l10n-upload-%:
+ $(PYTHON) $(topsrcdir)/build/upload.py --base-path $(DIST) "$(DIST)/$(PACKAGE)" $(DIST)/$(LANGPACK)
+ifdef MOZ_MAKE_COMPLETE_MAR
+ $(PYTHON) $(topsrcdir)/build/upload.py --base-path $(DIST) $(DIST)/$(COMPLETE_MAR)
+endif
+ifeq (WINNT, $(OS_ARCH))
+ $(PYTHON) $(topsrcdir)/build/upload.py --base-path $(DIST) "$(INSTALLER_PACKAGE)"
+endif
+
+
+merge-%:
+ifdef LOCALE_MERGEDIR
+ $(RM) -rf $(LOCALE_MERGEDIR)
+ MACOSX_DEPLOYMENT_TARGET= compare-locales -m $(LOCALE_MERGEDIR) $(srcdir)/l10n.ini $(L10NBASEDIR) $*
+endif
+ @echo
diff --git a/libre/icecat/PKGBUILD b/libre/icecat/PKGBUILD
index ca29d2a2d..af3a0250c 100644
--- a/libre/icecat/PKGBUILD
+++ b/libre/icecat/PKGBUILD
@@ -7,6 +7,8 @@
# Contributor: Muhammad 'MJ' Jassim <UnbreakableMJ@gmail.com>
# Changelog
+# =6.0
+# * Build with PGO support
# =3.6.13
# * Installed Privacy Extension by default
# * DDG is now the default search engine
@@ -19,18 +21,19 @@
# * Disabled ContentHandlers and other Google/Yahoo! related services
pkgname=icecat
-pkgver=5.0
-pkgrel=2
+pkgver=6.0
+pkgrel=1
pkgdesc="GNU version of the Firefox browser. SafeBrowsing and other Google services disabled!"
arch=('i686' 'x86_64' 'mips64el')
+license=('MPL' 'GPL' 'LGPL')
+depends=('gtk2' 'gcc-libs' 'mozilla-common' 'nss>=3.12.10' 'libxt' 'libxrender'
+ 'hunspell' 'startup-notification' 'mime-types' 'dbus-glib' 'alsa-lib'
+ 'libevent' 'sqlite3>=3.7.4' 'libnotify' 'desktop-file-utils' 'libvpx'
+ 'lcms' 'nspr>=4.8.8' 'libevent' 'libpng' 'cairo')
+makedepends=('unzip' 'zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'yasm'
+ 'mesa' 'autoconf2.13' 'gconf' 'xorg-server-xvfb')
+options=(!buildflags)
url="http://www.gnu.org/software/gnuzilla/"
-license=('GPL' 'MPL' 'LGPL')
-depends=('gtk2' 'gcc-libs' 'libidl2' 'mozilla-common' 'nss>=3.12.10' 'libxt'
- 'libxrender' 'hunspell' 'startup-notification' 'mime-types' 'dbus-glib'
- 'alsa-lib' 'libevent' 'sqlite3>=3.7.4' 'libnotify' 'desktop-file-utils'
- 'libvpx' 'lcms' 'nspr>=4.8.8' 'libevent' 'libpng' 'cairo')
-makedepends=('zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools'
- 'yasm' 'mesa' 'autoconf2.13' 'gconf' 'xorg-server-xvfb')
install=icecat.install
source=(ftp://ftp.gnu.org/gnu/gnuzilla/${pkgver}/${pkgname}-${pkgver}.tar.xz
mozconfig
@@ -45,56 +48,65 @@ source=(ftp://ftp.gnu.org/gnu/gnuzilla/${pkgver}/${pkgname}-${pkgver}.tar.xz
yacy.xml
duck-duck-go-ssl.xml
duck-duck-go-lite.xml
+ Makefile.in
# Default options
firefox.js
region.properties)
+md5sums=('9b752e408717ccb50d50f0bafe18a552'
+ 'e7fe1de533599f4ae645ea1661e4006a'
+ 'e81ad01dbc16ba28bf92ba4b7c309ca7'
+ 'd93fe402b87cd000a869e1fd6badc6c9'
+ 'bd5db57c23c72a02a489592644f18995'
+ '462c68585461f8cdc23c93c46f6ee4cf'
+ '2d492295c4308f9bba9ece28d8b3af2d'
+ '937ac0e5392b060d93bd33e761fbfa51'
+ 'cf97082e77e3ef5f1bd74b1db9329965'
+ '24528ca3f7f1e1a0ba735231aa3ac1de'
+ 'c5f00b6b24222aacd5a749d1f59c4d24'
+ 'e1bda0854de7d764f7401c81bb82b5ef'
+ 'ff83f1796ee13d3aec494649491d93cc'
+ '9952048383966926eea6d67384102425'
+ 'f1c76e7e244257856a386ca2de69bdf0')
build() {
-
ICECATDIR="/usr/lib/${pkgname}-${pkgver}" && export ICECATDIR
- msg2 "Patching some files..."
cd "${srcdir}/${pkgname}-${pkgver}/"
patch -Np1 -i "${srcdir}/mozilla-firefox-1.0-lang.patch"
-
+
+# Solve missing reporter locales and preprocessor.pl
+ cp --remove-destination ${srcdir}/Makefile.in ./browser/locales/
+
+# Default prefs, remove Google stuff
cp --remove-destination ${srcdir}/region.properties ./browser/locales/en-US/chrome/browser-region/
cp --remove-destination ${srcdir}/firefox.js ./browser/app/profile/
- msg2 "Starting build..."
cp "${srcdir}/mozconfig" .mozconfig
# Kill @PRE_RELEASE_SUFFIX@ from browser.xul because it
# gets set to \177 for an unknown reason
sed -i 's/@PRE_RELEASE_SUFFIX@//g' \
- browser/base/content/browser.xul
+ browser/base/content/browser.xul
- ## Don't generate startup cache. Unbreaks make install
- sed -i 's/^GENERATE_CACHE .*/GENERATE_CACHE = true/' \
- toolkit/mozapps/installer/packager.mk
+ export LDFLAGS="-Wl,-rpath,/usr/lib/icecat-$pkgver -Wl,-O1,--sort-common,--hash-style=gnu,--as-needed"
+ export PYTHON="/usr/bin/python2"
- export LDFLAGS="-Wl,-rpath,${ICECATDIR} -Wl,-O1,--sort-common,--hash-style=gnu,--as-needed"
- export PYTHON="/usr/bin/python2"
-
# PGO
sed -i '/^NO_PROFILE_GUIDED_OPTIMIZE = 1$/d' \
memory/jemalloc/Makefile.in
echo 'LDFLAGS += -lX11 -lXrender' \
>> layout/build/Makefile.in
- # Start build
- ./configure
- make MOZ_MAKE_FLAGS="${MAKEFLAGS}"
-
-# LD_PRELOAD="" /usr/bin/Xvfb -nolisten tcp -extension GLX :99 &
-# LD_PRELOAD="" DISPLAY=:99 make -j1 -f client.mk profiledbuild MOZ_MAKE_FLAGS="$MAKEFLAGS"
-# kill $! || true
+ LD_PRELOAD="" /usr/bin/Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 :99 &
+ LD_PRELOAD="" DISPLAY=:99 make -j1 -f client.mk profiledbuild MOZ_MAKE_FLAGS="$MAKEFLAGS"
+ kill $! || true
}
package() {
ICECATDIR="/usr/lib/${pkgname}-${pkgver}" && export ICECATDIR
cd "${srcdir}/${pkgname}-${pkgver}/"
- make install DESTDIR="${pkgdir}"
+ make -j1 -f client.mk install DESTDIR="${pkgdir}"
msg2 "Finishing..."
install -m755 -d ${pkgdir}/usr/share/applications
@@ -108,9 +120,9 @@ package() {
# Remove included dictionaries, add symlink to system myspell path
# Note: this will cause file conflicts when users have installed dictionaries in the old location
- #rm -rf "${pkgdir}/usr/lib/firefox-$pkgver/dictionaries"
- #ln -sf /usr/share/myspell/dicts \
- # "${pkgdir}/usr/lib/firefox-$pkgver/dictionaries"
+ rm -rf "$pkgdir/usr/lib/icecat-$pkgver/dictionaries"
+ ln -sf /usr/share/myspell/dicts \
+ "$pkgdir/usr/lib/icecat-$pkgver/dictionaries"
# We don't want the development stuff
rm -r "$pkgdir"/usr/{include,lib/icecat-devel-$pkgver,share/idl}
@@ -121,17 +133,3 @@ package() {
install -m755 -d ${pkgdir}${ICECATDIR}/searchplugins/
install -m644 ${srcdir}/*.xml ${pkgdir}${ICECATDIR}/searchplugins/
}
-md5sums=('3fd4f4c2bfdacdd52bbd6e197ceda95f'
- '105f2e5d98d719c37cba5601a59b8593'
- 'e81ad01dbc16ba28bf92ba4b7c309ca7'
- 'd93fe402b87cd000a869e1fd6badc6c9'
- 'bd5db57c23c72a02a489592644f18995'
- '462c68585461f8cdc23c93c46f6ee4cf'
- '2d492295c4308f9bba9ece28d8b3af2d'
- '937ac0e5392b060d93bd33e761fbfa51'
- 'cf97082e77e3ef5f1bd74b1db9329965'
- '24528ca3f7f1e1a0ba735231aa3ac1de'
- 'c5f00b6b24222aacd5a749d1f59c4d24'
- 'e1bda0854de7d764f7401c81bb82b5ef'
- '9952048383966926eea6d67384102425'
- 'f1c76e7e244257856a386ca2de69bdf0')
diff --git a/libre/icecat/icecat.install b/libre/icecat/icecat.install
index cefb71c4d..c1fe8284a 100644
--- a/libre/icecat/icecat.install
+++ b/libre/icecat/icecat.install
@@ -1,21 +1,13 @@
-#[ "${ICECATDIR}" = "" ] && ICECATDIR="/usr/lib/icecat"
-post_install () {
- echo -e "\n >>> Please, source /etc/profile or logout and re-login to your desktop session"
- echo -e " >>> If you installed some locale in the past or some stuff in libdir, please remove old /usr/lib/icecat-3.6.* directories"
- update-desktop-database -q
+post_install() {
+ update-desktop-database -q
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
}
-# arg 1: the new package version
-# arg 2: the old package version
post_upgrade() {
- post_install $1
+ post_install $1
}
post_remove() {
- update-desktop-database -q
+ post_install $1
}
-#op=$1
-#shift
-
-#$op $*
diff --git a/libre/icecat/mozconfig b/libre/icecat/mozconfig
index 442dfe76d..9ece9301f 100644
--- a/libre/icecat/mozconfig
+++ b/libre/icecat/mozconfig
@@ -18,7 +18,6 @@ ac_add_options --enable-system-lcms
ac_add_options --with-pthreads
ac_add_options --enable-default-toolkit=cairo-gtk2
-ac_add_options --enable-optimize="-pipe -O3"
ac_add_options --disable-safe-browsing
ac_add_options --enable-extensions=default
ac_add_options --enable-startup-notification
diff --git a/libre/lame-libre/PKGBUILD b/libre/lame-libre/PKGBUILD
new file mode 100644
index 000000000..205d81c1f
--- /dev/null
+++ b/libre/lame-libre/PKGBUILD
@@ -0,0 +1,30 @@
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+# Contributor: Hugo Doria <hugo@archlinux.org>
+# Maintainer: Henry Jensen <hjensen@connochaetos.org>
+
+pkgname=lame-libre
+pkgver=3.98.4
+pkgrel=3
+pkgdesc="An MP3 encoder and graphical frame analyzer"
+arch=('i686' 'x86_64')
+url="http://lame.sourceforge.net/"
+depends=('ncurses')
+makedepends=('nasm')
+replaces=('lame')
+provides=("lame=${pkgver}")
+conflicts=('lame')
+license=('LGPL')
+options=('!libtool' '!distcc')
+source=(http://repo.parabolagnulinux.org/other/lame-3.98.4-libre.tar.gz)
+md5sums=('761a8629378974163b98f0b1c91d13e1')
+
+build() {
+ cd "${srcdir}/lame-${pkgver}-libre"
+
+ ./configure --prefix=/usr \
+ --enable-nasm \
+ --enable-shared --disable-frontend
+ make
+ make DESTDIR="${pkgdir}" install
+ rm -rf ${pkgdir}/usr/share/man
+}
diff --git a/libre/libretools/PKGBUILD b/libre/libretools/PKGBUILD
index fd3ea4063..4eafae894 100644
--- a/libre/libretools/PKGBUILD
+++ b/libre/libretools/PKGBUILD
@@ -59,7 +59,6 @@ package_libretools() {
install -m755 ${_gitname}/librerelease ${pkgdir}/usr/bin/
install -m755 ${_gitname}/librerepkg ${pkgdir}/usr/bin
install -m755 ${_gitname}/librestage ${pkgdir}/usr/bin/
- install -m755 ${_gitname}/mipsrelease ${pkgdir}/usr/bin
install -m755 ${_gitname}/pkgbuild-check-nonfree ${pkgdir}/usr/bin/
install -m755 ${_gitname}/toru ${pkgdir}/usr/bin
install -m755 ${_gitname}/updateabslibre ${pkgdir}/usr/bin
@@ -73,11 +72,12 @@ package_libretools() {
package_libretools-pr() {
install -d ${pkgdir}/etc/libretools.d
- install -m644 ${_gitname}/prtools.conf ${pkgdir}/etc/libretools.d
+ install -m644 ${_gitname}/prtools/prtools.conf ${pkgdir}/etc/libretools.d
install -d ${pkgdir}/usr/bin
- install -m755 ${_gitname}/prfullpkg ${pkgdir}/usr/bin
- install -m755 ${_gitname}/prmipsrelease ${pkgdir}/usr/bin
+ install -m755 ${_gitname}/prtools/prfullpkg ${pkgdir}/usr/bin
+ install -m755 ${_gitname}/prtools/prmipsrelease ${pkgdir}/usr/bin
+ install -m755 ${_gitname}/prtools/prtoru ${pkgdir}/usr/bin
}
package_libretools-mips64el() {
diff --git a/libre/libui-sh/PKGBUILD b/libre/libui-sh/PKGBUILD
index 1fb9e9717..5792f88de 100644
--- a/libre/libui-sh/PKGBUILD
+++ b/libre/libui-sh/PKGBUILD
@@ -2,7 +2,7 @@
# Maintainer: Dieter Plaetinck <dieter@plaetinck.be>
pkgname=libui-sh
-pkgver=2011.05.22
+pkgver=2011.08.31
pkgrel=1
pkgdesc="a shell library providing useful UI functions"
arch=('any')
@@ -11,6 +11,7 @@ license=('GPL3')
depends=('bash')
optdepends=('dialog: for ncurses support')
source=($url/snapshot/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('79daf01e4cd5b7fb186d1127d3334092')
build() {
@@ -21,4 +22,3 @@ build() {
}
# vim:set ts=2 sw=2 et:
-md5sums=('44e422ca76ca99a7df99e2249ff3b4e5')
diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD
index b76294ad4..c83f3ef23 100644
--- a/libre/linux-libre/PKGBUILD
+++ b/libre/linux-libre/PKGBUILD
@@ -2,21 +2,22 @@
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Maintainer: Thomas Baechler <thomas@archlinux.org>
# Maintainer (Parabola): Nicolás Reynolds <fauno@kiwwwi.com.ar>
-# Contributor (Parabola): Sorin-Mihai Vârgolici <smv@yobicore.org>
+# Maintainer (Parabola): Sorin-Mihai Vârgolici <smv@yobicore.org>
pkgbase=linux-libre
pkgname=('linux-libre' 'linux-libre-headers' 'linux-libre-docs') # Build stock -LIBRE kernel
# pkgname=linux-custom # Build kernel with a different name
_kernelname=${pkgname#linux-libre}
_basekernel=3.0
-pkgver=${_basekernel}
-pkgrel=4
+pkgver=${_basekernel}.4
+pkgrel=2
arch=('i686' 'x86_64')
-url="http://linux-libre.fsfla.org"
+url="http://linux-libre.fsfla.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl')
options=('!strip')
-source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/linux-${pkgver}-libre.tar.xz"
+source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${_basekernel}-libre/linux-${_basekernel}-libre.tar.xz"
+ "http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/patch-${_basekernel}-libre-${pkgver}-libre.xz"
# the main kernel config files
'config.i686' 'config.x86_64'
# standard config files for mkinitcpio ramdisk
@@ -25,16 +26,19 @@ source=("http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/l
'fix-i915.patch'
'change-default-console-loglevel.patch')
md5sums=('44e7bc20c235a193f9b6123a8d5e9509'
- '66dff8af6b00eb8d054b2af85aaa5ef7'
- '1a98b8b8f2140ac8f95c3814cba8cc95'
- '7af24ad1789055e991b1e1f090ff276d'
+ 'f17e9c5f801be0b17efe78aaff0f2a0e'
+ 'bb679e0e61c53a8f1a22b8d46f89f47e'
+ '68d2fc73ce1d9057678f91235f6e22c6'
+ 'a8a3843046926eb7ab81312cd438c5c5'
'04b21c79df0a952c22d681dd4f4562df'
'263725f20c0b9eb9c353040792d644e5'
- '7396b811db06dec0250a1a098f527b83')
+ '9d3c56a4b999c8bfbd4018089a62f662')
build() {
cd "${srcdir}/linux-${_basekernel}"
+ patch -Np1 -i "${srcdir}/patch-${_basekernel}-libre-${pkgver}-libre"
+
# Add freedo as boot logo
patch -Np1 -i "${srcdir}/boot-logo.patch"
@@ -46,7 +50,7 @@ build() {
# (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227)
patch -Np1 -i "${srcdir}/change-default-console-loglevel.patch"
- cat "$srcdir/config.$CARCH" > ./.config # simpler
+ cat "${srcdir}/config.${CARCH}" > ./.config # simpler
if [ "${_kernelname}" != "" ]; then
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
@@ -91,8 +95,8 @@ package_linux-libre() {
depends=('coreutils' 'module-init-tools>=3.16' 'mkinitcpio>=0.7')
optdepends=('crda: to set the correct wireless channels of your country')
provides=('kernel26' "linux=$pkgver")
- conflicts=('kernel26' 'linux')
- replaces=('kernel26' 'linux')
+ conflicts=('kernel26' 'kernel26-libre' 'linux')
+ replaces=('kernel26' 'kernel26-libre' 'linux')
backup=("etc/mkinitcpio.d/${pkgname}.preset")
install=${pkgname}.install
@@ -119,14 +123,13 @@ package_linux-libre() {
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/g" \
-i "${startdir}/${pkgname}.install"
sed \
+ -e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgname}\"|g" \
-e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgname}.img\"|g" \
-e "s|fallback_image=.*|fallback_image=\"/boot/initramfs-${pkgname}-fallback.img\"|g" \
-i "${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset"
# remove build and source links
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
- # add compat symlink for the kernel image
- ln -sf vmlinuz-${pkgname} "${pkgdir}/boot/vmlinuz26${_kernelname}"
# remove the firmware
rm -rf "${pkgdir}/lib/firmware"
# gzip -9 all modules to safe 100MB of space
@@ -135,9 +138,9 @@ package_linux-libre() {
package_linux-libre-headers() {
pkgdesc="Header files and scripts for building modules for linux-libre kernel"
- provides=('kernel26-headers' "linux-headers=$pkgver")
- conflicts=('kernel26-headers' 'linux-headers')
- replaces=('kernel26-headers' 'linux-headers')
+ provides=('kernel26-headers' "linux-headers=${pkgver}")
+ conflicts=('kernel26-headers' 'kernel26-libre-headers' 'linux-headers')
+ replaces=('kernel26-headers' 'kernel26-libre-headers' 'linux-headers')
mkdir -p "${pkgdir}/lib/modules/${_kernver}"
@@ -267,13 +270,13 @@ package_linux-libre-headers() {
package_linux-libre-docs() {
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux-libre kernel."
provides=('kernel26-docs' "linux-docs=$pkgver")
- conflicts=('kernel26-docs' 'linux-docs')
- replaces=('kernel26-docs' 'linux-docs')
+ conflicts=('kernel26-docs' 'kernel26-libre-docs' 'linux-docs')
+ replaces=('kernel26-docs' 'kernel26-libre-docs' 'linux-docs')
cd "${srcdir}/linux-${_basekernel}"
- mkdir -p "$pkgdir/usr/src/linux-$_kernver"
- cp -r Documentation "$pkgdir/usr/src/linux-$_kernver"
+ mkdir -p "${pkgdir}/usr/src/linux-${_kernver}"
+ cp -r Documentation "${pkgdir}/usr/src/linux-${_kernver}"
find "${pkgdir}" -type f -exec chmod 444 {} \;
find "${pkgdir}" -type d -exec chmod 755 {} \;
@@ -281,4 +284,3 @@ package_linux-libre-docs() {
rm -f "${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile"
}
-# vim:set ts=2 sw=2 et:
diff --git a/libre/linux-libre/change-default-console-loglevel.patch b/libre/linux-libre/change-default-console-loglevel.patch
index cec208ee8..63435d84f 100644
--- a/libre/linux-libre/change-default-console-loglevel.patch
+++ b/libre/linux-libre/change-default-console-loglevel.patch
@@ -10,4 +10,3 @@ diff -upr linux-3.0.orig/kernel/printk.c linux-3.0/kernel/printk.c
DECLARE_WAIT_QUEUE_HEAD(log_wait);
-
diff --git a/libre/linux-libre/config.i686 b/libre/linux-libre/config.i686
index 8bd0cbe40..69a35c73c 100644
--- a/libre/linux-libre/config.i686
+++ b/libre/linux-libre/config.i686
@@ -470,7 +470,7 @@ CONFIG_CAN_PM_TRACE=y
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_PROCFS=y
-CONFIG_ACPI_PROCFS_POWER=y
+# CONFIG_ACPI_PROCFS_POWER is not set
CONFIG_ACPI_EC_DEBUGFS=m
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=m
diff --git a/libre/linux-libre/config.x86_64 b/libre/linux-libre/config.x86_64
index 8d40df599..d7b662cb6 100644
--- a/libre/linux-libre/config.x86_64
+++ b/libre/linux-libre/config.x86_64
@@ -458,7 +458,7 @@ CONFIG_CAN_PM_TRACE=y
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_PROCFS=y
-CONFIG_ACPI_PROCFS_POWER=y
+# CONFIG_ACPI_PROCFS_POWER is not set
CONFIG_ACPI_EC_DEBUGFS=m
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=m
diff --git a/libre/linux-libre/linux-libre.install b/libre/linux-libre/linux-libre.install
index 51e78dc60..6f7ae815a 100644
--- a/libre/linux-libre/linux-libre.install
+++ b/libre/linux-libre/linux-libre.install
@@ -11,10 +11,17 @@ post_install () {
echo ">>> Generating initial ramdisk, using mkinitcpio. Please wait..."
mkinitcpio -p linux-libre${KERNEL_NAME}
- # add compat symlinks for the initramfs images
- ln -sf initramfs-linux-libre${KERNEL_NAME}.img boot/kernel26${KERNEL_NAME}.img
- ln -sf initramfs-linux-libre${KERNEL_NAME}-fallback.img \
- boot/kernel26${KERNEL_NAME}-fallback.img
+ # compat symlinks for the official kernels only
+ if [ -z "${KERNEL_NAME}" -o "${KERNEL_NAME}" = "-lts" ]; then
+ loaders="$(find /boot -name syslinux.cfg -or -name extlinux.conf -or -name grub.cfg -or -name menu.lst)"
+ [ -f /etc/lilo.conf ] && loaders="$loaders /etc/lilo.conf"
+ if [ -n "${loaders}" ] && grep -q -e vmlinuz26 -e kernel26.img -e kernel26-fallback.img $loaders; then
+ # add compat symlinks for the initramfs images
+ ln -sf initramfs-linux-libre${KERNEL_NAME}.img /boot/kernel26${KERNEL_NAME}.img
+ ln -sf initramfs-linux-libre${KERNEL_NAME}-fallback.img /boot/kernel26${KERNEL_NAME}-fallback.img
+ ln -sf vmlinuz-linux-libre${KERNEL_NAME} /boot/vmlinuz26${KERNEL_NAME}
+ fi
+ fi
}
post_upgrade() {
diff --git a/libre/mplayer-libre/PKGBUILD b/libre/mplayer-libre/PKGBUILD
index bb64074b9..5f2af3d51 100644
--- a/libre/mplayer-libre/PKGBUILD
+++ b/libre/mplayer-libre/PKGBUILD
@@ -1,22 +1,20 @@
-# $Id: PKGBUILD 128080 2011-06-21 18:32:19Z ibiru $
+# $Id: PKGBUILD 134009 2011-07-31 18:23:34Z ibiru $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
_pkgbase=mplayer
pkgbase=mplayer-libre
pkgname=('mplayer-libre' 'mencoder-libre')
-pkgver=33805
+pkgver=34007
pkgrel=1
arch=('i686' 'x86_64')
makedepends=('libxxf86dga' 'libxxf86vm' 'libmad' 'cdparanoia' 'libxinerama' 'sdl' 'lame' 'libtheora' 'xvidcore' 'libmng' 'libxss' 'libgl' 'smbclient'
'aalib' 'jack' 'libcaca' 'x264' 'faad2' 'lirc-utils' 'libxvmc' 'enca' 'libvdpau' 'opencore-amr' 'libdca' 'a52dec' 'schroedinger' 'libvpx' 'speex'
-'libpulse' 'fribidi' 'unzip' 'mesa' 'live-media' 'yasm' 'git' 'fontconfig' 'mpg123' 'ladspa')
+'libpulse' 'fribidi' 'unzip' 'mesa' 'live-media' 'yasm' 'git' 'fontconfig' 'mpg123' 'ladspa' 'libass')
license=('GPL')
url="http://www.mplayerhq.hu/"
-options=(!buildflags !emptydirs)
+options=(!buildflags !emptydirs !distcc)
source=(ftp://ftp.archlinux.org/other/${_pkgbase}/${_pkgbase}-${pkgver}.tar.xz mplayer.desktop)
-md5sums=('512a0309ba5979a41ae93b740f4592f4'
- 'c0d6ef795cf6de48e3b87ff7c23f0319')
build() {
cd ${srcdir}/${_pkgbase}
@@ -32,6 +30,7 @@ build() {
--disable-musepack \
--disable-esd \
--disable-mga \
+ --disable-ass-internal \
--enable-xvmc \
--language=all \
--confdir=/etc/mplayer
@@ -46,7 +45,7 @@ package_mplayer-libre() {
backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
depends=('desktop-file-utils' 'ttf-dejavu' 'enca' 'libxss' 'a52dec' 'libvpx' 'lirc-utils' 'x264' 'libmng' 'libdca' 'aalib' 'lame' 'fontconfig' 'libgl' 'speex'
'libxinerama' 'libvdpau' 'libpulse' 'smbclient' 'xvidcore' 'opencore-amr' 'jack' 'cdparanoia' 'libmad' 'sdl' 'libtheora' 'libcaca' 'libxxf86dga' 'fribidi'
- 'libjpeg' 'faad2' 'libxvmc' 'schroedinger' 'mpg123' 'ladspa')
+ 'libjpeg' 'faad2' 'libxvmc' 'schroedinger' 'mpg123' 'libass')
provides=("mplayer=$pkgver")
replaces=('mplayer')
conflicts=('mplayer')
@@ -66,7 +65,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' 'cdparanoia' 'speex'
- 'libmad' 'libtheora' 'fribidi' 'libjpeg' 'faad2' 'schroedinger' 'mpg123')
+ 'libmad' 'libtheora' 'fribidi' 'libjpeg' 'faad2' 'schroedinger' 'mpg123' 'libass')
provides=("mencoder=$pkgver")
replaces=('mencoder')
conflicts=('mencoder')
@@ -75,3 +74,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=('675b929bab9e3540bb63207ed940fb7f'
+ 'c0d6ef795cf6de48e3b87ff7c23f0319')
diff --git a/libre/mplayer-vaapi-libre/PKGBUILD b/libre/mplayer-vaapi-libre/PKGBUILD
index 22517928e..73f3e6022 100644
--- a/libre/mplayer-vaapi-libre/PKGBUILD
+++ b/libre/mplayer-vaapi-libre/PKGBUILD
@@ -4,8 +4,9 @@
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
+_pkgname=mplayer-vaapi
pkgname=mplayer-vaapi-libre
-pkgver=33025
+pkgver=33161
_vaapi_version=20110127
pkgrel=3
pkgdesc="A movie player, compiled with vaapi support, without faac dependency, added speex support"
@@ -13,63 +14,73 @@ arch=('i686' 'x86_64')
url="http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/"
license=('GPL')
depends=('libxxf86dga' 'libxxf86vm' 'libmad' 'cdparanoia' 'libxinerama' 'sdl'
- 'lame' 'libtheora' 'xvidcore' 'libmng' 'libxss' 'libgl' 'smbclient'
+ 'lame' 'libtheora' 'xvidcore' 'libmng' 'libxss' 'mesa' 'smbclient'
'aalib' 'jack' 'libcaca' 'x264' 'lirc-utils' 'ttf-dejavu' 'speex'
'libxvmc' 'enca' 'opencore-amr' 'libdca' 'a52dec' 'schroedinger'
- 'libvpx' 'libpulse' 'fribidi' 'libva' 'desktop-file-utils')
-makedepends=('unzip' 'mesa' 'live-media>=2010.01.13' 'yasm')
-provides=("mplayer-vaapi=$pkgver" 'mplayer')
-conflicts=('mplayer' 'mplayer-vaapi')
+ 'libvpx' 'libpulse' 'fribidi' 'faad2' 'libva' 'libass'
+ 'desktop-file-utils')
+makedepends=('unzip' 'live-media' 'yasm' 'ladspa')
+provides=("$_pkgname=$pkgver" 'mplayer')
+conflicts=('mplayer' "$_pkgname")
replaces=('mplayer-vaapi')
backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
source=(http://pkgbuild.com/~foutrelis/mplayer-$pkgver.tar.xz
http://www.splitted-desktop.com/~gbeauchesne/mplayer-vaapi/mplayer-vaapi-$_vaapi_version.tar.bz2
mplayer.desktop
mplayer.png
- patch-fixes.patch)
+ patch-fixes.patch
+ gcc-4.6-mp3lib-sse-code-miscompilation.patch)
+options=('!buildflags' '!emptydirs')
install=mplayer-vaapi.install
-md5sums=('3814e5c47458de4bf0878d3996820341'
+md5sums=('b8b2842ba3fff04a9b64a94bd2b0a667'
'b39bd73ae8241dcb21dd1a8fa5eb87eb'
'647b9f4ab5284a7fef3f84f992214e77'
'd00874ccc644b7f43d6ef1c942fcef28'
- '9f96a03dddbea8be5ff2fa3925311d04')
+ 'c7a1df1c1d0f1e51ee400d96b0f34195'
+ 'd56174335d3c5bcdf3732f4a869f01dd')
build() {
cd "$srcdir/mplayer-$pkgver"
- # Custom CFLAGS break the mplayer build
- unset CFLAGS LDFLAGS
-
# Update vaapi patches for changes introduced in mplayer/ffmpeg
patch -d "$srcdir/mplayer-vaapi-$_vaapi_version" -p1 -i \
"$srcdir/patch-fixes.patch"
+ # Workaround mp3lib SSE code miscompilation with gcc 4.6 (r33469 upstream)
+ # Patch by Jindrich Makovicka <makovick <at> gmail>
+ patch -Np0 -i "$srcdir/gcc-4.6-mp3lib-sse-code-miscompilation.patch"
+
for patch in mplayer-{vaapi{,-{gma500-workaround,0.29}},vdpau}; do
patch -Np1 -i "$srcdir/mplayer-vaapi-$_vaapi_version/patches/$patch.patch"
done
./configure --prefix=/usr \
- --disable-faac \
- --enable-runtime-cpudetection \
- --disable-gui \
- --disable-arts \
- --disable-liblzo \
- --enable-speex \
- --disable-openal \
- --disable-libdv \
- --disable-musepack \
- --disable-esd \
- --disable-mga \
- --enable-xvmc \
- --disable-vdpau \
- --enable-vaapi \
- --language=all \
- --confdir=/etc/mplayer
+ --enable-runtime-cpudetection \
+ --disable-gui \
+ --disable-arts \
+ --disable-liblzo \
+ --enable-speex \
+ --disable-openal \
+ --disable-libdv \
+ --disable-musepack \
+ --disable-esd \
+ --disable-mga \
+ --disable-faac \
+ --enable-xvmc \
+ --disable-vdpau \
+ --enable-vaapi \
+ --language=all \
+ --confdir=/etc/mplayer
- [ "$CARCH" = "i686" ] && sed 's|-march=i486|-march=i686|g' -i config.mak
+ [[ $CARCH == i686 ]] && sed -i 's|-march=i486|-march=i686|g' config.mak
make
- make -j1 DESTDIR=$pkgdir install
+}
+
+package() {
+ cd "$srcdir/mplayer-$pkgver"
+
+ make -j1 DESTDIR="$pkgdir" install-mplayer install-mplayer-man
install -Dm644 etc/{codecs.conf,input.conf,example.conf} "$pkgdir/etc/mplayer/"
install -dm755 "$pkgdir/usr/share/mplayer/"
ln -s /usr/share/fonts/TTF/DejaVuSans.ttf "$pkgdir/usr/share/mplayer/subfont.ttf"
diff --git a/libre/mplayer-vaapi-libre/gcc-4.6-mp3lib-sse-code-miscompilation.patch b/libre/mplayer-vaapi-libre/gcc-4.6-mp3lib-sse-code-miscompilation.patch
new file mode 100644
index 000000000..58daa09e7
--- /dev/null
+++ b/libre/mplayer-vaapi-libre/gcc-4.6-mp3lib-sse-code-miscompilation.patch
@@ -0,0 +1,21 @@
+Index: mp3lib/dct64_sse.c
+===================================================================
+--- mp3lib/dct64_sse.c (revision 33468)
++++ mp3lib/dct64_sse.c (revision 33469)
+@@ -112,7 +112,6 @@
+ }
+
+ {
+- real *costab = costab_mmx + 24;
+ int i;
+
+ __asm__(
+@@ -121,7 +120,7 @@
+ "movaps %1, %%xmm5\n\t"
+ "movaps %%xmm5, %%xmm6\n\t"
+ :
+- :"m"(*costab), "m"(*nnnn)
++ :"m"(costab_mmx[24]), "m"(*nnnn)
+ );
+
+ for (i = 0; i < 0x20; i += 8)
diff --git a/libre/mplayer-vaapi-libre/patch-fixes.patch b/libre/mplayer-vaapi-libre/patch-fixes.patch
index 73153b3fe..5da97d1d9 100644
--- a/libre/mplayer-vaapi-libre/patch-fixes.patch
+++ b/libre/mplayer-vaapi-libre/patch-fixes.patch
@@ -1,7 +1,61 @@
+diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vaapi-0.29.patch mplayer-vaapi-20110127/patches/mplayer-vaapi-0.29.patch
+--- mplayer-vaapi-20110127.orig/patches/mplayer-vaapi-0.29.patch 2011-01-27 17:15:16.000000000 +0200
++++ mplayer-vaapi-20110127/patches/mplayer-vaapi-0.29.patch 2011-03-30 21:22:32.000000000 +0300
+@@ -434,7 +434,7 @@ diff --git a/ffmpeg/libavcodec/vaapi_vc1
+ index 34e9056..b29e50e 100644
+ --- a/ffmpeg/libavcodec/vaapi_vc1.c
+ +++ b/ffmpeg/libavcodec/vaapi_vc1.c
+-@@ -146,101 +146,103 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
++@@ -146,103 +146,103 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
+ pic_param = ff_vaapi_alloc_pic_param(vactx, sizeof(VAPictureParameterBufferVC1));
+ if (!pic_param)
+ return -1;
+@@ -452,7 +452,9 @@ index 34e9056..b29e50e 100644
+ - pic_param->sequence_fields.bits.syncmarker = s->resync_marker;
+ - pic_param->sequence_fields.bits.rangered = v->rangered;
+ - pic_param->sequence_fields.bits.max_b_frames = s->avctx->max_b_frames;
++-#if VA_CHECK_VERSION(0,32,0)
+ - pic_param->sequence_fields.bits.profile = v->profile;
++-#endif
+ - pic_param->coded_width = s->avctx->coded_width;
+ - pic_param->coded_height = s->avctx->coded_height;
+ - pic_param->entrypoint_fields.value = 0; /* reset all bits */
diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vaapi.patch mplayer-vaapi-20110127/patches/mplayer-vaapi.patch
--- mplayer-vaapi-20110127.orig/patches/mplayer-vaapi.patch 2011-01-27 17:15:29.000000000 +0200
-+++ mplayer-vaapi-20110127/patches/mplayer-vaapi.patch 2011-03-05 06:47:20.000000000 +0200
-@@ -449,14 +449,15 @@ diff --git a/fmt-conversion.c b/fmt-conv
++++ mplayer-vaapi-20110127/patches/mplayer-vaapi.patch 2011-03-30 21:09:14.000000000 +0300
+@@ -207,15 +207,6 @@ index 1e0f7fc..45e4574 100755
+ echocheck "Xv"
+ if test "$_xv" = auto ; then
+ _xv=no
+-@@ -4372,7 +4435,7 @@ if test "$_vdpau" = yes ; then
+- else
+- def_vdpau='#define CONFIG_VDPAU 0'
+- novomodules="vdpau $novomodules"
+-- libavdecoders=$(echo $libavdecoders | sed -e s/MPEG_VDPAU_DECODER// -e s/MPEG1_VDPAU_DECODER// -e s/H264_VDPAU_DECODER// -e s/WMV3_VDPAU_DECODER// -e s/VC1_VDPAU_DECODER// -e s/MPEG4_VDPAU_DECODER//)
+-+ libavdecoders=$(echo $libavdecoders | sed -e "s/\(MPEG\|MPEG[124]\|H26[34]\|WMV3\|VC1\)_VDPAU_DECODER//g")
+- fi
+- echores "$_vdpau"
+-
+ @@ -4791,6 +4854,31 @@ echores "$_corevideo"
+ fi #if darwin
+
+@@ -433,30 +424,19 @@ index d353bb5..e39a926 100644
+ out YV12,I420,IYUV
+
+ videocodec ffzygo
+-diff --git a/ffmpeg/libavcodec/vaapi_vc1.c b/ffmpeg/libavcodec/vaapi_vc1.c
+-index 2c24042..34e9056 100644
+---- a/ffmpeg/libavcodec/vaapi_vc1.c
+-+++ b/ffmpeg/libavcodec/vaapi_vc1.c
+-@@ -160,6 +160,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
+- pic_param->sequence_fields.bits.syncmarker = s->resync_marker;
+- pic_param->sequence_fields.bits.rangered = v->rangered;
+- pic_param->sequence_fields.bits.max_b_frames = s->avctx->max_b_frames;
+-+ pic_param->sequence_fields.bits.profile = v->profile;
+- pic_param->coded_width = s->avctx->coded_width;
+- pic_param->coded_height = s->avctx->coded_height;
+- pic_param->entrypoint_fields.value = 0; /* reset all bits */
+ diff --git a/fmt-conversion.c b/fmt-conversion.c
index 9e88100..bd32ce8 100644
--- a/fmt-conversion.c
+++ b/fmt-conversion.c
@@ -20,7 +74,7 @@ diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vaapi.patch mplayer-vaapi-
static const struct {
int fmt;
enum PixelFormat pix_fmt;
-@@ -503,14 +504,15 @@ diff --git a/fmt-conversion.h b/fmt-conv
+@@ -503,14 +483,15 @@ diff --git a/fmt-conversion.h b/fmt-conv
index 9e133a8..962ca4e 100644
--- a/fmt-conversion.h
+++ b/fmt-conversion.h
@@ -39,10 +93,126 @@ diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vaapi.patch mplayer-vaapi-
diff --git a/gui/mplayer/gtk/opts.c b/gui/mplayer/gtk/opts.c
index 4f7ffb2..0da5434 100644
--- a/gui/mplayer/gtk/opts.c
+@@ -808,7 +789,7 @@ index 7c68a20..609ac41 100644
+ sh_video_t *sh = avctx->opaque;
+ vd_ffmpeg_ctx *ctx = sh->context;
+ @@ -295,6 +296,12 @@ static int init(sh_video_t *sh){
+- avctx->codec_type = CODEC_TYPE_VIDEO;
++ avctx->codec_type = AVMEDIA_TYPE_VIDEO;
+ avctx->codec_id = lavc_codec->id;
+
+ +#if CONFIG_VAAPI
+@@ -817,9 +798,9 @@ index 7c68a20..609ac41 100644
+ + avctx->get_format = get_format;
+ + }
+ +#endif /* CONFIG_VAAPI */
+- #if CONFIG_VDPAU
+- if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){
+- avctx->get_format = get_format;
++ avctx->get_format = get_format;
++ if(ctx->do_dr1){
++ avctx->flags|= CODEC_FLAG_EMU_EDGE;
+ @@ -487,7 +494,7 @@ static void draw_slice(struct AVCodecContext *s,
+ const AVFrame *src, int offset[4],
+ int y, int type, int height){
+@@ -841,12 +822,10 @@ index 7c68a20..609ac41 100644
+ ctx->vo_initialized = 1;
+ }
+ return 0;
+-@@ -972,24 +980,62 @@ static mp_image_t *decode(sh_video_t *sh, void *data, int len, int flags){
++@@ -974,22 +974,60 @@ static mp_image_t *decode(sh_video_t *sh
+ return mpi;
+ }
+
+--#if CONFIG_XVMC || CONFIG_VDPAU
+-+#if CONFIG_XVMC || CONFIG_VAAPI || CONFIG_VDPAU
+ +static inline int is_hwaccel_format(int imgfmt)
+ +{
+ + switch (get_video_hwaccel()) {
+@@ -883,15 +862,14 @@ index 7c68a20..609ac41 100644
+ int imgfmt;
+ sh_video_t *sh = avctx->opaque;
+ - int i;
+--
+++ int i, try_hwaccel;
++
+ - for(i=0;fmt[i]!=PIX_FMT_NONE;i++){
+ - imgfmt = pixfmt2imgfmt(fmt[i]);
+ - if(!IMGFMT_IS_HWACCEL(imgfmt)) continue;
+ - mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_TryingPixfmt, i);
+ - if(init_vo(sh, fmt[i]) >= 0) {
+ - break;
+-+ int i, try_hwaccel;
+-+
+ + for (try_hwaccel = 1; try_hwaccel >= 0; --try_hwaccel) {
+ + for (i = 0; fmt[i] != PIX_FMT_NONE; i++) {
+ + imgfmt = pixfmt2imgfmt(fmt[i], avctx->codec_id);
+@@ -912,11 +890,9 @@ index 7c68a20..609ac41 100644
+ + break;
+ }
+ - selected_format = fmt[i];
++ if (selected_format == PIX_FMT_NONE)
++ selected_format = avcodec_default_get_format(avctx, fmt);
+ set_format_params(avctx, selected_format);
+- return selected_format;
+- }
+--#endif /* CONFIG_XVMC || CONFIG_VDPAU */
+-+#endif /* CONFIG_XVMC || CONFIG_VAAPI || CONFIG_VDPAU */
+ diff --git a/libmpcodecs/vf.h b/libmpcodecs/vf.h
+ index 3619e69..fd869b7 100644
+ --- a/libmpcodecs/vf.h
diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vdpau.patch mplayer-vaapi-20110127/patches/mplayer-vdpau.patch
--- mplayer-vaapi-20110127.orig/patches/mplayer-vdpau.patch 2010-11-15 08:41:19.000000000 +0200
-+++ mplayer-vaapi-20110127/patches/mplayer-vdpau.patch 2011-03-05 07:07:15.000000000 +0200
-@@ -133,7 +133,7 @@ index b0d00f4..745d3e4 100644
++++ mplayer-vaapi-20110127/patches/mplayer-vdpau.patch 2011-03-30 22:29:47.000000000 +0300
+@@ -11,15 +11,6 @@ index 91fd164..1f4434e 100755
+ libavdemuxers_all=$(sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]')
+ libavdemuxers=$(echo $libavdemuxers_all | sed -e 's/ LIB[A-Z0-9_]*_DEMUXER//g' -e s/REDIR_DEMUXER// -e s/AVISYNTH_DEMUXER//)
+ libavmuxers_all=$(sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' ffmpeg/libavformat/allformats.c | tr '[a-z]' '[A-Z]')
+-@@ -4466,7 +4466,7 @@ if test "$_vdpau" = yes ; then
+- else
+- def_vdpau='#define CONFIG_VDPAU 0'
+- novomodules="vdpau $novomodules"
+-- libavdecoders=$(echo $libavdecoders | sed -e "s/\(MPEG\|MPEG[124]\|H26[34]\|WMV3\|VC1\)_VDPAU_DECODER//g")
+-+ libavhwaccels=$(echo $libavhwaccels | sed -e "s/\(MPEG[124]\|H26[34]\|WMV3\|VC1\)_VDPAU_HWACCEL//g")
+- fi
+- echores "$_vdpau"
+-
+ diff --git a/etc/codecs.conf b/etc/codecs.conf
+ index b0d00f4..745d3e4 100644
+ --- a/etc/codecs.conf
+@@ -48,7 +39,7 @@ index b0d00f4..745d3e4 100644
+ out YV12,I420,IYUV
+ out 422P,444P
+
+-@@ -332,41 +335,6 @@ videocodec ffmpeg12mc
++@@ -332,38 +335,6 @@ videocodec ffmpeg12mc
+ out IDCT_MPEG2
+ out MOCO_MPEG2
+
+@@ -73,9 +64,6 @@ index b0d00f4..745d3e4 100644
+ - fourcc xdv7,xdv8,xdv9
+ - fourcc xdva,xdvb,xdvc
+ - fourcc xdvd,xdve,xdvf
+-- fourcc xd5a,xd5b,xd5c
+-- fourcc xd5d,xd5e,xd5f
+-- fourcc xd59,xd54
+ - fourcc mx5n,mx4n,mx4p
+ - fourcc mx3n,mx3p
+ - fourcc AVmp
+@@ -87,9 +75,9 @@ index b0d00f4..745d3e4 100644
+ - out VDPAU_MPEG1
+ - out VDPAU_MPEG2
+ -
+- videocodec mpegpes
+- info "MPEG-PES output (.mpg or DXR3/IVTV/DVB/V4L2 card)"
+- comment "for hardware decoding"
++ videocodec ffmpeg2crystalhd
++ info "FFmpeg MPEG-2 (CrystalHD)"
++ status working
+ @@ -943,6 +911,7 @@ videocodec ffwmv3
+ driver ffmpeg
+ dll wmv3
+@@ -133,7 +121,7 @@ index b0d00f4..745d3e4 100644
videocodec ffh264
info "FFmpeg H.264"
@@ -51,7 +221,7 @@ diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vdpau.patch mplayer-vaapi-
driver ffmpeg
dll h264
out VAAPI_H264
-@@ -146,6 +146,8 @@ index b0d00f4..745d3e4 100644
+@@ -146,6 +134,8 @@ index b0d00f4..745d3e4 100644
- fourcc X264,x264
- fourcc avc1,AVC1
- fourcc davc,DAVC
@@ -60,7 +230,111 @@ diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vdpau.patch mplayer-vaapi-
- format 0x10000005
- driver ffmpeg
- dll h264_vdpau
-@@ -362,13 +364,13 @@ index f99f7ea..faafa97 100644
+@@ -200,55 +190,41 @@ diff --git a/ffmpeg/libavcodec/allcodecs
+ index fbae0f6..4b6d2e9 100644
+ --- a/ffmpeg/libavcodec/allcodecs.c
+ +++ b/ffmpeg/libavcodec/allcodecs.c
+-@@ -65,6 +65,13 @@ void avcodec_register_all(void)
+- REGISTER_HWACCEL (WMV3_DXVA2, wmv3_dxva2);
+- REGISTER_HWACCEL (WMV3_VAAPI, wmv3_vaapi);
+-
+-+ REGISTER_HWACCEL (H264_VDPAU, h264_vdpau);
+-+ REGISTER_HWACCEL (MPEG1_VDPAU, mpeg1_vdpau);
+-+ REGISTER_HWACCEL (MPEG2_VDPAU, mpeg2_vdpau);
+-+ REGISTER_HWACCEL (MPEG4_VDPAU, mpeg4_vdpau);
+-+ REGISTER_HWACCEL (VC1_VDPAU, vc1_vdpau);
+-+ REGISTER_HWACCEL (WMV3_VDPAU, wmv3_vdpau);
+-+
+- /* video codecs */
+- REGISTER_ENCODER (A64MULTI, a64multi);
+- REGISTER_ENCODER (A64MULTI5, a64multi5);
+ @@ -116,7 +123,6 @@ void avcodec_register_all(void)
+- REGISTER_DECODER (H263I, h263i);
+ REGISTER_ENCODER (H263P, h263p);
+ REGISTER_DECODER (H264, h264);
++ REGISTER_DECODER (H264_CRYSTALHD, h264_crystalhd);
+ - REGISTER_DECODER (H264_VDPAU, h264_vdpau);
+ REGISTER_ENCDEC (HUFFYUV, huffyuv);
+ REGISTER_DECODER (IDCIN, idcin);
+ REGISTER_DECODER (IFF_BYTERUN1, iff_byterun1);
+ @@ -140,10 +146,7 @@ void avcodec_register_all(void)
+- REGISTER_ENCDEC (MPEG1VIDEO, mpeg1video);
+ REGISTER_ENCDEC (MPEG2VIDEO, mpeg2video);
+ REGISTER_ENCDEC (MPEG4, mpeg4);
++ REGISTER_DECODER (MPEG4_CRYSTALHD, mpeg4_crystalhd);
+ - REGISTER_DECODER (MPEG4_VDPAU, mpeg4_vdpau);
+ REGISTER_DECODER (MPEGVIDEO, mpegvideo);
+ - REGISTER_DECODER (MPEG_VDPAU, mpeg_vdpau);
+ - REGISTER_DECODER (MPEG1_VDPAU, mpeg1_vdpau);
++ REGISTER_DECODER (MPEG2_CRYSTALHD, mpeg2_crystalhd);
++ REGISTER_DECODER (MSMPEG4_CRYSTALHD, msmpeg4_crystalhd);
+ REGISTER_ENCDEC (MSMPEG4V1, msmpeg4v1);
+- REGISTER_ENCDEC (MSMPEG4V2, msmpeg4v2);
+- REGISTER_ENCDEC (MSMPEG4V3, msmpeg4v3);
+ @@ -196,7 +199,6 @@ void avcodec_register_all(void)
+- REGISTER_DECODER (V210X, v210x);
+ REGISTER_DECODER (VB, vb);
+ REGISTER_DECODER (VC1, vc1);
++ REGISTER_DECODER (VC1_CRYSTALHD, vc1_crystalhd);
+ - REGISTER_DECODER (VC1_VDPAU, vc1_vdpau);
+ REGISTER_DECODER (VCR1, vcr1);
+ REGISTER_DECODER (VMDVIDEO, vmdvideo);
+ REGISTER_DECODER (VMNC, vmnc);
+ @@ -210,7 +212,6 @@ void avcodec_register_all(void)
+- REGISTER_ENCDEC (WMV1, wmv1);
+ REGISTER_ENCDEC (WMV2, wmv2);
+ REGISTER_DECODER (WMV3, wmv3);
++ REGISTER_DECODER (WMV3_CRYSTALHD, wmv3_crystalhd);
+ - REGISTER_DECODER (WMV3_VDPAU, wmv3_vdpau);
+ REGISTER_DECODER (WNV1, wnv1);
+ REGISTER_DECODER (XAN_WC3, xan_wc3);
+- REGISTER_DECODER (XL, xl);
++ REGISTER_DECODER (XAN_WC4, xan_wc4);
+ diff --git a/ffmpeg/libavcodec/avcodec.h b/ffmpeg/libavcodec/avcodec.h
+ index bff9477..1e77fa6 100644
+ --- a/ffmpeg/libavcodec/avcodec.h
+@@ -285,9 +261,9 @@ index b0a3a8a..b5b9026 100644
+ #include "mpeg4video_parser.h"
+ #include "msmpeg4.h"
+ -#include "vdpau_internal.h"
++ #include "thread.h"
+ #include "flv.h"
+ #include "mpeg4video.h"
+-
+ @@ -620,11 +619,6 @@ retry:
+ if(MPV_frame_start(s, avctx) < 0)
+ return -1;
+@@ -305,23 +281,23 @@ index f99f7ea..faafa97 100644
+ --- a/ffmpeg/libavcodec/h264.c
+ +++ b/ffmpeg/libavcodec/h264.c
+ @@ -37,7 +37,6 @@
+- #include "golomb.h"
+ #include "mathops.h"
+ #include "rectangle.h"
++ #include "thread.h"
+ -#include "vdpau_internal.h"
+ #include "libavutil/avassert.h"
+
+ #include "cabac.h"
+ @@ -1647,9 +1646,6 @@ static void field_end(H264Context *h){
+- s->current_picture_ptr->qscale_type= FF_QSCALE_TYPE_H264;
+- s->current_picture_ptr->pict_type= s->pict_type;
++ ff_thread_report_progress((AVFrame*)s->current_picture_ptr, (16*s->mb_height >> FIELD_PICTURE) - 1,
++ s->picture_structure==PICT_BOTTOM_FIELD);
+
+ - if (CONFIG_H264_VDPAU_DECODER && s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
+ - ff_vdpau_h264_set_reference_frames(s);
+ -
+- if(!s->dropable) {
+- ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index);
+- h->prev_poc_msb= h->poc_msb;
++ if(in_setup || !(avctx->active_thread_type&FF_THREAD_FRAME)){
++ if(!s->dropable) {
++ ff_h264_execute_ref_pic_marking(h, h->mmco, h->mmco_index);
+ @@ -1663,9 +1659,6 @@ static void field_end(H264Context *h){
+ av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode picture\n");
+ }
+@@ -362,13 +338,13 @@ index f99f7ea..faafa97 100644
context_count++;
}
break;
@@ -76,7 +350,7 @@ diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vdpau.patch mplayer-vaapi-
- "h264_vdpau",
- AVMEDIA_TYPE_VIDEO,
- CODEC_ID_H264,
-@@ -381,6 +383,7 @@ index f99f7ea..faafa97 100644
+@@ -381,6 +357,7 @@ index f99f7ea..faafa97 100644
- .flush= flush_dpb,
- .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)"),
- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_H264, PIX_FMT_NONE},
@@ -84,7 +358,16 @@ diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vdpau.patch mplayer-vaapi-
-};
-#endif
diff --git a/ffmpeg/libavcodec/mpeg12.c b/ffmpeg/libavcodec/mpeg12.c
-@@ -458,7 +461,7 @@ index 6a331eb..c226797 100644
+@@ -449,7 +426,7 @@ index 6a331eb..c226797 100644
+ - break;
+ - }
+ -
+- if(avctx->thread_count > 1){
++ if(HAVE_THREADS && avctx->active_thread_type&FF_THREAD_SLICE){
+ int threshold= (s2->mb_height*s->slice_count + avctx->thread_count/2) / avctx->thread_count;
+ if(threshold <= mb_y){
+ @@ -2578,36 +2561,3 @@ AVCodec mpeg_xvmc_decoder = {
+@@ -458,7 +435,7 @@ index 6a331eb..c226797 100644
#endif
-
-#if CONFIG_MPEG_VDPAU_DECODER
@@ -93,7 +376,7 @@ diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vdpau.patch mplayer-vaapi-
- "mpegvideo_vdpau",
- AVMEDIA_TYPE_VIDEO,
- CODEC_ID_MPEG2VIDEO,
-@@ -474,7 +477,7 @@ index 6a331eb..c226797 100644
+@@ -474,7 +451,7 @@ index 6a331eb..c226797 100644
-#endif
-
-#if CONFIG_MPEG1_VDPAU_DECODER
@@ -102,7 +385,7 @@ diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vdpau.patch mplayer-vaapi-
- "mpeg1video_vdpau",
- AVMEDIA_TYPE_VIDEO,
- CODEC_ID_MPEG1VIDEO,
-@@ -500,7 +503,7 @@ index b339f78..1928d03 100644
+@@ -500,7 +477,7 @@ index b339f78..1928d03 100644
-
-
-#if CONFIG_MPEG4_VDPAU_DECODER
@@ -111,7 +394,35 @@ diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vdpau.patch mplayer-vaapi-
- "mpeg4_vdpau",
- AVMEDIA_TYPE_VIDEO,
- CODEC_ID_MPEG4,
-@@ -588,7 +591,7 @@ index c9a547b..71c50e7 100644
+@@ -527,9 +504,17 @@ index 9650066..5f8440b 100644
+ PIX_FMT_NONE
+ };
+ @@ -1064,7 +1065,6 @@ void MPV_frame_end(MpegEncContext *s)
+- if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration){
+ ff_xvmc_field_end(s);
+- }else if(!s->avctx->hwaccel
++ }else if((s->error_count || s->encoding)
++ && !s->avctx->hwaccel
++- && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
++ && s->unrestricted_mv
++ && s->current_picture.reference
++ && !s->intra_only
++@@ -2254,7 +2254,6 @@ void ff_draw_horiz_band(MpegEncContext *
++ }
++
++ if (!s->avctx->hwaccel
+ - && !(s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU)
+ && s->unrestricted_mv
+ && s->current_picture.reference
+@@ -582,13 +567,13 @@ index c9a547b..71c50e7 100644
+ if (avctx->hwaccel->start_frame(avctx, buf, buf_size) < 0)
+ return -1;
+ if (avctx->hwaccel->decode_slice(avctx, buf_start, (buf + buf_size) - buf_start) < 0)
+-@@ -3376,37 +3364,3 @@ AVCodec wmv3_decoder = {
+- .pix_fmts = ff_hwaccel_pixfmt_list_420
++@@ -3376,39 +3364,3 @@ AVCodec wmv3_decoder = {
++ .profiles = NULL_IF_CONFIG_SMALL(profiles)
+ };
#endif
-
-#if CONFIG_WMV3_VDPAU_DECODER
@@ -120,7 +431,14 @@ diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vdpau.patch mplayer-vaapi-
- "wmv3_vdpau",
- AVMEDIA_TYPE_VIDEO,
- CODEC_ID_WMV3,
-@@ -605,7 +608,7 @@ index c9a547b..71c50e7 100644
+@@ -600,12 +585,13 @@ index c9a547b..71c50e7 100644
+ - CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU,
+ - NULL,
+ - .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 VDPAU"),
+-- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_WMV3, PIX_FMT_NONE}
++- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_WMV3, PIX_FMT_NONE},
++- .profiles = NULL_IF_CONFIG_SMALL(profiles)
+ -};
-#endif
-
-#if CONFIG_VC1_VDPAU_DECODER
@@ -129,3 +447,45 @@ diff -upr mplayer-vaapi-20110127.orig/patches/mplayer-vdpau.patch mplayer-vaapi-
- "vc1_vdpau",
- AVMEDIA_TYPE_VIDEO,
- CODEC_ID_VC1,
+@@ -617,7 +603,8 @@ index c9a547b..71c50e7 100644
+ - CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU,
+ - NULL,
+ - .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"),
+-- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_VC1, PIX_FMT_NONE}
++- .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_VC1, PIX_FMT_NONE},
++- .profiles = NULL_IF_CONFIG_SMALL(profiles)
+ -};
+ -#endif
+ diff --git a/ffmpeg/libavcodec/vdpau.c b/ffmpeg/libavcodec/vdpau.c
+@@ -1163,9 +1150,9 @@ index 8ec91c8..2386a81 100644
+ PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
+ PIX_FMT_Y400A, ///< 8bit gray, 8bit alpha
+ + PIX_FMT_VDPAU, ///< HW decoding with VDPAU, Picture.data[3] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
++ PIX_FMT_BGR48LE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian
++ PIX_FMT_BGR48BE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian
+ PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
+- };
+-
+ diff --git a/fmt-conversion.c b/fmt-conversion.c
+ index bd32ce8..8994caa 100644
+ --- a/fmt-conversion.c
+@@ -1198,19 +1185,6 @@ index bd32ce8..8994caa 100644
+ {0, PIX_FMT_NONE}
+ };
+
+-diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
+-index 84b5430..aef79e9 100644
+---- a/libmpcodecs/vd_ffmpeg.c
+-+++ b/libmpcodecs/vd_ffmpeg.c
+-@@ -303,7 +303,7 @@ static int init(sh_video_t *sh){
+- }
+- #endif /* CONFIG_VAAPI */
+- #if CONFIG_VDPAU
+-- if(lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU){
+-+ if(get_video_hwaccel() == HWACCEL_VDPAU){
+- avctx->get_format = get_format;
+- }
+- #endif /* CONFIG_VDPAU */
+ diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c
+ index 5133b66..0ce6104 100644
+ --- a/libvo/vo_vdpau.c
diff --git a/libre/pacman/0001-makepkg-fix-removing-symbolic-link.patch b/libre/pacman/0001-makepkg-fix-removing-symbolic-link.patch
new file mode 100644
index 000000000..a14e1de69
--- /dev/null
+++ b/libre/pacman/0001-makepkg-fix-removing-symbolic-link.patch
@@ -0,0 +1,32 @@
+From c493eef643ecb3a54c79083c51a8975f816ed9de Mon Sep 17 00:00:00 2001
+From: Allan McRae <allan@archlinux.org>
+Date: Tue, 28 Jun 2011 22:47:35 +1000
+Subject: [PATCH] makepkg: fix removing symbolic link
+
+The path was not being stripped from $file before prefixing with
+$srcdir resulting in the attempted removal of a very weird
+filename.
+
+Signed-off-by: Allan McRae <allan@archlinux.org>
+Signed-off-by: Dan McGee <dan@archlinux.org>
+(cherry picked from commit e92905a2c8c14c7855e2841f44d3c139aa40844c)
+---
+ scripts/makepkg.sh.in | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
+index 3ace945..b0b0882 100644
+--- a/scripts/makepkg.sh.in
++++ b/scripts/makepkg.sh.in
+@@ -509,7 +509,7 @@ download_sources() {
+ local file=$(get_filepath "$netfile" || true)
+ if [[ -n "$file" ]]; then
+ msg2 "$(gettext "Found %s")" "${file##*/}"
+- rm -f "$srcdir/$file"
++ rm -f "$srcdir/${file##*/}"
+ ln -s "$file" "$srcdir/"
+ continue
+ fi
+--
+1.7.6
+
diff --git a/libre/pacman/PKGBUILD b/libre/pacman/PKGBUILD
index 71c50694b..1768684e1 100644
--- a/libre/pacman/PKGBUILD
+++ b/libre/pacman/PKGBUILD
@@ -2,14 +2,14 @@
# Maintainer: Dan McGee <dan@archlinux.org>
pkgname=pacman
-pkgver=3.5.3
-pkgrel=1
+pkgver=3.5.4
+pkgrel=4
pkgdesc="A library-based package manager with dependency support"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.archlinux.org/pacman/"
license=('GPL')
groups=('base')
-depends=('bash' 'libarchive>=2.8.4' 'libfetch>=2.28' 'pacman-mirrorlist')
+depends=('bash' 'glibc>=2.14' 'libarchive>=2.8.4' 'libfetch>=2.28' 'pacman-mirrorlist')
optdepends=('fakeroot: for makepkg usage as normal user'
'curl: for rankmirrors usage')
backup=(etc/pacman.conf etc/makepkg.conf)
@@ -19,18 +19,23 @@ source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz
pacman.conf
pacman.conf.x86_64
pacman.conf.mips64el
- makepkg.conf)
-md5sums=('c36c18ed4d8ec69c0ecb4f9684266901'
- 'c7e6dbee04b7c492febea4366519b91d'
- '8809642ed398d2b9b98c5974b8b5e348'
- '3b2e740853e3d1463885675809d4c6ff'
- 'be10d3d2e533515a0470237761415568')
+ makepkg.conf
+ 0001-makepkg-fix-removing-symbolic-link.patch)
+md5sums=('2dd3a85d55ee3dd89abd349aa837447c'
+ 'ba85525fe868f030bef209b0487dd5a5'
+ '7aaccf24479f396d4a5987c8ccd2f3a2'
+ '150a2854816cd67b1608e00f99701c1c'
+ 'be10d3d2e533515a0470237761415568'
+ '749a4ddc6d8418d8d031f1c9b4e09d6f')
# keep an upgrade path for older installations
PKGEXT='.pkg.tar.gz'
build() {
cd $srcdir/$pkgname-$pkgver
+
+ patch -Np1 < "$srcdir/0001-makepkg-fix-removing-symbolic-link.patch"
+
./configure --prefix=/usr --sysconfdir=/etc \
--localstatedir=/var --enable-doc
make
@@ -47,21 +52,21 @@ package() {
install -m644 $srcdir/pacman.conf $pkgdir/etc/pacman.conf
mycarch="i686"
mychost="i686-pc-linux-gnu"
- myflags="-march=i686 -mtune=generic -O2 -pipe"
- myldflags="-Wl,--hash-style=gnu -Wl,--as-needed"
+ myflags="-mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
+ myldflags="-Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu"
;;
x86_64)
install -m644 $srcdir/pacman.conf.x86_64 $pkgdir/etc/pacman.conf
mycarch="x86_64"
mychost="x86_64-unknown-linux-gnu"
- myflags="-march=x86-64 -mtune=generic -O2 -pipe"
+ myflags="-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
myldflags="-Wl,--hash-style=gnu -Wl,--as-needed"
;;
mips64el)
install -m644 $srcdir/pacman.conf.mips64el $pkgdir/etc/pacman.conf
mycarch="mips64el"
mychost="mips64el-unknown-linux-gnu"
- myflags="-O2 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop"
+ myflags="-O2 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
myldflags=""
;;
esac
diff --git a/libre/pacman/pacman.conf b/libre/pacman/pacman.conf
index 675956d3d..56f2b4670 100644
--- a/libre/pacman/pacman.conf
+++ b/libre/pacman/pacman.conf
@@ -79,6 +79,9 @@ Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
+# Parabola also supports community projects and personal repositories, to find
+# them check out this wiki page: http://wiki.parabolagnulinux.org/Repositories
+
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
diff --git a/libre/pacman/pacman.conf.mips64el b/libre/pacman/pacman.conf.mips64el
index caee508fd..82955b965 100644
--- a/libre/pacman/pacman.conf.mips64el
+++ b/libre/pacman/pacman.conf.mips64el
@@ -79,6 +79,9 @@ Include = /etc/pacman.d/mirrorlist
[community]
Include = /etc/pacman.d/mirrorlist
+# Parabola also supports community projects and personal repositories, to find
+# them check out this wiki page: http://wiki.parabolagnulinux.org/Repositories
+
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
diff --git a/libre/pacman/pacman.conf.x86_64 b/libre/pacman/pacman.conf.x86_64
index ed460dd8b..503df75e2 100644
--- a/libre/pacman/pacman.conf.x86_64
+++ b/libre/pacman/pacman.conf.x86_64
@@ -88,6 +88,9 @@ Include = /etc/pacman.d/mirrorlist
#[multilib]
#Include = /etc/pacman.d/mirrorlist
+# Parabola also supports community projects and personal repositories, to find
+# them check out this wiki page: http://wiki.parabolagnulinux.org/Repositories
+
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
diff --git a/libre/python2-libre/PKGBUILD b/libre/python2-libre/PKGBUILD
new file mode 100644
index 000000000..78550b63f
--- /dev/null
+++ b/libre/python2-libre/PKGBUILD
@@ -0,0 +1,105 @@
+# $Id: PKGBUILD 129895 2011-06-29 15:22:59Z stephane $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributer: Allan McRae <allan@archlinux.org>
+# Contributer: Jason Chu <jason@archlinux.org>
+
+_pkgname=python2
+pkgname=python2-libre
+pkgver=2.7.2
+pkgrel=2
+_pybasever=2.7
+pkgdesc="A high-level scripting language"
+arch=('i686' 'x86_64')
+license=('PSF')
+url="http://www.python.org/"
+depends=('bzip2' 'gdbm' 'openssl' 'zlib' 'expat' 'sqlite3' 'libffi')
+makedepends=('tk')
+optdepends=('tk: for IDLE')
+conflicts=('python<3')
+options=('!makeflags')
+source=(http://repo.parabolagnulinux.org/other/Python-${pkgver}.tar.xz
+ doc_license_change.patch
+ WDAS.patch)
+md5sums=('5f8a18361784411b16dbb1cdcd6f6664'
+ '1e6595f85a1da7f42b69456119924d50'
+ '3f8c0e310a0be0bd8b319d6c46bbd427')
+provides=("$_pkgname=$pkgver")
+conflicts=("$_pkgname")
+replaces=("$_pkgname")
+
+mksource() {
+ [ ! -d "Python-${pkgver}" ] && \
+ wget -O - http://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz |\
+ tar -xJf -
+
+ cd "Python-${pkgver}"
+# http://bugs.python.org/issue12417
+ patch -Np1 -i ../WDAS.patch || return 1
+ patch -Np0 -i ../doc_license_change.patch || return 1
+
+ cd ..
+ tar -cJf Python-${pkgver}.tar.xz "Python-${pkgver}"
+}
+
+build() {
+ cd "${srcdir}/Python-${pkgver}"
+
+ # Temporary workaround for FS#22322
+ # See http://bugs.python.org/issue10835 for upstream report
+ sed -i "/progname =/s/python/python${_pybasever}/" Python/pythonrun.c
+
+ # Enable built-in SQLite3 module to load extensions (fix FS#22122)
+ sed -i "/SQLITE_OMIT_LOAD_EXTENSION/d" setup.py
+
+ # FS#23997
+ sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python2|" Lib/cgi.py
+
+ # Ensure that we are using the system copy of various libraries (expat, zlib and libffi),
+ # rather than copies shipped in the tarball
+ rm -r Modules/expat
+ rm -r Modules/zlib
+ rm -r Modules/_ctypes/{darwin,libffi}*
+
+ export OPT="${CFLAGS}"
+ ./configure --prefix=/usr --enable-shared --with-threads --enable-ipv6 \
+ --enable-unicode=ucs4 --with-system-expat --with-system-ffi
+
+ make
+}
+
+package() {
+ cd "${srcdir}/Python-${pkgver}"
+ make DESTDIR="${pkgdir}" altinstall maninstall
+
+ ln -sf python${_pybasever} "${pkgdir}/usr/bin/python2"
+ ln -sf python${_pybasever}-config "${pkgdir}/usr/bin/python2-config"
+ ln -sf python${_pybasever}.1 "${pkgdir}/usr/share/man/man1/python2.1"
+
+ ln -sf ../../libpython${_pybasever}.so \
+ "${pkgdir}/usr/lib/python${_pybasever}/config/libpython${_pybasever}.so"
+
+ mv "${pkgdir}/usr/bin/smtpd.py" "${pkgdir}/usr/lib/python${_pybasever}/"
+
+ # some useful "stuff"
+ install -dm755 "${pkgdir}"/usr/lib/python${_pybasever}/Tools/{i18n,scripts}
+ install -m755 Tools/i18n/{msgfmt,pygettext}.py \
+ "${pkgdir}/usr/lib/python${_pybasever}/Tools/i18n/"
+ install -m755 Tools/scripts/{README,*py} \
+ "${pkgdir}/usr/lib/python${_pybasever}/Tools/scripts/"
+
+ # fix conflicts with python
+ mv "${pkgdir}"/usr/bin/idle{,2}
+ mv "${pkgdir}"/usr/bin/pydoc{,2}
+ mv "${pkgdir}"/usr/bin/2to3{,-2.7}
+
+ # clean up #!s
+ find "${pkgdir}/usr/lib/python${_pybasever}/" -name '*.py' | \
+ xargs sed -i "s|#[ ]*![ ]*/usr/bin/env python$|#!/usr/bin/env python2|"
+
+ # clean-up reference to build directory
+ sed -i "s#${srcdir}/Python-${pkgver}:##" \
+ "${pkgdir}/usr/lib/python${_pybasever}/config/Makefile"
+
+ # license
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
+}
diff --git a/libre/python2-libre/WDAS.patch b/libre/python2-libre/WDAS.patch
new file mode 100644
index 000000000..86bc75e8c
--- /dev/null
+++ b/libre/python2-libre/WDAS.patch
@@ -0,0 +1,109 @@
+diff -r ac562d86ab71 Lib/profile.py
+--- a/Lib/profile.py Fri Jun 03 17:50:59 2011 -0500
++++ b/Lib/profile.py Mon Jun 27 00:02:20 2011 -0700
+@@ -2,35 +2,26 @@
+ #
+ # Class for profiling python code. rev 1.0 6/2/94
+ #
++# Written by James Roskind
+ # Based on prior profile module by Sjoerd Mullender...
+ # which was hacked somewhat by: Guido van Rossum
+
+ """Class for profiling Python code."""
+
+-# Copyright 1994, by InfoSeek Corporation, all rights reserved.
+-# Written by James Roskind
+-#
+-# Permission to use, copy, modify, and distribute this Python software
+-# and its associated documentation for any purpose (subject to the
+-# restriction in the following sentence) without fee is hereby granted,
+-# provided that the above copyright notice appears in all copies, and
+-# that both that copyright notice and this permission notice appear in
+-# supporting documentation, and that the name of InfoSeek not be used in
+-# advertising or publicity pertaining to distribution of the software
+-# without specific, written prior permission. This permission is
+-# explicitly restricted to the copying and modification of the software
+-# to remain in Python, compiled Python, or other languages (such as C)
+-# wherein the modified or derived code is exclusively imported into a
+-# Python module.
+-#
+-# INFOSEEK CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+-# SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+-# FITNESS. IN NO EVENT SHALL INFOSEEK CORPORATION BE LIABLE FOR ANY
+-# SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+-# RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+-# CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+-# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+-
++# Copyright Disney Enterprises, Inc. All Rights Reserved.
++# Licensed to PSF under a Contributor Agreement
++#
++# Licensed under the Apache License, Version 2.0 (the "License");
++# you may not use this file except in compliance with the License.
++# You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
++# either express or implied. See the License for the specific language
++# governing permissions and limitations under the License.
+
+
+ import sys
+diff -r ac562d86ab71 Lib/pstats.py
+--- a/Lib/pstats.py Fri Jun 03 17:50:59 2011 -0500
++++ b/Lib/pstats.py Mon Jun 27 00:02:20 2011 -0700
+@@ -2,34 +2,26 @@
+
+ # Class for printing reports on profiled python code. rev 1.0 4/1/94
+ #
++# Written by James Roskind
+ # Based on prior profile module by Sjoerd Mullender...
+ # which was hacked somewhat by: Guido van Rossum
+-#
+-# see profile.py for more info.
+
+-# Copyright 1994, by InfoSeek Corporation, all rights reserved.
+-# Written by James Roskind
+-#
+-# Permission to use, copy, modify, and distribute this Python software
+-# and its associated documentation for any purpose (subject to the
+-# restriction in the following sentence) without fee is hereby granted,
+-# provided that the above copyright notice appears in all copies, and
+-# that both that copyright notice and this permission notice appear in
+-# supporting documentation, and that the name of InfoSeek not be used in
+-# advertising or publicity pertaining to distribution of the software
+-# without specific, written prior permission. This permission is
+-# explicitly restricted to the copying and modification of the software
+-# to remain in Python, compiled Python, or other languages (such as C)
+-# wherein the modified or derived code is exclusively imported into a
+-# Python module.
+-#
+-# INFOSEEK CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+-# SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+-# FITNESS. IN NO EVENT SHALL INFOSEEK CORPORATION BE LIABLE FOR ANY
+-# SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
+-# RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+-# CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+-# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++"""Class for profiling Python code."""
++
++# Copyright Disney Enterprises, Inc. All Rights Reserved.
++# Licensed to PSF under a Contributor Agreement
++#
++# Licensed under the Apache License, Version 2.0 (the "License");
++# you may not use this file except in compliance with the License.
++# You may obtain a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS,
++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
++# either express or implied. See the License for the specific language
++# governing permissions and limitations under the License.
+
+
+ import sys
diff --git a/libre/python2-libre/doc_license_change.patch b/libre/python2-libre/doc_license_change.patch
new file mode 100644
index 000000000..18f9447d7
--- /dev/null
+++ b/libre/python2-libre/doc_license_change.patch
@@ -0,0 +1,44 @@
+--- Doc/library/profile.rst 2011-06-11 12:46:23.000000000 -0300
++++ Doc/library/profile.rst.orig 2011-08-12 11:35:25.000000000 -0300
+@@ -12,27 +12,23 @@
+
+ .. index:: single: InfoSeek Corporation
+
+-Copyright © 1994, by InfoSeek Corporation, all rights reserved.
++Copyright Disney Enterprises, Inc. All Rights Reserved.
+
+ Written by James Roskind. [#]_
+
+-Permission to use, copy, modify, and distribute this Python software and its
+-associated documentation for any purpose (subject to the restriction in the
+-following sentence) without fee is hereby granted, provided that the above
+-copyright notice appears in all copies, and that both that copyright notice and
+-this permission notice appear in supporting documentation, and that the name of
+-InfoSeek not be used in advertising or publicity pertaining to distribution of
+-the software without specific, written prior permission. This permission is
+-explicitly restricted to the copying and modification of the software to remain
+-in Python, compiled Python, or other languages (such as C) wherein the modified
+-or derived code is exclusively imported into a Python module.
+-
+-INFOSEEK CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT
+-SHALL INFOSEEK CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+-DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+-OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++Licensed to PSF under a Contributor Agreement
++
++Licensed under the Apache License, Version 2.0 (the "License");
++you may not use this file except in compliance with the License.
++You may obtain a copy of the License at
++
++http://www.apache.org/licenses/LICENSE-2.0
++
++Unless required by applicable law or agreed to in writing, software
++distributed under the License is distributed on an "AS IS" BASIS,
++WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
++either express or implied. See the License for the specific language
++governing permissions and limitations under the License.
+
+ .. _profiler-introduction:
+
diff --git a/libre/sdl-libre/PKGBUILD b/libre/sdl-libre/PKGBUILD
new file mode 100644
index 000000000..6d1767ec6
--- /dev/null
+++ b/libre/sdl-libre/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 135310 2011-08-12 14:45:48Z ibiru $
+#mips64el Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: dorphell <dorphell@archlinux.org>
+# Maintainer: Henry Jensen <hjensen@connochaetos.org>
+
+pkgname=sdl-libre
+pkgver=1.2.14
+pkgrel=7
+pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard"
+arch=('i686' 'x86_64')
+url="http://www.libsdl.org"
+license=('LGPL')
+provides=("sdl=${pkgver}")
+conflicts=('sdl')
+depends=('glibc' 'libxext' 'libxrender' 'libx11')
+makedepends=('alsa-lib' 'mesa')
+replaces=('sdl')
+options=('!libtool')
+source=(http://repo.parabolagnulinux.org/other/SDL-${pkgver}-libre.tar.gz
+ sdl-1.2.14-joystick-crash.diff
+ sdl-1.2.14-fix-mouse-clicking.patch
+ sdl-1.2.14-fix-disappearing-cursor.patch)
+md5sums=('b8ac7254fe5425a0fb238fb535d3d14c'
+ '9d8890b3817736a5d365f7497f096634'
+ '04d8c179f125e04bcd4c9d60e013c2d7'
+ 'a6cf3e71b653aa97d0d8ae6c0a789807')
+
+build() {
+ cd ${srcdir}/SDL-${pkgver}-libre
+ patch -Np1 -i $srcdir/sdl-1.2.14-joystick-crash.diff
+ patch -Np1 -i $srcdir/sdl-1.2.14-fix-mouse-clicking.patch
+ patch -Np1 -i $srcdir/sdl-1.2.14-fix-disappearing-cursor.patch
+ ./configure --prefix=/usr --disable-nasm --enable-alsa --enable-esd \
+ --with-x --disable-rpath
+ make
+}
+
+package() {
+ cd ${srcdir}/SDL-${pkgver}-libre
+ make DESTDIR=${pkgdir} install
+}
diff --git a/libre/sdl-libre/sdl-1.2.14-fix-disappearing-cursor.patch b/libre/sdl-libre/sdl-1.2.14-fix-disappearing-cursor.patch
new file mode 100644
index 000000000..fcd3c314d
--- /dev/null
+++ b/libre/sdl-libre/sdl-1.2.14-fix-disappearing-cursor.patch
@@ -0,0 +1,17 @@
+Index: SDL-1.2.14/src/video/x11/SDL_x11events.c
+===================================================================
+--- SDL-1.2.14.orig/src/video/x11/SDL_x11events.c 2010-04-30 09:16:35.000000000 -0400
++++ SDL-1.2.14/src/video/x11/SDL_x11events.c 2010-04-30 09:16:35.000000000 -0400
+@@ -444,8 +444,10 @@
+ if ( xevent.xcrossing.mode == NotifyUngrab )
+ printf("Mode: NotifyUngrab\n");
+ #endif
+- if ( xevent.xcrossing.detail != NotifyInferior ) {
+- if ( this->input_grab == SDL_GRAB_OFF ) {
++ if ( (xevent.xcrossing.mode != NotifyGrab) &&
++ (xevent.xcrossing.mode != NotifyUngrab) &&
++ (xevent.xcrossing.detail != NotifyInferior) ) {
++ if ( this->input_grab == SDL_GRAB_OFF ) {
+ posted = SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS);
+ } else {
+ posted = SDL_PrivateMouseMotion(0, 0,
diff --git a/libre/sdl-libre/sdl-1.2.14-fix-mouse-clicking.patch b/libre/sdl-libre/sdl-1.2.14-fix-mouse-clicking.patch
new file mode 100644
index 000000000..7d3e5acfc
--- /dev/null
+++ b/libre/sdl-libre/sdl-1.2.14-fix-mouse-clicking.patch
@@ -0,0 +1,23 @@
+--- SDL-1.2.14/src/video/x11/SDL_x11events.c.orig 2010-04-08 11:57:05.003169834 -0700
++++ SDL-1.2.14/src/video/x11/SDL_x11events.c 2010-04-08 12:33:51.690926340 -0700
+@@ -423,12 +423,15 @@
+ if ( xevent.xcrossing.mode == NotifyUngrab )
+ printf("Mode: NotifyUngrab\n");
+ #endif
+- if ( this->input_grab == SDL_GRAB_OFF ) {
+- posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
++ if ( (xevent.xcrossing.mode != NotifyGrab) &&
++ (xevent.xcrossing.mode != NotifyUngrab) ) {
++ if ( this->input_grab == SDL_GRAB_OFF ) {
++ posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
++ }
++ posted = SDL_PrivateMouseMotion(0, 0,
++ xevent.xcrossing.x,
++ xevent.xcrossing.y);
+ }
+- posted = SDL_PrivateMouseMotion(0, 0,
+- xevent.xcrossing.x,
+- xevent.xcrossing.y);
+ }
+ break;
+
diff --git a/libre/sdl-libre/sdl-1.2.14-joystick-crash.diff b/libre/sdl-libre/sdl-1.2.14-joystick-crash.diff
new file mode 100644
index 000000000..949e18b96
--- /dev/null
+++ b/libre/sdl-libre/sdl-1.2.14-joystick-crash.diff
@@ -0,0 +1,14 @@
+Description: Fix crash with joystick detection.
+Index: libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c
+===================================================================
+--- libsdl1.2-1.2.14.orig/src/joystick/linux/SDL_sysjoystick.c 2010-01-12 12:37:36.000000000 -0500
++++ libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c 2010-01-12 12:38:27.000000000 -0500
+@@ -700,7 +700,7 @@
+ continue;
+ }
+ if ( test_bit(i, absbit) ) {
+- int values[5];
++ int values[6];
+
+ if ( ioctl(fd, EVIOCGABS(i), values) < 0 )
+ continue;
diff --git a/libre/texlive-bin-libre/09-texlive-fonts.conf b/libre/texlive-bin-libre/09-texlive-fonts.conf
new file mode 100644
index 000000000..f870fbd7a
--- /dev/null
+++ b/libre/texlive-bin-libre/09-texlive-fonts.conf
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<fontconfig>
+ <dir>/usr/share/texmf-dist/fonts/opentype</dir>
+ <dir>/usr/share/texmf-dist/fonts/truetype</dir>
+ <dir>/usr/local/share/texmf/fonts/opentype</dir>
+ <dir>/usr/local/share/texmf/fonts/truetype</dir>
+</fontconfig>
+
diff --git a/libre/texlive-bin-libre/PKGBUILD b/libre/texlive-bin-libre/PKGBUILD
new file mode 100644
index 000000000..44ffecd3b
--- /dev/null
+++ b/libre/texlive-bin-libre/PKGBUILD
@@ -0,0 +1,340 @@
+# Parabola maintainer: Michał Masłowski <mtjm@mtjm.eu>
+# Maintainer: Rémy Oudompheng <remy@archlinux.org>
+# Contributor: francois <francois.archlinux.org>
+
+pkgname=texlive-bin-libre
+pkgver=2011.1
+_luatex_ver=0.70.1
+pkgrel=1
+pkgdesc="TeX Live binaries"
+license=('GPL')
+arch=('i686' 'x86_64')
+depends=('t1lib' 'gd' 'libgraphite' 'poppler' 'libsigsegv' 'zziplib')
+makedepends=('perl' 'clisp' 'ffcall')
+optdepends=('ed: for texconfig')
+provides=('lcdf-typetools' 'kpathsea' 'xindy' 'pdfjam' 'texlive-bin')
+conflicts=('pdfjam')
+replaces=('texlive-bin')
+options=('!libtool')
+url='http://tug.org/texlive/'
+install="texlive.install"
+source=('texmf.cnf'
+ 'fix-fontforge-encoding.patch'
+ '09-texlive-fonts.conf'
+ 'archlinux-build.patch'
+ 'http://mirrors.kernel.org/archlinux/other/texlive/texlive-bin-source-20110724.tar.xz'
+ 'http://mirrors.kernel.org/archlinux/other/texlive/texlive-bin-texmf-20110724.tar.xz'
+ "http://foundry.supelec.fr/gf/download/frsrelease/392/1730/luatex-beta-${_luatex_ver}.tar.bz2"
+)
+backup=(etc/texmf/web2c/texmf.cnf \
+ etc/texmf/chktex/chktexrc \
+ etc/texmf/web2c/mktex.cnf \
+ etc/texmf/web2c/updmap.cfg \
+ etc/texmf/web2c/fmtutil.cnf \
+ etc/texmf/tex/generic/config/language.dat \
+ etc/texmf/tex/generic/config/language.def \
+ etc/texmf/tex/generic/config/pdftexconfig.tex \
+ etc/texmf/ttf2pk/ttf2pk.cfg \
+ etc/texmf/dvips/config/config.ps \
+ etc/texmf/dvipdfmx/dvipdfmx.cfg \
+ etc/texmf/dvipdfm/config/config \
+ etc/texmf/xdvi/XDvi)
+
+md5sums=('ff30d6813babd2e41c414365eea9c147'
+ 'bfb9716aa00c86c08cd31e5b32edeb98'
+ '393a4bf67adc7ca5df2b386759d1a637'
+ '94ef5571a54262790ab64d6d044dd10c'
+ '58e8ab64188eaf15897b7acf472dca9f'
+ '9f7ae1aa24afd9e34289ac10a8f9e87b'
+ 'c9348d4381170204b1a1b0440d8b6918')
+
+build() {
+ cd $srcdir
+ # Remove bundled packages available in Parabola or not needed.
+ # TODO remove also icu
+ rm -rf source/{extra/{djgpp,xz},libs/{freetype2,gd,xpdf,libpng,zziplib,zlib,t1lib,poppler,graphite},utils/dialog}
+ rm -rf luatex-beta-0.70.1/source/libs/{libpng,zziplib,zlib,poppler}
+ # Building LuaTeX
+ cd luatex-beta-${_luatex_ver}
+ patch -p0 -i ../fix-fontforge-encoding.patch
+ (cd source && ./texk/web2c/luatexdir/getluatexsvnversion.sh)
+ mkdir build
+ cd build
+ ../source/configure --prefix=/usr -C \
+ --disable-native-texlive-build \
+ --with-banner-add="/Parabola GNU/Linux-libre" \
+ --enable-cxx-runtime-hack \
+ --disable-all-pkgs \
+ --disable-dump-share \
+ --disable-ptex \
+ --enable-luatex \
+ --without-system-ptexenc \
+ --with-system-graphite \
+ --without-system-icu \
+ --without-system-kpathsea \
+ --with-system-freetype2 \
+ --with-system-poppler \
+ --with-freetype2-libdir=/usr/lib \
+ --with-freetype2-include=/usr/include/freetype2 \
+ --with-system-gd \
+ --with-system-libpng \
+ --without-system-teckit \
+ --with-system-zlib \
+ --with-system-zziplib \
+ --with-system-t1lib \
+ --disable-static \
+ --enable-shared \
+ --disable-largefile \
+ --disable-ipc \
+ --without-mf-x-toolkit \
+ --without-x
+ make
+ make -C libs/obsdcompat
+ make -C texk/kpathsea
+ make -C texk/web2c luatex
+
+ cd "$srcdir"
+ # this patch removes spurious error message with locale "xx_YY.utf8"
+ patch -p0 -i fix-fontforge-encoding.patch
+ #############################################################
+ ### configure
+ cd source
+ patch -Np1 -i ${srcdir}/archlinux-build.patch
+ for _dir in texk/tetex texk/texlive texk/tex4htk \
+ utils/ps2eps utils/chktex utils/psutils utils/xindy; do
+ (cd ${_dir} && automake) || true
+ done
+ ## prevent compiling Xdvi with libXp
+ sed -i~ 's|-lXp ||' texk/xdvik/configure
+ test ! -d Work && mkdir Work
+ cd Work
+ echo "--> Initial configuration..."
+ # we use temporary prefix to avoid messing the existing $pkgdir/usr/share/texmf tree
+ ../configure --prefix=/usr -C \
+ --datarootdir=/usr/share \
+ --datadir=/usr/share \
+ --mandir=/usr/share/man \
+ --disable-native-texlive-build \
+ --with-banner-add="/Parabola GNU/Linux-libre" \
+ --disable-multiplatform \
+ --disable-dialog \
+ --disable-psutils \
+ --disable-t1utils \
+ --disable-bibtexu \
+ --disable-xz \
+ --with-system-zlib \
+ --with-system-zziplib \
+ --with-system-pnglib \
+ --with-system-ncurses \
+ --with-system-t1lib \
+ --with-system-gd \
+ --with-system-poppler \
+ --with-system-xpdf \
+ --with-system-freetype2 \
+ --with-system-graphite \
+ --with-system-icu \
+ --with-freetype2-libdir=/usr/lib \
+ --with-freetype2-include=/usr/include/freetype2 \
+ --with-xdvi-x-toolkit=xaw \
+ --disable-dump-share \
+ --disable-aleph \
+ --disable-luatex \
+ --with-clisp-runtime=default \
+ --disable-static \
+ --enable-shared \
+ --enable-xindy --disable-xindy-rules --disable-xindy-docs
+ #############################################################
+ ### make
+ echo "-------------------------------------------------------"
+ echo "--> Building the whole beast ..."
+ echo "-------------------------------------------------------"
+ make
+}
+
+package() {
+ cd $srcdir
+ #############################################################
+ ### install texmf tree
+ echo "-------------------------------------------------------"
+ echo "--> installing the texmf tree"
+ echo "-------------------------------------------------------"
+ install -m755 -d $pkgdir/usr/share
+ cp -r texmf $pkgdir/usr/share/
+ install -d -m755 $pkgdir/etc/texmf/web2c
+ install -d -m755 $pkgdir/etc/texmf/chktex
+ install -d -m755 $pkgdir/etc/texmf/dvips/config
+ install -d -m755 $pkgdir/etc/texmf/dvipdfm/config
+ install -d -m755 $pkgdir/etc/texmf/dvipdfmx
+ install -d -m755 $pkgdir/etc/texmf/tex/generic/config
+ install -d -m755 $pkgdir/etc/texmf/ttf2pk
+ install -d -m755 $pkgdir/etc/texmf/xdvi
+ install -d -m755 $pkgdir/etc/fonts/conf.avail
+ install -m644 $srcdir/09-texlive-fonts.conf $pkgdir/etc/fonts/conf.avail/
+ # replace upstream texmf.cnf with ours
+ rm -f $pkgdir/usr/share/texmf/web2c/texmf.cnf
+ install -m644 $srcdir/texmf.cnf $pkgdir/etc/texmf/web2c/texmf.cnf
+ # since the location of texmf.cnf is hard-wired to be under /usr/share/texmf/web2c
+ # we make a symlink from /etc/texmf/web2c/texmf.cnf to the latter
+ ln -s /etc/texmf/web2c/texmf.cnf $pkgdir/usr/share/texmf/web2c/texmf.cnf
+ # fix location of TEXMFCACHE for luatools
+ sed -i 's#texlive2010#texlive#' $pkgdir/usr/share/texmf/web2c/texmfcnf.lua
+ ## remove aleph from fmtutil.cnf
+ sed -i -e '/aleph/d' $pkgdir/usr/share/texmf/web2c/fmtutil.cnf
+ # move man files to /usr/share/man
+ for i in 1 5; do
+ install -d -m755 $pkgdir/usr/share/man/man$i
+ mv $pkgdir/usr/share/texmf/doc/man/man$i/*.$i $pkgdir/usr/share/man/man$i/
+ done
+ # move info files to /usr/share/info
+ install -d -m755 $pkgdir/usr/share/info
+ mv $pkgdir/usr/share/texmf/doc/info/*.info $pkgdir/usr/share/info/
+ rm -rf $pkgdir/usr/share/texmf/doc/{man,info}
+ # copy config files to $TEXMFCONFIG tree
+ cp -a $pkgdir/usr/share/texmf/chktex/chktexrc \
+ $pkgdir/etc/texmf/chktex/
+ cp -a $pkgdir/usr/share/texmf/web2c/mktex.cnf \
+ $pkgdir/etc/texmf/web2c/
+ cp -a $pkgdir/usr/share/texmf/web2c/updmap.cfg \
+ $pkgdir/etc/texmf/web2c/
+ cp -a $pkgdir/usr/share/texmf/web2c/fmtutil.cnf \
+ $pkgdir/etc/texmf/web2c/
+ cp -a $pkgdir/usr/share/texmf/dvips/config/config.ps \
+ $pkgdir/etc/texmf/dvips/config/
+ cp -a $pkgdir/usr/share/texmf/dvipdfm/config/config \
+ $pkgdir/etc/texmf/dvipdfm/config/
+ cp -a $pkgdir/usr/share/texmf/dvipdfmx/dvipdfmx.cfg \
+ $pkgdir/etc/texmf/dvipdfmx/
+ cp -a $pkgdir/usr/share/texmf/tex/generic/config/pdftexconfig.tex \
+ $pkgdir/etc/texmf/tex/generic/config/
+ cp -a $pkgdir/usr/share/texmf/tex/generic/config/language.dat \
+ $pkgdir/etc/texmf/tex/generic/config/
+ cp -a $pkgdir/usr/share/texmf/tex/generic/config/language.def \
+ $pkgdir/etc/texmf/tex/generic/config/
+ cp -a $pkgdir/usr/share/texmf/ttf2pk/ttf2pk.cfg \
+ $pkgdir/etc/texmf/ttf2pk/
+ cp -a $pkgdir/usr/share/texmf/xdvi/XDvi \
+ $pkgdir/etc/texmf/xdvi/
+ # remove TL specific warnings in the language.{dat,def} files:
+ sed -i -e '/DO NOT EDIT/,+3 d' $pkgdir/etc/texmf/tex/generic/config/language.*
+ # clean updmap.cfg
+ sed -i '/^\(Map\|MixedMap\)/d' $pkgdir/etc/texmf/web2c/updmap.cfg
+ sed -i '/^#! \(Map\|MixedMap\)/d' $pkgdir/etc/texmf/web2c/updmap.cfg
+
+ #############################################################
+ ### install
+ cd source
+ # fixes for xindy
+ find utils/xindy -name Makefile -exec sed -i -e "s|^prefix =.\+$|prefix = $pkgdir/usr|" -e "s|^mandir =.\+$|mandir = \${prefix}/share/man|" -e "s|^datadir =.\+$|datadir = \${datarootdir}/texmf|" -e "s|^docdir =.\+$|docdir = \${datadir}/doc/xindy|" '{}' \;
+
+ echo "-------------------------------------------------------"
+ echo "--> Proceeding with make install ..."
+ echo "-------------------------------------------------------"
+ cd Work
+ make DESTDIR=${pkgdir} texmf=$pkgdir/usr/share/texmf install
+ rm -rf ${pkgdir}/usr/{texmf,texmf-dist}
+
+ ## install luatex binary
+ install -m755 $srcdir/luatex-beta-${_luatex_ver}/build/texk/web2c/luatex $pkgdir/usr/bin/
+ cd $pkgdir/usr/bin
+ /bin/ln -s luatex texlua
+ /bin/ln -s luatex texluac
+
+ ## install Perl libraries
+ mkdir -p $pkgdir/usr/share/tlpkg/TeXLive
+ install -m644 ${srcdir}/source/utils/biber/TeXLive/*.pm $pkgdir/usr/share/tlpkg/TeXLive
+
+ # create symlinks for formats
+ echo "--> Create symlinks for TeX formats ..."
+ LD_PRELOAD="${pkgdir}/usr/lib/libkpathsea.so.6" PATH="$PATH:${pkgdir}/usr/bin" texlinks -f $pkgdir/usr/share/texmf/web2c/fmtutil.cnf $pkgdir/usr/bin/
+ #############################################################
+ # remove dangling symlinks
+ _bibtexextra_scripts="bibexport"
+ _core_scripts="
+afm2afm
+arlatex
+autoinst
+bundledoc
+cmap2enc
+de-macro
+dviasm
+epstopdf
+findhyph
+font2afm
+fragmaster
+installfont-tl
+latex2man
+latexdiff
+latexdiff-vc
+latexmk
+latexrevise
+listings-ext.sh
+mkjobtexmf
+mkluatexfontdb
+mkt1font
+mptopdf
+ot2kpx
+pdf180
+pdf270
+pdf90
+pdfatfi
+pdfbook
+pdfcrop
+pdfflip
+pdfjam
+pdfjam-pocketmod
+pdfjam-slides3up
+pdfjam-slides6up
+pdfjoin
+pdfnup
+pdfpun
+pfm2kpx
+pkfix
+pkfix-helper
+purifyeps
+repstopdf
+rpdfcrop
+showglyphs
+sty2dtx
+texcount
+texdef
+texdiff
+texdirflatten
+texloganalyser
+thumbpdf
+vpl2ovp
+vpl2vpl
+"
+ _htmlxml_scripts="ht htcontext htlatex htmex httex httexi htxelatex htxetex mk4ht"
+ _langextra_scripts="ebong"
+ _langgreek_scripts="mkgrkindex"
+ _latexextra_scripts="authorindex \
+makeglossaries \
+pdfannotextractor \
+pdfthumb \
+perltex \
+ppower4 \
+ps4pdf \
+splitindex \
+svn-multi \
+vpe"
+ _music_scripts="musixtex musixflx"
+ _pictures_scripts="cachepic epspdf epspdftk fig4latex mathspic"
+ _pstricks_scripts="pst2pdf"
+ _science_scripts="ulqda"
+ for s in \
+ ${_bibtexextra_scripts} \
+ ${_core_scripts} \
+ ${_htmlxml_scripts} \
+ ${_langextra_scripts} \
+ ${_langgreek_scripts} \
+ ${_latexextra_scripts} \
+ ${_music_scripts} \
+ ${_pictures_scripts} \
+ ${_pstricks_scripts} \
+ ${_science_scripts} \
+ tlmgr; do
+ rm -f $pkgdir/usr/bin/$s
+ done
+ ###################################################################
+}
+
diff --git a/libre/texlive-bin-libre/archlinux-build.patch b/libre/texlive-bin-libre/archlinux-build.patch
new file mode 100644
index 000000000..accb97a7a
--- /dev/null
+++ b/libre/texlive-bin-libre/archlinux-build.patch
@@ -0,0 +1,40 @@
+diff -ur source.old/texk/am/script_links.am source/texk/am/script_links.am
+--- source.old/texk/am/script_links.am 2011-05-02 13:54:33.000000000 +0200
++++ source/texk/am/script_links.am 2011-06-05 11:22:53.118216353 +0200
+@@ -51,8 +51,8 @@
+ # We support both multiplatform and non-multiplatform builds.
+ install-links:
+ case "$(bindir)" in \
+- */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \
+- */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. TYPE=$(TYPE) EXT=$(EXT) make-links;; \
++ */bin) $(MAKE) $(AM_MAKEFLAGS) REL=$(datadir) TYPE=$(TYPE) EXT=$(EXT) make-links;; \
++ */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=$(datadir) TYPE=$(TYPE) EXT=$(EXT) make-links;; \
+ *) echo "strange directory '$(bindir)' for linked $(TYPE) scripts" >&2; \
+ exit 1;; \
+ esac
+diff -ur source.old/texk/tetex/Makefile.am source/texk/tetex/Makefile.am
+--- source.old/texk/tetex/Makefile.am 2011-05-31 11:47:04.000000000 +0200
++++ source/texk/tetex/Makefile.am 2011-06-05 10:28:40.287025375 +0200
+@@ -35,7 +35,7 @@
+
+ include $(srcdir)/../am/script_links.am
+
+-texmfdir = ${prefix}/$(scriptsdir)
++texmfdir = $(datadir)/$(scriptsdir)
+ dist_texmf_SCRIPTS = $(perl_scripts:=.pl) $(shell_scripts:=.sh)
+
+ if !WIN32
+diff -ur source.old/texk/texlive/linked_scripts/Makefile.am source/texk/texlive/linked_scripts/Makefile.am
+--- source.old/texk/texlive/linked_scripts/Makefile.am 2011-05-31 11:47:04.000000000 +0200
++++ source/texk/texlive/linked_scripts/Makefile.am 2011-06-05 09:41:50.997250443 +0200
+@@ -165,8 +165,8 @@
+ done
+ else !WIN32
+ case "$(bindir)" in \
+- */bin) $(MAKE) $(AM_MAKEFLAGS) REL=.. install-links;; \
+- */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=../.. install-links;; \
++ */bin) $(MAKE) $(AM_MAKEFLAGS) REL=$(datadir) install-links;; \
++ */bin/*) $(MAKE) $(AM_MAKEFLAGS) REL=$(datadir) install-links;; \
+ *) echo "strange directory '$(bindir)' for linked scripts" >&2; \
+ exit 1;; \
+ esac
diff --git a/libre/texlive-bin-libre/fix-fontforge-encoding.patch b/libre/texlive-bin-libre/fix-fontforge-encoding.patch
new file mode 100644
index 000000000..8104b3289
--- /dev/null
+++ b/libre/texlive-bin-libre/fix-fontforge-encoding.patch
@@ -0,0 +1,12 @@
+--- source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/noprefs.c.orig 2009-09-30 19:27:00.935039526 +0200
++++ source/texk/web2c/luatexdir/luafontloader/fontforge/fontforge/noprefs.c 2009-09-30 19:28:04.908364646 +0200
+@@ -495,6 +495,9 @@
+ { "Big5HKSCS", e_big5hkscs },
+ { "Big5-HKSCS", e_big5hkscs },
+ { "UTF-8", e_utf8 },
++ { "utf-8", e_utf8 },
++ { "UTF8", e_utf8 },
++ { "utf8", e_utf8 },
+ { "ISO-10646/UTF-8", e_utf8 },
+ { "ISO_10646/UTF-8", e_utf8 },
+ { "UCS2", e_unicode },
diff --git a/libre/texlive-bin-libre/texlive.install b/libre/texlive-bin-libre/texlive.install
new file mode 100644
index 000000000..9307c536b
--- /dev/null
+++ b/libre/texlive-bin-libre/texlive.install
@@ -0,0 +1,18 @@
+post_install() {
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ echo -n "creating all formats..."
+ usr/bin/fmtutil-sys --all 1>/dev/null
+ echo " done."
+ echo " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"
+}
+
+post_upgrade() {
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ echo -n "recreating all formats..."
+ usr/bin/fmtutil-sys --all 1>/dev/null
+ echo " done."
+ echo " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"
+}
+
diff --git a/libre/texlive-bin-libre/texmf.cnf b/libre/texlive-bin-libre/texmf.cnf
new file mode 100644
index 000000000..423d93e09
--- /dev/null
+++ b/libre/texlive-bin-libre/texmf.cnf
@@ -0,0 +1,676 @@
+% texmf.cnf for TeXLive/Arch Linux -- runtime path configuration file for kpathsea.
+% Public domain.
+%
+% If you modify this original file, YOUR CHANGES WILL BE LOST when it is
+% updated. Instead, put your changes -- and only your changes, not an
+% entire copy of the full texmf.cnf! -- in ../../texmf.cnf. That is, if
+% this file is installed in /some/path/to/texlive/2011/texmf/web2c/texmf.cnf,
+% add your custom settings to /some/path/to/texlive/2011/texmf.cnf.
+%
+% What follows is a super-summary of what this .cnf file can
+% contain. Please read the Kpathsea manual for more information.
+%
+% Any identifier (sticking to A-Za-z_ for names is safest) can be assigned.
+% The `=' (and surrounding spaces) is optional.
+% $foo (or ${foo}) in a value expands to the envvar or cnf value of foo.
+% Long lines can be continued with a \.
+%
+% Earlier entries (in the same or another file) override later ones, and
+% an environment variable foo overrides any texmf.cnf definition of foo.
+%
+% All definitions are read before anything is expanded, so you can use
+% variables before they are defined.
+%
+% If a variable assignment is qualified with `.PROGRAM', it is ignored
+% unless the current executable (last filename component of argv[0]) is
+% named PROGRAM. This foo.PROGRAM construct is not recognized on the
+% right-hand side. For environment variables, use FOO_PROGRAM.
+%
+% Which file formats use which paths for searches is described in the
+% various programs' and the Kpathsea documentation (http://tug.org/kpathsea).
+%
+% // means to search subdirectories (recursively).
+% A leading !! means to look only in the ls-R db, never on the disk.
+% In this file, either ; or : can be used to separate path components.
+% A leading/trailing/doubled path separator in the paths will be
+% expanded into the compile-time default. Probably not what you want.
+%
+% Brace notation is supported, for example: /usr/local/{mytex,othertex}
+% expands to /usr/local/mytex:/usr/local/othertex. We make extensive
+% use of this.
+
+
+% Part 1: Search paths and directories.
+
+% This is the parent directory of our several trees, i.e.,
+% /usr/local/texlive/YYYY in the original TeX Live distribution.
+%
+% All trees must be organized according to the TeX Directory Structure
+% (http://tug.org/tds), or files may not be found.
+%
+% Redistributors will probably want $SELFAUTODIR/share, i.e., /usr/share.
+TEXMFROOT = $SELFAUTODIR/share
+
+% The tree containing runtime files related to the specific
+% distribution and version.
+TEXMFMAIN = $TEXMFROOT/texmf
+
+% The main tree of packages, distribution-agnostic:
+TEXMFDIST = $TEXMFROOT/texmf-dist
+
+% Local additions to the distribution trees.
+TEXMFLOCAL = /usr/local/share/texmf
+
+% TEXMFSYSVAR, where *-sys store cached runtime data.
+TEXMFSYSVAR = /var/lib/texmf
+
+% TEXMFSYSCONFIG, where *-sys store configuration data.
+TEXMFSYSCONFIG = /etc/texmf
+
+% Per-user texmf tree(s) -- organized per the TDS, as usual. To define
+% more than one per-user tree, set this to a list of directories in
+% braces, as described above. (This used to be HOMETEXMF.) ~ expands
+% to %USERPROFILE% on Windows, $HOME otherwise.
+TEXMFHOME = ~/texmf
+
+% TEXMFVAR, where texconfig/updmap/fmtutil store cached runtime data.
+TEXMFVAR = ~/.texlive/texmf-var
+
+% TEXMFCONFIG, where texconfig/updmap/fmtutil store configuration data.
+TEXMFCONFIG = ~/.texlive/texmf-config
+
+% List all the texmf trees.
+%
+% For texconfig to work properly, TEXMFCONFIG and TEXMFVAR should be named
+% explicitly and before all other trees.
+%
+% TEXMFLOCAL follows TEXMFMAIN (and precedes TEXMFDIST) because the
+% files in TEXMFMAIN are tightly coupled with the particular version of
+% the distribution, such as configuration files. Overriding them would
+% be more likely to cause trouble than help. On the other hand, the
+% bulk of packages and fonts are in TEXMFDIST, and locally-installed
+% versions should take precedence over those -- although it is generally
+% a source of confusion to have different versions of a package
+% installed, whatever the trees, so try to avoid it.
+TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}
+
+% Where to look for ls-R files. There need not be an ls-R in the
+% directories in this path, but if there is one, Kpathsea will use it.
+% By default, this is only the !! elements of TEXMF, so that mktexlsr
+% does not create ls-R files in the non-!! elements -- because if an
+% ls-R is present, it will be used, and the disk will not be searched.
+% This is arguably a bug in kpathsea.
+TEXMFDBS = {!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}
+
+% The system trees. These are the trees that are shared by all users.
+% If a tree appears in this list, the mktex* scripts will use
+% VARTEXFONTS for generated files, if the original tree isn't writable;
+% otherwise the current working directory is used.
+SYSTEXMF = $TEXMFSYSVAR;$TEXMFMAIN;$TEXMFLOCAL;$TEXMFDIST
+
+% Where generated fonts may be written. This tree is used when the sources
+% were found in a system tree and either that tree wasn't writable, or the
+% varfonts feature was enabled in MT_FEATURES in mktex.cnf.
+VARTEXFONTS = $TEXMFVAR/fonts
+
+% On some systems, there will be a system tree which contains all the font
+% files that may be created as well as the formats. For example
+% TEXMFVAR = /var/lib/texmf
+% is used in many distros. In this case, set VARTEXFONTS like this
+%VARTEXFONTS = $TEXMFVAR/fonts
+% and do not mention it in TEXMFDBS (but _do_ mention TEXMFVAR).
+%
+% Remove $VARTEXFONTS from TEXMFDBS if the VARTEXFONTS directory is below
+% one of the TEXMF directories (avoids overlapping ls-R files).
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Usually you will not need to edit any of the following variables.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% WEB2C is for Web2C specific files. The current directory may not be
+% a good place to look for them.
+WEB2C = $TEXMF/web2c
+
+% TEXINPUTS is for TeX input files -- i.e., anything to be found by \input
+% or \openin, including .sty, .eps, etc. We specify paths for all known
+% formats, past or present. Not all of them are built these days.
+
+% Plain TeX. Have the command tex check all directories as a last
+% resort, we may have plain-compatible stuff anywhere.
+TEXINPUTS.tex = .;$TEXMF/tex/{plain,generic,}//
+
+% Fontinst needs to read afm files.
+TEXINPUTS.fontinst = .;$TEXMF/{tex,fonts/afm}//
+
+% Other plain-based formats.
+TEXINPUTS.amstex = .;$TEXMF/tex/{amstex,plain,generic,}//
+TEXINPUTS.csplain = .;$TEXMF/tex/{csplain,plain,generic,}//
+TEXINPUTS.eplain = .;$TEXMF/tex/{eplain,plain,generic,}//
+TEXINPUTS.ftex = .;$TEXMF/tex/{formate,plain,generic,}//
+TEXINPUTS.mex = .;$TEXMF/tex/{mex,plain,generic,}//
+TEXINPUTS.texinfo = .;$TEXMF/tex/{texinfo,plain,generic,}//
+
+% LaTeX 2e specific macros are stored in latex/, macros that can only be
+% used with 2.09 in latex209/. In addition, we look in the directory
+% latex209, useful for macros that were written for 2.09 and do not
+% mention 2e at all, but can be used with 2e.
+TEXINPUTS.cslatex = .;$TEXMF/tex/{cslatex,csplain,latex,generic,}//
+TEXINPUTS.latex = .;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.latex209 = .;$TEXMF/tex/{latex209,generic,latex,}//
+TEXINPUTS.olatex = .;$TEXMF/tex/{latex,generic,}//
+
+% MLTeX.
+TEXINPUTS.frlatex = .;$TEXMF/tex/{french,latex,generic,}//
+TEXINPUTS.frtex = .;$TEXMF/tex/{french,plain,generic,}//
+TEXINPUTS.mllatex = .;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.mltex = .;$TEXMF/tex/{plain,generic,}//
+
+% e-TeX.
+TEXINPUTS.elatex = .;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.etex = .;$TEXMF/tex/{plain,generic,}//
+
+% pdfTeX.
+TEXINPUTS.pdfcslatex = .;$TEXMF/tex/{cslatex,csplain,latex,generic,}//
+TEXINPUTS.pdfcsplain = .;$TEXMF/tex/{csplain,plain,generic,}//
+TEXINPUTS.pdflatex = .;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.pdfmex = .;$TEXMF/tex/{mex,plain,generic,}//
+TEXINPUTS.utf8mex = .;$TEXMF/tex/{mex,plain,generic,}//
+TEXINPUTS.pdftex = .;$TEXMF/tex/{plain,generic,}//
+TEXINPUTS.pdftexinfo = .;$TEXMF/tex/{texinfo,plain,generic,}//
+TEXINPUTS.pdfamstex = .;$TEXMF/tex/{amstex,plain,generic,}//
+
+% pdfeTeX.
+TEXINPUTS.pdfelatex = .;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.pdfetex = .;$TEXMF/tex/{plain,generic,}//
+
+% pdfxTeX.
+TEXINPUTS.pdfxlatex = .;$TEXMF/tex/{latex,generic,}//
+TEXINPUTS.pdfxmex = .;$TEXMF/tex/{mex,plain,generic,}//
+TEXINPUTS.pdfxtex = .;$TEXMF/tex/{plain,generic,}//
+
+% LuaTeX.
+TEXINPUTS.lualatex = .;$TEXMF/tex/{lualatex,latex,luatex,generic,}//
+TEXINPUTS.luatex = .;$TEXMF/tex/{luatex,plain,generic,}//
+TEXINPUTS.dvilualatex = .;$TEXMF/tex/{lualatex,latex,luatex,generic,}//
+TEXINPUTS.dviluatex = .;$TEXMF/tex/{luatex,plain,generic,}//
+
+% XeTeX.
+TEXINPUTS.xelatex = .;$TEXMF/tex/{xelatex,latex,xetex,generic,}//
+TEXINPUTS.xeplain = .;$TEXMF/tex/{xeplain,eplain,plain,xetex,generic,}//
+TEXINPUTS.xetex = .;$TEXMF/tex/{xetex,plain,generic,}//
+
+
+% ConTeXt.
+TEXINPUTS.context = .;$TEXMF/tex/{context,plain,generic,}//
+
+% jadetex.
+TEXINPUTS.jadetex = .;$TEXMF/tex/{jadetex,latex,generic,}//
+TEXINPUTS.pdfjadetex = .;$TEXMF/tex/{jadetex,latex,generic,}//
+
+% XMLTeX.
+TEXINPUTS.xmltex = .;$TEXMF/tex/{xmltex,latex,generic,}//
+TEXINPUTS.pdfxmltex = .;$TEXMF/tex/{xmltex,latex,generic,}//
+
+% Miscellany, no longer built.
+TEXINPUTS.lamstex = .;$TEXMF/tex/{lamstex,plain,generic,}//
+TEXINPUTS.lollipop = .;$TEXMF/tex/{lollipop,plain,generic,}//
+TEXINPUTS.frpdflatex = .;$TEXMF/tex/{french,latex,generic,}//
+TEXINPUTS.frpdftex = .;$TEXMF/tex/{french,plain,generic,}//
+
+% Earlier entries override later ones, so put this generic one last.
+TEXINPUTS = .;$TEXMF/tex/{$progname,generic,}//
+
+% ttf2tfm.
+TTF2TFMINPUTS = .;$TEXMF/ttf2pk//
+
+% Metafont, MetaPost inputs.
+MFINPUTS = .;$TEXMF/metafont//;{$TEXMF/fonts,$VARTEXFONTS}/source//
+MPINPUTS = .;$TEXMF/metapost//
+
+% Dump files (fmt/base/mem) for vir{tex,mf,mp} to read.
+% We want to find the engine-specific file, e.g., cont-en.fmt can
+% exist under both pdftex/ and xetex/. But just in case some formats
+% end up without an engine directory, look directly in web2c/ too.
+% We repeat the same definition three times because of the way fmtutil
+% is implemented; if we use ${TEXFORMATS}, the mpost/mf/etc. formats
+% will not be found.
+TEXFORMATS = .;$TEXMF/web2c{/$engine,}
+MFBASES = .;$TEXMF/web2c{/$engine,}
+MPMEMS = .;$TEXMF/web2c{/$engine,}
+%
+% As of 2008, pool files don't exist any more (the strings are compiled
+% into the binaries), but just in case something expects to find these:
+TEXPOOL = .;$TEXMF/web2c
+MFPOOL = ${TEXPOOL}
+MPPOOL = ${TEXPOOL}
+
+% support the original xdvi. Must come before the generic settings.
+PKFONTS.XDvi = .;$TEXMF/%s;$VARTEXFONTS/pk/{%m,modeless}//
+VFFONTS.XDvi = .;$TEXMF/%s
+PSHEADERS.XDvi = .;$TEXMF/%q{dvips,fonts/type1}//
+TEXPICTS.XDvi = .;$TEXMF/%q{dvips,tex}//
+
+% Device-independent font metric files.
+VFFONTS = .;$TEXMF/fonts/vf//
+TFMFONTS = .;{$TEXMF/fonts,$VARTEXFONTS}/tfm//
+
+% The $MAKETEX_MODE below means the drivers will not use a cx font when
+% the mode is ricoh. If no mode is explicitly specified, kpse_prog_init
+% sets MAKETEX_MODE to /, so all subdirectories are searched. See the manual.
+% The modeless part guarantees that bitmaps for PostScript fonts are found.
+PKFONTS = .;{$TEXMF/fonts,$VARTEXFONTS}/pk/{$MAKETEX_MODE,modeless}//
+
+% Similarly for the GF format, which only remains in existence because
+% Metafont outputs it (and MF isn't going to change).
+GFFONTS = .;$TEXMF/fonts/gf/$MAKETEX_MODE//
+
+% A backup for PKFONTS and GFFONTS. Not used for anything.
+GLYPHFONTS = .;$TEXMF/fonts
+
+% A place to puth everything that doesn't fit the other font categories.
+MISCFONTS = .;$TEXMF/fonts/misc//
+
+% font name map files. This isn't just fonts/map// because ConTeXt
+% wants support for having files with the same name in the different
+% subdirs. Maybe if the programs ever get unified to accepting the same
+% map file syntax the definition can be simplified again.
+TEXFONTMAPS = .;$TEXMF/fonts/map/{$progname,pdftex,dvips,}//
+
+% BibTeX bibliographies and style files. bibtex8 also uses these.
+BIBINPUTS = .;$TEXMF/bibtex/bib//
+BSTINPUTS = .;$TEXMF/bibtex/{bst,csf}//
+
+% MlBibTeX.
+MLBIBINPUTS = .;$TEXMF/bibtex/bib/{mlbib,}//
+MLBSTINPUTS = .;$TEXMF/bibtex/{mlbst,bst}//
+
+% MFT style files.
+MFTINPUTS = .;$TEXMF/mft//
+
+% PostScript headers and prologues (.pro); unfortunately, some programs
+% also use this for acessing font files (enc, type1, truetype)
+TEXPSHEADERS = .;$TEXMF/{dvips,fonts/{enc,type1,type42,type3}}//
+TEXPSHEADERS.gsftopk = .;$TEXMF/{dvips,fonts/{enc,type1,type42,type3,truetype}}//
+
+% OSFONTDIR is to provide a convenient hook for allowing TeX to find
+% fonts installed on the system (outside of TeX). An empty default
+% value would add "//" to the search paths, so we give it a dummy value.
+% OSFONTDIR = /usr/share/fonts
+
+% PostScript Type 1 outline fonts.
+T1FONTS = .;$TEXMF/fonts/type1//;$OSFONTDIR//
+
+% PostScript AFM metric files.
+AFMFONTS = .;$TEXMF/fonts/afm//;$OSFONTDIR//
+
+% TrueType outline fonts.
+TTFONTS = .;$TEXMF/fonts/{truetype,opentype}//;$OSFONTDIR//
+
+% Opentype outline fonts.
+OPENTYPEFONTS = .;$TEXMF/fonts/{opentype,truetype}//;$OSFONTDIR//
+
+% Type 42 outline fonts.
+T42FONTS = .;$TEXMF/fonts/type42//
+
+% Ligature definition files.
+LIGFONTS = .;$TEXMF/fonts/lig//
+
+% Dvips' config.* files (this name should not start with `TEX'!).
+TEXCONFIG = $TEXMF/dvips//
+
+% Makeindex style (.ist) files.
+INDEXSTYLE = .;$TEXMF/makeindex//
+
+% Font encoding files (.enc).
+ENCFONTS = .;$TEXMF/fonts/enc//
+
+% CMap files.
+CMAPFONTS = .;$TEXMF/fonts/cmap//
+
+% Subfont definition files.
+SFDFONTS = .;$TEXMF/fonts/sfd//
+
+% OpenType outline fonts.
+OPENTYPEFONTS = .;$TEXMF/fonts/opentype//
+
+% OpenType feature files (.fea).
+FONTFEATURES=.;$TEXMF/fonts/fea//
+
+% .cid and .cidmap
+FONTCIDMAPS=.;$TEXMF/fonts/cid//
+
+% pdftex config files:
+PDFTEXCONFIG = .;$TEXMF/pdftex/{$progname,}//
+
+% Used by DMP (ditroff-to-mpx), called by makempx -troff.
+TRFONTS = /usr{/local,}/share/groff/{current/font,site-font}/devps
+MPSUPPORT = .;$TEXMF/metapost/support
+
+% For xdvi to find mime.types and .mailcap, if they do not exist in
+% ~. These are single directories, not paths.
+% (But the default mime.types, at least, may well suffice.)
+MIMELIBDIR = /etc
+MAILCAPLIBDIR = /etc
+
+% Default settings for fontconfig library, used by Windows versions of
+% xetex/xdvipdfmx. On Unixish systems, fontconfig ignores this.
+FONTCONFIG_FILE=fonts.conf
+FONTCONFIG_PATH=$TEXMFSYSVAR/fonts/conf
+FC_CACHEDIR=$TEXMFSYSVAR/fonts/cache
+
+% TeX documentation and source files, for use with texdoc and kpsewhich.
+TEXDOCS = $TEXMF/doc//
+TEXSOURCES = .;$TEXMF/source//
+
+% Web and CWeb input paths.
+WEBINPUTS = .;$TEXMF/web//
+CWEBINPUTS = .;$TEXMF/cweb//
+
+% Omega-related fonts and other files.
+OFMFONTS = .;{$TEXMF/fonts,$VARTEXFONTS}/{ofm,tfm}//
+OPLFONTS = .;{$TEXMF/fonts,$VARTEXFONTS}/opl//
+OVFFONTS = .;{$TEXMF/fonts,$VARTEXFONTS}/{ovf,vf}//
+OVPFONTS = .;{$TEXMF/fonts,$VARTEXFONTS}/ovp//
+OTPINPUTS = .;$TEXMF/omega/otp//
+OCPINPUTS = .;$TEXMF/omega/ocp//
+
+% Some additional input variables for several programs. If you add
+% a program that uses the `other text files' or `other binary files'
+% search formats, you'll want to add their variables here as well.
+T4HTINPUTS = .;$TEXMF/tex4ht//
+
+%% t4ht utility, sharing files with TeX4ht
+TEX4HTFONTSET=alias,iso8859,unicode
+TEX4HTINPUTS = .;$TEXMF/tex4ht/base//;$TEXMF/tex4ht/ht-fonts/{$TEX4HTFONTSET}//
+
+% TeXworks editor configuration and settings
+TW_LIBPATH = $TEXMFCONFIG/texworks
+TW_INIPATH = $TW_LIBPATH
+
+% For security, do not look in . for dvipdfmx.cfg, since the D option
+% would allow command execution.
+DVIPDFMXINPUTS = $TEXMF/dvipdfmx
+
+% Find scripts that are distributed/installed in the texmf tree.
+
+% Lua needs to look in TEXINPUTS for lua scripts distributed with packages.
+LUAINPUTS = .;$TEXMF/scripts/{$progname,$engine,}/{lua,}//;$TEXINPUTS
+
+% Lua needs to look for binary lua libraries distributed with packages.
+CLUAINPUTS = .;$SELFAUTOLOC/lib/{$progname,$engine,}/lua//
+
+% Architecture independent executables.
+TEXMFSCRIPTS = $TEXMF/scripts/{$progname,$engine,}//
+
+% Other languages.
+JAVAINPUTS = .;$TEXMF/scripts/{$progname,$engine,}/java//
+PERLINPUTS = .;$TEXMF/scripts/{$progname,$engine,}/perl//
+PYTHONINPUTS = .;$TEXMF/scripts/{$progname,$engine,}/python//
+RUBYINPUTS = .;$TEXMF/scripts/{$progname,$engine,}/ruby//
+
+
+%% The mktex* scripts rely on KPSE_DOT. Do not set it in the environment.
+% KPSE_DOT = .
+
+% This definition isn't used from this .cnf file itself (that would be
+% paradoxical), but the compile-time default in paths.h is built from it.
+% The SELFAUTO* variables are set automatically from the location of
+% argv[0], in kpse_set_program_name.
+%
+% This main texmf.cnf file is installed, for a release YYYY, in a
+% directory such as /usr/local/texlive/YYYY/texmf/web2c/texmf.cnf.
+% Since this file is subject to future updates, the TeX Live installer
+% or human administrator may also create a file
+% /usr/local/texlive/YYYY/texmf.cnf; any settings in this latter file
+% will take precedence over the distributed one under texmf/web2c.
+%
+% For security reasons, it is better not to include . in this path.
+%
+TEXMFCNF = {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}
+
+% kpathsea 3.5.3 and later sets these at runtime. To avoid empty
+% expansions from binaries linked against an earlier version of the
+% library, we set $progname and $engine to something non-empty:
+progname = unsetprogname
+engine = unsetengine
+
+
+% Part 2: Options.
+
+% If this option is set to true, `tex a.b' will look first for a.b.tex
+% (within each path element), and then for a.b, i.e., we try standard
+% extensions first. If this is false, we first look for a.b and then
+% a.b.tex, i.e., we try the name as-is first.
+%
+% Both names are always tried; the difference is the order in which they
+% are tried. The setting applies to all searches, not just .tex.
+%
+% This setting only affects names being looked up which *already* have
+% an extension. A name without an extension (e.g., `tex story') will
+% always have an extension added first.
+%
+% The default is true, because we already avoid adding the standard
+% extension(s) in the usual cases. E.g., babel.sty will only look for
+% babel.sty, not babel.sty.tex, regardless of this setting.
+try_std_extension_first = t
+
+% Enable system commands via \write18{...}. When enabled fully (set to
+% t), obviously insecure. When enabled partially (set to p), only the
+% commands listed in shell_escape_commands are allowed. Although this
+% is not fully secure either, it is much better, and so useful that we
+% enable it for everything but bare tex.
+shell_escape = p
+
+% No spaces in this command list.
+%
+% The programs listed here are as safe as any we know: they either do
+% not write any output files, respect openout_any, or have hard-coded
+% restrictions similar or higher to openout_any=p. They also have no
+% features to invoke arbitrary other programs, and no known exploitable
+% bugs. All to the best of our knowledge. They also have practical use
+% for being called from TeX.
+%
+shell_escape_commands = \
+bibtex,bibtex8,\
+kpsewhich,\
+makeindex,\
+repstopdf,\
+
+% we'd like to allow:
+% dvips - but external commands can be executed, need at least -R1.
+% epspdf, ps2pdf, pstopdf - need to respect openout_any,
+% and gs -dSAFER must be used and check for shell injection with filenames.
+% (img)convert (ImageMagick) - delegates.mgk possible misconfig, besides,
+% without Unix convert it hardly seems worth it, and Windows convert
+% is something completely different that destroys filesystems, so skip.
+% pygmentize - but is the filter feature insecure?
+% ps4pdf - but it calls an unrestricted latex.
+% rpdfcrop - maybe ok, but let's get experience with repstopdf first.
+% texindy,xindy - but is the module feature insecure?
+% ulqda - but requires optional SHA1.pm, so why bother.
+% tex, latex, etc. - need to forbid --shell-escape, and inherit openout_any.
+
+% plain TeX should remain unenhanced.
+shell_escape.tex = f
+shell_escape.initex = f
+
+% This is used by the Windows script wrapper for restricting searching
+% for the purportedly safe shell_escape_commands above to system
+% directories.
+TEXMF_RESTRICTED_SCRIPTS = \
+ {!!$TEXMFMAIN,!!$TEXMFLOCAL,!!$TEXMFDIST}/scripts/{$progname,$engine,}//
+
+% Allow TeX \openin, \openout, or \input on filenames starting with `.'
+% (e.g., .rhosts) or outside the current tree (e.g., /etc/passwd)?
+% a (any) : any file can be opened.
+% r (restricted) : disallow opening "dotfiles".
+% p (paranoid) : as `r' and disallow going to parent directories, and
+% restrict absolute paths to be under $TEXMFOUTPUT.
+openout_any = p
+openin_any = a
+
+% Write .log/.dvi/etc. files here, if the current directory is unwritable.
+%TEXMFOUTPUT = /tmp
+
+% If a dynamic file creation fails, log the command to this file, in
+% either the current directory or TEXMFOUTPUT. Set to the
+% empty string or 0 to avoid logging.
+MISSFONT_LOG = missfont.log
+
+% Set to a colon-separated list of words specifying warnings to suppress.
+% To suppress everything, use TEX_HUSH = all; this is currently equivalent to
+% TEX_HUSH = checksum:lostchar:readable:special
+% To suppress nothing, use TEX_HUSH = none or do not set the variable at all.
+TEX_HUSH = none
+
+% Allow TeX, and MF to parse the first line of an input file for
+% the %&format construct.
+parse_first_line = t
+
+% But don't parse the first line if invoked as "tex", since we want that
+% to remain Knuth-compatible. The src_specials and
+% file_line_error_style settings, as well as the options -enctex,
+% -mltex, -8bit, etc., also affect this, but they are all off by default.
+parse_first_line.tex = f
+parse_first_line.initex = f
+
+% Control file:line:error style messages.
+file_line_error_style = f
+
+% Enable the mktex... scripts by default? These must be set to 0 or 1.
+% Particular programs can and do override these settings, for example
+% dvips's -M option. Your first chance to specify whether the scripts
+% are invoked by default is at configure time.
+%
+% These values are ignored if the script names are changed; e.g., if you
+% set DVIPSMAKEPK to `foo', what counts is the value of the environment
+% variable/config value `FOO', not the `MKTEXPK' value.
+%
+%MKTEXTEX = 0
+%MKTEXPK = 0
+%MKTEXMF = 0
+%MKTEXTFM = 0
+%MKTEXFMT = 0
+%MKOCP = 0
+%MKOFM = 0
+
+% Used by makempx to run TeX. We use "etex" because MetaPost is
+% expecting DVI, and not "tex" because we want first line parsing.
+TEX = etex
+
+% These variables specify the external program called for the
+% interactive `e' option. %d is replaced by the line number and %s by
+% the current filename. The default is specified at compile-time, and
+% we let that stay in place since different platforms like different values.
+%TEXEDIT = vi +%d "%s"
+%MFEDIT = ${TEXEDIT}
+%MPEDIT = ${TEXEDIT}
+
+% The default `codepage and sort order' file for BibTeX8, when none is
+% given as command line option or environment variable.
+BIBTEX_CSFILE = 88591lat.csf
+
+% Part 3: Array and other sizes for TeX (and Metafont).
+%
+% If you want to change some of these sizes only for a certain TeX
+% variant, the usual dot notation works, e.g.,
+% main_memory.hugetex = 20000000
+%
+% If a change here appears to be ignored, try redumping the format file.
+
+% Memory. Must be less than 8,000,000 total.
+%
+% main_memory is relevant only to initex, extra_mem_* only to non-ini.
+% Thus, have to redump the .fmt file after changing main_memory; to add
+% to existing fmt files, increase extra_mem_*. (To get an idea of how
+% much, try \tracingstats=2 in your TeX source file;
+% web2c/tests/memtest.tex might also be interesting.)
+%
+% To increase space for boxes (as might be needed by, e.g., PiCTeX),
+% increase extra_mem_bot.
+%
+% For some xy-pic samples, you may need as much as 700000 words of memory.
+% For the vast majority of documents, 60000 or less will do.
+%
+main_memory = 3000000 % words of inimemory available; also applies to inimf&mp
+extra_mem_top = 0 % extra high memory for chars, tokens, etc.
+extra_mem_bot = 0 % extra low memory for boxes, glue, breakpoints, etc.
+
+% ConTeXt needs lots of memory.
+extra_mem_top.context = 2000000
+extra_mem_bot.context = 4000000
+
+% Words of font info for TeX (total size of all TFM files, approximately).
+% Must be >= 20000 and <= 147483647 (without tex.ch changes).
+font_mem_size = 3000000
+
+% Total number of fonts. Must be >= 50 and <= 9000 (without tex.ch changes).
+font_max = 9000
+
+% Extra space for the hash table of control sequences.
+hash_extra = 200000
+
+% Max number of characters in all strings, including all error messages,
+% help texts, font names, control sequences. These values apply to TeX.
+pool_size = 3250000
+% Minimum pool space after TeX's own strings; must be at least
+% 25000 less than pool_size, but doesn't need to be nearly that large.
+string_vacancies = 90000
+% Maximum number of strings.
+max_strings = 500000
+% min pool space left after loading .fmt
+pool_free = 47500
+
+% Buffer size. TeX uses the buffer to contain input lines, but macro
+% expansion works by writing material into the buffer and reparsing the
+% line. As a consequence, certain constructs require the buffer to be
+% very large, even though most documents can be handled with a small value.
+buf_size = 200000
+
+% Hyphenation trie. The maximum possible is 4194303 (ssup_trie_size in
+% the sources), but we don't need that much. The value here suffices
+% for all known free hyphenation patterns to be loaded simultaneously
+% (as TeX Live does).
+%
+trie_size = 1000000
+
+hyph_size = 8191 % prime number of hyphenation exceptions, >610, <32767.
+ % http://primes.utm.edu/curios/page.php/8191.html
+nest_size = 500 % simultaneous semantic levels (e.g., groups)
+max_in_open = 15 % simultaneous input files and error insertions,
+ % also applies to MetaPost
+param_size = 10000 % simultaneous macro parameters, also applies to MP
+save_size = 50000 % for saving values outside current group
+stack_size = 5000 % simultaneous input sources
+
+% These work best if they are the same as the I/O buffer size, but it
+% doesn't matter much. Must be a multiple of 8.
+dvi_buf_size = 16384 % TeX
+gf_buf_size = 16384 % MF
+
+% It's probably inadvisable to change these. At any rate, we must have:
+% 45 < error_line < 255;
+% 30 < half_error_line < error_line - 15;
+% 60 <= max_print_line;
+% These apply to TeX, Metafont, and MetaPost.
+error_line = 79
+half_error_line = 50
+max_print_line = 79
+
+% Metafont only.
+screen_width.mf = 1664
+screen_depth.mf = 1200
+
+% BibTeX only (max_strings also determines hash_size and hash_prime).
+ent_str_size = 250
+glob_str_size = 5000
+max_strings.bibtex = 35307
+max_strings.bibtex8 = 35307
+max_strings.bibtexu = 35307
+max_strings.pbibtex = 35307
+
+% GFtype only.
+line_length.gftype = 500
+max_rows.gftype = 8191
+max_cols.gftype = 8191
diff --git a/libre/texlive-core-libre/PKGBUILD b/libre/texlive-core-libre/PKGBUILD
new file mode 100644
index 000000000..ccf5c480f
--- /dev/null
+++ b/libre/texlive-core-libre/PKGBUILD
@@ -0,0 +1,159 @@
+# Parabola maintainer: Michał Masłowski <mtjm@mtjm.eu>
+# Maintainer: Rémy Oudompheng <remy@archlinux.org>
+
+pkgname=texlive-core-libre
+_pkgname=texlive-core
+pkgver=2011.23170
+_revnr=${pkgver#2011.}
+pkgrel=1
+pkgdesc="TeX Live core distribution"
+license=('GPL')
+arch=(any)
+depends=('texlive-bin-libre')
+optdepends=(
+ 'perl: for many useful tools'
+ 'ruby: for old ConTeXT MkII and epspdf'
+ 'tk: for texdoctk'
+ 'python2: for dviasm'
+ 'ghostscript: for epstopdf, epspdf and other ConTeXt tools'
+ 'psutils: to manipulate the output of dvips'
+ 't1utils: can be useful when installing Type1 fonts'
+)
+groups=('texlive-most')
+conflicts=('tetex' 'texlive-latex3' 'texlive-core')
+provides=('tetex' 'texlive-latex3' 'texlive-core')
+replaces=('tetex' 'texlive-latex3' 'texlive-core')
+url='http://tug.org/texlive/'
+source=("http://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}.tar.xz"
+ "${_pkgname}.maps")
+options=(!strip)
+install=texlive.install
+#backup=(etc/texmf/tex/context/config/cont-usr.tex)
+md5sums=('304e164e22f8dee41bfd6c2f4758e394'
+ '490872c9981c40d20721de1e2fccccb8')
+
+mksource() {
+ [ -f texlive-core-$pkgver-src.zip ] || wget ftp://ftp.archlinux.org/other/texlive/texlive-core-$pkgver-src.zip
+ mkdir ${pkgname}-${pkgver}
+ pushd ${pkgname}-${pkgver}
+ bsdtar xf ../texlive-core-$pkgver-src.zip
+ # remove nonfree packages
+ # MeX licensed packages.
+ rm {cc-pl,cs,ec,mex,pl}.tar.xz
+ # Public domain, will be relicensed.
+ rm context-{account,algorithmic,fixme,games,letter,ruby}.tar.xz
+ # No specific free license.
+ rm euro-ce.tar.xz
+ # Remove them from package list.
+ sed -ri '/^(cc-pl|cs|ec|mex|pl|context-(account|algorithmic|fixme|games|letter|ruby)|euro-ce) /d' CONTENTS
+ popd
+ tar cJf ${pkgname}-${pkgver}.tar.xz ${pkgname}-${pkgver}
+ rm -rf ${pkgname}-${pkgver}
+}
+
+build() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ echo -n " --> extracting all packages... "
+ for p in *.tar.xz; do
+ bsdtar -xf $p
+ done
+ echo "done"
+ rm -rf {tlpkg,doc,source,omega} || true
+}
+
+package() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ install -m755 -d $pkgdir/var/lib/texmf/arch/installedpkgs
+ sed -i '/^#/d' CONTENTS
+ install -m644 CONTENTS $pkgdir/var/lib/texmf/arch/installedpkgs/${_pkgname}_${_revnr}.pkgs
+ install -m644 ${srcdir}/${_pkgname}.maps $pkgdir/var/lib/texmf/arch/installedpkgs/
+ install -m755 -d $pkgdir/usr/share
+ wanteddirs=$(for d in *; do test -d $d && [[ $d != texmf* ]] && echo $d; done) || true
+ for dir in $wanteddirs; do
+ find $dir -type d -exec install -d -m755 $pkgdir/usr/share/texmf-dist/'{}' \;
+ find $dir -type f -exec install -m644 '{}' $pkgdir/usr/share/texmf-dist/'{}' \;
+ done
+ find texmf-dist -type d -exec install -d -m755 $pkgdir/usr/share/'{}' \;
+ find texmf-dist -type f -exec install -m644 '{}' $pkgdir/usr/share/'{}' \;
+ if [[ -d $pkgdir/usr/share/texmf-dist/scripts ]]; then
+ find $pkgdir/usr/share/texmf-dist/scripts -type f -exec chmod a+x '{}' \;
+ fi
+ # use python2 for dviasm
+ sed -i 's/env python/env python2/' $pkgdir/usr/share/texmf-dist/scripts/dviasm/dviasm.py
+
+ # copy config file to texmf-config
+ #mkdir -p $pkgdir/etc/texmf/tex/context/config
+ #cp -a $pkgdir/usr/share/texmf-dist/tex/context/config/cont-usr.tex \
+ # $pkgdir/etc/texmf/tex/context/config/cont-usr.tex
+
+ # remove obsolete stuff (we don't provide the omega and aleph binaries anyway)
+ #rm -rf $pkgdir/usr/share/texmf-dist/omega
+ rm -f $pkgdir/usr/share/texmf-dist/tex/plain/config/{omega,aleph}.ini
+ # more cleanup
+ rm -rf $pkgdir/usr/share/texmf-dist/scripts/context/stubs/mswin/
+
+ # link programs from /usr/share/texmf-dist/scripts
+ _linked_scripts="
+accfonts/mkt1font
+accfonts/vpl2ovp
+accfonts/vpl2vpl
+bundledoc/arlatex
+bundledoc/bundledoc
+context/perl/mptopdf.pl
+de-macro/de-macro
+dviasm/dviasm.py
+epstopdf/epstopdf.pl
+findhyph/findhyph
+fontools/afm2afm
+fontools/autoinst
+fontools/cmap2enc
+fontools/font2afm
+fontools/ot2kpx
+fontools/pfm2kpx
+fontools/showglyphs
+fragmaster/fragmaster.pl
+installfont/installfont-tl
+latex2man/latex2man
+latexdiff/latexdiff.pl
+latexdiff/latexdiff-vc.pl
+latexdiff/latexrevise.pl
+latexmk/latexmk.pl
+luaotfload/mkluatexfontdb.lua
+mkjobtexmf/mkjobtexmf.pl
+oberdiek/pdfatfi.pl
+pdfcrop/pdfcrop.pl
+pdfjam/pdf180
+pdfjam/pdf270
+pdfjam/pdf90
+pdfjam/pdfbook
+pdfjam/pdfflip
+pdfjam/pdfjam
+pdfjam/pdfjam-pocketmod
+pdfjam/pdfjam-slides3up
+pdfjam/pdfjam-slides6up
+pdfjam/pdfjoin
+pdfjam/pdfnup
+pdfjam/pdfpun
+pkfix-helper/pkfix-helper
+pkfix/pkfix.pl
+purifyeps/purifyeps
+sty2dtx/sty2dtx.pl
+texcount/texcount.pl
+texdef/texdef.pl
+texdiff/texdiff
+texdirflatten/texdirflatten
+texloganalyser/texloganalyser
+thumbpdf/thumbpdf.pl
+"
+ install -m755 -d $pkgdir/usr/bin
+ for _script in ${_linked_scripts}; do
+ _scriptbase=$(basename $_script)
+ _scriptbase=${_scriptbase%.*}
+ ln -s /usr/share/texmf-dist/scripts/${_script} ${pkgdir}/usr/bin/${_scriptbase}
+ done
+ ln -s /usr/share/texmf-dist/scripts/listings-ext/listings-ext.sh ${pkgdir}/usr/bin/listings-ext.sh
+
+ # additional symlinks
+ ln -s epstopdf ${pkgdir}/usr/bin/repstopdf
+ ln -s pdfcrop ${pkgdir}/usr/bin/rpdfcrop
+}
diff --git a/libre/texlive-core-libre/texlive-core.maps b/libre/texlive-core-libre/texlive-core.maps
new file mode 100644
index 000000000..553d07b72
--- /dev/null
+++ b/libre/texlive-core-libre/texlive-core.maps
@@ -0,0 +1,40 @@
+Map euler.map
+Map charter.map
+Map fpls.map
+Map l7x-urwvn.map
+Map lm.map
+Map marvosym.map
+Map original-context-symbol.map
+Map pazo.map
+Map pxfonts.map
+Map qag.map
+Map qbk.map
+Map qcr.map
+Map qcs.map
+Map qhv.map
+Map qpl.map
+Map qtm.map
+Map qzc.map
+Map tabvar.map
+Map troff-updmap.map
+Map txfonts.map
+Map utopia.map
+MixedMap cm-super-t1.map
+MixedMap cm-super-t2a.map
+MixedMap cm-super-t2b.map
+MixedMap cm-super-t2c.map
+MixedMap cm-super-ts1.map
+MixedMap cm-super-x2.map
+MixedMap cm.map
+MixedMap cmextra.map
+MixedMap cmtext-bsr-interpolated.map
+MixedMap cyrillic.map
+MixedMap eurosym.map
+MixedMap latxfont.map
+MixedMap mflogo.map
+MixedMap rsfs.map
+MixedMap stmaryrd.map
+MixedMap symbols.map
+MixedMap tipa.map
+MixedMap wasy.map
+MixedMap yhmath.map
diff --git a/libre/texlive-core-libre/texlive.install b/libre/texlive-core-libre/texlive.install
new file mode 100644
index 000000000..a758c084d
--- /dev/null
+++ b/libre/texlive-core-libre/texlive.install
@@ -0,0 +1,58 @@
+PKGNAME="texlive-core"
+UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
+SYNCWITHTREES=''
+
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
+
+post_install() {
+ TMPFILE=`mktemp`
+ echo ">>> texlive: saving updmap.cfg as $TMPFILE..."
+ cp "$UPDMAP" "$TMPFILE"
+ echo ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+ echo " into /etc/texmf/web2c/updmap-local.cfg"
+ cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+ cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+ [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ echo ">>> texlive: updating the fontmap files with updmap..."
+ usr/bin/updmap-sys --quiet --nohash
+ echo " done."
+ echo -n "creating all formats..."
+ usr/bin/fmtutil-sys --all 1>/dev/null
+ echo " done."
+ echo " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"
+# echo "NB: To setup ConTeXt and the lua(la)tex font db,"
+# echo " see http://wiki.archlinux.org/index.php/TeX_Live"
+}
+
+post_upgrade() {
+ TMPFILE=`mktemp`
+ echo ">>> texlive: saving updmap.cfg as $TMPFILE..."
+ cp "$UPDMAP" "$TMPFILE"
+ echo ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+ echo " into /etc/texmf/web2c/updmap-local.cfg"
+ cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+ cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+ [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ echo ">>> texlive: updating the fontmap files with updmap..."
+ usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+ echo " done."
+ echo ">>> texlive: recreating all formats..."
+ usr/bin/fmtutil-sys --all 1>/dev/null
+ echo " done."
+ echo " (logs are under /var/lib/texmf/web2c/<engine>/<formatname>.log)"
+# echo "NB: To setup ConTeXt and the lua(la)tex font db,"
+# echo " see http://wiki.archlinux.org/index.php/TeX_Live"
+ if [[ "$2" == 200* ]]; then
+ echo "Important note. Some directories have moved:"
+ echo " \$TEXMFSYSVAR is now /var/lib/texmf (previously /usr/share/texmf-var)"
+ echo " \$TEXMFSYSCONFIG is now /etc/texmf (previously /usr/share/texmf-config)"
+ echo "Please move and update the config files you had modified and delete the rest."
+ echo "(Note however that updmap.cfg has been automatically copied and updated.)"
+ fi
+}
+
diff --git a/libre/texlive-fontsextra-libre/PKGBUILD b/libre/texlive-fontsextra-libre/PKGBUILD
new file mode 100644
index 000000000..9d296dd35
--- /dev/null
+++ b/libre/texlive-fontsextra-libre/PKGBUILD
@@ -0,0 +1,73 @@
+# Parabola maintainer: Michał Masłowski <mtjm@mtjm.eu>
+# Maintainer: Rémy Oudompheng <remy.archlinux.org>
+
+pkgname=texlive-fontsextra-libre
+_pkgname=texlive-fontsextra
+pkgver=2011.22691
+_revnr=${pkgver#2011.}
+pkgrel=1
+pkgdesc="TeX Live - all sorts of extra fonts"
+license=('GPL')
+arch=(any)
+depends=('texlive-core')
+groups=('texlive-most')
+replaces=('texlive-fontsextra')
+conflicts=('texlive-fontsextra')
+provides=('texlive-fontsextra')
+url='http://tug.org/texlive/'
+source=("http://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}.tar.xz"
+ "${_pkgname}.maps")
+options=('!emptydirs')
+options=(!strip)
+install=texlive.install
+md5sums=('33f8fc7b7ff98c616a0a7a0b5844e603'
+ '5150fc36c158776c6317ac14bbd677ab')
+
+mksource() {
+ [ -f ${_pkgname}-$pkgver-src.zip ] || wget ftp://ftp.archlinux.org/other/texlive/${_pkgname}-$pkgver-src.zip
+ mkdir ${pkgname}-${pkgver}
+ pushd ${pkgname}-${pkgver}
+ bsdtar xf ../${_pkgname}-$pkgver-src.zip
+ # remove nonfree packages
+ # No specific free license.
+ rm ogham.tar.xz
+ # Remove them from package list.
+ sed -ri '/^ogham /d' CONTENTS
+ popd
+ tar cJf ${pkgname}-${pkgver}.tar.xz ${pkgname}-${pkgver}
+ rm -rf ${pkgname}-${pkgver}
+}
+
+build() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ for p in *.tar.xz; do
+ bsdtar -xf $p
+ done
+ rm -rf {tlpkg,doc,source} || true
+}
+
+package() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ install -m755 -d $pkgdir/var/lib/texmf/arch/installedpkgs
+ sed -i '/^#/d' CONTENTS
+ install -m644 CONTENTS $pkgdir/var/lib/texmf/arch/installedpkgs/${_pkgname}_${_revnr}.pkgs
+ install -m644 $srcdir/${_pkgname}.maps $pkgdir/var/lib/texmf/arch/installedpkgs/
+ install -m755 -d $pkgdir/usr/share
+ wanteddirs=$(for d in *; do test -d $d && [[ $d != texmf* ]] && echo $d; done) || true
+ for dir in $wanteddirs; do
+ find $dir -type d -exec install -d -m755 $pkgdir/usr/share/texmf-dist/'{}' \;
+ find $dir -type f -exec install -m644 '{}' $pkgdir/usr/share/texmf-dist/'{}' \;
+ done
+ if [[ -d texmf-dist ]]; then
+ find texmf-dist -type d -exec install -d -m755 $pkgdir/usr/share/'{}' \;
+ find texmf-dist -type f -exec install -m644 '{}' $pkgdir/usr/share/'{}' \;
+ fi
+ if [[ -d $pkgdir/usr/share/texmf-dist/scripts ]]; then
+ find $pkgdir/usr/share/texmf-dist/scripts -type f -exec chmod a+x '{}' \;
+ fi
+
+ # remove stuff depending on omega/aleph
+ rm -rf $pkgdir/usr/share/texmf-dist/omega
+ find $pkgdir/ -wholename '*ocherokee*' -delete
+ find $pkgdir/ -wholename '*oinuit*' -delete
+}
diff --git a/libre/texlive-fontsextra-libre/texlive-fontsextra.maps b/libre/texlive-fontsextra-libre/texlive-fontsextra.maps
new file mode 100644
index 000000000..6bc0b19c2
--- /dev/null
+++ b/libre/texlive-fontsextra-libre/texlive-fontsextra.maps
@@ -0,0 +1,107 @@
+Map Acorn.map
+Map AnnSton.map
+Map ArrowsADF.map
+Map ArtNouv.map
+Map ArtNouvc.map
+Map BulletsADF.map
+Map Carrickc.map
+Map ESSTIX.map
+Map Eichenla.map
+Map Eileen.map
+Map EileenBl.map
+Map Elzevier.map
+Map GotIn.map
+Map GoudyIn.map
+Map Kinigcap.map
+Map Konanur.map
+Map Kramer.map
+Map MnSymbol.map
+Map MorrisIn.map
+Map Nouveaud.map
+Map OrnementsADF.map
+Map PTSans-type1.map
+Map PTSerif-type1.map
+Map Romantik.map
+Map Rothdn.map
+Map RoyalIn.map
+Map Sanremo.map
+Map Starburst.map
+Map Typocaps.map
+Map Zallman.map
+Map antt.map
+Map ap.map
+Map archaicprw.map
+Map arev.map
+Map ascii.map
+Map augie.map
+Map auncial.map
+Map aurical.map
+Map belleek.map
+Map bera.map
+Map boondox.map
+Map cantarell.map
+Map ccicons.map
+Map clm.map
+Map cm-lgc.map
+Map cmin.map
+Map comfortaa.map
+Map cyklop.map
+Map dictsym.map
+Map droid.map
+Map dstroke.map
+Map epigrafica.map
+Map esvect.map
+Map fdsymbol.map
+Map fge.map
+Map fi4.map
+Map foekfont.map
+Map fonetika.map
+Map fourier-utopia-expert.map
+Map fourier.map
+Map gfsartemisia.map
+Map gfsbodoni.map
+Map gfscomplutum.map
+Map gfsdidot.map
+Map gfsneohellenic.map
+Map gfssolomos.map
+Map gptimes.map
+Map icelandic.map
+Map iwona.map
+Map kpfonts.map
+Map kurier.map
+Map lato.map
+Map libertine.map
+Map linearA.map
+Map mathabx.map
+Map mdbch.map
+Map mdput.map
+Map mdugm.map
+Map ocrb.map
+Map pbsi.map
+Map phaistos.map
+Map prodint.map
+Map recycle.map
+Map sqrcaps.map
+Map starfont.map
+Map tfrupee.map
+Map uaq.map
+Map ugq.map
+Map ybd.map
+Map ybv.map
+Map yes.map
+Map yfrak.map
+Map yly.map
+Map yrd.map
+Map yv1.map
+Map yv2.map
+Map yv3.map
+Map yvo.map
+Map yvt.map
+MixedMap allrunes.map
+MixedMap bbold.map
+MixedMap cmll.map
+MixedMap hfbright.map
+MixedMap lxfonts.map
+MixedMap pigpen.map
+MixedMap semaf.map
+MixedMap trajan.map
diff --git a/libre/texlive-fontsextra-libre/texlive.install b/libre/texlive-fontsextra-libre/texlive.install
new file mode 100644
index 000000000..c2c5e8165
--- /dev/null
+++ b/libre/texlive-fontsextra-libre/texlive.install
@@ -0,0 +1,52 @@
+PKGNAME="texlive-fontsextra"
+UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
+SYNCWITHTREES=''
+
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
+
+post_install() {
+ TMPFILE=`mktemp`
+ echo ">>> texlive: saving updmap.cfg as $TMPFILE..."
+ cp "$UPDMAP" "$TMPFILE"
+ echo ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+ echo " into /etc/texmf/web2c/updmap-local.cfg"
+ cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+ cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+ [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ echo ">>> texlive: updating the fontmap files with updmap..."
+ usr/bin/updmap-sys --quiet --nohash
+ echo " done."
+}
+
+post_upgrade() {
+ TMPFILE=`mktemp`
+ echo ">>> texlive: saving updmap.cfg as $TMPFILE..."
+ cp "$UPDMAP" "$TMPFILE"
+ echo ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+ echo " into /etc/texmf/web2c/updmap-local.cfg"
+ cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+ cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+ [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ echo ">>> texlive: updating the fontmap files with updmap..."
+ usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+ echo " done."
+}
+
+pre_remove() {
+for m in `cut -d' ' -f2 $MAPFILE`; do
+ sed -i "/\s$m/d" $UPDMAP ;
+done
+}
+
+post_remove() {
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ echo ">>> texlive: updating the fontmap files with updmap..."
+ usr/bin/updmap-sys --quiet --nohash
+ echo " done."
+}
diff --git a/libre/texlive-latexextra-libre/PKGBUILD b/libre/texlive-latexextra-libre/PKGBUILD
new file mode 100644
index 000000000..b4c34a637
--- /dev/null
+++ b/libre/texlive-latexextra-libre/PKGBUILD
@@ -0,0 +1,97 @@
+# Parabola maintainer: Michał Masłowski <mtjm@mtjm.eu>
+# Maintainer: Firmicus <firmicus āt gmx dōt net>
+# Maintainer: Rémy Oudompheng <remy@archlinux.org>
+
+pkgname=texlive-latexextra-libre
+_pkgname=texlive-latexextra
+pkgver=2011.22931
+_revnr=${pkgver#2011.}
+pkgrel=1
+pkgdesc="TeX Live - Large collection of add-on packages for LaTeX"
+license=('GPL')
+arch=(any)
+depends=('texlive-core')
+optdepends=(
+ 'texlive-pictures: to use the package overpic'
+ 'openjdk6: for use by ppower4'
+)
+provides=('texlive-latexextra')
+replaces=('texlive-latexextra')
+conflicts=('texlive-latexextra')
+groups=('texlive-most')
+url='http://tug.org/texlive/'
+source=("http://repo.parabolagnulinux.org/other/${pkgname}-${pkgver}.tar.xz"
+ "${_pkgname}.maps")
+options=('!emptydirs')
+options=(!strip)
+install=texlive.install
+md5sums=('243f308790ad95e40a80526fecfdb7c1'
+ '9e4825f47dac663dd62c4bfa67899e84')
+
+mksource() {
+ [ -f ${_pkgname}-$pkgver-src.zip ] || wget ftp://ftp.archlinux.org/other/texlive/${_pkgname}-$pkgver-src.zip
+ mkdir ${pkgname}-${pkgver}
+ pushd ${pkgname}-${pkgver}
+ bsdtar xf ../${_pkgname}-$pkgver-src.zip
+ # remove nonfree packages
+ # No specific free license.
+ rm {authoraftertitle,clock,fltpage,fnpara}.tar.xz
+ # No explicit modification permission.
+ rm cmdtrack.tar.xz
+ # Remove them from package list.
+ sed -ri '/^(authoraftertitle|clock+fltpage|fnpara|cmdtrack) /d' CONTENTS
+ popd
+ tar cJf ${pkgname}-${pkgver}.tar.xz ${pkgname}-${pkgver}
+ rm -rf ${pkgname}-${pkgver}
+}
+
+build() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ for p in *.tar.xz; do
+ bsdtar -xf $p
+ done
+ rm -rf {tlpkg,doc,source} || true
+}
+package() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ install -m755 -d $pkgdir/var/lib/texmf/arch/installedpkgs
+ sed -i '/^#/d' CONTENTS
+ install -m644 CONTENTS $pkgdir/var/lib/texmf/arch/installedpkgs/${_pkgname}_${_revnr}.pkgs
+ install -m644 $srcdir/${_pkgname}.maps $pkgdir/var/lib/texmf/arch/installedpkgs/
+ install -m755 -d $pkgdir/usr/share
+ wanteddirs=$(for d in *; do test -d $d && [[ $d != texmf* ]] && echo $d; done) || true
+ for dir in $wanteddirs; do
+ find $dir -type d -exec install -d -m755 $pkgdir/usr/share/texmf-dist/'{}' \;
+ find $dir -type f -exec install -m644 '{}' $pkgdir/usr/share/texmf-dist/'{}' \;
+ done
+ if [[ -d texmf-dist ]]; then
+ find texmf-dist -type d -exec install -d -m755 $pkgdir/usr/share/'{}' \;
+ find texmf-dist -type f -exec install -m644 '{}' $pkgdir/usr/share/'{}' \;
+ fi
+ if [[ -d $pkgdir/usr/share/texmf-dist/scripts ]]; then
+ find $pkgdir/usr/share/texmf-dist/scripts -type f -exec chmod a+x '{}' \;
+ fi
+ #add symlinks that were in texlive-bin:
+ install -m755 -d $pkgdir/usr/bin
+ ln -s /usr/share/texmf-dist/scripts/authorindex/authorindex $pkgdir/usr/bin/authorindex
+ ln -s /usr/share/texmf-dist/scripts/glossaries/makeglossaries $pkgdir/usr/bin/makeglossaries
+ ln -s /usr/share/texmf-dist/scripts/pax/pdfannotextractor.pl $pkgdir/usr/bin/pdfannotextractor
+ ln -s /usr/share/texmf-dist/scripts/ppower4/pdfthumb.tlu $pkgdir/usr/bin/pdfthumb
+ ln -s /usr/share/texmf-dist/scripts/perltex/perltex.pl $pkgdir/usr/bin/perltex
+ #ln -s /usr/share/texmf-dist/scripts/ppower4/ppower4.tlu $pkgdir/usr/bin/ppower4
+ ln -s /usr/share/texmf-dist/scripts/pst-pdf/ps4pdf $pkgdir/usr/bin/ps4pdf
+ ln -s /usr/share/texmf-dist/scripts/splitindex/perl/splitindex.pl $pkgdir/usr/bin/splitindex
+ ln -s /usr/share/texmf-dist/scripts/svn-multi/svn-multi.pl $pkgdir/usr/bin/svn-multi
+ ln -s /usr/share/texmf-dist/scripts/vpe/vpe.pl $pkgdir/usr/bin/vpe
+ # but ppower4 was a symlink to ppower4.tlu, which was broken, but this is far better:
+ (
+ cat <<"END"
+#!/bin/bash
+java -jar /usr/share/texmf-dist/scripts/ppower4/pp4p.jar $@
+END
+ ) > /tmp/ppower4
+ install -m755 /tmp/ppower4 $pkgdir/usr/bin/
+ rm $pkgdir/usr/share/texmf-dist/scripts/glossaries/makeglossaries.bat
+ rm $pkgdir/usr/share/texmf-dist/scripts/pst-pdf/ps4pdf.bat*
+ rm $pkgdir/usr/share/texmf-dist/scripts/shipunov/biokey2html.bat
+}
diff --git a/libre/texlive-latexextra-libre/texlive-latexextra.maps b/libre/texlive-latexextra-libre/texlive-latexextra.maps
new file mode 100644
index 000000000..b97f37fdd
--- /dev/null
+++ b/libre/texlive-latexextra-libre/texlive-latexextra.maps
@@ -0,0 +1,3 @@
+Map epiolmec.map
+MixedMap esint.map
+MixedMap manfnt.map
diff --git a/libre/texlive-latexextra-libre/texlive.install b/libre/texlive-latexextra-libre/texlive.install
new file mode 100644
index 000000000..e8878db08
--- /dev/null
+++ b/libre/texlive-latexextra-libre/texlive.install
@@ -0,0 +1,52 @@
+PKGNAME="texlive-latexextra"
+UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
+SYNCWITHTREES=''
+
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
+
+post_install() {
+ TMPFILE=`mktemp`
+ echo ">>> texlive: saving updmap.cfg as $TMPFILE..."
+ cp "$UPDMAP" "$TMPFILE"
+ echo ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+ echo " into /etc/texmf/web2c/updmap-local.cfg"
+ cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+ cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+ [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ echo ">>> texlive: updating the fontmap files with updmap..."
+ usr/bin/updmap-sys --quiet --nohash
+ echo " done."
+}
+
+post_upgrade() {
+ TMPFILE=`mktemp`
+ echo ">>> texlive: saving updmap.cfg as $TMPFILE..."
+ cp "$UPDMAP" "$TMPFILE"
+ echo ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+ echo " into /etc/texmf/web2c/updmap-local.cfg"
+ cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+ cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+ [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ echo ">>> texlive: updating the fontmap files with updmap..."
+ usr/bin/updmap-sys --quiet --nohash $SYNCWITHTREES
+ echo " done."
+}
+
+pre_remove() {
+for m in `cut -d' ' -f2 $MAPFILE`; do
+ sed -i "/\s$m/d" $UPDMAP ;
+done
+}
+
+post_remove() {
+ echo ">>> texlive: updating the filename database..."
+ usr/bin/mktexlsr
+ echo ">>> texlive: updating the fontmap files with updmap..."
+ usr/bin/updmap-sys --quiet --nohash
+ echo " done."
+}