summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-editors/lfhex')
-rw-r--r--app-editors/lfhex/Manifest1
-rw-r--r--app-editors/lfhex/files/01-abs-llabs.dpatch19
-rw-r--r--app-editors/lfhex/files/02-gcc-4.7.dpatch19
-rw-r--r--app-editors/lfhex/lfhex-0.42.ebuild38
-rw-r--r--app-editors/lfhex/metadata.xml7
5 files changed, 84 insertions, 0 deletions
diff --git a/app-editors/lfhex/Manifest b/app-editors/lfhex/Manifest
new file mode 100644
index 000000000000..38da762892b1
--- /dev/null
+++ b/app-editors/lfhex/Manifest
@@ -0,0 +1 @@
+DIST lfhex-0.42.tar.gz 868287 SHA256 4e8f8b99eb271242937037a3af2fe07369b653f7f7d8becbd84554118bf8baba SHA512 5b0d61f732b4b3a0ff2d73ae3ea551af78047a2edd45916d6ad61fb6d89c18faa4e28ed321e51e034519635c3310ce7b0b67fb809ed67d6c37cb252b78696c88 WHIRLPOOL 720e812edb8d33968d7c89ccaf85096b80dd377743819111c436ce5315d36e070ac37727d4422bb982cf0f6aba69e41335a58a76b1e4d5f143a0948feb26aba5
diff --git a/app-editors/lfhex/files/01-abs-llabs.dpatch b/app-editors/lfhex/files/01-abs-llabs.dpatch
new file mode 100644
index 000000000000..74ffcbce7299
--- /dev/null
+++ b/app-editors/lfhex/files/01-abs-llabs.dpatch
@@ -0,0 +1,19 @@
+#!/bin/sh /usr/share/dpatch/dpatch-run
+## 01-abs-llabs.dpatch by Thiemo Seufer
+##
+## DP: Fixes FTBFS due to abs() not being in the global anymore since g++ 4.3
+## (#495467)
+
+diff -up lfhex-0.42.orig/src/reader.cpp lfhex-0.42/src/reader.cpp
+--- lfhex-0.42.orig/src/reader.cpp 2008-10-08 19:25:57.000000000 +0200
++++ lfhex-0.42/src/reader.cpp 2008-10-08 19:26:16.000000000 +0200
+@@ -238,7 +238,7 @@ bool Reader::loadPage(off_t pageIdx)
+ // free the page which is the furthest away from the page we are loading
+
+ // this could be trouble if off_t is unsigned!
+- if( abs(_firstPage - pageIdx) > abs(_lastPage - pageIdx) )
++ if( ::llabs(_firstPage - pageIdx) > ::llabs(_lastPage - pageIdx) )
+ while(!freePage(_firstPage++));
+ else
+ while(!freePage(_lastPage--));
+
diff --git a/app-editors/lfhex/files/02-gcc-4.7.dpatch b/app-editors/lfhex/files/02-gcc-4.7.dpatch
new file mode 100644
index 000000000000..0d58072d9574
--- /dev/null
+++ b/app-editors/lfhex/files/02-gcc-4.7.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02-gcc-4.7.dpatch by gregor herrmann <gregoa@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: add missing include to avoid FTBFS with gcc 4.7
+## DP: Bug-Debian: http://bugs.debian.org/667238
+
+@DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' lfhex-0.42~/src/expr.h lfhex-0.42/src/expr.h
+--- lfhex-0.42~/src/expr.h 2008-09-19 02:36:49.000000000 +0200
++++ lfhex-0.42/src/expr.h 2012-05-07 17:03:22.788794002 +0200
+@@ -19,6 +19,7 @@
+ */
+
+ #include <string>
++#include <sys/types.h>
+
+ bool expr_eval( const std::string &str, off_t &value );
+
diff --git a/app-editors/lfhex/lfhex-0.42.ebuild b/app-editors/lfhex/lfhex-0.42.ebuild
new file mode 100644
index 000000000000..0c18872bcdeb
--- /dev/null
+++ b/app-editors/lfhex/lfhex-0.42.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils qt4-r2
+
+DESCRIPTION="A fast, efficient hex-editor with support for large files and comparing binary files"
+HOMEPAGE="http://stoopidsimple.com/lfhex"
+SRC_URI="http://stoopidsimple.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE=""
+
+RDEPEND="dev-qt/qtgui:4
+ x11-libs/libXt"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ sys-devel/bison"
+
+S=${WORKDIR}/${P}/src
+
+src_prepare() {
+ # Apply Debian patches to fix compilation errors like gcc-4.7 compat
+ epatch "${FILESDIR}"/*.dpatch
+}
+
+src_configure() {
+ eqmake4
+}
+
+src_install() {
+ dobin lfhex
+ dodoc ../README
+ make_desktop_entry "${PN}" "${PN}"
+}
diff --git a/app-editors/lfhex/metadata.xml b/app-editors/lfhex/metadata.xml
new file mode 100644
index 000000000000..a40624fba8f0
--- /dev/null
+++ b/app-editors/lfhex/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+</maintainer>
+</pkgmetadata>