summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Porte2015-07-23 05:40:16 +0200
committerRomain Porte2015-07-23 05:40:16 +0200
commit7684f3ce3c89d835d8fba7f1f7beeed86674b7d5 (patch)
treeb6cc9227327dc6d412952ebb0171c7ebebfe67ad
downloadaur-7684f3ce3c89d835d8fba7f1f7beeed86674b7d5.tar.gz
Initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD34
-rw-r--r--missing_getver.patch46
3 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..51acde54277a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = libgd-doc
+ pkgdesc = Reference documentation for libgd, HTML format.
+ pkgver = 2.1.1
+ pkgrel = 1
+ url = https://bitbucket.org/libgd/gd-libgd/
+ arch = any
+ license = unknown
+ makedepends = naturaldocs
+ conflicts = libgd-doc-git
+ source = https://bitbucket.org/libgd/gd-libgd/downloads/libgd-2.1.1.tar.gz
+ source = missing_getver.patch
+ md5sums = 914f27f31ceb46827a322a1bc5165aff
+ md5sums = b6c4bd7db10c83f6048dcffc5475defa
+
+pkgname = libgd-doc
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..96bf6131daf5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Romain Porte <microjoe@mailoo.org>
+
+pkgname=libgd-doc
+pkgver=2.1.1
+pkgrel=1
+pkgdesc="Reference documentation for libgd, HTML format."
+arch=('any')
+url="https://bitbucket.org/libgd/gd-libgd/"
+license=('unknown')
+conflicts=('libgd-doc-git')
+makedepends=('naturaldocs')
+source=(https://bitbucket.org/libgd/gd-libgd/downloads/libgd-$pkgver.tar.gz
+ missing_getver.patch)
+md5sums=('914f27f31ceb46827a322a1bc5165aff'
+ 'b6c4bd7db10c83f6048dcffc5475defa')
+
+
+build() {
+
+ # Apply patch
+ cd "$srcdir/libgd-$pkgver/config"
+ patch -N -i "$srcdir/missing_getver.patch"
+
+ # Build docs
+ cd "$srcdir/libgd-$pkgver/docs/naturaldocs"
+ ./run_docs.sh
+}
+
+package() {
+ cd "$srcdir/libgd-$pkgver/docs/naturaldocs"
+
+ mkdir -p $pkgdir/usr/share/doc/libgd
+ cp -r html/ $pkgdir/usr/share/doc/libgd/
+}
diff --git a/missing_getver.patch b/missing_getver.patch
new file mode 100644
index 000000000000..c69ea3047c3e
--- /dev/null
+++ b/missing_getver.patch
@@ -0,0 +1,46 @@
+diff -ruNa libgd-2.1.1.orig/config/getver.pl libgd-2.1.1/config/getver.pl
+--- libgd-2.1.1.orig/config/getver.pl 1970-01-01 01:00:00.000000000 +0100
++++ libgd-2.1.1/config/getver.pl 2015-07-23 05:23:49.932676287 +0200
+@@ -0,0 +1,42 @@
++#!/usr/bin/env perl
++
++# Simple script to extract the version number parts from src/gd.h. If
++# called with the middle word of the version macro, it prints the
++# value of that macro. If called with no argument, it outputs a
++# human-readable version string. This must be run in the project
++# root. It is used by configure.ac and docs/naturaldocs/run_docs.sh.
++
++use strict;
++
++my $key = shift;
++my @version_parts = ();
++
++open FH, "<src/gd.h" # old-style filehandle for max. portability
++ or die "Unable to open 'version.h' for reading.\n";
++
++while(<FH>) {
++ next unless m{version605b5d1778};
++ next unless /^#define\s+GD_([A-Z0-9]+)_VERSION+\s+(\S+)/;
++ my ($lk, $lv) = ($1, $2);
++ if ($lk eq $key) {
++ chomp $lv;
++ $lv =~ s/"//g;
++
++ print $lv; # no newline
++ exit(0); # success!
++ }
++
++ push @version_parts, $lv if (!$key);
++}
++
++close(FH);
++
++if (scalar @version_parts == 4) {
++ my $result = join(".", @version_parts[0..2]);
++ $result .= $version_parts[3];
++ $result =~ s/"//g;
++ print $result;
++ exit(0);
++}
++
++exit(1); # failure