diff --git a/gtatool-2.1.0-netpbm.patch b/gtatool-2.1.0-netpbm.patch new file mode 100644 index 0000000..58e667c --- /dev/null +++ b/gtatool-2.1.0-netpbm.patch @@ -0,0 +1,52 @@ +From 7963c22de093ac40e62a44cacb13f0b2fed19aa4 Mon Sep 17 00:00:00 2001 +From: Martin Lambers +Date: Wed, 07 Jan 2015 19:48:01 +0000 +Subject: gta from-netpbm, to-netpbm: fix for 64 bit builds + +--- +diff --git a/gtatool/src/conv-netpbm/from-netpbm.cpp b/gtatool/src/conv-netpbm/from-netpbm.cpp +index 53aca1a..d3fd97f 100644 +--- a/gtatool/src/conv-netpbm/from-netpbm.cpp ++++ b/gtatool/src/conv-netpbm/from-netpbm.cpp +@@ -2,7 +2,7 @@ + * This file is part of gtatool, a tool to manipulate Generic Tagged Arrays + * (GTAs). + * +- * Copyright (C) 2010, 2011, 2012, 2013 ++ * Copyright (C) 2010, 2011, 2012, 2013, 2015 + * Martin Lambers + * + * This program is free software; you can redistribute it and/or modify +@@ -98,7 +98,7 @@ extern "C" int gtatool_from_netpbm(int argc, char *argv[]) + tuple *tuplerow; + + pm_init("gta from-netpbm", 0); +-#ifdef PAM_STRUCT_SIZE ++#if 0 + pnm_readpaminit(fi, &inpam, PAM_STRUCT_SIZE(tuple_type)); + #else + pnm_readpaminit(fi, &inpam, sizeof(struct pam)); +diff --git a/gtatool/src/conv-netpbm/to-netpbm.cpp b/gtatool/src/conv-netpbm/to-netpbm.cpp +index 7f68e7e..436d390 100644 +--- a/gtatool/src/conv-netpbm/to-netpbm.cpp ++++ b/gtatool/src/conv-netpbm/to-netpbm.cpp +@@ -2,7 +2,7 @@ + * This file is part of gtatool, a tool to manipulate Generic Tagged Arrays + * (GTAs). + * +- * Copyright (C) 2010, 2011, 2012, 2013 ++ * Copyright (C) 2010, 2011, 2012, 2013, 2015 + * Martin Lambers + * + * This program is free software; you can redistribute it and/or modify +@@ -121,7 +121,7 @@ extern "C" int gtatool_to_netpbm(int argc, char *argv[]) + struct pam outpam; + std::memset(&outpam, 0, sizeof(outpam)); + outpam.size = sizeof(struct pam); +-#ifdef PAM_STRUCT_SIZE ++#if 0 + outpam.len = PAM_STRUCT_SIZE(tuple_type); + #else + outpam.len = outpam.size; +-- +cgit v0.9.0.2 diff --git a/gtatool-2.1.0-pfstools.patch b/gtatool-2.1.0-pfstools.patch new file mode 100644 index 0000000..a1ad946 --- /dev/null +++ b/gtatool-2.1.0-pfstools.patch @@ -0,0 +1,96 @@ +diff --git a/configure.ac b/configure.ac +index 765eff2..8da54b9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5,7 +5,7 @@ dnl + dnl This file is part of gtatool, a tool to manipulate Generic Tagged Arrays + dnl (GTAs). + dnl +-dnl Copyright (C) 2010, 2011, 2012, 2013, 2014 ++dnl Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 + dnl Martin Lambers + dnl + dnl This program is free software; you can redistribute it and/or modify +@@ -487,6 +487,12 @@ if test "$pfs" = "yes"; then + AC_MSG_WARN([$libpfs_PKG_ERRORS]) + AC_MSG_WARN([Disabled the from-pfs and to-pfs commands.])]) + fi ++if test "$pfs" = "yes"; then ++ CPPFLAGS_bak="$CPPFLAGS" ++ CPPFLAGS="$libpfs_CFLAGS $CPPFLAGS" ++ AC_CHECK_HEADERS([pfs/pfs.h]) ++ CPPFLAGS="$CPPFLAGS_bak" ++fi + AC_DEFINE_UNQUOTED([WITH_PFS], [`if test "$pfs" = "yes"; then echo "1"; else echo "0"; fi`], [Use pfs?]) + AM_CONDITIONAL([WITH_PFS], [test "$pfs" = "yes"]) + +diff --git a/src/conv-pfs/from-pfs.cpp b/src/conv-pfs/from-pfs.cpp +index 2d47e58..e002f25 100644 +--- a/src/conv-pfs/from-pfs.cpp ++++ b/src/conv-pfs/from-pfs.cpp +@@ -2,7 +2,7 @@ + * This file is part of gtatool, a tool to manipulate Generic Tagged Arrays + * (GTAs). + * +- * Copyright (C) 2010, 2011, 2012, 2013 ++ * Copyright (C) 2010, 2011, 2012, 2013, 2015 + * Martin Lambers + * + * This program is free software; you can redistribute it and/or modify +@@ -23,8 +23,6 @@ + + #include + +-#include +- + #include + + #include "base/msg.h" +@@ -35,6 +33,12 @@ + + #include "lib.h" + ++#ifdef HAVE_PFS_PFS_H ++# include ++#else ++# include ++#endif ++ + + extern "C" void gtatool_from_pfs_help(void) + { +diff --git a/src/conv-pfs/to-pfs.cpp b/src/conv-pfs/to-pfs.cpp +index f6d5c1a..4a74720 100644 +--- a/src/conv-pfs/to-pfs.cpp ++++ b/src/conv-pfs/to-pfs.cpp +@@ -2,7 +2,7 @@ + * This file is part of gtatool, a tool to manipulate Generic Tagged Arrays + * (GTAs). + * +- * Copyright (C) 2010, 2011, 2012, 2013, 2014 ++ * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 + * Martin Lambers + * + * This program is free software; you can redistribute it and/or modify +@@ -24,8 +24,6 @@ + #include + #include + +-#include +- + #include + + #include "base/msg.h" +@@ -37,6 +35,12 @@ + + #include "lib.h" + ++#ifdef HAVE_PFS_PFS_H ++# include ++#else ++# include ++#endif ++ + + extern "C" void gtatool_to_pfs_help(void) + { diff --git a/gtatool.spec b/gtatool.spec index d96c9f7..b6b173d 100644 --- a/gtatool.spec +++ b/gtatool.spec @@ -2,13 +2,20 @@ Name: gtatool Version: 2.1.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Commandline tool to manipulate GTAs Group: Applications/Engineering License: GPLv3+ URL: http://gta.nongnu.org/gtatool.html Source0: http://download.savannah.nongnu.org/releases/gta/%{name}-%{version}.tar.xz +# http://git.savannah.gnu.org/cgit/gta.git/patch?id=7963c22de093ac40e62a44cacb13f0b2fed19aa4 +Patch0: %{name}-2.1.0-netpbm.patch + +# http://git.savannah.gnu.org/cgit/gta.git/patch/?id=ff0db13784787e65e9936673f3333116cd042ee6 +# Slightly modified to actually build with the help of the author +Patch1: %{name}-2.1.0-pfstools.patch + BuildRequires: gettext-devel BuildRequires: bash-completion BuildRequires: dcmtk-devel @@ -28,6 +35,7 @@ BuildRequires: pcl-devel BuildRequires: pkgconfig BuildRequires: pfstools-devel BuildRequires: qt4-devel +BuildRequires: libtool automake autoconf # Optional new BRs, when available in Fedora: libgls, libequalizer, libteem # http://teem.sourceforge.net/ @@ -142,6 +150,8 @@ sound data via libsndfile. %prep %setup -q +%patch0 -p2 -b .~netpbm +%patch1 -p1 -b .~pfstools %build # Stupid way to avoid overwriting the original LDFLAGS. @@ -150,6 +160,8 @@ export CFLAGS="%{optflags} -I%{_includedir}/netpbm" export CXXFLAGS="%{optflags} -I%{_includedir}/netpbm" export BASHCOMPLETIONDIR="%{completion_path}" +autoreconf -fi + # 1994 ply files are bundled; rply could take over, but the API is different # pvm uses files from vvv; No package is currently available in Fedora #TODO: Consider to switch to GraphicsMagick, as that's the default or even supply both @@ -260,6 +272,10 @@ fi %changelog +* Fri Jul 24 2015 Volker Froehlich - 2.1.0-8 +- Modified to build with pfstools 2.0 +- Apply an upstream patch that applies to 64 bit builds + * Wed Jun 17 2015 Fedora Release Engineering - 2.1.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild