summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-09-07 12:29:46 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-09-07 12:29:46 -0300
commitfba1f9077f6d545ad97b66b10b62ff44425a3c68 (patch)
treebe05c977bb3fb4b75cfcce0e13493625adbe17f1 /libre
parent730bda0e79d3e122d665663a18e0c973d7209236 (diff)
parent3a9ddbf363ba691ca209ad36485390d14ba3b46f (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: libre/abs-libre/PKGBUILD libre/icecat/PKGBUILD libre/libretools/PKGBUILD libre/linux-libre/PKGBUILD libre/mplayer-libre/PKGBUILD libre/pacman/0001-makepkg-fix-removing-symbolic-link.patch libre/pacman/PKGBUILD libre/python2-libre/PKGBUILD
Diffstat (limited to 'libre')
-rw-r--r--libre/abs-libre/PKGBUILD22
-rw-r--r--libre/aif-libre/PKGBUILD9
-rw-r--r--libre/aspell-pl-libre/PKGBUILD33
-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/icecat-i18n/PKGBUILD177
-rw-r--r--libre/icecat/Makefile.in451
-rw-r--r--libre/icecat/PKGBUILD71
-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/PKGBUILD10
-rw-r--r--libre/libui-sh/PKGBUILD4
-rw-r--r--libre/linux-libre/PKGBUILD35
-rw-r--r--libre/linux-libre/config.i6862
-rw-r--r--libre/linux-libre/config.x86_642
-rw-r--r--libre/mplayer-libre/PKGBUILD10
-rw-r--r--libre/pacman/0001-makepkg-fix-removing-symbolic-link.patch1
-rw-r--r--libre/pacman/PKGBUILD10
-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
51 files changed, 4673 insertions, 180 deletions
diff --git a/libre/abs-libre/PKGBUILD b/libre/abs-libre/PKGBUILD
index f75ecec4e..a9be5a541 100644
--- a/libre/abs-libre/PKGBUILD
+++ b/libre/abs-libre/PKGBUILD
@@ -3,8 +3,9 @@
_pkgname=abs
pkgname=abs-libre
+#CARCH=x86_64
pkgver=2.4.3
-pkgrel=1
+pkgrel=2
pkgdesc="Utilities to download and work with the Arch Build System (ABS)"
arch=('i686' 'x86_64' 'mips64el')
url="http://projects.archlinux.org/abs.git/"
@@ -25,13 +26,20 @@ build() {
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/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/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 c4ab461f7..e7e383a6e 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,22 +48,39 @@ 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
[ "$CARCH" = "mips64el" ] && echo "ac_add_options --disable-ipc" >> .mozconfig
@@ -69,32 +89,27 @@ build() {
# 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 -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 +123,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}
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 c0dac3d79..69b3bc5d4 100644
--- a/libre/libretools/PKGBUILD
+++ b/libre/libretools/PKGBUILD
@@ -70,6 +70,16 @@ package_libretools() {
install -m755 ${_gitname}/rePKGBUILD.proto ${pkgdir}/usr/share/pacman
}
+package_libretools-pr() {
+ install -d ${pkgdir}/etc/libretools.d
+ install -m644 ${_gitname}/prtools/prtools.conf ${pkgdir}/etc/libretools.d
+
+ install -d ${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() {
install -d ${pkgdir}/etc/libretools.d
install -m755 ${_gitname}/mips64el/mips64el.conf ${pkgdir}/etc/libretools.d
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 32d40024d..59167a484 100644
--- a/libre/linux-libre/PKGBUILD
+++ b/libre/linux-libre/PKGBUILD
@@ -2,17 +2,17 @@
# 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}.1
-pkgrel=5
+pkgver=${_basekernel}.4
+pkgrel=2
arch=('i686' 'x86_64' 'mips64el')
-url="http://linux-libre.fsfla.org"
+url="http://linux-libre.fsfla.org/"
license=('GPL2')
makedepends=('xmlto' 'docbook-xsl')
options=('!strip')
@@ -58,7 +58,6 @@ build() {
cat "${srcdir}/config.${CARCH}" > ./.config # simpler
fi
-
if [ "${_kernelname}" != "" ]; then
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
fi
@@ -107,8 +106,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
@@ -141,6 +140,7 @@ 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"
@@ -162,9 +162,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')
KARCH=x86
[[ $CARCH = "mips64el" ]] && KARCH=mips
@@ -314,8 +314,8 @@ 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}"
@@ -329,14 +329,3 @@ package_linux-libre-docs() {
}
# vim:set ts=2 sw=2 et:
-md5sums=('44e7bc20c235a193f9b6123a8d5e9509'
- 'af8d721036d89ed5500675c3289e3b48'
- '9a5db9c3dfb190b91dfe7c3bdcfe67a8'
- '66dff8af6b00eb8d054b2af85aaa5ef7'
- '1a98b8b8f2140ac8f95c3814cba8cc95'
- 'a8a3843046926eb7ab81312cd438c5c5'
- '2967cecc3af9f954ccc822fd63dca6ff'
- '8267264d9a8966e57fdacd1fa1fc65c4'
- '04b21c79df0a952c22d681dd4f4562df'
- '263725f20c0b9eb9c353040792d644e5'
- '9d3c56a4b999c8bfbd4018089a62f662')
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/mplayer-libre/PKGBUILD b/libre/mplayer-libre/PKGBUILD
index 3cbb36576..5f2af3d51 100644
--- a/libre/mplayer-libre/PKGBUILD
+++ b/libre/mplayer-libre/PKGBUILD
@@ -5,18 +5,16 @@
_pkgbase=mplayer
pkgbase=mplayer-libre
pkgname=('mplayer-libre' 'mencoder-libre')
-pkgver=33805
-pkgrel=2
+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' '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}
@@ -76,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/pacman/0001-makepkg-fix-removing-symbolic-link.patch b/libre/pacman/0001-makepkg-fix-removing-symbolic-link.patch
index 503d3367f..a14e1de69 100644
--- a/libre/pacman/0001-makepkg-fix-removing-symbolic-link.patch
+++ b/libre/pacman/0001-makepkg-fix-removing-symbolic-link.patch
@@ -30,4 +30,3 @@ index 3ace945..b0b0882 100644
--
1.7.6
-
diff --git a/libre/pacman/PKGBUILD b/libre/pacman/PKGBUILD
index dd7ff0497..29d7d2b9c 100644
--- a/libre/pacman/PKGBUILD
+++ b/libre/pacman/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=pacman
pkgver=3.5.4
-pkgrel=3
+pkgrel=4
pkgdesc="A library-based package manager with dependency support"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.archlinux.org/pacman/"
@@ -21,12 +21,6 @@ source=(ftp://ftp.archlinux.org/other/pacman/$pkgname-$pkgver.tar.gz
pacman.conf.mips64el
makepkg.conf
0001-makepkg-fix-removing-symbolic-link.patch)
-md5sums=('2dd3a85d55ee3dd89abd349aa837447c'
- 'ba85525fe868f030bef209b0487dd5a5'
- '7aaccf24479f396d4a5987c8ccd2f3a2'
- '150a2854816cd67b1608e00f99701c1c'
- 'be10d3d2e533515a0470237761415568'
- '7fca372cdfc5d01896490563ee4e13be')
# keep an upgrade path for older installations
PKGEXT='.pkg.tar.gz'
@@ -66,7 +60,7 @@ package() {
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/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."
+}